1010# supported CodeQL languages.
1111#
1212name : " CodeQL"
13- timeout-minutes : 60
1413on :
1514 push :
1615 branches : ["main"]
16+ paths :
17+ - " **.go"
1718 pull_request :
18- # The branches below must be a subset of the branches above
1919 branches : ["main"]
20+ paths :
21+ - " **.go"
2022 schedule :
2123 - cron : " 0 0 * * *"
2224
@@ -26,7 +28,7 @@ permissions:
2628jobs :
2729 analyze :
2830 name : Analyze
29- runs-on : ubuntu-latest
31+ runs-on : ubuntu-8core
3032 if : ${{ github.actor != 'dependabot[bot]' }}
3133 permissions :
3234 actions : read
@@ -52,25 +54,12 @@ jobs:
5254 - name : Initialize CodeQL
5355 uses : github/codeql-action/init@42213152a85ae7569bdb6bec7bcd74cd691bfe41 # v3.30.9
5456 with :
55- languages : ${{ matrix.language }}
56- # If you wish to specify custom queries, you can do so here or in a config file.
57- # By default, queries listed here will override any specified in a config file.
58- # Prefix the list here with "+" to use these queries and those in the config file.
57+ languages : go
58+ dependency-caching : true
5959
60- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
61- # If this step fails, then you should remove it and run the build manually (see below)
62- - name : Autobuild
63- uses : github/codeql-action/autobuild@42213152a85ae7569bdb6bec7bcd74cd691bfe41 # v3.30.9
64-
65- # ℹ️ Command-line programs to run using the OS shell.
66- # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
67-
68- # If the Autobuild fails above, remove it and uncomment the following three lines.
69- # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
70-
71- # - run: |
72- # echo "Run, Build Application using script"
73- # ./location_of_script_within_repo/buildscript.sh
60+ # Build with slim tag to exclude heavy cloud provider dependencies (AWS/Azure/GCP SDKs)
61+ - name : Build
62+ run : go build -tags slim ./...
7463
7564 - name : Perform CodeQL Analysis
7665 uses : github/codeql-action/analyze@42213152a85ae7569bdb6bec7bcd74cd691bfe41 # v3.30.9
0 commit comments