Repository navigation
feat(ai-security-context): add optional trace_checked mark to fix and introducing commits - #3886
Conversation
… introducing commits Add an optional boolean trace_checked to the fingerprint and to the introducing-commit record of the AI security context schema, and to the matching Go wire types. The producer sets it when the AI coding session lookup of a commit gave a definite result, so that a later scan can skip that commit instead of looking it up again. Refs: PFM-8487 Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: deb88eab-8423-4439-97a4-9a9982edb21e
PR validation — ✅ 3 passing
AI Session Checks — 🟢 91% · ✅ 0 failing
|
| Status | Attribution | File | Lines |
|---|---|---|---|
| modified | ai | internal/schemavalidators/schemavalidators_test.go |
+88 / -0 |
| modified | ai | internal/schemavalidators/internal_schemas/aisecuritycontext/ai-security-context-0.1.schema.json |
+12 / -0 |
| modified | ai | pkg/attestation/crafter/materials/aisecuritycontext/aisecuritycontext.go |
+10 / -0 |
| modified | ai | internal/schemavalidators/testdata/ai_security_context_valid.json |
+4 / -2 |
| modified | ai | pkg/attestation/crafter/materials/testdata/ai-security-context.json |
+4 / -2 |
Policies (4)
| Status | Policy | Material | Messages |
|---|---|---|---|
| ✅ Passed | ai-config-ai-agents-allowed |
ai-coding-session-deb88e |
- |
| ✅ Passed | ai-config-no-dangerous-commands |
ai-coding-session-deb88e |
- |
| ✅ Passed | ai-config-no-secrets |
ai-coding-session-deb88e |
- |
| ✅ Passed | ai-config-mcp-servers-allowed |
ai-coding-session-deb88e |
- |
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 |
Powered by Chainloop and Chainloop Trace
Adds an optional boolean
trace_checkedto the fingerprint (fix commit) and to the introducing-commit record (introduced_by[]) of the AI security context schema, and to the matching Go wire types.The producer sets the mark when the AI coding session lookup of a commit gave a definite result (sessions found or no session found). A later scan can then skip that commit instead of looking it up again on every run. A denied or failed lookup leaves the mark unset, so the commit is tried again. Absent and
falsemean the same thing, so existing security contexts stay valid.This is the upstream part of PFM-8487. The schema sets
additionalProperties: falseon both records, so the CLI must accept the field before the producer can emit it.This PR was written with AI assistance (Claude Code).
🤖 Generated with Claude Code