name: Code Scanning

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

permissions:
  contents: read

env:
  CGO_ENABLED: 0

jobs:
  CodeQL-Build:
    runs-on: ubuntu-latest
    permissions:
      security-events: write

    steps:
      - name: Check out code
        uses: actions/checkout@v4.2.2

      - name: Initialize CodeQL
        uses: github/codeql-action/init@v3.28.0
        with:
          languages: go
          queries: security-and-quality

      - name: Perform CodeQL Analysis
        uses: github/codeql-action/analyze@v3.28.0
