feat(workflows): add security reusable workflows #4
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CodeQL Security Analysis | |
| on: | |
| push: | |
| branches: [ main, develop, feature/* ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| schedule: | |
| - cron: '0 4 * * 0' # Sundays at 4 AM UTC | |
| workflow_call: | |
| permissions: | |
| contents: read | |
| security-events: write | |
| jobs: | |
| analyze: | |
| name: CodeQL Analysis | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| security-events: write | |
| actions: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| language: [ 'javascript' ] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@71cf2267d89c5cb81562390fa70a37fa40b1305e # v4.2.2 | |
| with: | |
| persist-credentials: false | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@95b1867cf797beb28ce725a6f25268e2d3304672 # v3.27.0 | |
| with: | |
| languages: ${{ matrix.language }} | |
| queries: security-extended,security-and-quality | |
| - name: Autobuild | |
| uses: github/codeql-action/autobuild@95b1867cf797beb28ce725a6f25268e2d3304672 # v3.27.0 | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@95b1867cf797beb28ce725a6f25268e2d3304672 # v3.27.0 | |
| with: | |
| category: "/language:${{ matrix.language }}" | |
| - name: Add job summary | |
| if: always() | |
| run: | | |
| echo "## CodeQL Security Analysis Complete" >> $GITHUB_STEP_SUMMARY | |
| echo "**Language:** ${{ matrix.language }}" >> $GITHUB_STEP_SUMMARY | |
| echo "**Queries:** security-extended, security-and-quality" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "📊 View results in the Security tab under Code Scanning" >> $GITHUB_STEP_SUMMARY |