deps(deps): bump bcryptjs from 2.4.3 to 3.0.3 #13
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: CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build & Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| node-version: ['20'] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run npm audit (fail on high/critical) | |
| run: npm audit --audit-level=high | |
| - name: Run linting | |
| run: npm run lint | |
| - name: Run tests | |
| run: npm test | |
| - name: Build application | |
| run: npm run build | |
| security-gate: | |
| name: Security Gate | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Security audit (blocking) | |
| run: npm audit --audit-level=high | |
| - name: Check for known vulnerabilities | |
| run: | | |
| echo "Running security checks..." | |
| npm audit --json > audit-results.json || true | |
| # Count high and critical vulnerabilities | |
| HIGH_COUNT=$(cat audit-results.json | jq '.metadata.vulnerabilities.high // 0') | |
| CRITICAL_COUNT=$(cat audit-results.json | jq '.metadata.vulnerabilities.critical // 0') | |
| echo "High vulnerabilities: $HIGH_COUNT" | |
| echo "Critical vulnerabilities: $CRITICAL_COUNT" | |
| if [ "$CRITICAL_COUNT" -gt 0 ]; then | |
| echo "::error::Critical vulnerabilities found! Please address them before merging." | |
| exit 1 | |
| fi | |
| if [ "$HIGH_COUNT" -gt 5 ]; then | |
| echo "::warning::Multiple high vulnerabilities found. Consider addressing them." | |
| fi |