File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
.github/actions/semgrep-action Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,18 @@ runs:
3434 - name : " Run semgrep"
3535 run : |
3636 results_file="/tmp/semgrep-results.${{ inputs.results_format }}"
37+ baseline_commit_arg=""
38+ if [ "${{ inputs.show_results_in_pr }}" = "true" ]; then
39+ baseline_commit_arg="--baseline-commit=${{ github.event.pull_request.base.sha }}"
40+ fi
3741 semgrep scan --config $HOME/semgrep-rules --config $HOME/semgrep-rules-tob \
3842 --metrics=off --experimental \
3943 --exclude-rule=third-party-action-not-pinned-to-commit-sha \
4044 --exclude-rule=jsx-not-internationalized \
4145 --severity=WARNING \
4246 --severity=ERROR \
4347 --exclude="*.html" --exclude="*.js" \
44- --baseline-commit=${{ github.event.pull_request.base.sha }} \
48+ $baseline_commit_arg \
4549 --${{ inputs.results_format }} > "$results_file" || true
4650 shell : bash
4751 - name : " Set results file path output"
You can’t perform that action at this time.
0 commit comments