Menu

1 / 2

Your CI gate can be turned off by the pull request it is judging

DEV Community: cicd·Maya·11 days ago
#mxEZdVCl
#devtocicd#devto#dev#gate#base
Long article (913 words) — no AI summary yet.
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.