mirror of
https://github.com/jdx/mise-action.git
synced 2026-05-16 22:50:32 +00:00
chore(ci): add zizmor workflow for github actions security analysis (#471)
Adds [zizmor](https://github.com/zizmorcore/zizmor) to audit GitHub
Actions workflows for security issues. Runs on push to main and on PRs
that change `.github/workflows/**`. Fails CI on any finding.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Mostly CI/workflow hardening, but it also changes release automation
(`postversion.sh`) and workflow permissions/credentials behavior, which
could break tagging/publishing if misconfigured.
>
> **Overview**
> Adds a new `zizmor` workflow that runs on PRs/pushes touching
`.github/workflows/**` to security-audit workflows.
>
> Hardens existing workflows by defaulting to least-privilege
`permissions`, setting `actions/checkout` to `persist-credentials:
false`, and adjusting related behavior (e.g., `scripts/postversion.sh`
now runs `gh auth setup-git` so `git push` still works; `ci.yml`
disables `mise-action` caching; `test.yml` avoids interpolating
`steps.bad.outcome` inside a shell string by passing it via env).
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
d878aee510. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ff58e14023
commit
46bb674500
9 changed files with 70 additions and 4 deletions
19
.github/workflows/test.yml
vendored
19
.github/workflows/test.yml
vendored
|
|
@ -8,6 +8,9 @@ on: # rebuild any PRs and main branch changes
|
|||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref_name }}
|
||||
cancel-in-progress: true
|
||||
|
|
@ -17,6 +20,8 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4
|
||||
- run: aube install
|
||||
- run: aubr all
|
||||
|
|
@ -43,6 +48,8 @@ jobs:
|
|||
if: ${{ matrix.requirements }}
|
||||
run: ${{ matrix.requirements }}
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup mise
|
||||
uses: ./
|
||||
with:
|
||||
|
|
@ -65,6 +72,8 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup mise
|
||||
uses: ./
|
||||
with:
|
||||
|
|
@ -90,6 +99,8 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup mise
|
||||
id: bad
|
||||
uses: ./
|
||||
|
|
@ -107,14 +118,18 @@ jobs:
|
|||
if: ${{ steps.bad.outcome == 'failure' }}
|
||||
- name: not failed as expected
|
||||
run: |
|
||||
echo "Expected failure but the job was ${{ steps.bad.outcome }}"
|
||||
echo "Expected failure but the job was ${STEPS_BAD_OUTCOME}"
|
||||
exit 1
|
||||
if: ${{ steps.bad.outcome != 'failure' }}
|
||||
env:
|
||||
STEPS_BAD_OUTCOME: ${{ steps.bad.outcome }}
|
||||
|
||||
custom_cache_key:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup mise with custom cache key
|
||||
uses: ./
|
||||
with:
|
||||
|
|
@ -132,6 +147,8 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup mise from mise.jdx.dev
|
||||
uses: ./
|
||||
with:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue