Severity
High
Short Description
Contains a dependency which resolves to a remote HTTP URL which could be used to inject untrusted code and reduce overall package reliability.
Packages
View packages with this alert.Suggestion
Publish the HTTP URL dependency to npm or a private package repository and consume it from there.
The HTTP Dependency Alert is triggered when a package resolves dependencies from remote HTTP or HTTPS URLs instead of trusted, immutable package registries like npm. This practice introduces significant risks related to security, stability, and reproducibility. Dependencies fetched from URLs bypass the typical vetting and integrity checks enforced by package registries, making them prone to exploitation. Using URL-based dependencies introduces significant challenges, including unpredictability, dependency drift, and the potential for supply chain attacks.
Why HTTP Dependencies are Risky
To mitigate the risks associated with HTTP dependencies:
Publish Dependencies to Trusted Registries
Replace HTTP URLs in Configuration Files
package.json
, requirements.txt
).Pin Dependencies to Specific Versions
Automate HTTPS Enforcement
Conduct Regular Audits
Package: 07-cli
Here's an example of a package with this alert. It is considered a high severity alert in the supply chain risk category.
The alert links to package.json
where the Git repo is listed as a dependency:
Socket identifies HTTP Dependency Alerts by analyzing the package configuration files for dependencies sourced from remote URLs. It flags both HTTP and HTTPS connections, emphasizing the risks associated with non-immutable dependencies.