This guide documents the strategy and workflow for AI agents to efficiently address security vulnerabilities in this repository. It is based on successful remediation completed on February 6, 2026.
This repository is a JavaScript utility package for parcelLab's plugin system with React and Vue framework support. Security vulnerabilities typically come from:
- Direct dependencies (lodash, buble)
- Build tool dependencies (@vue/cli-service, webpack-dev-server)
- Transitive dependencies (postcss, vue-template-compiler)
cd /home/runner/work/js-plugin-utils/js-plugin-utils
cat package.json
ls -laKey Points:
- This is a build tool package, not a runtime application
- Contains React and Vue wrapper components
- Build scripts:
unsafe-build-react,unsafe-build-vue - DevDependencies only (no production dependencies)
npm audit
npm audit --json > audit-report.json # For detailed analysisExpected Output:
- List of vulnerabilities with severity levels
- Direct vs. transitive dependency issues
- Suggested fix commands
npm outdatedCategorize vulnerabilities by fix strategy:
- Direct dependencies with available updates
- No breaking changes
- Action: Run
npm audit fixfirst
- Outdated major dependencies
- Action: Update via package.json modifications
- Transitive dependencies where parent package hasn't updated
- Examples: webpack-dev-server, postcss through @vue/cli-service
- Action: Add to
overridessection in package.json
- Packages that are end-of-life
- Example: vue-template-compiler (Vue 2)
- Action: Search for community-maintained patches
npm audit fix
npm audit # Verify what remainsFor remaining vulnerabilities, search:
- GitHub Security Advisories (GHSA-xxxx-xxxx-xxxx)
- CVE databases
- Package changelogs and release notes
- Community discussions
Web Search Template:
"[package-name] vulnerability [GHSA-ID] fixed version"
Example Override Pattern:
{
"overrides": {
"webpack-dev-server": ">=5.2.1",
"postcss": ">=8.4.31",
"vue-template-compiler": "npm:vue-template-compiler-patched@^2.7.16-patch.2"
}
}For EOL Packages:
- Search for "[package-name] patched" or "[package-name] community fix"
- Use npm aliases:
"package": "npm:package-patched@version" - Add to both
devDependenciesANDoverridesto ensure transitive deps also use it
rm -rf node_modules package-lock.json
npm install
npm audit # Should show 0 vulnerabilitiesnpm audit
npm list [package-name] # Verify specific package versions# Test React build
npm run unsafe-build-react
# Test Vue build
npm run unsafe-build-vueSuccess Criteria:
- Both builds complete without errors
- Output files generated in v3/ and v5/ directories
- File sizes are reasonable (~2-7 KB)
ls -lh v3/react/index.js
ls -lh v3/vue/index.jsUpdate commit messages and PR descriptions with:
- What vulnerabilities were fixed
- How they were fixed
- CVE/GHSA identifiers
- Version changes
- Final audit status
CVE: CVE-2019-10744, GHSA-xxjr-mmjv-4gpg
Fix: npm audit fix (updates to 4.17.21+)
CVE: CVE-2025-30360
GHSA: GHSA-9jgg-88mc-972h, GHSA-4v9v-hfq4-rm2v
Fix: Update to 5.2.1+
Method: npm overrides (parent packages may not have updated)
CVE: CVE-2023-44270
GHSA: GHSA-7fh5-64p2-3v2j
Fix: Update to 8.4.31+
Method: npm overrides
CVE: CVE-2024-6783
GHSA: GHSA-g3ch-rx76-35fx
Fix: Use vue-template-compiler-patched@2.7.16-patch.2
Method: npm alias + overrides
Note: Official Vue 2 is EOL; community maintains patches
- Check for breaking changes in updated packages
- Review build output for specific errors
- Consider pinning to specific patch versions if needed
- Verify package-lock.json has updated versions
- Check
npm list [package]to confirm actual installed version - Sometimes npm audit database lags behind; verify CVE is actually fixed
- Ensure syntax is correct in package.json
- Delete node_modules and package-lock.json
- Run
npm installfresh - Check npm version (overrides require npm 8.3.0+)
- Always backup first: Git commit or stash changes before major updates
- Test incrementally: Fix and test one category at a time
- Document everything: Note what worked and what didn't
- Use web search: Security advisories have specific fix versions
- Prefer npm overrides: More maintainable than forking packages
- Check for patches: Community often maintains security patches for EOL packages
- Verify builds work: Security fixes are useless if they break functionality
- Simple case (1-2 auto-fixable vulnerabilities): 10-15 minutes
- Moderate case (3-5 vulnerabilities, some require overrides): 30-45 minutes
- Complex case (5+ vulnerabilities, EOL packages, custom patches): 60-90 minutes
✅ npm audit reports 0 vulnerabilities
✅ All build scripts execute successfully
✅ Generated files are present and reasonable size
✅ No breaking changes to public API
✅ Documentation updated with changes made
- npm overrides documentation
- GitHub Security Advisories
- Snyk Vulnerability Database
- npm audit documentation
Recommended frequency: Monthly or when Dependabot alerts are received
Quick check command:
npm audit && echo "Security Status: OK" || echo "Security Status: VULNERABILITIES FOUND"Last Updated: February 6, 2026
All vulnerabilities successfully resolved in this iteration