Skip to content

feat(container): surface provenance attestations behind feature flag [PRIM-100] - #7047

Open
bdemeo12 wants to merge 4 commits into
mainfrom
PRIM-100/cli-provenance-attestations-ff
Open

feat(container): surface provenance attestations behind feature flag [PRIM-100]#7047
bdemeo12 wants to merge 4 commits into
mainfrom
PRIM-100/cli-provenance-attestations-ff

Conversation

@bdemeo12

@bdemeo12 bdemeo12 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

What

Surfaces container image provenance attestations through the CLI, gated behind a feature flag.

  • Bumps snyk-docker-plugin ^9.16.0^9.18.0, which adds provenance attestation extraction (emits the provenanceMetadata fact).
  • Gates that fact behind the surfaceProvenanceAttestations feature flag in filterDockerFacts, mirroring the existing allowNewContainerFacts pattern. When the flag is off, provenanceMetadata is filtered out before facts are sent downstream; when on, it is forwarded to Registry for upsert.

The provenance flag is independent of allowNewContainerFacts so it can be rolled out separately.

Changes

  • package.json / package-lock.json — bump snyk-docker-plugin to ^9.18.0.
  • src/cli/commands/constants.ts — add SURFACE_PROVENANCE_ATTESTATIONS_FEATURE_FLAG = 'surfaceProvenanceAttestations'.
  • src/lib/ecosystems/common.ts — in filterDockerFacts, filter provenanceMetadata unless the flag is enabled.

Feature flag

surfaceProvenanceAttestations — defined in registry (snyk/registry#44819).

Downstream

This is the CLI half of the end-to-end provenance work. Registry relays the fact and assets-api persists it.

Notes

n/a

@snyk-io

snyk-io Bot commented Jul 28, 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 Jul 28, 2026

Copy link
Copy Markdown
Contributor
Warnings
⚠️

You've modified files in src/ directory, but haven't updated anything in test folder. Is there something that could be tested?

⚠️ There are multiple commits on your branch, please squash them locally before merging!
⚠️

"[feat(container): surface provenance attestations behind feature flag PRIM-100](#7047)" is too long. Keep the first line of your commit message under 72 characters.

⚠️

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

Generated by 🚫 dangerJS against 805f667

@bdemeo12
bdemeo12 marked this pull request as ready for review July 28, 2026 14:50
@bdemeo12
bdemeo12 requested a review from a team as a code owner July 28, 2026 14:50
@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

bdemeo12 and others added 4 commits August 3, 2026 15:29
…[PRIM-100]

Bump snyk-docker-plugin to ^9.18.0 (adds provenance attestation extraction)
and gate the provenanceMetadata fact behind the surfaceProvenanceAttestations
feature flag in filterDockerFacts, mirroring the allowNewContainerFacts pattern.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Picks up snyk-docker-plugin 9.19.0, which falls back to BuildKit's
vcs.source for buildConfigSourceUri on local builds
(snyk/snyk-docker-plugin#889) so locally-built images still surface their
source repository in the provenanceMetadata fact. Registry maps that field
to repository_uri when relaying the asset upsert.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@bdemeo12
bdemeo12 force-pushed the PRIM-100/cli-provenance-attestations-ff branch from ccb7cb7 to 805f667 Compare August 3, 2026 19:29
@snyk-pr-review-bot

Copy link
Copy Markdown

PR Reviewer Guide 🔍

🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Version Mismatch 🟡 [minor]

The PR description states that snyk-docker-plugin is being bumped to ^9.18.0, but the actual changes in package.json and package-lock.json bump it to ^9.20.0. While likely intentional to include more recent fixes, it contradicts the stated scope of the PR.

"snyk-docker-plugin": "^9.20.0",
📚 Repository Context Analyzed

This review considered 7 relevant code sections from 4 files (average relevance: 0.56)

🤖 Repository instructions applied (from AGENTS.md)

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.

2 participants