Skip to content

Commit 04793cd

Browse files
authored
chore: create CodeQL workflow (#8789)
1 parent 7e99a22 commit 04793cd

1 file changed

Lines changed: 75 additions & 0 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Autogenerated with manual adjustements
2+
3+
name: "CodeQL Advanced"
4+
5+
on:
6+
push:
7+
branches: "main"
8+
pull_request:
9+
branches: "main"
10+
schedule:
11+
- cron: '16 1 * * 3'
12+
13+
jobs:
14+
analyze:
15+
name: Analyze (${{ matrix.language }})
16+
# Runner size impacts CodeQL analysis time. To learn more, please see:
17+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
18+
# - https://gh.io/supported-runners-and-hardware-resources
19+
# - https://gh.io/using-larger-runners (GitHub.com only)
20+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
21+
runs-on: 'ubuntu-latest'
22+
permissions:
23+
# required for all workflows
24+
security-events: write
25+
26+
# required to fetch internal or private CodeQL packs
27+
packages: read
28+
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
include:
33+
- language: actions
34+
build-mode: none
35+
- language: javascript-typescript
36+
build-mode: none
37+
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@v4
41+
42+
# Initializes the CodeQL tools for scanning.
43+
- name: Initialize CodeQL
44+
uses: github/codeql-action/init@v4
45+
with:
46+
languages: ${{ matrix.language }}
47+
build-mode: ${{ matrix.build-mode }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
51+
52+
# 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
53+
# queries: security-extended,security-and-quality
54+
55+
# If the analyze step fails for one of the languages you are analyzing with
56+
# "We were unable to automatically build your code", modify the matrix above
57+
# to set the build mode to "manual" for that language. Then modify this step
58+
# to build your code.
59+
# ℹ️ Command-line programs to run using the OS shell.
60+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
61+
- name: Run manual build steps
62+
if: matrix.build-mode == 'manual'
63+
shell: bash
64+
run: |
65+
echo 'If you are using a "manual" build mode for one or more of the' \
66+
'languages you are analyzing, replace this with the commands to build' \
67+
'your code, for example:'
68+
echo ' make bootstrap'
69+
echo ' make release'
70+
exit 1
71+
72+
- name: Perform CodeQL Analysis
73+
uses: github/codeql-action/analyze@v4
74+
with:
75+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)