SAP CAP Node.js: Investigating an Axios Dependency Security Finding

A scanner may report Axios even when it is not listed as a direct dependency in package.json. Find the dependency path and installed version before applying a fix.

What to check

From the CAP project directory, inspect the dependency tree and run the package audit. Use the results to identify the affected version and whether another package introduces it.

npm ls axios
npm explain axios
npm audit

Validation and precautions

Review the advisory and select a compatible update of the direct package or its parent dependency. Update the lockfile through the normal development process, run tests and rebuild the deployable artifact. Do not run npm audit fix –force blindly; it can introduce incompatible major updates. Verify the deployed dependency tree with the security team.

Reference

SAP Note: 3756320

npm documentation: Documentation

You May Also Like

Leave a Reply?