-
Notifications
You must be signed in to change notification settings - Fork 41
Update requiremodulev3 monorepo #769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update requiremodulev3 monorepo #769
Conversation
if (WORKSPACE_MODULE_PATH) { | ||
exports.debug(`Getting ${module} from path ${WORKSPACE_MODULE_PATH}`); | ||
let workspace_path = null; | ||
workspace_path = path.join(WORKSPACE_MODULE_PATH, 'node_modules', module); |
Check warning
Code scanning / Semgrep
Semgrep Finding: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal
/* Find from node path */ | ||
let node_path = null; | ||
if (!exports.isUndefined(process.env.NODE_PATH)) { | ||
node_path = path.join(process.env.NODE_PATH, module); |
Check warning
Code scanning / Semgrep
Semgrep Finding: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal
/* Find from global node modules path */ | ||
exports.debug(`Getting ${module} from ${GLOBAL_MODULE_PATH}`); | ||
|
||
let global_path = path.join(GLOBAL_MODULE_PATH, module); |
Check warning
Code scanning / Semgrep
Semgrep Finding: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal
} catch (_) { | ||
/* Find from current working directory */ | ||
exports.debug(`Getting ${module} from ${process.cwd()}`); | ||
let local_path = path.join(process.cwd(), 'node_modules', module); |
Check warning
Code scanning / Semgrep
Semgrep Finding: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal
Whitelisted all the required module paths. If not in the list throw error. This will ensure any random value of the module is not allowed. |
No description provided.