Validate manual SEI CERT findings
validate_findingsValidates manual code-review findings before formatting, accepting or rejecting each by rule ID, quote, file, line, message, profile, and packet hunk bounds.
Instructions
Accept or reject findings written from a build_review_packet review, with reasons. A finding passes only if its rule_id exists (C++ rules are rejected on .c files, MISRA C rules on C++ files), its quote is a passage of 20+ characters found in that rule's text or examples (case, whitespace, curly quotes and markdown are normalised; MISRA/AUTOSAR need a quote only when a licensed rule-texts file is loaded, otherwise accepted findings carry grounding='rule-id-only'), it has a file, a line >= 1 and a message, and the profile does not disable the rule. With packet, the line must also fall inside a hunk whose candidate_rules include the rule. Use on every manual finding before format_findings; check_files and check_diff output needs no validation. Pure computation on the arguments; reads no files.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"findings": "<findings>"
},
"name": "validate_findings"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| packet | No | The build_review_packet result (or just {hunks}) to enforce hunk and candidate-rule bounds. Strongly recommended. | |
| profile | No | Review profile: 'default' (plain SEI CERT), 'ceph' (Ceph severities, suppressions and idioms), 'misra' (MISRA C:2012 + MISRA C++:2023), 'autosar' (AUTOSAR C++14) or an absolute path to a profile .yaml file. | default |
| findings | Yes | Findings to check; an empty list is valid. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| summary | Yes | {accepted, rejected} counts. | |
| accepted | Yes | Grounded findings in the check_files finding shape plus quote and fix; pass to format_findings. | |
| rejected | Yes | {finding, reasons[]} for each rejected finding. |