mock-require
Simple, intuitive mocking of Node.js modules.
Supply chain provenance
Status for the latest visible version.
Without SLSA provenance there is no cryptographic link between this tarball and the public source — the axios compromise (March 2026) relied on exactly this gap.
Maintainers
Keywords
Accepted risks
Findings the reviewer chose to accept rather than block on.
| Source | Rule | Reason | Accepted by | When |
|---|---|---|---|---|
| semgrep | semgrep:dynamic-require | AI (semgrep): mock-require's core purpose is intercepting require() calls; dynamic require with a variable is the fundamental mechanism of this mocking library, not a vulnerability. | ai |
Versions (showing 17 of 17)
| Version | Deps | Published |
|---|---|---|
| 3.0.3 | 2 / 3 | |
| 3.0.2 | 2 / 2 | |
| 3.0.1 | 1 / 2 | |
| 3.0.0 | 2 / 2 | |
| 2.0.2 | 1 / 0 | |
| 2.0.1 | 1 / 0 | |
| 2.0.0 | 1 / 0 | |
| 1.3.0 | 1 / 0 | |
| 1.2.1 | 1 / 0 | |
| 1.2.0 | 1 / 0 | |
| 1.1.0 | 1 / 0 | |
| 1.0.5 | 1 / 0 | |
| 1.0.4 | 1 / 0 | |
| 1.0.3 | 1 / 0 | |
| 1.0.2 | 0 / 0 | |
| 1.0.1 | 0 / 0 | |
| 1.0.0 | 0 / 0 |
v3.0.3
1 findingPackage was published without Sigstore provenance. Consider requesting the maintainer enable provenance via CI/CD.
v3.0.2
1 findingPackage was published without Sigstore provenance. Consider requesting the maintainer enable provenance via CI/CD.
v3.0.1
1 findingPackage was published without Sigstore provenance. Consider requesting the maintainer enable provenance via CI/CD.
v3.0.0
1 findingPackage was published without Sigstore provenance. Consider requesting the maintainer enable provenance via CI/CD.
v2.0.2
1 findingPackage was published without Sigstore provenance. Consider requesting the maintainer enable provenance via CI/CD.
v2.0.1
1 findingPackage was published without Sigstore provenance. Consider requesting the maintainer enable provenance via CI/CD.
v2.0.0
1 findingPackage was published without Sigstore provenance. Consider requesting the maintainer enable provenance via CI/CD.