Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/create-release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Print github context JSON
run: |
cat <<EOF
${{ toJson(github) }}
EOF
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
gather_facts:
name: Gather facts
runs-on: ubuntu-24.04
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Print github context JSON
run: |
cat <<EOF
${{ toJson(github) }}
EOF
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
gather_facts:
name: Gather facts
runs-on: ubuntu-24.04
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ensure-major-version-tags.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Print github context JSON
run: |
cat <<EOF
${{ toJson(github) }}
EOF
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
ensure_major_version_tags:
name: Ensure major version tags
runs-on: ubuntu-24.04
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/update-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Print github context JSON
run: |
cat <<EOF
${{ toJson(github) }}
EOF
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
gather_facts:
name: Gather facts
runs-on: ubuntu-24.04
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/validate-workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,26 @@ jobs:
with:
show-ascii-art: false
path-to-workflows: '.github/workflows/*.yaml'

analyze-actions:
name: Analyze workflows with zizmor (report-only)
runs-on: ubuntu-24.04
permissions:
contents: read
security-events: write # upload SARIF to the Security tab (code scanning is enabled)
actions: read
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

# Report-only: zizmor uploads findings to the Security tab for visibility but never
# blocks PRs. The repo carries pre-existing findings that are tracked separately; this
# scan is here to surface regressions (e.g. re-introducing `${{ toJson(github) }}` in a
# `run:` block) that CodeQL did not catch. See giantswarm/giantswarm#36940.
- name: Run zizmor (non-blocking)
continue-on-error: true
uses: zizmorcore/zizmor-action@192e21d79ab29983730a13d1382995c2307fbcaa # v0.5.7
with:
persona: regular
Comment on lines +58 to +79

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

fyi @giantswarm/team-honeybadger zizmor is already available as a devctl-managed workflow https://github.com/giantswarm/devctl/blob/main/pkg/gen/input/workflows/internal/file/zizmor_base.yml.template

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
however this project does not use Semantic Versioning and there are no releases.
Instead this file uses a date-based structure.

## 2026-06-24

### Security

- Fixed a GitHub Actions script injection (CWE-94) in the `debug_info` "Print github context JSON" step of `create-release.yaml`, `create-release-pr.yaml`, `update-chart.yaml` and `ensure-major-version-tags.yaml`. The step interpolated `${{ toJson(github) }}` directly into a `run:` shell heredoc, so attacker-controllable event fields (e.g. a commit message containing an `EOF` line plus shell commands) could break out of the heredoc and execute arbitrary commands on the runner. The context is now passed through an `env:` variable (`GITHUB_CONTEXT`) and printed with `echo "$GITHUB_CONTEXT"`, treating it as data rather than script text — the same safe pattern already used for `COMMIT_MESSAGE` in `create-release.yaml`. Reported via giantswarm/giantswarm#36940.

### Added

- `validate-workflows.yaml` now runs a report-only [`zizmor`](https://github.com/zizmorcore/zizmor-action) security scan on this repository's own workflows. It uploads findings to the GitHub Security tab (code scanning) for visibility but does not block PRs (`continue-on-error: true`), so regressions of the script-injection class above are surfaced even though CodeQL did not catch them.

## 2026-06-03

### Fixed
Expand Down