Summary
The emit-sarif skill / AI-generated-findings profile enforces AI1012 at emit-results receipt: result.ruleId MUST be CWE-<n>/<sub-id> (or the flat NOVEL-<sub-id>); a bare CWE-<n> is rejected. But emit-finalize then rewrites result.ruleId from CWE-<n>/<sub-id> back to bare CWE-<n> (and points ruleIndex at the bare descriptor), relocating the sub-id nowhere — no result.rule.id, no slugged reportingDescriptor, no property.
The producer is forced to author a sub-classifier at the door and it is silently confiscated at the exit. get-skill emit-sarif Step 5 lists finalize's actions (replay, snippets, CWE descriptor enrichment, permalink rebase, embed, validate) but never mentions this strip, and never tells producers that a sub-classifier they want to keep must be parked in a property bag.
Evidence (Sarif.Multitool 5.2.0)
emit-results with a bare id:
`
{ "appended": 0, "rejected": [ { "index": 0, "errorCode": "AI1012",
"message": "error AI1012: ... Every AI-emitted result.ruleId MUST take one of two shapes:
- Taxonomy sub-id CWE-/ ...
- NOVEL escape hatch NOVEL- ..." } ] }
emit-resultswithCWE-306/anon-endpoint->{ "appended": 1, "rejected": [] }`.
After emit-finalize (real two-run Argus log), runs[1].results[0]:
ruleId = "CWE-306" (sub-id gone), ruleIndex -> bare CWE-306 descriptor
rule = null; no tool-driver descriptor whose id contains /
- the only durable carrier of the sub-classification is the producer's own
argus/antipatternId property.
Ask
- Document in
emit-sarif Step 5 (and docs/ai/generating-sarif.md) that emit-finalize canonicalizes result.ruleId to the base CWE and does not retain the AI1012 sub-id on the result.
- Add explicit guidance: if you need the sub-classifier to survive finalize, store it in a tool-namespaced property (e.g.
myscanner/subId); result.ruleId is not a durable place for it.
References
Summary
The
emit-sarifskill / AI-generated-findings profile enforces AI1012 atemit-resultsreceipt:result.ruleIdMUST beCWE-<n>/<sub-id>(or the flatNOVEL-<sub-id>); a bareCWE-<n>is rejected. Butemit-finalizethen rewritesresult.ruleIdfromCWE-<n>/<sub-id>back to bareCWE-<n>(and pointsruleIndexat the bare descriptor), relocating the sub-id nowhere — noresult.rule.id, no sluggedreportingDescriptor, no property.The producer is forced to author a sub-classifier at the door and it is silently confiscated at the exit.
get-skill emit-sarifStep 5 lists finalize's actions (replay, snippets, CWE descriptor enrichment, permalink rebase, embed, validate) but never mentions this strip, and never tells producers that a sub-classifier they want to keep must be parked in a property bag.Evidence (Sarif.Multitool 5.2.0)
emit-resultswith a bare id:`
{ "appended": 0, "rejected": [ { "index": 0, "errorCode": "AI1012",
"message": "error AI1012: ... Every AI-emitted result.ruleId MUST take one of two shapes:
emit-resultswithCWE-306/anon-endpoint->{ "appended": 1, "rejected": [] }`.After
emit-finalize(real two-run Argus log),runs[1].results[0]:ruleId="CWE-306"(sub-id gone),ruleIndex-> bareCWE-306descriptorrule=null; no tool-driver descriptor whoseidcontains/argus/antipatternIdproperty.Ask
emit-sarifStep 5 (anddocs/ai/generating-sarif.md) thatemit-finalizecanonicalizesresult.ruleIdto the base CWE and does not retain the AI1012 sub-id on the result.myscanner/subId);result.ruleIdis not a durable place for it.References
emit-sarif@ 8c1dc61