name: PHP Security on: push: branches: [dev, main] pull_request: branches: [dev, main] schedule: - cron: '0 6 * * 1' workflow_dispatch: permissions: contents: read security-events: write jobs: phpstan: name: PHPStan runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: '8.3' coverage: none - name: Install dependencies run: composer install --no-interaction --prefer-dist - name: Run PHPStan run: vendor/bin/phpstan analyse --error-format=github || true semgrep: name: Semgrep SAST runs-on: ubuntu-latest container: image: semgrep/semgrep steps: - uses: actions/checkout@v4 - name: Run Semgrep run: semgrep scan --config auto --sarif --output results.sarif || true - name: Upload SARIF uses: github/codeql-action/upload-sarif@v3 with: sarif_file: results.sarif if: always()