Skip to content

Commit d11f852

Browse files
authored
CodeQL: Update SARIF uploading example (#25702)
* CodeQL: Update SARIF uploading example
1 parent 80ace67 commit d11f852

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

content/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ jobs:
8686
build:
8787
runs-on: ubuntu-latest{% ifversion fpt or ghes > 3.1 or ghae or ghec %}
8888
permissions:
89-
security-events: write{% endif %}
89+
# required for all workflows
90+
security-events: write
91+
# only required for workflows in private repositories
92+
actions: read
93+
contents: read{% endif %}
9094
steps:
9195
# This step checks out a copy of your repository.
9296
- name: Checkout repository
@@ -123,7 +127,11 @@ jobs:
123127
build:
124128
runs-on: ubuntu-latest{% ifversion fpt or ghes > 3.1 or ghae or ghec %}
125129
permissions:
126-
security-events: write{% endif %}
130+
# required for all workflows
131+
security-events: write
132+
# only required for workflows in private repositories
133+
actions: read
134+
contents: read{% endif %}
127135
steps:
128136
- uses: actions/checkout@v2
129137
- name: Run npm install

0 commit comments

Comments
 (0)