Dockerfile sets NPM configuration to disable strict SSL misconfiguration detected in code
Rule Details
Cortex AppSec Rule ID
APPSEC2_DOCKER_13
Category - Subcategory
Public Exposure - Encryption And Protocols
Provider
OTHER
Severity
HIGH
Framework
DOCKER
Impact
Configuring NPM with the command npm config set strict-ssl false within Dockerfiles is deemed insecure. This command directs NPM (Node Package Manager) to forego SSL certificate verification during its interactions with registries or other network-based transactions.
When strict SSL for NPM is disabled, it heightens the risk of man-in-the-middle (MitM) attacks. Such attacks involve unauthorized actors potentially intercepting, altering, or eavesdropping on the communications between the Node.js application and the NPM registry or other servers. This can facilitate unintended code injections, data breaches, or the installation of malicious packages.
How to Fix
[source,go]
RUN npm config set strict-ssl false
RUN npm config set strict-ssl true
Last updated
Was this helpful?
