feat(miner-deployment): add fleet-mode gittensory-miner Docker image (#4295) - #4462
Conversation
| # --- runtime: non-root CLI image with a mounted config volume ----------------------------------- | ||
| FROM public.ecr.aws/docker/library/node:24-slim AS runtime | ||
| WORKDIR /app | ||
| ARG GITTENSORY_VERSION= |
There was a problem hiding this comment.
P2: npm prune runs lifecycle scripts of removed packages without --ignore-scripts
npm prune without --ignore-scripts can execute uninstall scripts of removed devDependencies during the build.
Add --ignore-scripts to npm prune to prevent lifecycle script execution during pruning.
AI prompt
Check if this security scanner issue is valid. If so, understand the root cause and fix it. If appropriate, update or add tests. Keep the change focused and preserve intended behavior.
<file name="packages/gittensory-miner/Dockerfile">
<violation number="1" location="packages/gittensory-miner/Dockerfile:23">
<priority>P2</priority>
<title>npm prune runs lifecycle scripts of removed packages without --ignore-scripts</title>
<evidence>RUN npm prune --omit=dev runs in the build stage and can execute preuninstall/uninstall/postuninstall scripts of packages being removed. A compromised devDependency could use these lifecycle hooks to execute malicious code or tamper with production files before they are copied to the runtime stage.</evidence>
<recommendation>Add --ignore-scripts to the npm prune --omit=dev command: RUN npm prune --omit=dev --ignore-scripts</recommendation>
</violation>
</file>
| # --- runtime: non-root CLI image with a mounted config volume ----------------------------------- | ||
| FROM public.ecr.aws/docker/library/node:24-slim AS runtime | ||
| WORKDIR /app | ||
| ARG GITTENSORY_VERSION= |
There was a problem hiding this comment.
P2: npm prune runs lifecycle scripts of removed packages without --ignore-scripts
npm prune without --ignore-scripts can execute uninstall scripts of removed devDependencies during the build.
Add --ignore-scripts to npm prune to prevent lifecycle script execution during pruning.
AI prompt
Check if this security scanner issue is valid. If so, understand the root cause and fix it. If appropriate, update or add tests. Keep the change focused and preserve intended behavior.
<file name="packages/gittensory-miner/Dockerfile">
<violation number="1" location="packages/gittensory-miner/Dockerfile:23">
<priority>P2</priority>
<title>npm prune runs lifecycle scripts of removed packages without --ignore-scripts</title>
<evidence>RUN npm prune --omit=dev runs in the build stage and can execute preuninstall/uninstall/postuninstall scripts of packages being removed. A compromised devDependency could use these lifecycle hooks to execute malicious code or tamper with production files before they are copied to the runtime stage.</evidence>
<recommendation>Add --ignore-scripts to the npm prune --omit=dev command: RUN npm prune --omit=dev --ignore-scripts</recommendation>
</violation>
</file>
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-09 20:20:34 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4462 +/- ##
=======================================
Coverage 94.01% 94.01%
=======================================
Files 418 418
Lines 37417 37417
Branches 13677 13677
=======================================
Hits 35178 35178
Misses 1583 1583
Partials 656 656 🚀 New features to boost your workflow:
|
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Closes #4295
Summary
packages/gittensory-miner/Dockerfile— a two-stage fleet image built from the monorepo root with the same workspaceCOPY . .beforenpm ciordering the rootDockerfiledocuments for@jsonbored/gittensory-engine.node, defaultsGITTENSORY_MINER_CONFIG_DIR=/data/miner, declares a/data/minervolume, and threadsARG GITTENSORY_VERSION→GITTENSORY_MINER_VERSIONfor fleet release tagging.packages/gittensory-miner/DEPLOYMENT.mdfleet walkthrough todocker build+docker runthe new image instead of the ad hocnode:24-slim+npm install -gworkaround.Build / run
Test plan
test/unit/miner-deployment-doc.test.ts— DEPLOYMENT.md walkthrough strings + Dockerfile invariantsdocker build -f packages/gittensory-miner/Dockerfile .succeeds locallydocker run … gittensory-miner:latest doctorexits 0 with mounted volumenpm run test:cigreennpm audit --audit-level=moderateclean