Skip to content

Commit c5cef5a

Browse files
authored
Update CodeQL configuration (#5)
* Update CodeQL action * Enable additional CodeQL queries
1 parent fea51f1 commit c5cef5a

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Code scanning - action"
1+
name: "CodeQL"
22

33
on:
44
push:
@@ -7,29 +7,36 @@ on:
77
- cron: '0 0 * * 0'
88

99
jobs:
10-
CodeQL-Build:
11-
10+
analyze:
11+
name: Analyze
1212
runs-on: ubuntu-latest
13+
permissions:
14+
actions: read
15+
contents: read
16+
security-events: write
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
language: [ 'javascript' ]
22+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
23+
# Learn more:
24+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
1325

1426
steps:
1527
- name: Checkout repository
1628
uses: actions/checkout@v2
17-
with:
18-
# We must fetch at least the immediate parents so that if this is
19-
# a pull request then we can checkout the head.
20-
fetch-depth: 2
21-
22-
# If this run was triggered by a pull request event, then checkout
23-
# the head of the pull request instead of the merge commit.
24-
- run: git checkout HEAD^2
25-
if: ${{ github.event_name == 'pull_request' }}
26-
29+
2730
# Initializes the CodeQL tools for scanning.
2831
- name: Initialize CodeQL
2932
uses: github/codeql-action/init@v1
30-
# Override language selection by uncommenting this and choosing your languages
31-
# with:
32-
# languages: go, javascript, csharp, python, cpp, java
33+
with:
34+
languages: ${{ matrix.language }}
35+
queries: +security-and-quality
36+
# If you wish to specify custom queries, you can do so here or in a config file.
37+
# By default, queries listed here will override any specified in a config file.
38+
# Prefix the list here with "+" to use these queries and those in the config file.
39+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
3340

3441
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
3542
# If this step fails, then you should remove it and run the build manually (see below)

0 commit comments

Comments
 (0)