Skip to content

ci: Set explicit permissions to workflows #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 12, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/check-enforce-all-checks.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Check - Enforce all checks pass
on:
pull_request:
permissions:
checks: read

jobs:
wf:
uses: nikobockerman/github-workflows/.github/workflows/check-enforce-all-checks.yaml@c40fd048af4cc60e443fb5e0741812d69716d6a6
permissions:
checks: read
2 changes: 2 additions & 0 deletions .github/workflows/check-github-actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
- "package.json"
- "yarn.lock"
workflow_dispatch:
permissions:
contents: read

jobs:
wf:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/check-mypy.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Check - mypy

on:
pull_request:
paths:
Expand All @@ -11,6 +10,8 @@ on:
- "uv.lock"
workflow_call:
workflow_dispatch:
permissions:
contents: read

jobs:
mypy:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/check-prettier.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Check - prettier

on:
pull_request:
paths-ignore:
- "**.py"
- "**/py.typed"
workflow_dispatch:
permissions:
contents: read

jobs:
wf:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/check-pyright.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Check - pyright

on:
pull_request:
paths:
Expand All @@ -13,6 +12,8 @@ on:
- "yarn.lock"
workflow_call:
workflow_dispatch:
permissions:
contents: read

jobs:
pyright:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/check-renovate-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- ".github/renovate.json5"
- ".github/workflows/check-renovate-config.yaml"
workflow_dispatch:
permissions:
contents: read

jobs:
wf:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/check-ruff.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Check - ruff

on:
pull_request:
paths:
Expand All @@ -11,6 +10,8 @@ on:
- "uv.lock"
workflow_call:
workflow_dispatch:
permissions:
contents: read

jobs:
ruff:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/check-yarn.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: Check - Yarn and dependencies

on:
pull_request:
paths:
- ".github/workflows/check-yarn.yaml"
- "package.json"
- "yarn.lock"
workflow_dispatch:
permissions:
contents: read

jobs:
wf:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: CI

on:
push:
branches:
Expand All @@ -11,6 +10,8 @@ on:
# Run every Monday at 00:30 UTC
- cron: "30 0 * * 1"
workflow_dispatch:
permissions:
contents: read

jobs:
check-github-actions:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/run-all.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Run - all

on:
pull_request:
paths:
Expand All @@ -11,6 +10,8 @@ on:
- "uv.lock"
workflow_call:
workflow_dispatch:
permissions:
contents: read

jobs:
run-all:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-pytest.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Check - pytest

on:
pull_request:
paths:
Expand All @@ -10,6 +9,8 @@ on:
- "uv.lock"
workflow_call:
workflow_dispatch:
permissions:
contents: read

jobs:
pytest:
Expand Down