name: codeql on: push: branches: [ master ] pull_request: schedule: - cron: '0 6 * * MON' workflow_dispatch: permissions: {} jobs: analysis: name: analysis runs-on: ubuntu-latest timeout-minutes: 10 concurrency: group: ${{ github.workflow }}-${{ github.sha }} cancel-in-progress: false permissions: actions: read # Scan GitHub Actions workflows contents: read # Checkout the repository security-events: write # Store results in the Security tab strategy: fail-fast: false matrix: language: [ 'actions', 'javascript' ] steps: - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false show-progress: false - name: Initialize CodeQL uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3 with: languages: ${{ matrix.language }} - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3 with: category: '/language:${{ matrix.language }}' codeql: if: ${{ !cancelled() }} name: codeql needs: [ analysis ] runs-on: ubuntu-latest timeout-minutes: 5 concurrency: group: ${{ github.workflow }}-${{ github.sha }} cancel-in-progress: false steps: - name: Report status shell: bash env: SCAN_SUCCESS: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }} run: | if [ "${SCAN_SUCCESS}" == "true" ] then echo 'CodeQL analysis successful ✅' else echo 'CodeQL analysis failed ❌' exit 1 fi