Skip to content

Conversation

@erik-krogh
Copy link
Contributor

Gets a TP/TN for CVE-2019-10778

I originally made this as part of the js/shell-command-constructed-from-input query.
But back then an evaluation came back with mixed results, so I shelved the implementation.

I dug the implementation up again, refactored it a bit, and added support for rootDir.

Performance looks fine now.

@github-actions github-actions bot added the JS label Oct 27, 2020
@asgerf
Copy link
Contributor

asgerf commented Oct 27, 2020

Hm, the extractor already determines the effective main file for each package.json file. I'd prefer to extract that information and use it in QL, rather than redo the same work in QL.

@erik-krogh
Copy link
Contributor Author

Hm, the extractor already determines the effective main file for each package.json file. I'd prefer to extract that information and use it in QL, rather than redo the same work in QL.

I'm not sure its straightforward to use that extractor code here.

The existing extractor code is only for determining the main import - without regards to where the compiled code ends up.
And the code in this PR is establishing a link between the source code and the compiled code.

@asgerf
Copy link
Contributor

asgerf commented Oct 30, 2020

Ah, great! I looked at the code for the CVE and it seemed the main problem was to identify the entry point for the package, but I see now that the problem is actually connecting that entry point to the real package contents. 👍

@erik-krogh erik-krogh marked this pull request as ready for review October 30, 2020 09:40
@erik-krogh erik-krogh requested a review from a team as a code owner October 30, 2020 09:40
@codeql-ci codeql-ci merged commit 89a808c into github:main Nov 5, 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.

3 participants