Skip to content

feat(ai-security-context): record the scan start date and in-range total - #3833

Merged
matiasinsaurralde merged 1 commit into
mainfrom
matias/pfm-8172-security-context-start-date
Nov 20, 2026
Merged

matiasinsaurralde merged 1 commit into
mainfrom
matias/pfm-8172-security-context-start-date

Conversation

@matiasinsaurralde

@matiasinsaurralde matiasinsaurralde commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Allow the ai-security-context (CHAINLOOP_AI_SECURITY_CONTEXT) artifact to carry two optional scan fields:

  • scan_start_date: the oldest commit date the scan mined to (the backfill floor).
  • in_range_commits_total: how many commits are on or after that date — the denominator for coverage within the start date, distinct from repo_commits_total (the whole repository).

Both are optional, so older artifacts and full-history scans still validate. The change adds the schema properties, the crafter struct fields, and validation tests.

This is the OSS part of PFM-8172. The platform producer (strata) emits these fields and the control plane surfaces them in a paired change, once this lands in a chainloop release.

Part of https://linear.app/chainloop/issue/pfm-8172

View guided diff

Allow the security-context artifact to carry the scan-start-date floor the run
mined to and the number of commits on or after it. The floor makes the mined
depth attested, and the in-range total is the denominator for coverage within
the start date, distinct from the whole-repository total — so a consumer can
show both the in-range coverage and how much history the start date excludes.

Both are optional, so older artifacts and full-history scans still validate.

Companion to the platform scan-start-date feature (PFM-8172): the crafter and
schema accept the fields; strata emits them and the control plane surfaces them
in a follow-up once this is released.

Signed-off-by: Matías Insaurralde <matias@chainloop.dev>

Chainloop-Trace-Sessions: e5650227-b675-4bd2-8f75-eecc5f392474
@chainloop-platform

chainloop-platform Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

PR validation — ✅ 3 passing

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

View attestation ↗

AI Session Checks — ⚠️ no AI session found

Missing AI Coding Sessions

This organization requires every PR to be backed by a Chainloop Trace AI coding session, and none was found for this one.

Please make sure the AI coding session evidence has been sent by the Chainloop CLI, or add the skip-ai-session label to this PR to bypass this check.

Learn more about Chainloop Trace.

Security Checks — ✅ 7 passing

✅ AI Security Analysis

Nothing this change touches re-opens a recorded security fix.

View in Chainloop ↗ · How this works ↗

✅ secret-scan

Status Policy Messages
✅ Passed secrets-detection -

✅ sast-scan

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

✅ iac-scan

Status Policy Messages
✅ Passed iac-misconfiguration -
Scans not applied (2)
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 3 files

Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack

View guided diff | Re-trigger cubic

@matiasinsaurralde
matiasinsaurralde marked this pull request as ready for review November 20, 2026 13:04
@matiasinsaurralde
matiasinsaurralde merged commit 058a95b into main Nov 20, 2026
17 of 18 checks passed
@matiasinsaurralde
matiasinsaurralde deleted the matias/pfm-8172-security-context-start-date branch November 20, 2026 13:44
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