Skip to content

ci: harden CI runners and pin actions to SHA digests#110

Merged
jmeridth merged 1 commit intomainfrom
jm_harden_runners
Mar 14, 2026
Merged

ci: harden CI runners and pin actions to SHA digests#110
jmeridth merged 1 commit intomainfrom
jm_harden_runners

Conversation

@jmeridth
Copy link
Collaborator

@jmeridth jmeridth commented Mar 14, 2026

What

Add step-security/harden-runner with egress audit policy to all workflow jobs and pin all GitHub Actions and Docker image references to full SHA digests. Apply least-privilege permissions by adding top-level permissions: contents: read to workflows missing it and scoping elevated permissions to the job level.

Why

Unpinned action references (version tags, latest) are mutable and vulnerable to supply-chain attacks where a compromised tag could execute arbitrary code in CI. Harden-runner provides network egress visibility to detect unexpected outbound calls. Top-level read-only permissions with job-level escalation follows the principle of least privilege.

Notes

  • harden-runner is set to audit mode (observe-only), not block — no existing workflows should break, but this means malicious egress won't be blocked yet
  • The mark-ready-when-ready.yml permissions were restructured: moved from workflow-level to job-level, which is a behavioral change if additional jobs are added later

@jmeridth jmeridth self-assigned this Mar 14, 2026
@jmeridth jmeridth requested a review from zkoppert as a code owner March 14, 2026 03:13
## What

Add step-security/harden-runner with egress audit policy to all workflow
jobs and pin all GitHub Actions and Docker image references to full SHA
digests. Apply least-privilege permissions by adding top-level
`permissions: contents: read` to workflows missing it and scoping
elevated permissions to the job level.

## Why

Unpinned action references (version tags, `latest`) are mutable and
vulnerable to supply-chain attacks where a compromised tag could execute
arbitrary code in CI. Harden-runner provides network egress visibility
to detect unexpected outbound calls. Top-level read-only permissions
with job-level escalation follows the principle of least privilege.

## Notes

- harden-runner is set to `audit` mode (observe-only), not `block` — no existing workflows should break, but this means malicious egress won't be blocked yet
- The `mark-ready-when-ready.yml` permissions were restructured: moved from workflow-level to job-level, which is a behavioral change if additional jobs are added later

Signed-off-by: jmeridth <jmeridth@gmail.com>
Copy link
Contributor

@zkoppert zkoppert left a comment

Choose a reason for hiding this comment

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

LGTM! All 5 SHA pins verified against their claimed version tags and all are at the latest release. Permissions restructuring on mark-ready-when-ready.yml looks correct. Harden-runner applied consistently across all 11 jobs.

@jmeridth jmeridth merged commit 23927bf into main Mar 14, 2026
13 checks passed
@jmeridth jmeridth deleted the jm_harden_runners branch March 14, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants