mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 22:56:55 +01:00
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:
parent
4cd53eac64
commit
7726d5d8d8
3 changed files with 153 additions and 5 deletions
|
|
@ -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": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue