Skip to content

Commit 378e766

Browse files
authored
Merge pull request #73 from maxmind/add-codeql-workflow
Add CodeQL code scanning workflow
2 parents f70acda + 83a27c0 commit 378e766

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ updates:
1717
time: '14:00'
1818
cooldown:
1919
default-days: 7
20+
groups:
21+
codeql:
22+
patterns:
23+
- github/codeql-action*
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: "Code scanning - action"
2+
3+
on:
4+
pull_request:
5+
schedule:
6+
- cron: '0 9 * * 3'
7+
8+
permissions:
9+
security-events: write # Used by this action.
10+
11+
jobs:
12+
CodeQL-Build:
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
19+
with:
20+
# We must fetch at least the immediate parents so that if this is
21+
# a pull request then we can checkout the head.
22+
fetch-depth: 2
23+
persist-credentials: false
24+
25+
# If this run was triggered by a pull request event, then checkout
26+
# the head of the pull request instead of the merge commit.
27+
- run: git checkout HEAD^2
28+
if: ${{ github.event_name == 'pull_request' }}
29+
30+
# Initializes the CodeQL tools for scanning.
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
33+
# Override language selection by uncommenting this and choosing your languages
34+
# with:
35+
# languages: go, javascript, csharp, python, cpp, java
36+
37+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
38+
# If this step fails, then you should remove it and run the build manually (see below)
39+
- name: Autobuild
40+
uses: github/codeql-action/autobuild@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
41+
42+
#- run: |
43+
# make bootstrap
44+
# make release
45+
46+
- name: Perform CodeQL Analysis
47+
uses: github/codeql-action/analyze@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0

0 commit comments

Comments
 (0)