Skip to content

Resolve composer & npm security advisories (#525)#555

Open
maltehuebner wants to merge 1 commit into
mainfrom
upgrade/dependency-cves-525
Open

Resolve composer & npm security advisories (#525)#555
maltehuebner wants to merge 1 commit into
mainfrom
upgrade/dependency-cves-525

Conversation

@maltehuebner

Copy link
Copy Markdown
Contributor

Summary

composer audit reported 34 advisories across 12 packages (twig critical CVE-2026-46633; high CVEs in symfony/http-kernel, symfony/monolog-bridge, twig; plus guzzlehttp/*, symfony/cache, symfony/routing, symfony/runtime, symfony/yaml, symfony/http-foundation, symfony/dom-crawler, symfony/web-profiler-bundle). npm audit reported 18.

Composer

  • Ran composer update within the existing version constraints. composer audit is 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\Request as an unknown class), which would turn the PHPStan CI job red. To keep it green:

  • phpstan/phpstan ^1.12 -> ^2.0
  • phpstan/phpdoc-parser ^1.2 -> ^2.0
  • rector/rector ^1.2 -> ^2.0 (rector 1.x pins phpstan ^1.12)

The existing phpstan-baseline.neon still applies and vendor/bin/phpstan analyse passes with no errors under PHPStan 2.x.

NPM

  • Applied the non-breaking npm audit fix (18 -> 6 advisories).
  • The 6 remaining are all devDependencies in the webpack build tool chain (serialize-javascript, css-minimizer-webpack-plugin, webpack-notifier, node-notifier, uuid) and only fix via breaking --force upgrades that cannot be verified without a full frontend build.
  • npm audit --omit=dev (production / browser-shipped deps) reports 0 vulnerabilities.

CI

  • New .github/workflows/security-audit.yml runs composer audit and npm audit --omit=dev on push/PR, so new advisories in shipped dependencies fail the build.

Deliberately not implemented

  • chart.js 2 -> 4 and font-awesome 4 -> 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.
  • Breaking npm audit fix --force for 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

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Hoch] Abhängigkeits-Updates: Symfony-/Twig-CVEs (composer) und npm-Schwachstellen

1 participant