A simple Node.js project designed to exercise vulnerability scanners such as Endor Labs.
This project intentionally includes a dependency with known security vulnerabilities to test and demonstrate vulnerability scanning capabilities.
- Package: lodash
- Version: 4.17.19
- Known Vulnerabilities:
- CVE-2020-8203 (Prototype Pollution) - CVSS 7.4 (High)
- CVE-2019-10744 (Regular Expression Denial of Service) - CVSS 5.3 (Moderate)
- Command Injection - CVSS 7.2 (High)
- Category: String manipulation and object merging
The vulnerable code paths are exercised through various lodash functions including:
_.merge()- Object merging_.mergeWith()- Custom object merging_.set()- Setting nested object properties with string paths_.template()- String templating- String manipulation utilities (trim, upperCase, camelCase)
npm installRun the application to exercise the vulnerable dependency:
npm startOr:
node index.jsThe application demonstrates various uses of the vulnerable lodash library, including string manipulation and object operations that could be exploited for prototype pollution attacks.
This repository includes automated Endor Labs exception policy management via GitHub Actions.
The .endorignore file contains vulnerability IDs that should be ignored by Endor Labs scans. Format:
- One vulnerability ID per line
- Comments start with
# - Blank lines are ignored
Example:
# Ignore Regular Expression Denial of Service (ReDoS) in lodash
GHSA-35jh-r3h4-6jhm
GHSA-29mw-wpgm-hmr9
Three workflows are configured:
-
endor-sync.yml- Runs on PR open/sync/reopen- Syncs PR-specific exception policy from
.endorignore - Runs Endor scan with PR comments enabled
- Syncs PR-specific exception policy from
-
endor-main-sync.yml- Runs on push to main/master- Syncs main branch exception policy from
.endorignore
- Syncs main branch exception policy from
-
endor-pr-cleanup.yml- Runs on PR close- Deletes PR-specific exception policy
Configure these secrets in your repository settings:
ENDOR_NAMESPACE- Your Endor namespace (e.g.,leonardo-learn)ENDOR_API_KEY- Endor API keyENDOR_API_SECRET- Endor API secret
The GITHUB_TOKEN is automatically provided by GitHub Actions and has PR read/write permissions.
For detailed documentation about the sync script, including usage examples and command-line options, see scripts/README.md.
The included vulnerable dependency (lodash 4.17.19) has known security issues and should not be used in production environments. This project is specifically designed to help test vulnerability scanning tools.
MIT