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

fix(sbom): use Annotation instead of AttributionTexts for SPDX formats #7811

Merged
merged 5 commits into from
Oct 30, 2024

Conversation

DmitriyLewen
Copy link
Contributor

@DmitriyLewen DmitriyLewen commented Oct 29, 2024

Description

use Annotation instead of AttributionTexts for package properties.

examples:

  • Packages:
    before:

     "attributionTexts": [
        "PkgType: conda-pkg"
      ],
    

    after:

    "annotations": [
      {
         "annotator": "Tool: trivy-dev",
         "annotationDate": "2021-08-25T12:20:30Z",
         "annotationType": "OTHER",
         "comment": "PkgType: conda-pkg"
      }
    ]
    
  • ContainerImage:
    Before:

      "attributionTexts": [
      	"SchemaVersion: 2",
      	"ImageID: sha256:49193a2310dbad4c02382da87ac624a80a92387a4f7536235f9ba590e5bcd7b5",
      	"DiffID: sha256:dd565ff850e7003356e2b252758f9bdc1ff2803f61e995e24c7844f6297f8fc3",
      	"RepoTag: maven-test-project:latest",
      ],
    

    After:

      "annotations": [
      	{
      		"annotator": "Tool: trivy-dev",
      		"annotationDate": "2024-10-29T06:50:38Z",
      		"annotationType": "OTHER",
      		"comment": "SchemaVersion: 2"
      	},
      	{
      		"annotator": "Tool: trivy-dev",
      		"annotationDate": "2024-10-29T06:50:38Z",
      		"annotationType": "OTHER",
      		"comment": "ImageID: sha256:49193a2310dbad4c02382da87ac624a80a92387a4f7536235f9ba590e5bcd7b5"
      	},
      	{
      		"annotator": "Tool: trivy-dev",
      		"annotationDate": "2024-10-29T06:50:38Z",
      		"annotationType": "OTHER",
      		"comment": "DiffID: sha256:dd565ff850e7003356e2b252758f9bdc1ff2803f61e995e24c7844f6297f8fc3"
      	},
      	{
      		"annotator": "Tool: trivy-dev",
      		"annotationDate": "2024-10-29T06:50:38Z",
      		"annotationType": "OTHER",
      		"comment": "RepoTag: maven-test-project:latest"
      	}
      ],
    

Related issues

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@DmitriyLewen DmitriyLewen self-assigned this Oct 29, 2024
@knqyf263
Copy link
Collaborator

@goneall Could you take a quick look?

@DmitriyLewen We probably need to add the output before and after this change so @goneall can easily review it.

@DmitriyLewen
Copy link
Contributor Author

@knqyf263 Tests show changes, but i added examples for Package and ContainerImage in PR description.

@goneall
Copy link

goneall commented Oct 29, 2024

@knqyf263 @DmitriyLewen - Looks good - thanks!

@knqyf263 knqyf263 added this pull request to the merge queue Oct 30, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 30, 2024
@DmitriyLewen DmitriyLewen added this pull request to the merge queue Oct 30, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Oct 30, 2024
@knqyf263 knqyf263 added this pull request to the merge queue Oct 30, 2024
Merged via the queue into aquasecurity:main with commit f2bb9c6 Oct 30, 2024
13 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.

Incorrect using of AttributionText in SPDX output
3 participants