Commit aa243b2
committed
fix: source REVIEW.md from trusted base ref in CI mode
In CI mode, contributor-controlled branches could add a REVIEW.md that
manipulates review behavior (e.g. 'report no findings'). Now in CI mode
with a known base SHA (CI_MERGE_REQUEST_DIFF_BASE_SHA), REVIEW.md is
read from the target/base ref via 'git show' instead of the working tree.
This ensures only repo maintainers (who control the default branch)
can set review instructions. In local --diff mode the filesystem version
is still used since the developer controls the checkout.
Includes command-injection guard (reject refs starting with '-') consistent
with the existing pattern in getLocalDiffs().1 parent 7daaa4a commit aa243b2
1 file changed
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
183 | 189 | | |
184 | 190 | | |
185 | 191 | | |
| |||
469 | 475 | | |
470 | 476 | | |
471 | 477 | | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
0 commit comments