Skip to content

Pin Docker image to SHA digest for security#1

Open
pqn wants to merge 2 commits intomainfrom
devin/1773093220-pin-docker-image-sha
Open

Pin Docker image to SHA digest for security#1
pqn wants to merge 2 commits intomainfrom
devin/1773093220-pin-docker-image-sha

Conversation

@pqn
Copy link

@pqn pqn commented Mar 9, 2026

Summary

Pin the Docker image used by the codeowners-plus action to its SHA256 digest instead of using the mutable :latest tag, for supply chain security.

Changes

  • action.yml: Replace ghcr.io/multimediallc/codeowners-plus:latest with ghcr.io/multimediallc/codeowners-plus@sha256:8f9b834d270546cfafa9b3e6774722a93e7178fbeb08415c1bc2e655bb7f8637
  • scripts/prepare-release.sh: Update sed patterns from codeowners-plus:.*' to codeowners-plus[:@].*' so the release script correctly handles both :TAG and @sha256:DIGEST formats when updating action.yml

Devin Session: https://staging.itsdev.in/sessions/4c99077567f84cb48aaec9bf4166df48

Replace :latest tag with pinned SHA256 digest to prevent supply chain attacks
from tag mutation.

Co-Authored-By: Staging-Devin AI <166158716+staging-devin-ai-integration[bot]@users.noreply.github.com>
@staging-devin-ai-integration
Copy link

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

staging-devin-ai-integration[bot]

This comment was marked as resolved.

The sed pattern for action.yml now matches both :TAG and @sha256:DIGEST
formats using [:@] character class.

Co-Authored-By: Staging-Devin AI <166158716+staging-devin-ai-integration[bot]@users.noreply.github.com>
Copy link

@staging-devin-ai-integration staging-devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 1 additional finding in Devin Review.

Staging: Open in Devin
Debug

Playground

# For BSD sed (macOS), -i requires an argument (even if empty string for no backup).
if sed --version 2>/dev/null | grep -q GNU; then # GNU sed
sed -i "s|codeowners-plus:.*'|codeowners-plus:${VERSION_TAG}'|g" "${ACTIONS_FILE}"
sed -i "s|codeowners-plus[:@].*'|codeowners-plus:${VERSION_TAG}'|g" "${ACTIONS_FILE}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 post-release.sh not updated but likely intentional

The scripts/post-release.sh doesn't modify action.yml at all. Previously with :latest, this was fine because Docker would resolve to the newest image. Now with sha256 pinning, after a release cycle the main branch will retain the old sha256 digest in action.yml. This means the sha256 on main could become stale after a new release. However, this appears intentional — the sha256 pinning on main represents a known-good image and would be manually updated (as was done in this PR). The prepare-release.sh correctly handles converting whatever format is in action.yml to a :vX.Y.Z tag for the release branch/tag.

Staging: Open in Devin

Was this helpful? React with 👍 or 👎 to provide feedback.

Debug

Playground

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant