Security Checks #36
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: | |
| schedule: | |
| - cron: "0 0 * * 0" # every Sunday at midnight UTC | |
| permissions: | |
| contents: read | |
| jobs: | |
| audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@ec406be512d7077f68eed36e63f4d91bc006edc4 | |
| with: | |
| php-version: "8.2" | |
| tools: composer:v2 | |
| coverage: none | |
| - name: Cache Composer packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: vendor | |
| key: composer-${{ hashFiles('composer.lock') }} | |
| restore-keys: composer- | |
| - name: Install Composer dependencies | |
| run: composer install --no-interaction --prefer-dist --no-dev | |
| - name: Composer audit | |
| run: composer audit | |
| continue-on-error: true | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: pnpm audit (production only) | |
| run: pnpm audit --prod --audit-level=high | |
| continue-on-error: true |