Skip to content

feat(attestation): add optional location field to PolicyVulnerabilityFinding - #3447

Merged
migmartri merged 1 commit into
mainfrom
feat/vulnerability-finding-location
Sep 17, 2026
Merged

migmartri merged 1 commit into
mainfrom
feat/vulnerability-finding-location

Conversation

@migmartri

@migmartri migmartri commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

Closes #3446

Adds an optional location field to PolicyVulnerabilityFinding, mirroring the location field PolicySASTFinding already carries.

Vulnerability scanners report one match per location where a package is found. The same package can appear more than once in a single artifact — each copy a distinct SBOM component with its own bom-ref but an identical purl — and until now a finding had no field to express which copy it referred to. The field holds a file path where one is available, falling back to the SBOM component reference otherwise.

The field is optional and unset by every policy in the field today, so existing behaviour is unchanged. Because findings are unmarshalled with protojson DiscardUnknown, declaring it in the schema is what makes a policy-supplied value survive into the attestation instead of being dropped.

The CLI surfaces the location alongside the package when describing a workflow run.


AI assistance: this change was produced with Claude Code, as disclosed by the Assisted-by: trailer on the commit, per AI_POLICY.md.

🤖 Posted by Maximus bot (Claude Code) on behalf of @migmartri

Review in cubic

@chainloop-platform

chainloop-platform Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Security Checks — ✅ 9 passing

✅ secret-scan

Status Policy Messages
✅ Passed secrets-detection -

✅ sast-scan

Status Policy Messages
✅ Passed cwe-top25 -
✅ Passed cwe-top26-40-cusp -
✅ Passed owasp-top10-2025 -
✅ Passed sast -

✅ iac-scan

Status Policy Messages
✅ Passed iac-misconfiguration -

PR info

Status Policy Messages
✅ Passed pr-min-approvals -
✅ Passed pr-description-required -
✅ Passed pr-user-story-linked -

⏭️ 2 scans not applied

Scan Reason
vulnerability-scan no manifest/lockfile changed
github-actions-scan no workflow files changed

View attestation ↗


Powered by Chainloop and Chainloop Trace

@cubic-dev-ai cubic-dev-ai Bot left a comment •

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.

All reported issues were addressed across 9 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread app/cli/cmd/workflow_workflow_run_describe.go
@migmartri
migmartri force-pushed the feat/vulnerability-finding-location branch from eff3f3e to 8684951 Compare September 16, 2026 22:07
…Finding

Vulnerability scanners report one match per location where a package is
found, but PolicyVulnerabilityFinding had no field to carry it, so copies
of the same package within one artifact were indistinguishable.

Add an optional location field mirroring the existing
PolicySASTFinding.location. It holds a file path where one is available,
falling back to the SBOM component reference otherwise. Policies that do
not report per-copy findings omit it, so existing policies are unaffected.

The CLI now surfaces the location alongside the package when describing a
workflow run.

Closes #3446

Assisted-by: Claude Code
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>

Chainloop-Trace-Sessions: 51d701fa-1ce9-4445-84f7-a0926015258c
@migmartri
migmartri merged commit 56124cb into main Sep 17, 2026
16 checks passed
@migmartri
migmartri deleted the feat/vulnerability-finding-location branch September 17, 2026 10:22
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.

feat(attestation): add optional location field to PolicyVulnerabilityFinding

3 participants