Skip to content

Commit a14da87

Browse files
authored
Merge pull request #61 from QWED-AI/fix/wheel-cve-circleci
fix(docker): force-reinstall wheel to eliminate CVE-2026-24049 + enha…
2 parents 19de7a5 + 1479663 commit a14da87

File tree

2 files changed

+64
-4
lines changed

2 files changed

+64
-4
lines changed

.circleci/config.yml

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,83 @@ jobs:
1212
- image: cimg/python:<< parameters.python-version >>
1313
steps:
1414
- checkout
15+
- restore_cache:
16+
keys:
17+
- pip-v1-{{ checksum "pyproject.toml" }}-<< parameters.python-version >>
18+
- pip-v1-
1519
- run:
1620
name: Install Dependencies
1721
command: pip install .[dev,server,symbolic]
22+
- save_cache:
23+
key: pip-v1-{{ checksum "pyproject.toml" }}-<< parameters.python-version >>
24+
paths:
25+
- ~/.local/lib/python<< parameters.python-version >>/site-packages
26+
- ~/.cache/pip
1827
- run:
1928
name: Run Tests
2029
command: |
21-
# Run pytest with coverage as configured in pyproject.toml
22-
pytest
30+
mkdir -p test-results
31+
pytest --junitxml=test-results/results.xml
2332
- store_test_results:
2433
path: test-results
2534
- store_artifacts:
2635
path: htmlcov
2736

37+
security-scan:
38+
docker:
39+
- image: cimg/python:3.12
40+
steps:
41+
- checkout
42+
- run:
43+
name: Create isolated audit environment
44+
command: |
45+
python -m venv /tmp/audit-env
46+
/tmp/audit-env/bin/pip install --upgrade pip
47+
/tmp/audit-env/bin/pip install .[dev,server,symbolic]
48+
- run:
49+
name: Run pip-audit (project deps only)
50+
command: |
51+
set -o pipefail
52+
/tmp/audit-env/bin/pip install pip-audit
53+
/tmp/audit-env/bin/pip-audit --strict --skip-editable --desc \
54+
`# CVE-2025-8869: pip tar extraction vuln — build-only tool, not in runtime image` \
55+
--ignore-vuln CVE-2025-8869 \
56+
`# CVE-2026-1703: pip wheel path traversal (CVSS 2.0 Low) — build-only, pinned hashes used` \
57+
--ignore-vuln CVE-2026-1703 \
58+
2>&1 | tee audit-results.txt
59+
- store_artifacts:
60+
path: audit-results.txt
61+
62+
docker-build:
63+
docker:
64+
- image: cimg/base:current
65+
steps:
66+
- checkout
67+
- setup_remote_docker:
68+
version: docker24
69+
docker_layer_caching: true
70+
- run:
71+
name: Build Docker Image
72+
command: |
73+
docker build -t qwedai/qwed-verification:ci-${CIRCLE_SHA1:0:7} .
74+
- run:
75+
name: Verify Image
76+
command: |
77+
docker run --rm --entrypoint python qwedai/qwed-verification:ci-${CIRCLE_SHA1:0:7} -c "import qwed_sdk; print('QWED SDK loaded successfully')"
78+
2879
workflows:
29-
main:
80+
ci:
3081
jobs:
3182
- build-and-test:
3283
matrix:
3384
parameters:
3485
python-version: ["3.10", "3.11", "3.12"]
86+
- security-scan:
87+
requires:
88+
- build-and-test
89+
- docker-build:
90+
requires:
91+
- build-and-test
92+
filters:
93+
branches:
94+
only: main

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ COPY requirements.txt /app/requirements.txt
2828
# Vulnerability Fix: Upgrade pip and wheel to patch base image CVEs
2929
# CVE-2026-24049 (Critical): wheel<=0.46.1 -> 0.46.2
3030
# CVE-2025-8869 (Medium): pip==24.0 -> latest
31-
RUN pip install --no-cache-dir --upgrade "pip>=25.0" "wheel>=0.46.2"
31+
RUN pip install --no-cache-dir --force-reinstall "pip>=25.0" "wheel>=0.46.2"
3232

3333
# Install dependencies with hash verification
3434
# Vulnerability Fix: Pin versions with hashes to prevent supply chain attacks

0 commit comments

Comments
 (0)