Repository navigation
feat(ai-security-context): add optional attempts to unresolved commits - #3888
Conversation
Unresolved holes can now record how many times triage tried and failed to classify the commit. The field is optional, so the schema stays at security-context-0.1 and existing contexts remain valid. Refs: https://linear.app/chainloop/issue/PFM-8486 Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: 46352acc-1770-40e5-a6f4-5c4966e2ddb9
PR validation — ✅ 3 passing
AI Session Checks — 🟢 97% · ✅ 0 failing
|
| Status | Attribution | File | Lines |
|---|---|---|---|
| modified | ai | internal/schemavalidators/schemavalidators_test.go |
+32 / -0 |
| modified | ai | internal/schemavalidators/internal_schemas/aisecuritycontext/ai-security-context-0.1.schema.json |
+5 / -0 |
Policies (4)
| Status | Policy | Material | Messages |
|---|---|---|---|
| ✅ Passed | ai-config-ai-agents-allowed |
ai-coding-session-46352a |
- |
| ✅ Passed | ai-config-no-dangerous-commands |
ai-coding-session-46352a |
- |
| ✅ Passed | ai-config-no-secrets |
ai-coding-session-46352a |
- |
| ✅ Passed | ai-config-mcp-servers-allowed |
ai-coding-session-46352a |
- |
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
attemptsfield (non-negative integer) to theunresolveddefinition of the AI security context schema. It records how many times triage tried and failed to classify a commit: the agentic large-diff triage for an oversize commit, or the one-shot triage for any other commit. When the count reaches the cap, the hole stops retrying andretryablebecomes false.Strata already writes this field on unresolved holes. Because
unresolvedhasadditionalProperties: false,chainloop attestation addrejects such contexts with "additionalProperties 'attempts' not allowed". The field is optional, so the schema stays atsecurity-context-0.1and existing contexts remain valid. It mirrors the existingattemptsfield onsurvivor.Refs: PFM-8486
AI disclosure: this change was produced with assistance from Claude Code.
🤖 Generated with Claude Code