name: Code Scanning
on:
  push:
    branches: [trunk]
  pull_request:
    branches: [trunk]
  schedule:
    - cron: "0 0 * * 0"
permissions:
  actions: read
  contents: read
  security-events: write
jobs:
  codeql:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

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

      - name: Perform CodeQL Analysis
        uses: github/codeql-action/analyze@v2
