Skip to content

Fix false positive for global navigation check in typescript#77

Merged
phosphore merged 1 commit into
doyensec:masterfrom
bchurchill:typescript-literal-fp
Dec 16, 2020
Merged

Fix false positive for global navigation check in typescript#77
phosphore merged 1 commit into
doyensec:masterfrom
bchurchill:typescript-literal-fp

Conversation

@bchurchill

Copy link
Copy Markdown
Contributor

Typescript code would always have the LIMIT_NAVIGATION_GLOBAL_CHECK fail. This was happening because the atomic LIMIT_NAVIGATION_JS_CHECK was looking for an AST node of type Literal, instead of using AstHelper.StringLiteral. As a result, the check worked properly for javascript code but not typescript.

This PR:

  • fixes this particular issue
  • adds a test case
  • makes the coding style consistent across the CustomArgumentsJSCheck as well

@phosphore

Copy link
Copy Markdown
Contributor

Ooops! My bad 😇
LGTM

@phosphore phosphore merged commit 73c1d5b into doyensec:master Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants