Skip to content

Commit

Permalink
Restrict default permissions of Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
phw committed Sep 6, 2023
1 parent 6f46ebc commit bab30fd
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/codacy-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ on:
schedule:
- cron: '32 4 * * 0'

permissions: {}

jobs:
codacy-security-scan:
name: Codacy Security Scan
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ on:
schedule:
- cron: '0 14 * * 6'

permissions:
actions: read
contents: read
security-events: write

jobs:
analyze:
name: Analyze
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ on:
- 'win.version-info.txt.in'
pull_request:

permissions: {}

jobs:
package-macos:
runs-on: macos-11
Expand Down Expand Up @@ -240,6 +242,8 @@ jobs:
- package-macos
- package-windows
- package-pypi
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Package for PyPI

on: [workflow_call]

permissions: {}
defaults:
run:
shell: bash
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Run tests

on: [push, pull_request]
permissions: {}

jobs:
test-latest:
Expand Down

0 comments on commit bab30fd

Please sign in to comment.