mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 15:14:44 +00:00
chore: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much. - Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
This commit is contained in:
parent
9361325137
commit
1331b65023
2 changed files with 9 additions and 0 deletions
6
.github/workflows/lockthreads.yml
vendored
6
.github/workflows/lockthreads.yml
vendored
|
@ -7,8 +7,14 @@ on:
|
||||||
# min 0-59 ┘ │ │ │ └ weekday 0-6
|
# min 0-59 ┘ │ │ │ └ weekday 0-6
|
||||||
# hour 0-23 ┘ │ └ month 1-12
|
# hour 0-23 ┘ │ └ month 1-12
|
||||||
# └ day 1-31
|
# └ day 1-31
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lock:
|
lock:
|
||||||
|
permissions:
|
||||||
|
issues: write # for dessant/lock-threads to lock issues
|
||||||
|
pull-requests: write # for dessant/lock-threads to lock PRs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: dessant/lock-threads@v2
|
- uses: dessant/lock-threads@v2
|
||||||
|
|
3
.github/workflows/main.yml
vendored
3
.github/workflows/main.yml
vendored
|
@ -6,6 +6,9 @@ env:
|
||||||
CTEST_PARALLEL_LEVEL: "1"
|
CTEST_PARALLEL_LEVEL: "1"
|
||||||
CMAKE_BUILD_PARALLEL_LEVEL: "4"
|
CMAKE_BUILD_PARALLEL_LEVEL: "4"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ubuntu:
|
ubuntu:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue