Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a6bb57b

Browse files
jorgectfanathan
authored andcommittedJun 11, 2023
Add CodeQL workflow
1 parent 7ddcfa4 commit a6bb57b

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
 

‎.github/workflows/codeql.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ 'master' ]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [ 'master' ]
9+
schedule:
10+
- cron: '31 12 * * 2'
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: [ 'cpp', 'python' ]
25+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
26+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
27+
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v3
31+
32+
- name: Install dependencies
33+
run: sudo apt install libssl-dev
34+
35+
# Initializes the CodeQL tools for scanning.
36+
- name: Initialize CodeQL
37+
uses: github/codeql-action/init@v2
38+
with:
39+
languages: ${{ matrix.language }}
40+
# If you wish to specify custom queries, you can do so here or in a config file.
41+
# By default, queries listed here will override any specified in a config file.
42+
# Prefix the list here with "+" to use these queries and those in the config file.
43+
44+
# 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
45+
queries: +security-and-quality
46+
47+
48+
- name: Build
49+
run: |-
50+
cd c
51+
mkdir build && cd build
52+
cmake ..
53+
bash
54+
55+
- name: Perform CodeQL Analysis
56+
uses: github/codeql-action/analyze@v2
57+
with:
58+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)
Please sign in to comment.