Skip to content

Commit 9759f2c

Browse files
committed
experiment enabling github code analysis with codeql
1 parent 54d2ecd commit 9759f2c

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/codeql-analysis.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# https://github.com/github/codeql-action
2+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning
3+
4+
name: "code-scanning"
5+
6+
on:
7+
push:
8+
branches: [main]
9+
pull_request:
10+
branches: [main]
11+
schedule:
12+
- cron: '0 15 * * 0'
13+
14+
jobs:
15+
CodeQL-Build:
16+
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v2
22+
with:
23+
# Must fetch at least the immediate parents so that if this is
24+
# a pull request then we can checkout the head of the pull request.
25+
# Only include this option if you are running this workflow on pull requests.
26+
fetch-depth: 2
27+
28+
# If this run was triggered by a pull request event then checkout
29+
# the head of the pull request instead of the merge commit.
30+
# Only include this step if you are running this workflow on pull requests.
31+
- run: git checkout HEAD^2
32+
if: ${{ github.event_name == 'pull_request' }}
33+
34+
# Initializes the CodeQL tools for scanning.
35+
- name: Initialize CodeQL
36+
uses: github/codeql-action/init@v1
37+
# Override language selection by uncommenting this and choosing your languages
38+
# with:
39+
# languages: go, javascript, csharp, python, cpp, java
40+
41+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
42+
# If this step fails, then you should remove it and run the build manually (see below).
43+
- name: Autobuild
44+
uses: github/codeql-action/autobuild@v1
45+
46+
# ℹ️ Command-line programs to run using the OS shell.
47+
# 📚 https://git.io/JvXDl
48+
49+
# ✏️ If the Autobuild fails above, remove it and uncomment the following
50+
# three lines and modify them (or add more) to build your code if your
51+
# project uses a compiled language
52+
53+
#- run: |
54+
# make bootstrap
55+
# make release
56+
57+
- name: Perform CodeQL Analysis
58+
uses: github/codeql-action/analyze@v1

0 commit comments

Comments
 (0)