Skip to content

feat(container): surface provenance attestations [PRIM-100] - #7098

Merged
bdemeo12 merged 2 commits into
mainfrom
PRIM-100/cli-provenance-attestations-ff-9.19.0
Aug 14, 2026
Merged

feat(container): surface provenance attestations [PRIM-100]#7098
bdemeo12 merged 2 commits into
mainfrom
PRIM-100/cli-provenance-attestations-ff-9.19.0

Conversation

@bdemeo12

@bdemeo12 bdemeo12 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Duplicate of #7047, pinned to snyk-docker-plugin 9.19.0 instead of 9.20.0, rebuilt on current main.

Pull Request Submission Checklist

  • Follows CONTRIBUTING guidelines
  • Commit messages
    are release-note ready, emphasizing
    what was changed, not how.
  • Includes detailed description of changes
  • Contains risk assessment (Low | Medium | High)
  • Highlights breaking API changes (if applicable)
  • Links to automated tests covering new functionality
  • Includes manual testing instructions (if necessary)
  • Updates relevant GitBook documentation (PR link: ___)
  • Includes product update to be announced in the next stable release notes

What does this PR do?

Surfaces container image provenance attestations through the CLI.

  • Bumps snyk-docker-plugin ^9.16.0^9.19.0, which adds provenance attestation extraction (emits the provenanceMetadata fact).

Where should the reviewer start?

  • package.json / package-lock.json — bump snyk-docker-plugin to ^9.19.0.

How should this be manually tested?

Point CLI to SDP 9.19.0

What's the product update that needs to be communicated to CLI users?

Upgrade CLI to collect provenance attestation from container scans. Will be included in Container GA announcement.

@bdemeo12
bdemeo12 requested a review from a team as a code owner August 7, 2026 17:49
@snyk-io

snyk-io Bot commented Aug 7, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor
Warnings
⚠️ There are multiple commits on your branch, please squash them locally before merging!
⚠️

"[feat(container): surface provenance attestations behind feature flag PRIM-100](https://api.github.com/repos/snyk/cli/git/commits/0c444b0112583ea3180027352f66a7922751cf06)" is too long. Keep the first line of your commit message under 72 characters.

Generated by 🚫 dangerJS against 60c2f64

@snyk-pr-review-bot

This comment has been minimized.

@bdemeo12
bdemeo12 enabled auto-merge August 10, 2026 13:38
Comment thread src/lib/ecosystems/common.ts Outdated

// 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';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Questions:

  1. Is the legacy flow still being used that makes this change necessary?
  2. What would be the effort to drop the legacy flow?
  3. I assume the method for feature flag checking is legacy - has it been tested if it is working as expected?

Comment thread package.json Outdated
@snyk-pr-review-bot

This comment has been minimized.

@bdemeo12 bdemeo12 changed the title feat(container): surface provenance attestations behind feature flag [PRIM-100] feat(container): surface provenance attestations [PRIM-100] Aug 13, 2026
@snyk-pr-review-bot

This comment has been minimized.

…[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>
@bdemeo12
bdemeo12 force-pushed the PRIM-100/cli-provenance-attestations-ff-9.19.0 branch from e6545e5 to 0c444b0 Compare August 13, 2026 17:16
@snyk-pr-review-bot

This comment has been minimized.

Provenance attestations should be surfaced unconditionally, so drop the
`surfaceProvenanceAttestations` gating. `shouldFilterFact` is a denylist and
`provenanceMetadata` is not in it, so removing the special case is sufficient
for the fact to always pass through.

Also pins snyk-docker-plugin to exact 9.19.0. `^9.19.0` allows 9.20.x, which
reintroduces the double-JSON-output problem (CLIA-1576); the lockfile pinned
9.19.0 so `npm ci` was safe, but a lockfile regeneration would have floated.
Exact pinning matches snyk-go-plugin / snyk-gradle-plugin / snyk-module.

Reapplies work lost when the branch was force-pushed from a stale local copy.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@snyk-pr-review-bot

Copy link
Copy Markdown

PR Reviewer Guide 🔍

🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected
📚 Repository Context Analyzed

This review considered 5 relevant code sections from 2 files (average relevance: 0.46)

🤖 Repository instructions applied (from AGENTS.md)

@bdemeo12
bdemeo12 merged commit 1930713 into main Aug 14, 2026
12 of 13 checks passed
@bdemeo12
bdemeo12 deleted the PRIM-100/cli-provenance-attestations-ff-9.19.0 branch August 14, 2026 08:30
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.

3 participants