Commit Graph
12 Commits
Author SHA1 Message Date
Matt Moore c6dc504a60 Fix: Incorporate platform architecture (#1029)
🐛 Right now `--sbom-dir` with a multi-arch build just writes the same file over and over.

This loosely follows the lead of apko which uses the form `sbom-{arch}.{form}.json`, but we are going with: `{app}-{platform}.{form}.json`.

It is notable that `{platform}` is a superset of `{arch}` and we sanitize the string encoding replacing the `/` and `:` characters with `-`.

/kind bug
2023-05-01 10:32:09 -04:00
Matt Moore 72e2752b00 Feature: Add ECR presubmit testing. (#934)
🎁 This leverages OIDC federation to enable presubmit testing against ECR.

/kind feature
2023-01-16 09:47:25 -08:00
Matt Moore 3d362cf670 Add a delimiter before digest in the SPDX namespace (#765) 2022-07-15 11:09:28 -07:00
Matt Moore 8f228585b9 Have --image-refs list all images for multi-arch builds. (#761)
* Have `--image-refs` list all images for multi-arch builds.

This change alters the behavior of `--image-refs` to also include all of the image references when a multi-architecture build is being performed.

* Add test coverage for the new path

* Add ref count check to unit test
2022-07-12 09:06:42 -07:00
Matt Moore bd8cfaa245 Decorate per-architecture images with base image annotations. (#759)
* Decorate per-architecture images with base image annotations.

Currently we only decorate the topmost index/image with base image data for the base index/image (for everything except docker manifest lists).

This change makes multi-arch builds decorate the manifest of the per-architecture images with the reference of the base index, and the digest of the specific base image used for that particular architecture's image.

This results in the per-architecture SBOMs starting to encode `DESCENDENT_OF` links as well.

* Add a detailed comment outlining why the per-arch digest is preferable even for cases where we want to watch the base index for updates.
2022-07-11 12:18:25 -07:00
Matt Moore cdd1dec2ff Several SPDX SBOM adjustments. (#760)
1. Change index -> image relationship type from `CONTAINS` to `VARIANT_OF` (I think this was an oversight in my original PR),
2. Always include `mediaType` in pURLs for index/images we produce (I'm not adding this to the base image, since it's not readily available, but we can add it there if we want to find a way to plumb it through),
3. Include more platform discriminator information to the pURLs we use in index -> image.
2022-07-11 11:49:14 -07:00
Matt Moore 9139f454d7 Populate base image information via DESCENDENT_OF (#744) 2022-07-05 15:19:03 -07:00
Matt Moore 2299765c54 Start emitting multi-arch SBOMs for SPDX with ko (#743)
This plumbs through support for building multi-arch SPDX SBOMs largely based on Puerco's outline, but with a few
adaptations.  I added a few minor refactorings to try to enable consistency across the Image/Index SBOMs.

Related: https://github.com/google/ko/issues/655
2022-07-05 12:47:15 -07:00
Matt Moore 787d625019 Unconditionally set the base image annotation. (#745)
* Unconditionally set the base image annotation.

Previously we only set this annotation when our base image was a tag, but this means when folks actually follow the best practice of use digest base images they get strictly worse resulting images!

It sounds like maybe the original motivation for this condition was that it was supposed to contain the mutable reference (tag), but I don't see anything detailing such a restriction (just an example), so there should be nothing
precluding this from the spec.

* Fold assignment into map initialization.
2022-07-05 11:17:28 -07:00
Matt Moore 31d1c612ba Fix off-by-one error (#742) 2022-07-01 10:09:28 -07:00
Matt Moore 12e5001192 Convert our SPDX SBOMs to spdx+json. (#740) 2022-07-01 07:13:30 -07:00
Matt Moore 31be2cb778 Take advantage of Chainguard maintained versions of various actions. (#609)
* Take advantage of Chainguard maintained versions of various actions.

* Bump cosign version
2022-02-23 07:23:48 -05:00