Snyk package loading system with policy detection
Installations
npm install snyk-try-require
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
16.6.2
NPM Version
7.20.6
Score
98.8
Supply Chain
68.1
Quality
77.9
Maintenance
100
Vulnerability
99.6
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
Snyk
Download Statistics
Total Downloads
62,899,423
Last Day
24,249
Last Week
110,025
Last Month
375,248
Last Year
4,304,851
GitHub Statistics
Apache-2.0 License
4 Stars
56 Commits
6 Forks
90 Watchers
1 Branches
22 Contributors
Updated on Oct 29, 2024
Bundle Size
24.21 kB
Minified
8.29 kB
Minified + Gzipped
Package Meta Information
Latest Version
2.0.2
Package Id
snyk-try-require@2.0.2
Size
8.27 kB
NPM Version
7.20.6
Node Version
16.6.2
Published on
Aug 16, 2021
Total Downloads
Cumulative downloads
Total Downloads
62,899,423
Last Day
66.2%
24,249
Compared to previous day
Last Week
8.3%
110,025
Compared to previous week
Last Month
64.9%
375,248
Compared to previous month
Last Year
-1.5%
4,304,851
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Snyk's (try) require
This package tries to load and parse a package.json
file. This does not load the package into memory (as per require
).
What snyk-try-require does:
- Returns a promise
- Does not throw if the
package.json
can't be found, but fulfills withnull
- Uses
debug
module under thesnyk:resolve:try-require
key - Uses lru-cache for caching for 100 objects for 1 hour
- Adds
dependencies
anddevDependencies
if they're missing - Adds
__filename
containing the full original path to the package - If a Snyk policy is present, will add the path of the policy to the
snyk
property - If the package uses
npm-shrinkwrap.json
will include ashrinkwrap
boolean property - Returns the
leading
andtrailing
whitespace of the originalpackage.json
file as aleading
andtrailing
property respectively

No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0
Reason
Found 12/13 approved changesets -- score normalized to 9
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/snyk/try-require/release.yaml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/snyk/try-require/release.yaml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/snyk/try-require/test.yaml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/snyk/try-require/test.yaml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/release.yaml:18
- Warn: npmCommand not pinned by hash: .github/workflows/test.yaml:23
- Info: 0 out of 4 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 2 npmCommand dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/release.yaml:1
- Warn: no topLevel permission defined: .github/workflows/test.yaml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 30 are checked with a SAST tool
Score
4.7
/10
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More