Skip to content

Commit f7b350e

Browse files
ttw225Lee-W
authored andcommitted
config: move dependency audit from pre-push hook to scheduled CI
1 parent 186022a commit f7b350e

2 files changed

Lines changed: 43 additions & 8 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Dependency security audit
2+
3+
on:
4+
pull_request:
5+
schedule:
6+
# Mondays 01:05 UTC (09:05 Taipei). A locked dependency becomes
7+
# vulnerable when an advisory is published against it, not when anyone
8+
# changes uv.lock, so this needs a trigger independent of repository
9+
# activity. pip-audit reads the PyPI advisory database, which does not
10+
# always carry the same findings as the GitHub Advisory Database behind
11+
# Dependabot alerts.
12+
#
13+
# Runs at :05 rather than on the hour: scheduled workflows queue behind
14+
# the spike of jobs that pick round times, and GitHub drops runs it
15+
# cannot dispatch instead of catching them up later.
16+
- cron: "5 1 * * 1"
17+
workflow_dispatch:
18+
19+
jobs:
20+
audit:
21+
# Non-blocking (continue-on-error) because pygments PYSEC-2026-2987
22+
# cannot be fixed while pelican caps pygments<2.20.0 — see issue #219.
23+
# Make this job blocking once that finding is resolved or ignored.
24+
runs-on: ubuntu-latest
25+
continue-on-error: true
26+
steps:
27+
- name: Check out
28+
uses: actions/checkout@v7
29+
30+
- name: Install the latest version of uv
31+
uses: astral-sh/setup-uv@v7
32+
with:
33+
enable-cache: true
34+
version: "latest"
35+
36+
- name: Install dependencies
37+
run: |
38+
uv --version
39+
uv sync
40+
41+
- name: Audit dependencies for known vulnerabilities
42+
run: |
43+
uv run inv security-check

.pre-commit-config.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,3 @@ repos:
4444
pass_filenames: false
4545
entry: uv run inv style
4646
types: [python]
47-
48-
- id: security-check
49-
name: security-check
50-
stages: [pre-push]
51-
language: system
52-
pass_filenames: false
53-
entry: uv run inv security-check
54-
types: [python]

0 commit comments

Comments
 (0)