-
Notifications
You must be signed in to change notification settings - Fork 329
WIP Convert to use Chainguard Python #1473
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
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.
3 issues found across 4 files
Prompt for AI agents (all 3 issues)
Understand the root cause of the following 3 issues and fix them.
<file name="docker-compose.local.yml">
<violation number="1" location="docker-compose.local.yml:123">
Incorrect use of python -m with a file path; -m requires a module name. This will prevent the worker from starting.</violation>
</file>
<file name="scripts/install-packages.sh">
<violation number="1" location="scripts/install-packages.sh:29">
Script relies on wget but does not ensure it's present, causing potential build failures on minimal images.</violation>
<violation number="2" location="scripts/install-packages.sh:44">
Do not skip checksum verification when retrieval fails; fail closed to prevent unverified binary installation.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Ask questions if you need clarification on any suggestion
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
scripts/install-packages.sh
Outdated
| if [[ -n "${DENO_SHA256}" ]]; then | ||
| echo "${DENO_SHA256} ${DENO_ZIP}" | sha256sum -c - | ||
| else | ||
| echo "WARNING: checksum unavailable; skipping verification." >&2 |
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.
Do not skip checksum verification when retrieval fails; fail closed to prevent unverified binary installation.
Prompt for AI agents
Address the following comment on scripts/install-packages.sh at line 44:
<comment>Do not skip checksum verification when retrieval fails; fail closed to prevent unverified binary installation.</comment>
<file context>
@@ -1,118 +1,81 @@
+if [[ -n "${DENO_SHA256}" ]]; then
echo "${DENO_SHA256} ${DENO_ZIP}" | sha256sum -c -
+else
+ echo "WARNING: checksum unavailable; skipping verification." >&2
fi
</file context>
| echo "WARNING: checksum unavailable; skipping verification." >&2 | |
| { echo "ERROR: checksum unavailable; aborting." >&2; exit 1; } |
| trap cleanup EXIT | ||
|
|
||
| # ---- wget helpers (quiet, with a few retries) ---- | ||
| wget_stdout() { wget -q --tries=3 --timeout=20 -O- "$1"; } |
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.
Script relies on wget but does not ensure it's present, causing potential build failures on minimal images.
Prompt for AI agents
Address the following comment on scripts/install-packages.sh at line 29:
<comment>Script relies on wget but does not ensure it's present, causing potential build failures on minimal images.</comment>
<file context>
@@ -1,118 +1,81 @@
+trap cleanup EXIT
+
+# ---- wget helpers (quiet, with a few retries) ----
+wget_stdout() { wget -q --tries=3 --timeout=20 -O- "$1"; }
+wget_to() { wget -q --tries=3 --timeout=20 "$1" -O "$2"; }
+
</file context>
Example PR showing how to use Chainguard Python.
Summary by cubic
Convert containers to Chainguard Python images and move to a secure, nonroot, multi-stage build. Replace the shell entrypoint with a Python entrypoint and update Compose commands and healthchecks.
Refactors
Migration