Repository navigation
build(deps-dev): bump phpunit/phpunit from 13.4.5 to 13.4.6 #140
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: PHP security analysis | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| workflow_call: | |
| permissions: | |
| contents: read | |
| jobs: | |
| php-security: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Fetch reviewed upstream PHP security rules | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| repository: semgrep/semgrep-rules | |
| ref: a84ff9cc2453ca91d581380de4b8b3f272f6f4be | |
| path: build/security-rules | |
| sparse-checkout: php/lang/security | |
| persist-credentials: false | |
| - name: Install the pinned scanner in an isolated environment | |
| run: | | |
| python3 -m venv "$RUNNER_TEMP/runtime-semgrep" | |
| "$RUNNER_TEMP/runtime-semgrep/bin/pip" install --disable-pip-version-check 'semgrep==1.178.0' | |
| - name: Scan source with upstream PHP security rules | |
| run: | | |
| "$RUNNER_TEMP/runtime-semgrep/bin/semgrep" scan --jobs 1 --no-git-ignore --metrics=off --disable-version-check --strict --error \ | |
| --config build/security-rules/php/lang/security/injection \ | |
| --config build/security-rules/php/lang/security/php-ssrf.yaml \ | |
| --config build/security-rules/php/lang/security/curl-ssl-verifypeer-off.yaml \ | |
| --config build/security-rules/php/lang/security/deserialization.yaml \ | |
| --sarif --output build/php-security.sarif src | |
| python3 tools/check-security-sarif.py build/php-security.sarif | |
| - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 | |
| if: always() | |
| with: | |
| name: php-security-analysis | |
| path: build/php-security.sarif | |
| if-no-files-found: error | |
| dependency-audit: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # v2 | |
| with: | |
| php-version: '8.5' | |
| extensions: curl, dom, mbstring, mysqli | |
| tools: composer:2 | |
| coverage: none | |
| - name: Resolve and audit production and development dependencies | |
| run: | | |
| composer update --no-plugins --no-scripts --no-interaction --no-progress --prefer-dist | |
| composer audit --locked |