Fix CI workflow: actionlint install, zizmor, and permissions
- Use actionlint's official download script instead of hardcoded URL missing the version number in the asset filename - Use pipx run for zizmor to avoid PATH and PEP 668 issues - Add explicit permissions: contents: read to both workflows to satisfy zizmor's excessive-permissions audit Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
@@ -18,6 +18,9 @@ on:
|
|||||||
- ".gitignore"
|
- ".gitignore"
|
||||||
- ".github/workflows/deploy.yml"
|
- ".github/workflows/deploy.yml"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
backend-lint:
|
backend-lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -45,14 +48,12 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Install actionlint
|
- name: Install actionlint
|
||||||
run: |
|
run: |
|
||||||
curl -sL https://github.com/rhysd/actionlint/releases/latest/download/actionlint_linux_amd64.tar.gz | tar xz
|
bash <(curl -sL https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
|
||||||
sudo mv actionlint /usr/local/bin/
|
sudo mv actionlint /usr/local/bin/
|
||||||
- name: Lint GitHub Actions
|
- name: Lint GitHub Actions
|
||||||
run: actionlint
|
run: actionlint
|
||||||
- name: Install zizmor
|
|
||||||
run: pip install zizmor
|
|
||||||
- name: Audit GitHub Actions security
|
- name: Audit GitHub Actions security
|
||||||
run: zizmor .github/workflows/
|
run: pipx run zizmor .github/workflows/
|
||||||
|
|
||||||
frontend-lint:
|
frontend-lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
3
.github/workflows/deploy.yml
vendored
3
.github/workflows/deploy.yml
vendored
@@ -3,6 +3,9 @@ name: Deploy
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Reference in New Issue
Block a user