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

Implement CycloneDX index SBOM generation #274

Merged
merged 1 commit into from
Jul 8, 2022

Conversation

puerco
Copy link
Contributor

@puerco puerco commented Jul 8, 2022

This PR implements the CycloneDX index SBOM generation following the same structure we're using for SPDX.

Sample:

{
  "bomFormat": "CycloneDX",
  "specVersion": "1.4",
  "version": 1,
  "components": [
    {
      "bom-ref": "pkg:oci/apko-test?mediaType=application%2Fvnd.oci.image.index.v1+json",
      "type": "container",
      "name": "apko-test@sha256:1638f8d567670cdc9fdb094ed177933cdff76eaf98d17097da2d8bed418c5fe1",
      "version": "1638f8d567670cdc9fdb094ed177933cdff76eaf98d17097da2d8bed418c5fe1",
      "description": "Multi-arch image index",
      "purl": "pkg:oci/apko-test?mediaType=application%2Fvnd.oci.image.index.v1+json",
      "hashes": [
        {
          "alg": "SHA-256",
          "content": "1638f8d567670cdc9fdb094ed177933cdff76eaf98d17097da2d8bed418c5fe1"
        }
      ],
      "components": [
        {
          "bom-ref": "pkg:oci/apko-test@sha256:58dfecc2f53c99406ea5dd0dd706481569a00d137e582aecd04932ff5bcf085b?mediaType=application%2Fvnd.oci.image.index.v1+json&os=linux",
          "type": "container",
          "name": "sha256:58dfecc2f53c99406ea5dd0dd706481569a00d137e582aecd04932ff5bcf085b",
          "version": "sha256:58dfecc2f53c99406ea5dd0dd706481569a00d137e582aecd04932ff5bcf085b",
          "description": "apko image for linux/amd64",
          "purl": "pkg:oci/apko-test@sha256:58dfecc2f53c99406ea5dd0dd706481569a00d137e582aecd04932ff5bcf085b?mediaType=application%2Fvnd.oci.image.index.v1+json&os=linux",
          "hashes": [
            {
              "alg": "SHA-256",
              "content": "58dfecc2f53c99406ea5dd0dd706481569a00d137e582aecd04932ff5bcf085b"
            }
          ]
        },
        {
          "bom-ref": "pkg:oci/apko-test@sha256:670a8907db4f4fe31a93951f1e0e05ef6084efd801c753c063aac30dab37ec93?mediaType=application%2Fvnd.oci.image.index.v1+json&os=linux",
          "type": "container",
          "name": "sha256:670a8907db4f4fe31a93951f1e0e05ef6084efd801c753c063aac30dab37ec93",
          "version": "sha256:670a8907db4f4fe31a93951f1e0e05ef6084efd801c753c063aac30dab37ec93",
          "description": "apko image for linux/386",
          "purl": "pkg:oci/apko-test@sha256:670a8907db4f4fe31a93951f1e0e05ef6084efd801c753c063aac30dab37ec93?mediaType=application%2Fvnd.oci.image.index.v1+json&os=linux",
          "hashes": [
            {
              "alg": "SHA-256",
              "content": "670a8907db4f4fe31a93951f1e0e05ef6084efd801c753c063aac30dab37ec93"
            }
          ]
        }
      ]
    }
  ]
}

/cc @kaniini @imjasonh @jspeed-meyers @mattmoor

Signed-off-by: Adolfo García Veytia (Puerco) [email protected]

This commit implements the CycloneDX index sbom generation.

Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
@puerco puerco added enhancement New feature or request go Pull requests that update Go code labels Jul 8, 2022
@kaniini kaniini merged commit 94040a3 into chainguard-dev:main Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants