Skip to content

Commit 9875939

Browse files
authored
chore(deps): remediate Wave0 pip-audit vulnerabilities (#377)
* fix: unblock wave0 shared CI failures (#371) * chore: satisfy black gate for shared lint blockers * fix: enforce instruction override guard and stale agent links * fix: import prompt loader in cart agent instructions helper * chore(deps): remediate wave0 pip-audit vulnerabilities
1 parent c7d3e5a commit 9875939

File tree

6 files changed

+113
-3
lines changed

6 files changed

+113
-3
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: dependency-audit
2+
3+
permissions:
4+
contents: read
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
8+
cancel-in-progress: true
9+
10+
on:
11+
pull_request:
12+
branches:
13+
- main
14+
push:
15+
branches:
16+
- main
17+
paths:
18+
- lib/**
19+
- apps/**
20+
- pyproject.toml
21+
- .github/workflows/dependency-audit.yml
22+
23+
jobs:
24+
pip-audit:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Set up Python
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: '3.13'
32+
- name: Set up uv
33+
uses: astral-sh/setup-uv@v5
34+
- name: Install audit toolchain
35+
run: |
36+
uv pip install --system pip-audit "black[jupyter]>=26.3.1"
37+
- name: Install lib
38+
run: uv pip install --system -e ./lib/src
39+
- name: Install apps
40+
run: |
41+
set -e
42+
for d in apps/*/src; do
43+
if [ -f "$d/pyproject.toml" ]; then
44+
uv pip install --system -e "$d"
45+
else
46+
echo "Skipping $d (no pyproject.toml)"
47+
fi
48+
done
49+
- name: Run pip-audit (Wave0)
50+
run: |
51+
python -m pip_audit --ignore-vuln CVE-2024-23342
52+
- name: Export pip-audit report
53+
if: always()
54+
run: |
55+
python -m pip_audit --format=json --ignore-vuln CVE-2024-23342 > pip-audit-report.json
56+
- name: Upload pip-audit report artifact
57+
if: always()
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: pip-audit-report
61+
path: pip-audit-report.json

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Install lib
3737
run: uv pip install --system -e ./lib/src
3838
- name: Install lint dependencies
39-
run: uv pip install --system pylint isort "black[jupyter]>=25.1.0"
39+
run: uv pip install --system pylint isort "black[jupyter]>=26.3.1"
4040
- name: Install apps
4141
run: |
4242
for d in apps/*/src; do

apps/crud-service/src/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ dev = [
4747
"pytest-cov>=6.0.0",
4848
"pytest-mock>=3.14.0",
4949
"httpx>=0.28.0", # For testing FastAPI
50-
"black>=24.10.0",
50+
"black>=26.3.1",
5151
"isort>=5.13.0",
5252
"pylint>=3.3.0",
5353
"mypy>=1.13.0",

docs/governance/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ This folder is the governance source of truth for engineering standards, runtime
2222
**Audience**: DevOps/SRE/Cloud engineers
2323
**Scope**: Azure IaC, AKS/SWA deployment, CI/CD and environment gates
2424

25+
### [Wave0 Dependency Audit](dependency-audit-wave0.md)
26+
**Audience**: Platform/DevSecOps engineers
27+
**Scope**: pip-audit baseline evidence, remediation status, and vulnerability exception tracking
28+
2529
## Repository Source-of-Truth Map
2630

2731
| Governance topic | Canonical source | Notes |
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Wave0 Dependency Audit Remediation
2+
3+
**Issue**: [#372](https://github.com/Azure-Samples/holiday-peak-hub/issues/372)
4+
**Owner**: Platform Quality / Platform Engineering
5+
**Last Updated**: 2026-03-19
6+
7+
## Baseline Evidence
8+
9+
Issue baseline reproduction command:
10+
11+
```bash
12+
python -m pip_audit
13+
```
14+
15+
Wave0 baseline observed in issue #372:
16+
17+
- `15` known vulnerabilities in `12` packages
18+
- Representative vulnerable packages: `black`, `cryptography`, `flask`, `pillow`, `urllib3`, `werkzeug`
19+
20+
## Remediation Applied
21+
22+
- Added CI workflow `.github/workflows/dependency-audit.yml` to run `pip-audit` on every PR/push to `main`.
23+
- Updated lint toolchain minimum version to `black[jupyter]>=26.3.1` in:
24+
- `.github/workflows/lint.yml`
25+
- `lib/src/pyproject.toml`
26+
- `apps/crud-service/src/pyproject.toml`
27+
- Added report artifact upload (`pip-audit-report.json`) for traceable security evidence.
28+
29+
## Current Scan Status
30+
31+
Repository-scoped clean environment scan after remediation:
32+
33+
- Command: `python -m pip_audit --ignore-vuln CVE-2024-23342`
34+
- Result: `No known vulnerabilities found, 1 ignored`
35+
36+
## Temporary Exception Register
37+
38+
| Vulnerability | Package | Status | Rationale | Owner | Expiry |
39+
| --- | --- | --- | --- | --- | --- |
40+
| `CVE-2024-23342` | `ecdsa==0.19.1` | Temporary exception | No upstream fixed version published at audit time; transitive dependency path requires upstream release before safe upgrade. | Platform Engineering | 2026-06-30 |
41+
42+
## Follow-up Actions
43+
44+
1. Re-check `ecdsa` on each dependency audit run and remove ignore immediately when fixed version is available.
45+
2. Keep dependency-audit workflow enabled as a PR gate recommendation for `main` branch governance.

lib/src/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ test = [
5252
lint = [
5353
"pylint",
5454
"isort",
55-
"black[jupyter]>=25.1.0",
55+
"black[jupyter]>=26.3.1",
5656
]
5757
docs = [
5858
"mkdocs",

0 commit comments

Comments
 (0)