Commit 6ff3070
committed
fix: validate artifact contents before use to prevent artifact poisoning
CodeQL flagged the download-artifact + require() pattern as artifact
poisoning: data written by an external user in the capture workflow
flows into a write-token context without validation. Validate reviewer
login against the GitHub login charset (alphanumeric and hyphens) and
confirm pr_number is a positive integer before passing either value to
the removal function. Fails the step with a clear message if contents
are unexpected.
Signed-off-by: Mounil Kanakhara <mounilkankhara@gmail.com>1 parent a3a7489 commit 6ff3070
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
94 | 102 | | |
95 | 103 | | |
0 commit comments