-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (33 loc) · 1.51 KB
/
codeql.yml
File metadata and controls
41 lines (33 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: CodeQL Security CI
run-name: "${{ github.workflow }} #${{ github.run_number }} by @${{ github.actor }}"
on: [push]
jobs:
# Will run on either the latest version of Ubuntu or the latest version of macOS if the language being analyzed is Swift.
analyze:
name: Analyze
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
# Sets permissions for the job to read actions and contents, and write security events.
permissions:
actions: read
contents: read
security-events: write
# This is defining a matrix strategy for the job, which allows the same job to be run multiple times with different configurations.
strategy:
# If one configuration of the job fails, the other configurations should still be run instead of stopping the entire job immediately.
fail-fast: false
# Specifying that the job should be run for the 'javascript' language.
matrix:
language: [ 'javascript' ]
steps:
# Using the latest version of Ubuntu as the operating system for the job.
- uses: actions/checkout@v3
# Specifies the language to be analyzed using the 'matrix.language' variable.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# Performing the actual CodeQL analysis on the codebase.
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"