On v0.187.1 of draugr, a tool that ranks security findings and gates pull requests, the gate on new findings came from one line in a YAML file:
config : gate : failOnNew : P1
Enter fullscreen mode
Exit fullscreen mode
draugr diff reads that line from the descriptor that --saga names. The GitHub Action passes --saga "$INPUT_SAGA" , and that path resolves inside the checkout of the pull request. So the change being judged supplied the rule it was judged by.
That is the whole bug. The rest is the receipt.
The repro
Same two SARIF files in every case. base.sarif : seven results, one P4. head.sarif : the same seven plus one new P1 at web/package-lock.json:12 .
what the head's descriptor says exit
failOnNew: P1 1
the failOnNew line deleted 0
failOnNew: P4 0
--fail-on-new P1 on the command line, descriptor untouched 1
The findings never changed. What changed was which copy of the threshold the tool read.…