-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.12 KB
/
osv-scanner.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: OSV-Scanner Workflow
on:
push:
branches:
- main
pull_request:
branches:
- main
pull_request_target:
branches:
- main
schedule:
- cron: '38 6 * * 6' # Runs every Saturday at 06:38 UTC
permissions:
security-events: write
contents: read
jobs:
scan:
name: OSV Vulnerability Scan
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set Up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Cache Python Dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install OSV Scanner
run: |
python -m pip install --upgrade pip
pip install osv-scanner
- name: Run OSV Scanner
run: |
echo "Running OSV Scanner..."
osv-scanner --all
- name: Clean Up Pip Cache
run: python -m pip cache purge
if: always()