Harden findings-report producer constraints (#218)

Reject fragment-bearing finding IDs and cap uncited confidence and severity in the shared schema. Require final-source verification before emission and cover leaf/root compatibility and fail-closed source bounds.

Co-authored-by: wenjiefan <wenjiefan@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Wenjie Fan 2026-10-05 15:01:04 +02:00 • committed by GitHub
parent 4cd53eac64
commit 7726d5d8d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 153 additions and 5 deletions

View file

@ -122,7 +122,7 @@
"additionalProperties": false,
"required": ["id", "severity", "message", "references", "confidence"],
"properties": {
"id": { "type": "string", "minLength": 1 },
"id": { "type": "string", "minLength": 1, "pattern": "^[^#]+$" },
"severity": { "enum": ["blocker", "major", "minor", "info"] },
"message": { "type": "string", "minLength": 1 },
"location": { "$ref": "#/definitions/location" },
@ -135,6 +135,17 @@
"domain": { "type": "string", "minLength": 1, "pattern": "^[^\\r\\n]+$" },
"suggested-code": { "type": "string", "minLength": 1 },
"suggested-code-omission-reason": { "type": "string", "minLength": 1 }
},
"if": {
"properties": {
"references": { "maxItems": 0 }
}
},
"then": {
"properties": {
"confidence": { "enum": ["medium", "low"] },
"severity": { "enum": ["minor", "info"] }
}
}
},
"suppressed": {