Fix security scan failures and build/scan order#30
Conversation
|
@copilot : Try again, I fixed the branch permissions. |
- Reorganize workflow: build locally, scan, then push only if scan passes - Update Dockerfiles to use Python 3.13-slim (newer packages) - Explicitly upgrade setuptools to >=75.0.0 to get jaraco.context 6.1.0+ - Remove docker pull steps since images are now scanned before push Co-authored-by: zaxlofful <33877007+zaxlofful@users.noreply.github.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
simplewish | 613f377 | Feb 02 2026, 07:45 AM |
There was a problem hiding this comment.
Pull request overview
This PR addresses security scan failures by reorganizing the CI workflow to ensure images are scanned before publishing and by updating base images to fix vulnerabilities. The workflow now builds images locally, scans them with Trivy, and only pushes to GHCR if scans pass. The Python base images are updated (with a version error), and setuptools is explicitly upgraded to fix security vulnerabilities.
Changes:
- Reorganized workflow to build → scan → push order with conditional push steps based on scan success
- Updated Python base images in both Dockerfiles (incorrectly to 3.14-slim instead of intended 3.13-slim)
- Added explicit setuptools upgrade to >=75.0.0 in both Dockerfiles
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| .github/workflows/build-ci-image.yml | Refactored to build images locally first, scan them, and only push to GHCR if scans pass; removed pull steps and consolidated push logic |
| .github/ci/Dockerfile.qr | Updated base image from Python 3.11-slim to 3.14-slim (error) and added setuptools upgrade |
| .github/ci/Dockerfile.infra | Updated base image from Python 3.11-slim to 3.14-slim (error) and added setuptools upgrade |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fix Security Scan Failures and Build/Scan Order
This PR fixes the security scan failure on the main branch by addressing two critical issues:
Build/Scan Order: The workflow was publishing images to GHCR before scanning them, which is a security risk. The workflow has been reorganized to:
Vulnerability Fixes: Updated base images and dependencies to fix HIGH/CRITICAL vulnerabilities:
Changes
Workflow Changes (.github/workflows/build-ci-image.yml)
Dockerfile Changes
Verification
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.