Skip to content

Harden GitHub Actions workflows based on zizmor audit#2444

Merged
sankettangade merged 1 commit into
devfrom
workflow-hardening-zizmor
Jun 26, 2026
Merged

Harden GitHub Actions workflows based on zizmor audit#2444
sankettangade merged 1 commit into
devfrom
workflow-hardening-zizmor

Conversation

@sankettangade

Copy link
Copy Markdown
Contributor

AppSec ticket V2263249804 flagged script injection in issue-regression-labeler.yml. Fixed it and ran zizmor over all the workflows to address the same class of issues. This repo had the most to clean up.

Same approach as aws-sdk-net-staging#1375. No action versions bumped, pinned to the SHA each tag already resolved to.

Changes

  • Move untrusted ${{ }} values into env: vars (fixes the AppSec finding)
  • Fix PowerShell and github-script injection in the Dockerfile-update workflows
  • Pin all actions to commit SHAs
  • Set top-level permissions: {} with minimal per-job grants
  • Add concurrency groups and job names
  • Pin the semgrep container image by digest

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

- Move untrusted ${{ }} into env vars to prevent script injection
- Pin all actions to commit SHAs (no version bumps)
- Set top-level permissions: {} with minimal job-level grants
- Add concurrency groups and job names
- Fix PowerShell/github-script injection in Dockerfile-update workflows
- Pin semgrep container image by digest
@sankettangade sankettangade requested review from a team as code owners June 25, 2026 18:37
@sankettangade sankettangade requested review from normj and philasmar June 25, 2026 18:37
@sankettangade sankettangade added the Release Not Needed Add this label if a PR does not need to be released. label Jun 25, 2026
@sankettangade sankettangade merged commit b31109c into dev Jun 26, 2026
13 of 15 checks passed
@sankettangade sankettangade deleted the workflow-hardening-zizmor branch June 26, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Release Not Needed Add this label if a PR does not need to be released.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants