Skip to content

fix: upgrade grunt-contrib-pug to eliminate deprecated core-js dependency#72

Open
harekrishnarai wants to merge 2 commits into
auth0:masterfrom
harekrishnarai:fix/sec-3570-deprecated-core-js
Open

fix: upgrade grunt-contrib-pug to eliminate deprecated core-js dependency#72
harekrishnarai wants to merge 2 commits into
auth0:masterfrom
harekrishnarai:fix/sec-3570-deprecated-core-js

Conversation

@harekrishnarai
Copy link
Copy Markdown

@harekrishnarai harekrishnarai commented Jun 20, 2025

Description

This PR resolves a security vulnerability (SEC-3570) by eliminating the deprecated core-js@2.6.12 dependency from the project's dependency tree.

Background:
The project was using grunt-contrib-pug@1.0.0 which had a transitive dependency on deprecated core-js@2.6.12 through the following chain:

grunt-contrib-pug@1.0.0 → pug@2.0.4 → constantinople@3.1.2 → babel-types@6.26.0 → babel-runtime@6.26.0 → core-js@2.6.12

Security Impact:

  • core-js@<3.23.3 is no longer maintained and not recommended for usage
  • Could cause performance degradation up to 100x due to V8 engine feature detection issues
  • Has known web compatibility issues in some versions

Solution:
Upgraded grunt-contrib-pug from 1.0.0 to 3.0.0, which uses modern pug@3.0.3 and eliminates the entire deprecated dependency chain.

Implementation Details:

  • No breaking changes: The upgrade is backward compatible
  • No API changes: All existing Pug template functionality remains unchanged
  • Modern dependencies: Now uses actively maintained packages
  • Zero impact: Build process, webpack compilation, and site functionality remain intact

References

Testing

Security Verification:

# Verify no deprecated packages
npm ls | grep -i deprecated
# Result: (empty) ✅

# Verify no core-js@2.6.12 in dependency tree  
npm ls core-js
# Result: (empty) ✅

# Security audit shows zero vulnerabilities
npm audit --only=prod
# Result: found 0 vulnerabilities ✅

# Verify grunt-contrib-pug version
npm ls grunt-contrib-pug
# Result: grunt-contrib-pug@3.0.0 ✅

Functionality Testing:

# Build process works correctly
npm run build
# Result: ✅ Successful compilation

# Webpack builds complete without errors
# Result: ✅ All 6 entry points compiled successfully

# Pug template processing unchanged
# Result: ✅ All .pug files compiled to HTML correctly

Environment:

  • Node.js: v20.19.0
  • npm: 10.8.2
  • Dependencies: No breaking changes, all existing functionality preserved

Manual Testing:

  • Website loads and functions correctly

  • All WebAuthn functionality works as expected

  • Build artifacts are identical in structure and functionality

  • No UI changes or regressions observed

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not master

…ency

- Upgrade grunt-contrib-pug from 1.0.0 to 3.0.0
- Eliminates deprecated core-js@2.6.12 dependency chain
- Resolves SEC-3570 security vulnerability
- Uses modern pug@3.0.3 with maintained dependencies
- No breaking changes, build and functionality verified

Fixes: SEC-3570
@harekrishnarai harekrishnarai marked this pull request as ready for review June 20, 2025 20:15
@harekrishnarai harekrishnarai force-pushed the fix/sec-3570-deprecated-core-js branch from 32eac17 to b04d0b4 Compare September 1, 2025 09:19
@harekrishnarai harekrishnarai reopened this Sep 1, 2025
@harekrishnarai
Copy link
Copy Markdown
Author

An ESD ticket has been filed for this PR.

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.

1 participant