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

feat(sbom): add image labels into SPDX and CycloneDX reports #7257

Merged

Conversation

DmitriyLewen
Copy link
Contributor

@DmitriyLewen DmitriyLewen commented Jul 30, 2024

Description

Add image labels into:

examples:

    "component": {
      "bom-ref": "934bb60f-fb6b-4cb5-8b4b-30ca2c2a1b86",
      "type": "container",
      "name": "test",
      "properties": [
        {
          "name": "aquasecurity:trivy:DiffID",
          "value": "sha256:9110f7b5208f035f4d4f99b5169338169e1df9bb2519d1b047f50f54430bacc2"
        },
        {
          "name": "aquasecurity:trivy:ImageID",
          "value": "sha256:6e29a990365e345fad58f36b8a317ebf4197450175619961bb5675395eec48af"
        },
        {
          "name": "aquasecurity:trivy:Labels:vendor",
          "value": "aquasecurity"
        },
        {
          "name": "aquasecurity:trivy:RepoTag",
          "value": "test"
        },
        {
          "name": "aquasecurity:trivy:SchemaVersion",
          "value": "2"
        }
      ]
    }
    {
      "name": "test",
      "SPDXID": "SPDXRef-ContainerImage-ad5c95ebcdfb33df",
      "downloadLocation": "NONE",
      "filesAnalyzed": false,
      "attributionTexts": [
        "DiffID: sha256:9110f7b5208f035f4d4f99b5169338169e1df9bb2519d1b047f50f54430bacc2",
        "ImageID: sha256:6e29a990365e345fad58f36b8a317ebf4197450175619961bb5675395eec48af",
        "Labels:vendor: aquasecurity",
        "RepoTag: test",
        "SchemaVersion: 2"
      ],
      "primaryPackagePurpose": "CONTAINER"
    },

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 Jul 30, 2024
@DmitriyLewen DmitriyLewen marked this pull request as ready for review July 30, 2024 06:15
Copy link
Collaborator

@knqyf263 knqyf263 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I left a small comment.

pkg/sbom/io/encode.go Outdated Show resolved Hide resolved
pkg/sbom/core/bom.go Outdated Show resolved Hide resolved
DmitriyLewen and others added 2 commits July 30, 2024 12:39
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
@knqyf263 knqyf263 enabled auto-merge July 30, 2024 06:51
@knqyf263 knqyf263 added this pull request to the merge queue Jul 30, 2024
Merged via the queue into aquasecurity:main with commit 4a2f492 Jul 30, 2024
12 checks passed
@DmitriyLewen DmitriyLewen deleted the feat-sbom/image-labels-cyclonedx branch July 30, 2024 08:16
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.

feat(sbom): add image labels into CycloneDX report
2 participants