harden GitHub Actions against supply chain attacks#2421
Open
hu-ahmed wants to merge 2 commits intoeclipse-ditto:masterfrom
Open
harden GitHub Actions against supply chain attacks#2421hu-ahmed wants to merge 2 commits intoeclipse-ditto:masterfrom
hu-ahmed wants to merge 2 commits intoeclipse-ditto:masterfrom
Conversation
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
931f9e6 to
f32fc77
Compare
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.
Background
The https://www.stepsecurity.io/blog/harden-runner-detection-aqua-security-trivy-action-supply-chain-attack — where an attacker force-pushed 76 of 77 version tags in aquasecurity/trivy-action to malicious commits — showed that any CI workflow consuming third-party actions by mutable reference (tags, branches) is one upstream compromise away from shipping attacker code. Ditto's workflows were in that category.
This PR applies the hardening baseline recommended by the Eclipse Foundation Security Team in https://blog.mbarbero.com/ (Mikaël Barbero, 2026-03-24), adapted to Ditto's specific workflows.
What changed
Every third-party action pinned to commit SHA. 17 distinct actions across 10 workflows. Each uses: owner/name@vX is now uses: owner/name@ # . SHAs resolved and verified with https://github.com/suzuki-shunsuke/pinact (the tool cited in the Eclipse blog post) — not by hand. A tag can be silently repointed; a SHA cannot.
.github/dependabot.yml added. Weekly github-actions ecosystem updates, grouped into a single PR, with a 7-day cooldown so we don't adopt a compromised release during the first 24 hours of an incident. Config matches the Eclipse security team's template verbatim.
▎ Dependabot still needs to be enabled at the repo level (Settings → Security → Dependabot). The file alone is not enough — Eclipse Foundation admins can flip this on.
step-security/harden-runner added in audit mode to every GitHub-hosted job (9 workflows, 11 jobs). Records network egress and file modifications without blocking. Had this been active during the Trivy incident, exfiltration to the typo-squatted scan.aquasecurtiy.org domain would have been immediately visible. The self-hosted ditto-runner job in system-tests.yml is intentionally excluded — harden-runner is designed for GitHub-hosted runners and needs runner-owner validation before enabling.
Docker image pinned by digest. maven:3.9.12-eclipse-temurin-25 → maven:3.9.12-eclipse-temurin-25@sha256:4f82a03a... in all 4 uses in system-tests.yml. Container tags have the same mutability problem as action tags.
Supply-chain linters added/run: