on: [push]

name: Datadog Static Analysis

permissions:
  contents: read
  pull-requests: write

jobs:
  static-analysis:
    runs-on: ubuntu-latest
    name: Datadog Static Analyzer
    steps:
    - name: Checkout
      uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
    - name: Check code meets quality and security standards
      id: datadog-static-analysis
      uses: DataDog/datadog-static-analyzer-github-action@2cc0e0621ea2863272b29d9aea230d9aad238086 # v2.0.0
      with:
        dd_api_key: ${{ secrets.STATIC_ANALYZER_API_KEY }}
        dd_app_key: ${{ secrets.STATIC_ANALYZER_APP_KEY }}
        dd_service: dd-trace-go
        dd_env: ci
        dd_site: datadoghq.com
        cpu_count: 2
