Skip to content

fix: upgrade aws-cdk-lib to fix HIGH minimatch vulnerability#91

Merged
Simone319 merged 6 commits intomainfrom
fix/dependabot-high-critical-vulnerabilities
Mar 27, 2026
Merged

fix: upgrade aws-cdk-lib to fix HIGH minimatch vulnerability#91
Simone319 merged 6 commits intomainfrom
fix/dependabot-high-critical-vulnerabilities

Conversation

@Simone319
Copy link
Copy Markdown
Contributor

@Simone319 Simone319 commented Mar 23, 2026

Summary

Fixes Dependabot alert (HIGH severity): minimatch ReDoS vulnerability bundled inside aws-cdk-lib@2.240.0. Since minimatch is bundled (not a regular transitive dep), npm overrides cannot fix it — upgrading aws-cdk-lib is the only viable path.

Vulnerability Fix

  • aws-cdk-lib: 2.240.0 → 2.241.0 (bundles patched minimatch 10.2.4)
  • constructs: 10.1.139 → 10.5.0 (peer dep required by aws-cdk-lib@2.241.0)
  • npm audit --audit-level=high: 0 vulnerabilities

CI/Build Modernization (required by dependency upgrades)

The aws-cdk-lib upgrade required jsii 5.x, which cascaded into CI and toolchain changes:

  • jsii: ^1.63.0 → ~5.9.9 (required by aws-cdk-lib@2.241.0 assembly format)
  • typescript: ^4.7.4 → ~5.9.3 (required by jsii 5.x)
  • jsii-docgen: ^3.8.31 → ^10.11.14 (compatible with jsii 5.x)
  • jsii-rosetta: added ~5.9.5 (required by jsii 5.x)
  • Removed jsii/superchain Docker container from CI — it only ships jsii 1.x. Replaced with actions/setup-java@v4 (Corretto 11) and actions/setup-python@v5 for pacmak.
  • Fixed broken YAML syntax in build.yml (multi-line run: block scalar)
  • Upgraded GitHub Actions: checkout@v2→v4, setup-node@v2→v4
  • Replaced deprecated ::set-output with $GITHUB_OUTPUT
  • Node.js: 14.17.6 → 18.x

Test Compatibility Fixes

  • ts-jest: ^27.1.5 → ^29.4.6 (jest 30 compatibility)
  • @types/jest: ^27.5.2 → ^30.0.0
  • Replaced deprecated jest config (preset/globals) with transform syntax
  • Replaced deprecated matchers: toBeCalled()toHaveBeenCalled(), toBeCalledWith()toHaveBeenCalledWith()
  • Added skipLibCheck: true and esnext.disposable to tsconfig.jest.json

Other

  • Removed mavenEndpoint from .projenrc.js (incompatible with jsii 5.x Maven Central publishing)
  • Removed .env from git tracking, added to .gitignore
  • API.md regenerated by jsii-docgen 10.x (formatting changes only)

Verification

  • npm audit: 0 vulnerabilities
  • jsii: builds successfully (0 errors, 0 warnings)
  • jest: 2 test suites, 2 tests passed
  • CI: all checks green (build, CodeQL, Analyze)

- Upgrade aws-cdk-lib 2.240.0 → 2.241.0 (bundles patched minimatch 10.2.4)
- Upgrade constructs 10.1.139 → 10.5.0 (required by aws-cdk-lib@2.241.0)
- Upgrade jsii ^1.63.0 → ~5.9.9 (supports intersection-types assembly feature)
- npm audit --audit-level=high: 0 vulnerabilities
@Simone319 Simone319 requested a review from a team as a code owner March 23, 2026 12:58
- Fix broken multi-line run: YAML block scalar syntax
- Upgrade Node.js 14.17.6 → 18.x (required by jsii ~5.9.9)
- Upgrade container jsii/superchain:1-buster-slim-node14 → 1-bookworm-slim-node18
- Upgrade actions/checkout@v2 → v4, actions/setup-node@v2.2.0 → v4
- Replace deprecated ::set-output with $GITHUB_OUTPUT
… matchers

- Upgrade ts-jest ^27.1.5 → ^29.4.6 (supports jest ^29 || ^30)
- Upgrade @types/jest ^27.5.2 → ^30.0.0
- Replace deprecated jest preset with transform config
- Replace toBeCalled() with toHaveBeenCalled() (jest 30 deprecation)
- Replace toBeCalledWith() with toHaveBeenCalledWith()
- All tests passing (2 suites, 2 tests)
- Remove jsii/superchain container (only ships jsii 1.x)
- Add actions/setup-java@v4 and actions/setup-python@v5 for pacmak
- Upgrade aws-cdk-lib 2.240.0→2.241.0 (bundles patched minimatch 10.2.4)
- Upgrade jsii ^1.63.0→~5.9.9, typescript ^4.7.4→~5.9.3
- Upgrade constructs 10.1.139→10.5.0, jsii-docgen ^3.8.31→^10.11.14
- Add jsii-rosetta ~5.9.5
- Fix ts-jest/jest 30 compatibility, update deprecated test matchers
- npm audit: 0 vulnerabilities
@Simone319 Simone319 merged commit 58e4007 into main Mar 27, 2026
3 checks passed
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.

2 participants