CodeQL Security Analysis #267
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "CodeQL Security Analysis" | |
| on: | |
| push: | |
| branches: ["master", "main"] | |
| pull_request: | |
| branches: ["master", "main"] | |
| schedule: | |
| # Run weekly on Fridays at 10:33 UTC | |
| - cron: '33 10 * * 5' | |
| # Prevent duplicate runs on the same branch | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| analyze: | |
| name: Analyze Go | |
| runs-on: self-hosted | |
| timeout-minutes: 30 | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.23' | |
| cache: false | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v3 | |
| with: | |
| languages: go | |
| # Enable extended security queries for more thorough analysis | |
| queries: security-extended,security-and-quality | |
| # Manual build for Go - more reliable than autobuild | |
| - name: Build | |
| run: | | |
| rm -rf lib/NTrace-core | |
| git clone --depth 1 https://github.com/netwatcherio/NTrace-core.git lib/NTrace-core | |
| go build -v ./... | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v3 | |
| with: | |
| category: "/language:go" |