on:
  workflow_call:

jobs:
  codeql:
    name: analyze
    runs-on: ubuntu-22.04
    permissions:
      actions: read
      contents: read
      security-events: write

    strategy:
      fail-fast: false
      matrix:
        language: ['javascript', 'typescript']

    steps:
      - name: checkout
        uses: actions/checkout@v4

      - name: initialize
        uses: github/codeql-action/init@v3
        with:
          languages: ${{ matrix.language }}

      - name: autobuild
        uses: github/codeql-action/autobuild@v3

      - name: analysis
        uses: github/codeql-action/analyze@v3
