1- name : " Disable CodeQL Analysis"
1+ name : " CodeQL Analysis"
22
3- # This workflow is intentionally disabled for this documentation repository
4- # This file exists to prevent GitHub from automatically enabling CodeQL
3+ # This workflow explicitly excludes Python analysis for this documentation repository
54
65on :
7- # Don't run automatically - set to manual only
8- workflow_dispatch :
6+ push :
7+ branches : [ main ]
8+ pull_request :
9+ branches : [ main ]
10+ schedule :
11+ - cron : ' 0 0 * * 0' # Run once a week
912
1013jobs :
11- no-analysis :
12- name : No CodeQL Analysis
14+ analyze :
15+ name : Analyze
1316 runs-on : ubuntu-latest
17+ permissions :
18+ actions : read
19+ contents : read
20+ security-events : write
21+
22+ strategy :
23+ fail-fast : false
24+ matrix :
25+ # Override automatic language detection to explicitly exclude Python
26+ language : [ 'javascript' ] # Only include JavaScript if needed
27+
1428 steps :
15- - name : Checkout repository
16- uses : actions/checkout@v4
29+ - name : Checkout repository
30+ uses : actions/checkout@v4
1731
18- - name : Skip Analysis
19- run : echo "CodeQL Analysis intentionally disabled for this documentation repository"
32+ # Explicitly exclude Python files
33+ - name : Setup Python exclusion
34+ run : |
35+ echo "# Language detection overrides" > .gitattributes
36+ echo "*.py linguist-generated=true" >> .gitattributes
37+ echo "*.md linguist-detectable=true" >> .gitattributes
38+ echo "*.html linguist-detectable=true" >> .gitattributes
39+ git add .gitattributes
40+ git config --global user.name "GitHub Actions"
41+ git config --global user.email "actions@github.com"
42+ git commit -m "Add gitattributes to help language detection" || echo "No changes to commit"
43+
44+ - name : Initialize CodeQL
45+ uses : github/codeql-action/init@v2
46+ with :
47+ languages : ${{ matrix.language }}
48+ config-file : ./.github/codeql/codeql-config.yml
49+ # Skip Python extraction
50+ tools : ' !python'
51+
52+ - name : Perform CodeQL Analysis
53+ uses : github/codeql-action/analyze@v2
54+ with :
55+ category : " /language:${{ matrix.language }}"
0 commit comments