GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — deps: Upgrade MailCatcher runtime by marcelorodrigo · Pull Request #16 · marcelorodrigo/mailcatcher Conversation
| |||||||||||||||||||||||||||||||||||||||||||||||||||
📝 WalkthroughWalkthroughThe Docker image upgrades Ruby, Alpine, and MailCatcher. The pull request adds CI smoke tests that build the image, validate runtime dependencies, send an SMTP message, verify it through the HTTP API, and clean up the container. ChangesImage upgrade and validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant DockerImage
participant SmokeTestContainer
participant SMTPClient
participant MailCatcherHTTPAPI
GitHubActions->>DockerImage: build and load mailcatcher:smoke-test
GitHubActions->>SmokeTestContainer: validate versions and runtime packages
GitHubActions->>SmokeTestContainer: start with SMTP and HTTP ports
GitHubActions->>MailCatcherHTTPAPI: poll readiness
SMTPClient->>SmokeTestContainer: send test message over SMTP
GitHubActions->>MailCatcherHTTPAPI: verify message subject
GitHubActions->>SmokeTestContainer: collect logs and remove container
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/pr-build.yml:
- Line 34: Update both docker/build-push-action references in the workflow,
including the build/push step, from the stale `@v3` major version to `@v7`; leave
the surrounding container-build configuration unchanged.
In `@Dockerfile`:
- Line 1: Add a dedicated non-root runtime user in the Dockerfile, switch to it
with USER mailcatcher before the existing CMD, and preserve the smoke test so
startup, SMTP, and HTTP access remain verified.
Fix all unresolved CodeRabbit comments on this PR:
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f3412f92-fb31-4860-a314-30bf94f26d92
.github/workflows/pr-build.ymlDockerfileREADME.md
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| uses: docker/setup-buildx-action@v2 | ||
|
|
||
| - name: Build smoke test image | ||
| uses: docker/build-push-action@v3 |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🏁 Script executed:
#!/bin/bash set -euo pipefail echo "== workflow occurrences ==" if [ -f .github/workflows/pr-build.yml ]; then grep -n "docker/build-push-action" .github/workflows/pr-build.yml || true echo "== surrounding context ==" sed -n '25,45p;115,130p' .github/workflows/pr-build.yml else echo "missing .github/workflows/pr-build.yml" fi echo "== repository actionlint references ==" rg -n "actionlint|docker/build-push-action|build-push-action" .github . 2>/dev/null | head -100 || true echo "== installed actionlint ==" (command -v actionlint && actionlint -version) || true
Repository: marcelorodrigo/mailcatcher
Length of output: 1813
🌐 Web query:
Docker build-push-action supported versions v7 docker/build-push-action releases
💡 Result:
The docker/build-push-action currently supports the v7 release series [1][2]. The latest version within this series is v7.3.0, which was published on July 1, 2026 [3]. The v7 series introduced significant updates, including switching to Node 24 as the default runtime, which requires the use of GitHub Actions Runner v2.327.1 or later [4]. It also included the removal of deprecated environment variables and legacy export-build tool support [4]. Users can implement the action in their workflows by specifying the version tag, for example: - uses: docker/build-push-action@v7 Official documentation and examples consistently reference the v7 series as the current major version for building and pushing Docker images [2][5][6]. Older major versions, such as v6, remain in the release history, but v7 is the latest supported major release [1].
Citations:
🌐 Web query:
docker/build-push-action Node.js version v3 Node12 runner requirements
💡 Result:
The docker/build-push-action v3 is significantly outdated and relies on older Node.js runtimes that are no longer supported or recommended by GitHub Actions [1][2]. Specifically, regarding the Node.js version requirements for build-push-action v3: - When v3 was initially released, it used Node.js 16 as its default runtime [3]. - Warnings regarding "Node.js 12" associated with older versions of this action were common during the transition periods where GitHub deprecated older runner environments [4][1][5]. - GitHub officially removed support for Node.js 12 from the Actions runner on August 14, 2023 [1]. - Subsequent transitions have moved the platform requirements to Node.js 16 and eventually Node.js 20 [1][2]. As of August 2026, the docker/build-push-action has moved to more recent major versions (up to v7), which now utilize Node.js 24 as the default runtime [6][7][8]. If you are encountering errors or warnings related to Node.js 12 or Node.js 16 requirements, it is strongly recommended that you update your workflow to use the latest version of the action (e.g., docker/build-push-action@v7) [7][2]. You can perform this update by modifying your GitHub Actions YAML file: - uses: docker/build-push-action@v7 [7] Using outdated action versions can lead to pipeline failures as GitHub continues to retire support for legacy Node.js versions on its hosted runners [1][2].
Citations:
Update the stale docker/build-push-action ref.
docker/build-push-action@v3 is an old major version; the project’s current docker/build-push-action releases use @v7. Update both workflow occurrences so container-build jobs do not depend on a defunct action version.
- uses: docker/build-push-action@v3 + uses: docker/build-push-action@v7
Apply the same update to the build/push step at line 124.
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| uses: docker/build-push-action@v3 | |
| uses: docker/build-push-action@v7 |
[error] 34-34: the runner of "docker/build-push-action@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/pr-build.yml at line 34, Update both
docker/build-push-action references in the workflow, including the build/push
step, from the stale `@v3` major version to `@v7`; leave the surrounding
container-build configuration unchanged.
Source: Linters/SAST tools
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @@ -1,4 +1,4 @@ | |||
| FROM ruby:2.7.6-alpine3.15 | |||
| FROM ruby:4.0.6-alpine3.24 | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🏁 Script executed:
#!/bin/bash set -euo pipefail echo "Files:" git ls-files | sed -n '1,120p' echo echo "Dockerfile contents:" if [ -f Dockerfile ]; then cat -n Dockerfile else fd -a '^Dockerfile$' -x sh -c 'echo "--- $1"; cat -n "$1"' sh {} fi echo echo "Search for Dockerfiles / USER / CMD / EXPOSE / MailCatcher:" rg -n --hidden --glob '!vendor/**' --glob '!node_modules/**' --glob '!tmp/**' '(^|\b)(FROM|USER|CMD|ENTRYPOINT|EXPOSE|mailcatcher|Gemfile|docker|docker-compose|compose\.ya?ml|trivy|Trivy|DS-0002)\b' . | sed -n '1,220p'
Repository: marcelorodrigo/mailcatcher
Length of output: 4483
Run MailCatcher as a non-root user.
The Dockerfile never sets USER, so the final CMD runs mailcatcher as root. Ports 1025 and 1080 do not require root privileges. Add a dedicated runtime user and USER mailcatcher before CMD, then keep the smoke test enabled to verify startup, SMTP, and HTTP access.
&& gem install mailcatcher -v 0.10.0 -N \
&& apk del .build-deps
+RUN addgroup -S mailcatcher \
+ && adduser -S -G mailcatcher mailcatcher
+USER mailcatcher
EXPOSE 1025[error] 1-1: Image user should not be 'root'
Specify at least 1 USER command in Dockerfile with non-root user as argument
Rule: DS-0002
(IaC/Dockerfile)
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@Dockerfile` at line 1, Add a dedicated non-root runtime user in the
Dockerfile, switch to it with USER mailcatcher before the existing CMD, and
preserve the smoke test so startup, SMTP, and HTTP access remain verified.
Source: Linters/SAST tools
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.