-
-
Notifications
You must be signed in to change notification settings - Fork 3
fix(docker): force-reinstall wheel to eliminate CVE-2026-24049 + enha… #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…nce CircleCI config
📝 WalkthroughWalkthroughAdds dependency caching and JUnit test output to CircleCI, introduces Changes
Sequence Diagram(s)sequenceDiagram
participant CI as CircleCI (ci)
participant Build as job: build-and-test
participant Scan as job: security-scan
participant DockerJob as job: docker-build
participant Docker as Docker daemon
CI->>Build: run build-and-test (restore cache, run pytest -> junit xml)
Build-->>CI: upload artifacts + test-results
CI->>Scan: start security-scan (depends on build-and-test)
Scan->>Scan: create venv, install deps, run pip-audit -> audit-results.txt
Scan-->>CI: upload audit-results.txt
CI->>DockerJob: start docker-build (depends on build-and-test) [only on main]
DockerJob->>Docker: build image
Docker-->>DockerJob: image built
DockerJob->>Docker: run verification container (python -c check)
Docker-->>DockerJob: verification result
DockerJob-->>CI: publish success/failure + artifacts
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In @.circleci/config.yml:
- Around line 45-48: The pipeline step running pip-audit currently appends "||
true" which masks failures; remove the "|| true" from the pip-audit command and
ensure the shell uses pipefail (e.g., enable set -o pipefail in the job or
runner) so that the exit code from "pip-audit --strict --desc 2>&1 | tee
audit-results.txt" can fail the workflow when vulnerabilities are found; update
the step that installs/runs pip-audit (the lines containing "pip install
pip-audit" and "pip-audit --strict --desc 2>&1 | tee audit-results.txt || true")
accordingly.
- Around line 65-67: The Verify Image step fails because the image's ENTRYPOINT
(/action_entrypoint.py) intercepts arguments so the intended python -c "..."
isn't executed; update the docker run invocation in the "Verify Image" step to
bypass the image ENTRYPOINT by adding --entrypoint python (so docker runs the
python binary directly) and keep the existing -c "import qwed_sdk; print(...)"
args; target the docker run line that references
qwedai/qwed-verification:ci-${CIRCLE_SHA1:0:7}.
- Around line 15-25: The cache path currently uses "~/.local/lib" which is too
broad and misses Python-versioned site-packages; update the restore_cache and
save_cache steps (the restore_cache, save_cache keys) to include the
Python-version-specific site-packages path and pip cache (e.g.,
"~/.local/lib/python<< parameters.python-version >>/site-packages" and
"~/.cache/pip") so caches are reused across Python versions when running the
"Install Dependencies" run step that executes "pip install
.[dev,server,symbolic]".
…audit, entrypoint bypass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.circleci/config.yml:
- Around line 53-56: Add documented justification for the two ignored CVEs in
the pip-audit step so future maintainers understand the risk acceptance: update
the .circleci/config.yml pip-audit invocation (the line running
/tmp/audit-env/bin/pip-audit) to reference a short comment or link to a new
audit exception document that explains why CVE-2025-8869 and CVE-2026-1703 are
acceptable to ignore in our deployment model (e.g., sdist/wheel sources are
validated, runtime environment constraints, or compensating controls), and
include the document path or ticket ID in the pipeline output
(audit-results.txt) for auditability.
🧹 Nitpick comments (1)
.circleci/config.yml (1)
15-26: Fallback cache key may restore incompatible packages across Python versions.The fallback key
pip-v1-will match caches from any Python version. If Python 3.10 cache is restored for a 3.12 job, the version-specific path (~/.local/lib/python3.10/...) won't exist atpython3.12/..., making the cache ineffective. Include version in the fallback:Suggested fix
- restore_cache: keys: - pip-v1-{{ checksum "pyproject.toml" }}-<< parameters.python-version >> - - pip-v1- + - pip-v1-<< parameters.python-version >>-
Summary
1. 🔒 Docker Security Fix
Changed
pip install --upgradetopip install --force-reinstallforwheel>=0.46.2, ensuring the base image's oldwheel==0.45.1metadata is fully replaced — not just shadowed.Before: Docker Scout shows 1 High (in wheel)
After: 0 fixable vulnerabilities
2. ⚡ CircleCI Enhancement
Enhanced
.circleci/config.ymlfrom basic pytest to a full CI pipeline:pip-auditdependency vulnerability scanNew features:
pip-auditsecurity scanning with artifact storageSummary by CodeRabbit
Chores
Tests