Security #99
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: Security | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| schedule: | |
| - cron: '0 6 * * 1' # Weekly on Monday at 6am UTC | |
| permissions: | |
| contents: read | |
| security-events: write | |
| pull-requests: write | |
| actions: read | |
| jobs: | |
| semgrep: | |
| name: Semgrep SAST | |
| runs-on: ubuntu-latest | |
| container: | |
| image: semgrep/semgrep | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Run Semgrep (Auto) | |
| run: semgrep scan --config auto --sarif --output semgrep-auto.sarif src | |
| continue-on-error: true | |
| - name: Run Semgrep (OWASP Top 10) | |
| run: semgrep scan --config p/owasp-top-ten --sarif --output semgrep-owasp.sarif src | |
| continue-on-error: true | |
| - name: Upload Semgrep Auto results to GitHub Security | |
| uses: github/codeql-action/upload-sarif@v3 | |
| with: | |
| sarif_file: semgrep-auto.sarif | |
| category: semgrep-auto | |
| if: always() | |
| - name: Upload Semgrep OWASP results to GitHub Security | |
| uses: github/codeql-action/upload-sarif@v3 | |
| with: | |
| sarif_file: semgrep-owasp.sarif | |
| category: semgrep-owasp | |
| if: always() | |
| codeql: | |
| name: CodeQL Analysis | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v3 | |
| with: | |
| languages: javascript-typescript | |
| queries: security-and-quality | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v3 | |
| with: | |
| category: codeql | |
| dependency-review: | |
| name: Dependency Review | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Dependency Review | |
| uses: actions/dependency-review-action@v4 | |
| with: | |
| comment-summary-in-pr: always | |
| fail-on-severity: high | |
| warn-on-openssf-scorecard-level: 3 |