Skip to content

Commit 6a7f86c

Browse files
committed
feat(codeql): enhance CodeQL analysis workflow
* Updated the CodeQL configuration to include the `src` path for analysis. * Renamed the workflow from 'CodeQL' to 'CodeQL Analyser' for clarity. * Replaced the reusable workflow with a direct job definition for better control over the analysis steps. * Added steps for initializing CodeQL and performing analysis.
1 parent 630494d commit 6a7f86c

2 files changed

Lines changed: 31 additions & 11 deletions

File tree

.github/codeql/codeql-config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: JavaScript CodeQL Configuration
22

3+
paths:
4+
- src
5+
36
paths-ignore:
47
- node_modules
58
- dist

.github/workflows/codeql-analysis.yml

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'CodeQL'
1+
name: 'CodeQL Analyser'
22

33
permissions:
44
security-events: write
@@ -25,10 +25,22 @@ on:
2525
- cron: '30 1 * * 0' # Every Sunday at 01:30 UTC
2626

2727
jobs:
28-
analyze:
29-
uses: pixpilot/dev-config/.github/workflows/codeql-analysis.yml@main
30-
with:
31-
config-file: .github/codeql/codeql-config.yml
28+
codeql-analysis:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v4
33+
34+
- name: Initialize CodeQL
35+
uses: github/codeql-action/init@v3
36+
with:
37+
config-file: .github/codeql/codeql-config.yml
38+
39+
- name: Autobuild
40+
uses: github/codeql-action/autobuild@v3
41+
42+
- name: Perform CodeQL Analysis
43+
uses: github/codeql-action/analyze@v3
3244
# -------------------------------------------------------------
3345
# Alternative: Reusable workflow for code scanning
3446
# -------------------------------------------------------------
@@ -37,10 +49,15 @@ jobs:
3749
# integration with GitHub Security UI.
3850
#
3951
# jobs:
40-
# code-analysis:
41-
# uses: pixpilot/dev-config/.github/workflows/codeql-issue-maker.yml@main
42-
# with:
43-
# language: 'javascript' # or your target language
44-
# secrets:
45-
# token: ${{ secrets.GITHUB_TOKEN }}
52+
# analyze:
53+
# runs-on: ubuntu-latest
54+
# steps:
55+
# - name: Checkout repository
56+
# uses: actions/checkout@v4
57+
58+
# - name: Perform CodeQL Analysis
59+
# uses: pixpilot/github/actions/codeql-analyzer@main
60+
# with:
61+
# token: ${{ secrets.GITHUB_TOKEN }}
62+
# config-file: .github/codeql/codeql-config.yml
4663

0 commit comments

Comments
 (0)