Skip to content

Commit a1da112

Browse files
authored
Update security-scan.yml with creation of report PR only on push event
1 parent b79f596 commit a1da112

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/security-scan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
tmp/bandit_output.json >> tmp/pr-body.md
7272
7373
- name: Create Pull Request (if vulnerabilities found)
74-
if: ${{ steps.scan.outputs.bandit_high_found == 'true' }}
74+
if: ${{ github.event_name == 'push' && steps.scan.outputs.bandit_high_found == 'true' }}
7575
uses: peter-evans/create-pull-request@v5
7676
with:
7777
commit-message: 'chore: issues detected by Bandit (HIGH)'
@@ -157,7 +157,7 @@ jobs:
157157
' tmp/trivy.json >> tmp/pr-body.md
158158
159159
- name: Create Pull Request (if vulnerabilities found)
160-
if: ${{ steps.scan.outputs.trivy_issues_found == 'true' }}
160+
if: ${{ github.event_name == 'push' && steps.scan.outputs.trivy_issues_found == 'true' }}
161161
uses: peter-evans/create-pull-request@v5
162162
with:
163163
commit-message: 'chore: vulnerabilities detected by Trivy (HIGH/CRITICAL)'

0 commit comments

Comments
 (0)