ci: add explicit vitest config and enhance test logging to debug sile… #147
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 Checks | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| schedule: | |
| - cron: '0 2 * * 0' | |
| jobs: | |
| dependency-check: | |
| name: Dependency Vulnerability Scan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.19.0' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| env: | |
| HUSKY: 0 | |
| run: npm ci | |
| - name: Run npm audit (production dependencies) | |
| run: npm audit --omit=dev --audit-level=critical | |
| - name: Check for known vulnerabilities in frontend (production dependencies) | |
| run: npm audit --workspace=frontend --omit=dev --audit-level=critical | |
| - name: Check for known vulnerabilities in backend (production dependencies) | |
| run: npm audit --workspace=backend --omit=dev --audit-level=critical | |
| codeql-analysis: | |
| name: CodeQL Analysis | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| language: [ 'javascript', 'typescript' ] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v3 | |
| with: | |
| languages: ${{ matrix.language }} | |
| - name: Autobuild | |
| uses: github/codeql-action/autobuild@v3 | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v3 |