Skip to content

Commit 71c7be8

Browse files
authored
Add security scan workflow (#94)
1 parent 0c8187d commit 71c7be8

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Security Scan
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
branches:
7+
- master
8+
9+
jobs:
10+
security-scan:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Get changed files
18+
id: changed-files
19+
uses: tj-actions/changed-files@v46
20+
with:
21+
files: |
22+
**/requirements.txt
23+
24+
- name: Run Vulnerability Scanner
25+
if: steps.changed-files.outputs.any_changed == 'true'
26+
uses: fylein/vulnerability-scan-action@master
27+
with:
28+
github_token: ${{ secrets.GITHUB_TOKEN }}
29+
is_submodule: true
30+
31+
- name: Skip Vulnerability Scanner
32+
if: steps.changed-files.outputs.any_changed != 'true'
33+
run: echo "No changes to dependency files, skipping vulnerability scan."

0 commit comments

Comments
 (0)