Update GitHub Actions workflow with security improvements and linting#50
Open
Update GitHub Actions workflow with security improvements and linting#50
Conversation
- Add checkout step with persist-credentials: false for security Prevents credentials from persisting in the workspace (zizmor recommendation) - Add hadolint Dockerfile linting step Runs before building to catch Dockerfile issues early Ignores intentional version pinning warnings (DL3007, DL3008, DL3013, DL3016) - Update actions/checkout to v5 (latest major version) v5 uses Node 24 runtime for better performance All actions use major version tags for automatic security updates while avoiding breaking changes. 🤖 Generated with Claude Code https://claude.ai/code Co-Authored-By: Claude <noreply@anthropic.com>
elopez
reviewed
Sep 6, 2025
Comment on lines
+25
to
+36
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Lint Dockerfile | ||
| uses: hadolint/hadolint-action@v3 | ||
| with: | ||
| dockerfile: Dockerfile | ||
| ignore: DL3007,DL3008,DL3013,DL3016 | ||
| failure-threshold: warning | ||
|
|
Member
There was a problem hiding this comment.
Can you make this its own workflow instead, that runs on pull requests to master and dev? This docker.yml only runs on a schedule and merges to master/dev only, and I feel like linting then is too late.
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.
Summary
Changes
1. Added Checkout Step with Security Configuration
actions/checkout@v5withpersist-credentials: false2. Added Hadolint Dockerfile Linting
DL3007: Using:latesttag (intentional for echidna)DL3008: Unpinned apt packages (flexibility over reproducibility)DL3013: Unpinned pip packages (flexibility over reproducibility)DL3016: Unpinned npm packages (flexibility over reproducibility)3. Updated Action Versions
actions/checkout@v5- Latest major version (uses Node 24)docker/setup-qemu-action@v3docker/setup-buildx-action@v3docker/metadata-action@v5docker/login-action@v3docker/build-push-action@v6hadolint/hadolint-action@v3Security Review
Testing
This improves CI security and adds quality checks without breaking existing functionality.
🤖 Generated with Claude Code
https://claude.ai/code