-
Notifications
You must be signed in to change notification settings - Fork 9
Add apk upgrade and modernize docker-compose installation to address security vulnerabilities #54
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
base: main
Are you sure you want to change the base?
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
This change adds `apk upgrade` in the final stage of the Dockerfile, ensuring that all Alpine packages are upgraded to their latest versions with security patches. This addresses the vulnerabilities reported in the docker image scan: - CVE-2025-62171 (imagemagick packages) - CVE-2025-64720, CVE-2025-65018 (libpng) - CVE-2025-49794, CVE-2025-49796, CVE-2025-49795, CVE-2025-6021 (libxml2) - CVE-2025-12818 (postgresql packages) Co-authored-by: stnguyen90 <1477010+stnguyen90@users.noreply.github.com>
stnguyen90
left a comment
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.
- Remove manual docker-compose installation - Replace with docker-cli-compose Alpine package - Remove DOCKER_CONFIG and DOCKER_COMPOSE_VERSION env vars - Add RUN set -ex for better error visibility - Add docker compose version test Co-authored-by: stnguyen90 <1477010+stnguyen90@users.noreply.github.com>
Applied changes from PR #55 in commit e701af2:
Note: Unable to run the Trivy scan locally due to SSL certificate verification issues in the build environment when accessing Alpine repositories. The changes are code-complete and match PR #55. The build and scan should succeed in the CI environment where proper SSL certificates are available. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
Trivy scan result: Report Summary
┌────────────────────────────────────┬────────┬─────────────────┬─────────┐
│ Target │ Type │ Vulnerabilities │ Secrets │
├────────────────────────────────────┼────────┼─────────────────┼─────────┤
│ appwrite-base-test (alpine 3.22.1) │ alpine │ 0 │ - │
└────────────────────────────────────┴────────┴─────────────────┴─────────┘
Legend:
- '-': Not scanned
- '0': Clean (no security findings detected)
|
|
|
||
| RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
|
|
||
| RUN set -ex |
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.
This is redundant, each RUN instruction is run in a new shell
Docker image scan identified HIGH/CRITICAL vulnerabilities in Alpine packages (imagemagick, libpng, libxml2, postgresql). The
finalstage was missingapk upgrade, so security patches weren't being applied.Changes
Security Patch Application
apk upgradeafterapk updatein the final stage to pull latest package versions with security fixesDocker Compose Modernization (from PR #55)
docker-cli-composeAlpine packageDOCKER_CONFIGandDOCKER_COMPOSE_VERSIONenvironment variablesRUN set -exfor better build error visibilitytests.yamlVulnerabilities Addressed
Note
Go dependency vulnerabilities (containerd, golang.org/x/crypto, etc.) are transitive via
docker-cliand will resolve when Alpine updates that package.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.