Skip to content

Commit ba08bb7

Browse files
committed
feat: add CodeQL configuration file and update workflow to use it
Signed-off-by: kaifcoder <kaifmohd2014@gmail.com>
1 parent 15cf775 commit ba08bb7

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/codeql/codeql-config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: "CodeQL Config"
2+
3+
# Exclude template directories that contain placeholder syntax
4+
paths-ignore:
5+
- templates/
6+
- templates/**
7+
8+
# Include only actual source code
9+
paths:
10+
- bin/
11+
- scripts/

.github/workflows/codeql.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ jobs:
5353
uses: github/codeql-action/init@bffd034ab1518ad839a542b8a7356e13a240e076 # v3.31.7
5454
with:
5555
languages: ${{ matrix.language }}
56+
config-file: ./.github/codeql/codeql-config.yml
5657
# If you wish to specify custom queries, you can do so here or in a config file.
5758
# By default, queries listed here will override any specified in a config file.
5859
# Prefix the list here with "+" to use these queries and those in the config file.
@@ -74,8 +75,9 @@ jobs:
7475

7576
# Autobuild attempts to build any compiled languages (C/C++, C#, Go).
7677
# For Java, we use explicit Maven build steps above instead.
78+
# For Go, skip autobuild since templates/ contains placeholder files
7779
- name: Autobuild
78-
if: matrix.language != 'java'
80+
if: matrix.language != 'java' && matrix.language != 'go'
7981
uses: github/codeql-action/autobuild@bffd034ab1518ad839a542b8a7356e13a240e076 # v3.31.7
8082

8183
# ℹ️ Command-line programs to run using the OS shell.

0 commit comments

Comments
 (0)