Skip to content

JavaScript: Model extra sinks in vm module#3468

Merged
semmle-qlci merged 2 commits intogithub:masterfrom
p0:imp/nodejs-vm-sinks
May 18, 2020
Merged

JavaScript: Model extra sinks in vm module#3468
semmle-qlci merged 2 commits intogithub:masterfrom
p0:imp/nodejs-vm-sinks

Conversation

@p0
Copy link
Copy Markdown
Contributor

@p0 p0 commented May 14, 2020

This adds a few extra sinks for code injection to our NodeJS models -- basically, anything with a code parameter in the documentation of the vm module.

Renaming the existing library class is technically a breaking change, since it is public (though not in the global namespace). If you prefer, I could retain it while introducing a supertype for InvokeNodes and a secondary subclass of that supertype for VmModuleConstructorInvocation.

@p0 p0 requested a review from esbena May 14, 2020 09:06
@p0 p0 requested a review from a team as a code owner May 14, 2020 09:06
@esbena
Copy link
Copy Markdown
Contributor

esbena commented May 14, 2020

LGTM, but lets preserve backwards-compatibility.

I believe we have done something like this in a few places:

/**
 * DEPRCATED Use `VmModuleMemberInvocation` instead.
 */ 
deprecated
class VmModuleMethodCall = VmModuleMemberInvocation;

@p0
Copy link
Copy Markdown
Contributor Author

p0 commented May 14, 2020 via email

@esbena esbena added the JS label May 18, 2020
@semmle-qlci semmle-qlci merged commit 14664be into github:master May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants