Skip to content

Commit 948e2b4

Browse files
Initial CodeQL commit (#958)
1 parent d4fc7d3 commit 948e2b4

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL Advanced"
13+
14+
on:
15+
push:
16+
branches: [ "master" ]
17+
pull_request:
18+
branches: [ "master" ]
19+
20+
jobs:
21+
analyze:
22+
name: Analyze (${{ matrix.language }})
23+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
24+
permissions:
25+
# required for all workflows
26+
security-events: write
27+
28+
# required to fetch internal or private CodeQL packs
29+
packages: read
30+
31+
# only required for workflows in private repositories
32+
actions: read
33+
contents: read
34+
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
include:
39+
- language: actions
40+
build-mode: none
41+
- language: python
42+
build-mode: none
43+
- language: ruby
44+
build-mode: none
45+
- language: swift
46+
build-mode: autobuild
47+
steps:
48+
- name: Checkout repository
49+
uses: actions/checkout@v4
50+
51+
# Add any setup steps before running the `github/codeql-action/init` action.
52+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
53+
# or others). This is typically only required for manual builds.
54+
# - name: Setup runtime (example)
55+
# uses: actions/setup-example@v1
56+
57+
# Initializes the CodeQL tools for scanning.
58+
- name: Initialize CodeQL
59+
uses: github/codeql-action/init@v3
60+
with:
61+
languages: ${{ matrix.language }}
62+
build-mode: ${{ matrix.build-mode }}
63+
# If you wish to specify custom queries, you can do so here or in a config file.
64+
# By default, queries listed here will override any specified in a config file.
65+
# Prefix the list here with "+" to use these queries and those in the config file.
66+
67+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
68+
queries: ${{ matrix.language && 'security-extended, security-and-quality' }}
69+
70+
- if: matrix.build-mode == 'manual'
71+
shell: bash
72+
run: |
73+
echo 'If you are using a "manual" build mode for one or more of the' \
74+
'languages you are analyzing, replace this with the commands to build' \
75+
'your code, for example:'
76+
echo ' make bootstrap'
77+
echo ' make release'
78+
exit 1
79+
80+
- name: Perform CodeQL Analysis
81+
uses: github/codeql-action/analyze@v3
82+
with:
83+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)