Skip to content

Commit ad2b50f

Browse files
author
Shadi Samadi
committed
updated README
1 parent e448184 commit ad2b50f

File tree

1 file changed

+9
-31
lines changed

1 file changed

+9
-31
lines changed

README.md

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ on:
2929
jobs:
3030
analyze:
3131
name: Analyze (${{ matrix.language }})
32-
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
32+
runs-on: ubuntu-latest
3333
permissions:
3434
security-events: write
3535
packages: read
@@ -42,59 +42,37 @@ jobs:
4242
include:
4343
- language: go
4444
build-mode: autobuild
45-
- language: java-kotlin
46-
build-mode: none
47-
- language: javascript-typescript
48-
build-mode: none
49-
- language: python
50-
build-mode: none
45+
query: codeql/go-queries:AlertSuppression.ql
5146

5247
steps:
5348
- name: Checkout repository
5449
uses: actions/checkout@v4
5550

56-
- name: Map Languages
57-
run: |
58-
if [ "${{ matrix.language }}" == "java-kotlin" ]; then
59-
echo "language=java" >> $GITHUB_ENV
60-
elif [ "${{ matrix.language }}" == "javascript-typescript" ]; then
61-
echo "language=javascript" >> $GITHUB_ENV
62-
else
63-
echo "language=${{ matrix.language }}" >> $GITHUB_ENV
64-
fi
65-
6651
- name: Initialize CodeQL
6752
uses: github/codeql-action/init@v3
6853
with:
6954
languages: ${{ matrix.language }}
7055
build-mode: ${{ matrix.build-mode }}
71-
packs: "codeql/${{ env.language }}-queries:AlertSuppression.ql"
72-
73-
- if: matrix.build-mode == 'manual'
74-
shell: bash
75-
run: |
76-
echo 'If you are using a "manual" build mode for one or more of the' \
77-
'languages you are analyzing, replace this with the commands to build' \
78-
'your code, for example:'
79-
echo ' make bootstrap'
80-
echo ' make release'
81-
exit 1
56+
packs: ${{ matrix.query }}
8257

8358
- name: Perform CodeQL Analysis
59+
# define an 'id' for the analysis step
8460
id: analyze
8561
uses: github/codeql-action/analyze@v2
8662
with:
8763
category: "/language:${{matrix.language}}"
64+
# define the output folder for SARIF files
8865
output: sarif-results
8966

9067
- name: Dismiss alerts
9168
if: github.ref == 'refs/heads/main'
92-
uses: advanced-security/dismiss-alerts@main
69+
uses: advanced-security/dismiss-alerts@v2
9370
with:
71+
# specify a 'sarif-id' and 'sarif-file'
9472
sarif-id: ${{ steps.analyze.outputs.sarif-id }}
95-
sarif-file: sarif-results/${{ env.language }}.sarif
73+
sarif-file: sarif-results/${{ matrix.language }}.sarif
9674
env:
97-
GITHUB_TOKEN: ${{ github.token }
75+
GITHUB_TOKEN: ${{ github.token }}
9876
```
9977
10078
### Third party produced SARIF file

0 commit comments

Comments
 (0)