Skip to content

Commit baa041b

Browse files
committed
fix(ci): stabilize Scrutinizer and pin actions
1 parent bcef9ed commit baa041b

3 files changed

Lines changed: 21 additions & 16 deletions

File tree

.github/workflows/security-pipeline.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616

1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
2020

2121
- name: Setup PHP 8.3 (no Docker)
22-
uses: shivammathur/setup-php@v2
22+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
2323
with:
2424
php-version: '8.3'
2525
coverage: none
@@ -53,15 +53,15 @@ jobs:
5353

5454
- name: Upload quality gate report
5555
if: always()
56-
uses: actions/upload-artifact@v4
56+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
5757
with:
5858
name: security-quality-gate
5959
path: security/reports/quality-gate.json
6060
if-no-files-found: ignore
6161

6262
- name: Upload hardening gate report
6363
if: always()
64-
uses: actions/upload-artifact@v4
64+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
6565
with:
6666
name: security-hardening-gate
6767
path: security/reports/hardening-gate.json
@@ -72,7 +72,7 @@ jobs:
7272

7373
steps:
7474
- name: Checkout
75-
uses: actions/checkout@v4
75+
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
7676

7777
- name: Run Semgrep (SAST)
7878
run: |
@@ -91,7 +91,7 @@ jobs:
9191
9292
- name: Upload Gitleaks report
9393
if: always()
94-
uses: actions/upload-artifact@v4
94+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
9595
with:
9696
name: security-gitleaks
9797
path: security/reports/gitleaks-report.json
@@ -105,15 +105,15 @@ jobs:
105105
106106
- name: Upload Semgrep SARIF
107107
if: always()
108-
uses: actions/upload-artifact@v4
108+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
109109
with:
110110
name: security-semgrep
111111
path: security/reports/semgrep.sarif
112112
if-no-files-found: ignore
113113

114114
- name: Upload SBOM
115115
if: always()
116-
uses: actions/upload-artifact@v4
116+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
117117
with:
118118
name: security-sbom
119119
path: security/reports/sbom.cyclonedx.json

.github/workflows/snyk-security.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v4
13+
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
1414

1515
- name: Install Snyk CLI
1616
run: npm install -g snyk
@@ -21,6 +21,6 @@ jobs:
2121
run: snyk code test --sarif > snyk-code.sarif || true
2222

2323
- name: Upload SARIF to GitHub Security
24-
uses: github/codeql-action/upload-sarif@v3
24+
uses: github/codeql-action/upload-sarif@6f5948dfacef28e207b48d0905cf90c03365536d # v3.37.9
2525
with:
26-
sarif_file: snyk-code.sarif
26+
sarif_file: snyk-code.sarif

.scrutinizer.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,12 @@ build:
3030
ini:
3131
memory_limit: "-1"
3232

33-
# PHPUnit runs tests in separate processes; Xdebug keeps coverage
34-
# available across those process boundaries.
35-
xdebug.mode: "coverage"
33+
# PCOV keeps the full suite below Scrutinizer's command timeout.
34+
# The few process-isolated tests may not contribute coverage, but the
35+
# suite remains executable and the coverage report stays valid.
36+
pcov.enabled: "1"
37+
pcov.directory: "src"
38+
xdebug.mode: "off"
3639
opcache.enable_cli: "0"
3740
opcache.jit: "0"
3841
opcache.jit_buffer_size: "0"
@@ -72,6 +75,8 @@ build:
7275

7376
dependencies:
7477
override:
78+
- pecl install pcov
79+
7580
# ⚡ Optimized composer
7681
- composer install -o --no-interaction --no-progress --prefer-dist --classmap-authoritative
7782

@@ -100,13 +105,13 @@ build:
100105
stop_on_failure: true
101106
override:
102107
- command: >
103-
XDEBUG_MODE=coverage
108+
php -d pcov.enabled=1
109+
-d pcov.directory=src
104110
vendor/bin/phpunit
105111
--configuration phpunit.xml.dist
106112
--colors=never
107113
--stop-on-error
108114
--stop-on-failure
109-
--debug
110115
--coverage-clover cache/coverage/coverage.xml
111116
idle_timeout: 1200
112117
coverage:

0 commit comments

Comments
 (0)