Skip to content

ci: add zizmor and actionlint, harden workflows - #83

Merged
AkihiroSuda merged 8 commits into
opencontainers:mainfrom
kolyshkin:ci-zizmor
Oct 30, 2026
Merged

AkihiroSuda merged 8 commits into
opencontainers:mainfrom
kolyshkin:ci-zizmor

Conversation

@kolyshkin

@kolyshkin kolyshkin commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Add zizmor (security-focused) and actionlint (correctness-focused)
checks for GitHub Actions workflows, and fix what zizmor finds.
This mirrors what was done in runc.

  • pin all actions to commit hashes (all at their latest releases);
  • set persist-credentials: false for actions/checkout;
  • ignore zizmor's cache-poisoning audit via .github/zizmor.yml
    (with an explanation why it does not apply here);
  • add 7 days cooldown to dependabot config;
  • add zizmor job (to validate.yml) and actionlint workflow;
  • drop unneeded pull-requests: read permission from the lint job;
  • add concurrency limits (cancel superseded PR runs);
  • rename all-done job in validate.yml to all-done-validate,
    so it does not collide with the one in test.yml.

NOTE to admins: branch protection for main currently requires all-done,
which matches jobs from both test.yml and validate.yml. Once this is merged,
please add all-done-validate and all-done-actionlint to the required checks.

@kolyshkin
kolyshkin requested a review from a team as a code owner October 2, 2026 20:39
@kolyshkin kolyshkin added this to the 0.1.1 milestone Oct 2, 2026
kolyshkin and others added 3 commits October 7, 2026 17:31
A version tag (even a "full" one like v7.0.1) is mutable: whoever
controls the action's repository can move it to point to any other
commit. Pinning to a full commit hash is the only way to get the exact
same action code on every run.

Found by zizmor's unpinned-uses audit. Dependabot is already enabled for
the github-actions ecosystem and knows how to update hash pins together
with their version comments, so this should not add maintenance burden.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Kir Kolyshkin <[email protected]>
Set persist-credentials: false for actions/checkout, as applied by
"zizmor --fix". By default checkout leaves the credentials it used in
.git/config, where any later step (or anything that archives the
workspace) can pick them up. Nothing here pushes back to the repository,
so they are not needed.

The remaining findings are all cache-poisoning, and are ignored via
.github/zizmor.yml, which explains why they do not apply to us.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Kir Kolyshkin <[email protected]>
Wait for 7 days before proposing an update, so that a compromised or
broken release has a chance to be noticed and pulled before it lands
here.

As recommended by zizmor's dependabot-cooldown audit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin
kolyshkin force-pushed the ci-zizmor branch 2 times, most recently from 79adcf6 to c989a0b Compare October 8, 2026 00:45
kolyshkin and others added 5 commits October 29, 2026 23:10
zizmor is a static analysis tool for GitHub Actions workflows, focused
on security issues.

Use the official action, which runs zizmor from a digest-pinned
container image. A few non-default settings:

 - version: pin it, so a new zizmor release adding new audits does not
   suddenly fail CI on an unrelated pull request. Bumping it is then a
   deliberate change.

 - advanced-security: false + annotations: true. The default uploads
   SARIF to the repository's security tab, which needs the job to have
   security-events: write. Inline annotations are enough for us and
   keep the workflow at contents: read.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Kir Kolyshkin <[email protected]>
Debugging GHA yaml is not fun -- usually when there is an issue with a
workflow file, it just doesn't run.

Add a separate actionlint workflow to catch workflow issues. It is
deliberately a separate workflow, so that it still runs when another
workflow file is broken.

Use the actively maintained kjanat/actionlint fork of rhysd/actionlint,
which knows about the newer GitHub-hosted runner images (such as
ubuntu-26.04 used here), and ships its own action.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Kir Kolyshkin <[email protected]>
The lint job does not need pull-requests: read: golangci-lint-action only
uses it for its only-new-issues option, which we do not set.

The lint-extra step does its own "new code only" filtering with
--new-from-rev=HEAD~1, which is plain git against the fetch-depth: 2
checkout, and the PR annotations come from checks: write.

Found by zizmor's undocumented-permissions audit (--persona=pedantic).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Kir Kolyshkin <[email protected]>
Cancel CI runs that are already superseded, rather than letting them run
to completion and waste runner time.

The concurrency group is keyed by PR number, so only runs of the same
pull request cancel each other. For anything else -- in particular
pushes to main, to release-*, to a v* tag, and scheduled runs -- there
is no PR number, so the group falls back to the unique run_id and no run
is ever cancelled. Keying by github.head_ref instead would be wrong, as
two pull requests from different forks can use the same branch name.

Found by zizmor's concurrency-limits audit (--persona=pedantic).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Kir Kolyshkin <[email protected]>
Rename all-done job in validate.yml to all-done-validate, so it does not
collide with the all-done job in test.yml in CI summaries and UI output
when both workflows are triggered together.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin

Copy link
Copy Markdown
Contributor Author

@haircommander @dims this needs a second LGTM. If you have a moment, please review other PRs as well

@dims dims left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks @kolyshkin

