Skip to content

JS: Expand cheat sheet page#5741

Merged
codeql-ci merged 6 commits into
github:mainfrom
asgerf:js/more-cheat-sheet
May 10, 2021
Merged

JS: Expand cheat sheet page#5741
codeql-ci merged 6 commits into
github:mainfrom
asgerf:js/more-cheat-sheet

Conversation

@asgerf

@asgerf asgerf commented Apr 21, 2021

Copy link
Copy Markdown
Contributor

Expands the JS data flow cheat sheet with:

  • SourceNode.getALocalUse
  • AccessPath module
  • Elaborate on RemoteFlowSource and move into its own section.

cc @lcartey @rvermeulen, let me know if you have any input of this.

@asgerf asgerf added JS no-change-note-required This PR does not need a change note labels Apr 21, 2021
@rvermeulen

Copy link
Copy Markdown
Contributor

Thanks for updating the cheat sheet!

Might it be useful to reference the RemoteFlowSource part in the cheat sheet in the following paragraph found at https://codeql.github.com/docs/codeql-language-guides/specifying-additional-remote-flow-sources-for-javascript/ or otherwise add emphasize on the isUserControlledObject predicate?

To model a new source of untrusted input, such as a previously unmodelled library API, you can define a subclass of RemoteFlowSource that covers all uses of that API. All standard analyses will then automatically pick up this new source of remote flow.

@erik-krogh erik-krogh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@codeql-ci codeql-ci merged commit b1f28af into github:main May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation JS no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants