Skip to content

Commit

Permalink
github/workflow: Define permissions for actions
Browse files Browse the repository at this point in the history
Avoid granting excessive permissions.

Signed-off-by: Jianxin Xiong <[email protected]>
  • Loading branch information
j-xiong committed Mar 30, 2024
1 parent f0b627c commit 4c20ae3
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: clang-format Check
on: [push, pull_request]
permissions:
contents: read
jobs:
formatting-check:
name: Formatting Check
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
# UTC time, 'minute hour day-of-month month day-of-week'
- cron: '0 5 * * *'

permissions:
contents: read
environments: read

env:
APT_PACKAGES: >-
abi-compliance-checker
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/gh-man.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
gh-man-update:
name: GH Man Page Updater
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Debug information
env:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/nroff-elves.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
nroff-elves-scheduled:
name: The Nroff Elves
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Debug information
env:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pr-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Build Checks
on: [push, pull_request]
permissions:
contents: read
pull-requests: read
env:
APT_PACKAGES: >-
abi-compliance-checker
Expand Down

0 comments on commit 4c20ae3

Please sign in to comment.