diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..feaffe0 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,31 @@ +name: CodeQL + +on: + push: + branches: [main] + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + paths-ignore: + - '**/*.md' + - 'docs/**' + - '.github/ISSUE_TEMPLATE/**' + schedule: + - cron: "0 6 * * *" + workflow_dispatch: + +permissions: {} + +concurrency: + group: codeql-${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + analyze: + if: github.event_name != 'pull_request' || !github.event.pull_request.draft + uses: Mininglamp-OSS/.github/.github/workflows/reusable-codeql.yml@main + with: + language: go + permissions: + actions: read + contents: read + security-events: write