Commit 9eafbe9
committed
Annotate the two remaining exec sinks for Semgrep
Semgrep's diff scan re-reports php.lang.security.exec-use on both lines,
because the lines changed — the constructs themselves are pre-existing and are
already among master's open findings. Both are now the mitigated versions, so
they are annotated with the reason rather than left to fail the check:
- isRunning(): the interpolated value is the intval() directly above, guarded
> 0, so only digits can reach the shell.
- start(): $call comes from start_command(), where every caller-supplied part
is escapeshellarg()'d and every unquoted token is a fixed flag name. This is
precisely the sink this change exists to make safe, and the regression tests
pin it with payloads that fail on the pre-fix code.1 parent 8cfd7df commit 9eafbe9
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
| |||
172 | 175 | | |
173 | 176 | | |
174 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
175 | 183 | | |
176 | 184 | | |
177 | 185 | | |
| |||
0 commit comments