@AkihiroSuda
AkihiroSuda merged commit 0db4dc2 into opencontainers:main Oct 30, 2026
18 checks passed
Maks1mS pushed a commit to stplr-dev/stplr that referenced this pull request Nov 19, 2026
…(#524)

This PR contains the following updates:

| Package | Type | Update | Change | OpenSSF |
|---|---|---|---|---|
| [github.com/opencontainers/cgroups](https://github.com/opencontainers/cgroups) | require | patch | `v0.1.0` → `v0.1.1` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/opencontainers/cgroups/badge)](https://securityscorecards.dev/viewer/?uri=github.com/opencontainers/cgroups) |

---

> ⚠️ **Warning**
>
> Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/23) for more information.

---

### Release Notes

<details>
<summary>opencontainers/cgroups (github.com/opencontainers/cgroups)</summary>

### [`v0.1.1`](https://github.com/opencontainers/cgroups/releases/tag/v0.1.1)

[Compare Source](opencontainers/cgroups@v0.1.0...v0.1.1)

This release concludes the removal of cilium/ebpf dependency started in v0.1.0 (it is only used by tests now), tightens the CI and release workflows (zizmor, actionlint, immutable tags), and adds a few fixes and enhancements to fs and systemd cgroup drivers.

#### What's Changed

- ci: use latest golangci-lint by [@&#8203;kolyshkin](https://github.com/kolyshkin) in [#&#8203;77](opencontainers/cgroups#77)
- systemd: support zswap unified resources by [@&#8203;MKrupauskas](https://github.com/MKrupauskas) in [#&#8203;76](opencontainers/cgroups#76)
- build(deps): bump github.com/cilium/ebpf from 0.17.3 to 0.22.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;80](opencontainers/cgroups#80)
- build(deps): bump github.com/sirupsen/logrus to v1.10.2 by [@&#8203;kolyshkin](https://github.com/kolyshkin) in [#&#8203;81](opencontainers/cgroups#81)
- systemd: use sync.WaitGroup.Go in TestParallelConnection by [@&#8203;kolyshkin](https://github.com/kolyshkin) in [#&#8203;82](opencontainers/cgroups#82)
- systemd: fix jitter in dbus connection retry backoff by [@&#8203;hakman](https://github.com/hakman) in [#&#8203;85](opencontainers/cgroups#85)
- fs: initialize subsystems lazily by [@&#8203;kolyshkin](https://github.com/kolyshkin) in [#&#8203;90](opencontainers/cgroups#90)
- ci: add zizmor and actionlint, harden workflows by [@&#8203;kolyshkin](https://github.com/kolyshkin) in [#&#8203;83](opencontainers/cgroups#83)
- fs: fix hugetlb tests by [@&#8203;kolyshkin](https://github.com/kolyshkin) in [#&#8203;87](opencontainers/cgroups#87)
- fs2: support OwnerUID by [@&#8203;kolyshkin](https://github.com/kolyshkin) in [#&#8203;84](opencontainers/cgroups#84)
- systemd: DetectUID: use $ROOTLESSKIT_PARENT_EUID if set by [@&#8203;kolyshkin](https://github.com/kolyshkin) in [#&#8203;88](opencontainers/cgroups#88)
- Relax PR merge rules, enforce them via CI by [@&#8203;kolyshkin](https://github.com/kolyshkin) in [#&#8203;91](opencontainers/cgroups#91)
- ci: re-pin kjanat/actionlint to the current v1.17 by [@&#8203;kolyshkin](https://github.com/kolyshkin) in [#&#8203;95](opencontainers/cgroups#95)
- dependabot: fix ignore rule for review-policy.yml by [@&#8203;kolyshkin](https://github.com/kolyshkin) in [#&#8203;97](opencontainers/cgroups#97)
- build(deps): bump zizmorcore/zizmor-action from 0.8.0 to 0.8.1 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;93](opencontainers/cgroups#93)
- systemd: fix CPU quota overflow and unified cpu.max round-up by [@&#8203;kolyshkin](https://github.com/kolyshkin) in [#&#8203;79](opencontainers/cgroups#79)
- devices: drop cilium/ebpf/asm dependency by [@&#8203;mfrw](https://github.com/mfrw) in [#&#8203;94](opencontainers/cgroups#94)
- Skip cgroup tests when no cgroups are mounted by [@&#8203;kolyshkin](https://github.com/kolyshkin) in [#&#8203;99](opencontainers/cgroups#99)
- systemd/v2: set MemorySwapMax=0 when disabling swap by [@&#8203;kolyshkin](https://github.com/kolyshkin) in [#&#8203;78](opencontainers/cgroups#78)

#### New Contributors

- [@&#8203;MKrupauskas](https://github.com/MKrupauskas) made their first contribution in [#&#8203;76](opencontainers/cgroups#76)
- [@&#8203;hakman](https://github.com/hakman) made their first contribution in [#&#8203;85](opencontainers/cgroups#85)
- [@&#8203;mfrw](https://github.com/mfrw) made their first contribution in [#&#8203;94](opencontainers/cgroups#94)

**Full Changelog**: <opencontainers/cgroups@v0.1.0...v0.1.1>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At 12:00 AM through 04:59 AM and 10:00 PM through 11:59 PM, Monday through Friday (`* 0-4,22-23 * * 1-5`)
  - Only on Sunday and Saturday (`* * * * 0,6`)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yNDEuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjI0MS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJLaW5kL0RlcGVuZGVuY2llcyJdfQ==-->

Reviewed-on: https://altlinux.space/stapler/stplr/pulls/524
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants