Skip to content

Commit 642889e

Browse files
CodeQL initial commit (#529)
* CodeQL initial commit * changing build mode * changing language * removing swift from the matrix * changed query pack to remove default * changing buildmode to manual * removing build mode all together * adding src as the path to be scanned * trying to figure out why codeql isn't running * updating the language format * Working on the analysis run
1 parent 8587979 commit 642889e

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: "CodeQL Advanced"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
analyze:
11+
name: Analyze Javascript
12+
runs-on: 'ubuntu-latest'
13+
permissions:
14+
# required for all workflows
15+
security-events: write
16+
17+
# required to fetch internal or private CodeQL packs
18+
packages: read
19+
20+
# only required for workflows in private repositories
21+
actions: read
22+
contents: read
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
include:
28+
- language: ['javascript']
29+
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v4
33+
34+
# Initializes the CodeQL tools for scanning.
35+
- name: Initialize CodeQL
36+
uses: github/codeql-action/init@v3
37+
# queries: ${{ matrix.language && 'security-extended' }}
38+
39+
# If the "analyze" step fails for one of the languages you are analyzing with
40+
# "We were unable to automatically build your code", modify the matrix above
41+
# to set the build mode to "manual" for that language. Then modify this step
42+
# to build your code.
43+
# ℹ️ Command-line programs to run using the OS shell.
44+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
45+
- if: matrix.build-mode == 'manual'
46+
shell: bash
47+
run: |
48+
echo 'If you are using a "manual" build mode for one or more of the' \
49+
'languages you are analyzing, replace this with the commands to build' \
50+
'your code, for example:'
51+
echo ' make bootstrap'
52+
echo ' make release'
53+
exit 1
54+
55+
- name: Perform CodeQL Analysis
56+
uses: github/codeql-action/analyze@v3
57+
with:
58+
category: "/language:${{matrix.language}}"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ results
1212
browserstack.json
1313
.DS_Store
1414
stats.json
15+
.idea

0 commit comments

Comments
 (0)