|
1 |
| -name: "Code scanning - action" |
| 1 | +name: "CodeQL" |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | push:
|
|
7 | 7 | - cron: '0 0 * * 0'
|
8 | 8 |
|
9 | 9 | jobs:
|
10 |
| - CodeQL-Build: |
11 |
| - |
| 10 | + analyze: |
| 11 | + name: Analyze |
12 | 12 | 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 |
13 | 25 |
|
14 | 26 | steps:
|
15 | 27 | - name: Checkout repository
|
16 | 28 | 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 | + |
27 | 30 | # Initializes the CodeQL tools for scanning.
|
28 | 31 | - name: Initialize CodeQL
|
29 | 32 | 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 |
33 | 40 |
|
34 | 41 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
35 | 42 | # If this step fails, then you should remove it and run the build manually (see below)
|
|
0 commit comments