Skip to content

Commit 0e7f490

Browse files
[Maintenance] Make known upstream vulnerabilities not fail the pipe
1 parent 8f3eae2 commit 0e7f490

File tree

2 files changed

+63
-34
lines changed

2 files changed

+63
-34
lines changed

.github/workflows/build.yaml

Lines changed: 57 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
matrix:
2222
php: ["8.3"]
2323
symfony: ["^5.4.21", "^6.4"]
24-
sylius: ["~1.13.0", "~1.14.0"]
24+
sylius: ["~1.14.0"]
2525
database: ["mysql", "postgres"]
2626
mysql: ["8.4"]
2727
postgres: ["15.8"]
@@ -30,7 +30,7 @@ jobs:
3030

3131
include:
3232
-
33-
php: "8.1"
33+
php: "8.3"
3434
symfony: "^6.4"
3535
sylius: "~1.14.0"
3636
database: "mysql"
@@ -39,7 +39,7 @@ jobs:
3939
wkhtmltopdf: "0.12.6-1"
4040
state_machine_adapter: "symfony_workflow"
4141
-
42-
php: "8.2"
42+
php: "8.3"
4343
symfony: "^6.4"
4444
sylius: "~1.14.0"
4545
database: "mysql"
@@ -48,7 +48,7 @@ jobs:
4848
wkhtmltopdf: "0.12.6-1"
4949
state_machine_adapter: "winzou_state_machine"
5050
-
51-
php: "8.2"
51+
php: "8.3"
5252
symfony: "^6.4"
5353
sylius: "~1.14.0"
5454
database: "mysql"
@@ -103,14 +103,6 @@ jobs:
103103
postgresql version: "${{ matrix.postgres }}"
104104
postgresql password: "postgres"
105105

106-
-
107-
name: Run Chrome Headless
108-
run: google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 &
109-
110-
-
111-
name: Run webserver
112-
run: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon)
113-
114106
-
115107
name: Get Composer cache directory
116108
id: composer-cache
@@ -143,6 +135,53 @@ jobs:
143135
name: Install PHP dependencies
144136
run: composer install --no-interaction
145137

138+
- name: Run security checks
139+
run: |
140+
set -e
141+
142+
IGNORED=$(jq -r '.config.audit.ignore[]?' composer.json | sort || true)
143+
144+
if [ -n "$IGNORED" ]; then
145+
echo "Ignored CVEs:"
146+
echo "$IGNORED"
147+
echo
148+
fi
149+
150+
composer audit --no-interaction --abandoned=ignore --no-dev
151+
152+
symfony security:check --format=json > symfony-audit.json || true
153+
154+
FOUND=$(jq -r '.[]?.advisories[]?.cve? // empty' symfony-audit.json | sort | uniq)
155+
DIFF=$(comm -23 <(echo "$FOUND") <(echo "$IGNORED"))
156+
157+
if [ -n "$DIFF" ]; then
158+
echo "❌ New vulnerabilities found by Symfony security:check:"
159+
echo "$DIFF"
160+
exit 1
161+
else
162+
echo "✅ No new vulnerabilities found by Symfony security:check."
163+
fi
164+
165+
-
166+
name: Run ECS
167+
run: vendor/bin/ecs check
168+
169+
-
170+
name: Validate composer.json
171+
run: composer validate --ansi --strict
172+
173+
-
174+
name: Run analysis
175+
run: composer analyse
176+
177+
-
178+
name: Run PHPStan
179+
run: vendor/bin/phpstan analyse -c phpstan.neon.dist src/
180+
181+
-
182+
name: Run PHPSpec
183+
run: vendor/bin/phpspec run --ansi -f progress --no-interaction
184+
146185
-
147186
name: Get Yarn cache directory
148187
id: yarn-cache
@@ -193,32 +232,16 @@ jobs:
193232
run: (cd tests/Application && bin/console sylius:fixtures:load -n)
194233

195234
-
196-
name: Run security check
197-
run: symfony security:check
198-
199-
-
200-
name: Run ECS
201-
run: vendor/bin/ecs check
202-
203-
-
204-
name: Validate composer.json
205-
run: composer validate --ansi --strict
206-
207-
-
208-
name: Run analysis
209-
run: composer analyse
210-
211-
-
212-
name: Run PHPStan
213-
run: vendor/bin/phpstan analyse -c phpstan.neon.dist src/
235+
name: Run PHPUnit
236+
run: vendor/bin/phpunit --colors=always
214237

215238
-
216-
name: Run PHPSpec
217-
run: vendor/bin/phpspec run --ansi -f progress --no-interaction
239+
name: Run Chrome Headless
240+
run: google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 &
218241

219242
-
220-
name: Run PHPUnit
221-
run: vendor/bin/phpunit --colors=always
243+
name: Run webserver
244+
run: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon)
222245

223246
-
224247
name: Run Behat

composer.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@
6464
"symfony/flex": true,
6565
"symfony/thanks": false,
6666
"php-http/discovery": true
67+
},
68+
"audit": {
69+
"ignore": [
70+
"CVE-2025-31481",
71+
"CVE-2025-31485"
72+
]
6773
}
6874
},
6975
"conflict": {

0 commit comments

Comments
 (0)