feat(container): surface provenance attestations behind feature flag [PRIM-100] - #7098
feat(container): surface provenance attestations behind feature flag [PRIM-100]#7098bdemeo12 wants to merge 1 commit into
Conversation
…[PRIM-100] Bump snyk-docker-plugin to ^9.19.0 (adds provenance attestation extraction and the vcs.source fallback for buildConfigSourceUri) and gate the provenanceMetadata fact behind the surfaceProvenanceAttestations feature flag in filterDockerFacts, mirroring the allowNewContainerFacts pattern. Pinned to 9.19.0 rather than 9.20.0 deliberately. 9.20.0 adds a best-effort provenance fetch to the image's registry (snyk/snyk-docker-plugin#891). The plugin handles a failed fetch and the scan completes, but the CLI records the failed request as a command error and appends a second JSON object after the result, which breaks JSON.parse in container.spec.ts. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
PR Reviewer Guide 🔍
|
|
|
||
| // Provenance attestations are gated behind their own feature flag so they can be | ||
| // rolled out independently of the broader "new container facts" flag. | ||
| const PROVENANCE_METADATA_FACT_TYPE = 'provenanceMetadata'; |
There was a problem hiding this comment.
Question: This constant seems to be a duplicate to what the snyk-docker-plugin contains, breaking the best practice of single source of truth. wouldn't it be possible to move the filtering into the plugin and hand over the feature flags from the CLI?
There was a problem hiding this comment.
Hi Peter! I can do this, but I am blocked by this ask: https://snyksec.atlassian.net/servicedesk/customer/portal/64/CLIA-1576
which is why I implemented it like this!
Duplicate of #7047, pinned to snyk-docker-plugin 9.19.0 instead of 9.20.0, rebuilt on current
main.Surfaces container image provenance attestations through the CLI, gated behind the
surfaceProvenanceAttestationsfeature flag infilterDockerFacts, mirroring the existingallowNewContainerFactspattern.