diff --git a/.github/workflows/lib-codeql.yaml b/.github/workflows/lib-codeql.yaml new file mode 100644 index 000000000..7fb4fcf73 --- /dev/null +++ b/.github/workflows/lib-codeql.yaml @@ -0,0 +1,35 @@ +name: "CodeQL" + +on: + workflow_call: + +permissions: + actions: read + contents: read + +jobs: + analyze: + name: Analysis + runs-on: ubuntu-24.04 + timeout-minutes: 360 + + permissions: + security-events: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: ./src/cloud-api-adaptor/go.mod + check-latest: true + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: 'go' + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:go" diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 0956e6c55..28b08f58a 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -77,6 +77,15 @@ jobs: - name: check run: make golangci-lint + codeql: + permissions: + actions: read + contents: read + security-events: write + needs: + - vet-and-fmt + uses: "./.github/workflows/lib-codeql.yaml" + shellcheck: name: shellcheck runs-on: ubuntu-24.04