Skip to content

Commit a0b9cf5

Browse files
authored
Add Security Scanning workflow using CodeQL
- Added a new GitHub Actions workflow (security-scan.yml) to scan for vulnerabilities using CodeQL. - Configured to run weekly, on pull requests, and on pushes to the main branch. - Supports JavaScript and Python analysis by default. - Ensures early detection of security vulnerabilities in dependencies and code.
1 parent 9fbf0e7 commit a0b9cf5

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/security-scan.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Security Scanning
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 0' # Runs weekly on Sunday at midnight UTC
6+
pull_request: # Runs on every pull request
7+
push: # Runs on pushes
8+
9+
10+
jobs:
11+
codeql-scan:
12+
name: Perform CodeQL Analysis
13+
runs-on: ubuntu-latest
14+
15+
permissions:
16+
actions: read # Allows Actions to read resources
17+
contents: read # Grants access to code
18+
security-events: write # Required for security analysis
19+
20+
steps:
21+
# Step 1: Checkout the repository
22+
- name: Checkout code
23+
uses: actions/checkout@v3
24+
25+
# Step 2: Initialize CodeQL
26+
- name: Initialize CodeQL
27+
uses: github/codeql-action/init@v2
28+
with:
29+
languages: 'javascript,python' # Specify languages (add/remove as needed)
30+
# Optional: Specify custom CodeQL queries
31+
# queries: ./path/to/custom-queries
32+
33+
# Step 3: Perform CodeQL Analysis
34+
- name: Perform CodeQL Analysis
35+
uses: github/codeql-action/analyze@v2

0 commit comments

Comments
 (0)