forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 2.73 KB
/
codeql.yml
File metadata and controls
64 lines (55 loc) · 2.73 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# For most projects, this workflow file will remain unchanged; it's designed to be plug-and-play.
# ******** NOTE ********
# We've tried to identify the languages in your repository. Please verify
# the `language` matrix below to ensure it includes all supported CodeQL languages for your project.
#
name: "CodeQL"
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '33 21 * * 6'
jobs:
analyze:
name: Analyze
# The size of the runner affects the CodeQL analysis duration. For more information, visit:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Opting for larger runners may reduce analysis time.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions: write-all
strategy:
fail-fast: false
matrix:
language: [ 'c-cpp', 'go', 'javascript-typescript', 'python', 'csharp', 'ruby', 'swift' ]
# Supported CodeQL languages include [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use 'java-kotlin' for Java, Kotlin, or both
# Use 'javascript-typescript' for JavaScript, TypeScript, or both
# Discover more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Prepares the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# To specify custom queries, add them here or in a config file.
# By default, queries here will override config file specifications.
# Use "+" prefix here to combine these queries with those in the config file.
# For details on CodeQL query packs, see: https://docs.github.com/en/code-security/code-scanning/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# ℹ️ Commands to run using the OS shell.
# 📚 For syntax details, visit https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If Autobuild fails, remove it and uncomment the lines below, adjusting them to build your code. See the EXAMPLE for guidance.
- run: |
echo "Executing Build Script"
./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"