Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for multiple categories #317

Merged

Conversation

viveksahu26
Copy link
Collaborator

fixes #301

The PR adds support for multiple categories. For example, user want to see score for 3 categories NTIA-minimum-elements,Semantic,Sharing. See below the command and o/p:

go run main.go score --category NTIA-minimum-elements,Semantic,Sharing   samples/sbomqs-spdx-syft.json  
catScores()
SBOM Quality by Interlynk Score:6.4     components:27   samples/sbomqs-spdx-syft.json
+-----------------------+-------------------------+-----------+--------------------------------+
|       CATEGORY        |         FEATURE         |   SCORE   |              DESC              |
+-----------------------+-------------------------+-----------+--------------------------------+
| NTIA-minimum-elements | comp_with_name          | 10.0/10.0 | 27/27 have names               |
+                       +-------------------------+-----------+--------------------------------+
|                       | comp_with_supplier      | 0.0/10.0  | 0/27 have supplier names       |
+                       +-------------------------+-----------+--------------------------------+
|                       | comp_with_uniq_ids      | 10.0/10.0 | 27/27 have unique ID's         |
+                       +-------------------------+-----------+--------------------------------+
|                       | comp_with_version       | 10.0/10.0 | 27/27 have versions            |
+                       +-------------------------+-----------+--------------------------------+
|                       | sbom_authors            | 10.0/10.0 | doc has 2 authors              |
+                       +-------------------------+-----------+--------------------------------+
|                       | sbom_creation_timestamp | 10.0/10.0 | doc has creation timestamp     |
|                       |                         |           | 2023-05-04T09:33:40Z           |
+                       +-------------------------+-----------+--------------------------------+
|                       | sbom_dependencies       | 10.0/10.0 | doc has 1 relationships        |
+-----------------------+-------------------------+-----------+--------------------------------+
| Semantic              | comp_with_checksums     | 0.0/10.0  | 0/27 have checksums            |
+                       +-------------------------+-----------+--------------------------------+
|                       | comp_with_licenses      | 0.0/10.0  | 0/27 have licenses             |
+                       +-------------------------+-----------+--------------------------------+
|                       | sbom_required_fields    | 10.0/10.0 | Doc Fields:true Pkg            |
|                       |                         |           | Fields:true                    |
+-----------------------+-------------------------+-----------+--------------------------------+
| Sharing               | sbom_sharable           | 0.0/10.0  | doc has a sharable license     |
|                       |                         |           | free 0 :: of 1                 |
+-----------------------+-------------------------+-----------+--------------------------------+

Signed-off-by: Vivek Kumar Sahu <[email protected]>
@riteshnoronha riteshnoronha merged commit 403d97c into interlynk-io:main Sep 2, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: add support for multiple Categories(--category) in sbomqs score Command
2 participants