Repository navigation
feat: add repo_commits_total to the AI security-context schema - #3750
Merged
matiasinsaurralde merged 1 commit intoOct 29, 2026
Merged
Conversation
Add an optional repo_commits_total integer to the scan_stats definition of the security-context Chainloop-Trace-Sessions: 8e8e03db-d3cd-4b70-b3f2-1401b06dd4cf Signed-off-by: Matías Insaurralde <matias@chainloop.dev>
Contributor
PR validation — ✅ 3 passing
AI Session Checks — 🟢 94% · ✅ 0 failing
|
| Status | Attribution | File | Lines |
|---|---|---|---|
| modified | ai | pkg/attestation/crafter/materials/aisecuritycontext/aisecuritycontext.go |
+6 / -0 |
| modified | ai | internal/schemavalidators/internal_schemas/aisecuritycontext/ai-security-context-0.1.schema.json |
+5 / -0 |
| modified | ai | pkg/attestation/crafter/materials/testdata/ai-security-context.json |
+2 / -1 |
Policies (4)
| Status | Policy | Material | Messages |
|---|---|---|---|
| ✅ Passed | ai-config-ai-agents-allowed |
ai-coding-session-8e8e03 |
- |
| ✅ Passed | ai-config-no-dangerous-commands |
ai-coding-session-8e8e03 |
- |
| ✅ Passed | ai-config-no-secrets |
ai-coding-session-8e8e03 |
- |
| ✅ Passed | ai-config-mcp-servers-allowed |
ai-coding-session-8e8e03 |
- |
Security Checks — ✅ 6 passing
✅ 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 |
Security context
✅ Nothing this change touches has a recorded security-fix history.
View in Chainloop ↗ · How this works ↗
Powered by Chainloop and Chainloop Trace
migmartri
approved these changes
Oct 29, 2026
matiasinsaurralde
deleted the
matias/ai-security-context-repo-commits-total
branch
October 29, 2026 12:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs PFM-8068
Summary
Adds an optional
repo_commits_totalinteger to thescan_statsdefinition of the AI security-context0.1JSON Schema. It records the number of commits reachable from the scanned revision, the denominator a consumer needs to render scan progress as "N of M commits" or a percentage, which it cannot compute without git access to the repository.The field is additive and optional:
additionalProperties: falseand thescan_statsrequired set are unchanged.0.1;$idis unchanged.The Go decoder
ScanStatsstruct mirrors the new field. This change must be released before any producer starts emitting the field.