ci: restrict starter workflow permissions
Signed-off-by: Emmanuel Roullit <[email protected]>
This commit is contained in:
@@ -9,13 +9,21 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [ $default-branch, $protected-branches ]
|
branches: [ $default-branch, $protected-branches ]
|
||||||
pull_request:
|
pull_request:
|
||||||
|
# The branches below must be a subset of the branches above
|
||||||
branches: [ $default-branch ]
|
branches: [ $default-branch ]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: $cron-weekly
|
- cron: $cron-weekly
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
php-security:
|
php-security:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read # for actions/checkout to fetch code
|
||||||
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@@ -27,4 +35,4 @@ jobs:
|
|||||||
- name: Upload Security Analysis results to GitHub
|
- name: Upload Security Analysis results to GitHub
|
||||||
uses: github/codeql-action/upload-sarif@v1
|
uses: github/codeql-action/upload-sarif@v1
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
|||||||
Reference in New Issue
Block a user