Skip to content

Commit 2219573

Browse files
authored
Create codeql.yml
1 parent c7a63df commit 2219573

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed

.github/workflows/codeql.yml

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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+
name: "CodeQL"
7+
8+
on:
9+
push:
10+
branches: [ "main" ]
11+
pull_request:
12+
branches: [ "main" ]
13+
schedule:
14+
- cron: '35 6 * * 2'
15+
16+
jobs:
17+
analyze:
18+
name: Analyze
19+
# Runner size impacts CodeQL analysis time. To learn more, please see:
20+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
21+
# - https://gh.io/supported-runners-and-hardware-resources
22+
# - https://gh.io/using-larger-runners
23+
# Consider using larger runners for possible analysis time improvements.
24+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
25+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
26+
permissions:
27+
# required for all workflows
28+
security-events: write
29+
30+
# only required for workflows in private repositories
31+
actions: read
32+
contents: read
33+
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
language: [ 'python' ]
38+
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
39+
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
40+
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
41+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
42+
43+
steps:
44+
- name: Checkout repository
45+
uses: actions/checkout@v4
46+
47+
# Initializes the CodeQL tools for scanning.
48+
- name: Initialize CodeQL
49+
uses: github/codeql-action/init@v3
50+
with:
51+
languages: ${{ matrix.language }}
52+
# If you wish to specify custom queries, you can do so here or in a config file.
53+
# By default, queries listed here will override any specified in a config file.
54+
# Prefix the list here with "+" to use these queries and those in the config file.
55+
56+
# 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
57+
# queries: security-extended,security-and-quality
58+
59+
60+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
61+
# If this step fails, then you should remove it and run the build manually (see below)
62+
- name: Autobuild
63+
uses: github/codeql-action/autobuild@v3
64+
65+
# ℹ️ Command-line programs to run using the OS shell.
66+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
67+
68+
# If the Autobuild fails above, remove it and uncomment the following three lines.
69+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
70+
71+
# - run: |
72+
# echo "Run, Build Application using script"
73+
# ./location_of_script_within_repo/buildscript.sh
74+
75+
- name: Perform CodeQL Analysis
76+
uses: github/codeql-action/analyze@v3
77+
with:
78+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)