Repository navigation
Run API and ETL in maintained non-root containers - #3161
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The API and ETL Dockerfiles used unsupported Node 18/Ruby 2.7 bases and root runtimes. The API build also referenced an obsolete per-package lockfile, while ETL startup installed gems and automatically performed database maintenance.
Use digest-pinned Node 24.22.2 and Ruby 3.4.12 images with non-root users, root-owned application/configuration files, separate build stages, and healthchecks. Build the API from the current workspace with frozen dependencies and disabled lifecycle scripts; explicitly compile only SQLite. Exclude environment files, private keys and encrypted Rails credentials from image contexts.
Upgrade ETL to Rails 8.1.4.1 and mysql2 0.5.7, replacing the obsolete TiDB adapter with the standard MySQL adapter. Refresh and checksum the Ruby lockfile, remove the incompatible development annotation hook, and use Selenium's driver manager. Support the image's MariaDB client with certificate/hostname verification. ETL startup now only runs ingestion; schema/seed maintenance remains explicit. A progress heartbeat covers completed polls and deliberate rate-limit waits.
Validation completed locally:
Linux amd64 CI 41948659251 passed both verification jobs, including the added image/TiDB checks. Final Trivy 0.76.1 scans report zero fixable high/critical vulnerabilities in either runtime image; the API runtime removes unused npm/Yarn bundles. Production cutover of the customized ETL worker is still pending; it requires preserving its capture/deduplication code and durable paths, a rollback copy, and a single active poller. See
ops/container-security/README.mdfor build, runtime and rollout instructions.