Skip to content

Commit 729a9f0

Browse files
authored
ci: periodically run OSV scanner (#390)
Dependabot does not work with `uv`, which means not only that we don't get automatic package updates but also that we don't get alerts on vulnerabilities. With this scheduled pipeline, osv will run once a week checking for possible threats.
1 parent d4380f0 commit 729a9f0

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/security.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,42 @@
1-
# This workflow will run security checks against our project
2-
31
name: Security
42

53
on:
64
push:
75
branches: ["main"]
86
pull_request:
97
branches: ["main"]
8+
schedule:
9+
- cron: "0 0 * * 1" # every Monday at 00:00 UTC
1010

1111
jobs:
1212
osv-scanner:
13-
runs-on: ubuntu-latest
1413
if: "!startsWith(github.event.head_commit.message, 'bump:')"
14+
runs-on: ubuntu-latest
1515
container:
1616
image: ghcr.io/google/osv-scanner:v2.1.0@sha256:9a1ba57d2a1506c9e9d0dfbeaf46346507e829745b70d47d77e12c38e66de8d7
1717
steps:
1818
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1919
- name: Run OSV Scanner
2020
run: |
2121
/osv-scanner --format table -r .
22+
2223
semgrep:
24+
if: github.event_name != 'schedule' && !startsWith(github.event.head_commit.message, 'bump:')
2325
runs-on: ubuntu-latest
24-
if: "!startsWith(github.event.head_commit.message, 'bump:')"
2526
container:
2627
image: returntocorp/semgrep:1.128.1@sha256:144d315f7354c2b2c53021a76165a500f67252c47464be75e951b67050f54a9e
2728
steps:
2829
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2930
- name: Run Semgrep
3031
run: |
3132
semgrep scan --config auto
33+
3234
twyn:
35+
if: github.event_name != 'schedule' && !startsWith(github.event.head_commit.message, 'bump:')
3336
runs-on: ubuntu-latest
34-
if: "!startsWith(github.event.head_commit.message, 'bump:')"
3537
steps:
3638
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
37-
39+
3840
- name: Install uv
3941
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
4042

0 commit comments

Comments
 (0)