Skip to content

Commit 78a1ed3

Browse files
committed
ci: Add CodeQL analysis
Motivation: codeql are quite popular now, moreover various projects use it as metric on how secure certain OSS project is. Example: https://github.com/ ossf/scorecard/blob/main/docs/checks.md#sast Also, it can uncover some real security issues both in our sorce code and GitHub workflows. So I don't see a lot of harm by enabling it, we can always ignore certain files or disable it completely. Fixes graphql#3162
1 parent 9a494d9 commit 78a1ed3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,28 @@ jobs:
154154
- name: Run Tests with coverage
155155
run: npm run testonly:cover
156156

157+
codeql:
158+
name: Run CodeQL security scan
159+
runs-on: ubuntu-latest
160+
permissions:
161+
security-events: write
162+
steps:
163+
- name: Checkout repo
164+
uses: actions/checkout@v3
165+
with:
166+
persist-credentials: false
167+
168+
- name: Initialize CodeQL
169+
uses: github/codeql-action/init@v2
170+
with:
171+
languages:
172+
- javascript
173+
- typescript
174+
queries: +security-extended
175+
176+
- name: Perform CodeQL analysis
177+
uses: github/codeql-action/analyze@v2
178+
157179
build-npm-dist:
158180
name: Build 'npmDist' artifact
159181
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)