Commit 76bc8a5
authored
Add a remediation for the workflow_no_pull_request_target rule (#202)
This PR depends on having mindersec/minder#4830
merged first as it takes the remediation function added there into
effect.
The remediation works as follows:
- if there are any instances of pull_request target objects those are
removed
- else if there are any instances of pull_request strings in an array
those are removed
- if the resulting array of array of objects would have length 0,
`workflow_dispatch` is added instead
Fixes: #2011 parent c5b67e6 commit 76bc8a5
1 file changed
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
60 | 92 | | |
61 | 93 | | |
62 | 94 | | |
| |||
0 commit comments