Resolve composer & npm security advisories (#525)#555
Open
maltehuebner wants to merge 1 commit into
Open
Conversation
composer audit reported 34 advisories across 12 packages (twig critical CVE-2026-46633, high CVEs in symfony/http-kernel, symfony/monolog-bridge, twig; plus guzzle, symfony/cache, routing, runtime, yaml, ...). Ran composer update within the existing constraints; composer audit is now clean (0 advisories). Updating symfony to 8.1 makes PHPStan 1.12 unable to index symfony symbols (it reports the HttpFoundation Request class as unknown), which would fail the PHPStan CI job. Bumped the static-analysis toolchain to support the new symfony release: - phpstan/phpstan ^1.12 -> ^2.0 - phpstan/phpdoc-parser ^1.2 -> ^2.0 - rector/rector ^1.2 -> ^2.0 (requires phpstan ^2.0) The existing phpstan-baseline.neon still applies and `phpstan analyse` passes with no errors. npm: applied the non-breaking `npm audit fix` (18 -> 6 advisories). The 6 remaining advisories are all in the webpack build tool chain (devDependencies: serialize-javascript, css-minimizer-webpack-plugin, webpack-notifier, node-notifier, uuid) and require breaking upgrades that cannot be verified without a full frontend build. `npm audit --omit=dev` (production, browser-shipped dependencies) reports 0 vulnerabilities. Added a Security Audit CI workflow running `composer audit` and `npm audit --omit=dev` on push/PR so new advisories in shipped dependencies fail the build. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
composer auditreported 34 advisories across 12 packages (twig critical CVE-2026-46633; high CVEs insymfony/http-kernel,symfony/monolog-bridge,twig; plusguzzlehttp/*,symfony/cache,symfony/routing,symfony/runtime,symfony/yaml,symfony/http-foundation,symfony/dom-crawler,symfony/web-profiler-bundle).npm auditreported 18.Composer
composer updatewithin the existing version constraints.composer auditis now clean (0 advisories). Notable bumps:twig/twig-> 3.28,symfony/http-kernel-> 7.4.14,symfony/monolog-bridge-> 7.4.12,symfony/cache/routing-> 8.1,guzzlehttp/*patched.Toolchain bump (required by the symfony update)
Updating symfony to 8.1 makes PHPStan 1.12 unable to index symfony symbols (it reports
Symfony\Component\HttpFoundation\Requestas an unknown class), which would turn the PHPStan CI job red. To keep it green:phpstan/phpstan^1.12->^2.0phpstan/phpdoc-parser^1.2->^2.0rector/rector^1.2->^2.0(rector 1.x pins phpstan^1.12)The existing
phpstan-baseline.neonstill applies andvendor/bin/phpstan analysepasses with no errors under PHPStan 2.x.NPM
npm audit fix(18 -> 6 advisories).devDependenciesin the webpack build tool chain (serialize-javascript,css-minimizer-webpack-plugin,webpack-notifier,node-notifier,uuid) and only fix via breaking--forceupgrades that cannot be verified without a full frontend build.npm audit --omit=dev(production / browser-shipped deps) reports 0 vulnerabilities.CI
.github/workflows/security-audit.ymlrunscomposer auditandnpm audit --omit=devon push/PR, so new advisories in shipped dependencies fail the build.Deliberately not implemented
chart.js2 -> 4 andfont-awesome4 -> maintained fork. These are EOL/unmaintained (not open CVEs); the major upgrades require frontend code changes and a webpack rebuild that can't be verified in this environment. Recommended as a follow-up.npm audit fix --forcefor the 6 dev/build-chain advisories — same verification limitation.Verification
composer audit— No advisories.npm audit --omit=dev— 0 vulnerabilities.vendor/bin/phpstan analyse— No errors (PHPStan 2.x).vendor/bin/phpunit --testsuite="Project Test Suite"— 121 tests green.bin/console lint:container --env=prod— OK.Closes #525
🤖 Generated with Claude Code