Skip to content
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

Features/ruleset no backticks in js handlers #292

Merged
merged 2 commits into from
Jul 27, 2023

Conversation

thypon
Copy link
Member

@thypon thypon commented Jul 27, 2023

No description provided.

@thypon thypon requested a review from bcaller July 27, 2023 12:13
@@ -0,0 +1,6 @@
// ruleid: no-backticks-in-js-handlers
onclick="call('good', `{{var}}`, `{{var}}`)"

Choose a reason for hiding this comment

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

reported by reviewdog 🐶
[semgrep] Backtick in JS handler may cause XSS since they are typically not auto escaped in variables.

Consider using single or double apices, instead of backticks.


Source: https://github.com/brave/security-action


Cc @thypon @bcaller

Copy link
Contributor

Choose a reason for hiding this comment

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

TIL

In written Latin, the apex (plural "apices") is a mark with roughly the shape of an acute accent ◌́ which was sometimes placed over vowels to indicate that they are long.

Copy link
Member Author

Choose a reason for hiding this comment

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

now you know what they mean by "apex twins" :P

// ruleid: no-backticks-in-js-handlers
onclick="call('good', `{{var}}`, `{{var}}`)"
// ruleid: no-backticks-in-js-handlers
onclick='call("good", `{{var}}`, `{{var}}`)'

Choose a reason for hiding this comment

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

reported by reviewdog 🐶
[semgrep] Backtick in JS handler may cause XSS since they are typically not auto escaped in variables.

Consider using single or double apices, instead of backticks.


Source: https://github.com/brave/security-action


Cc @thypon @bcaller

// ruleid: no-backticks-in-js-handlers
onclick='call("good", `{{var}}`, `{{var}}`)'
// ruleid: no-backticks-in-js-handlers
onclick=call('good', `{{var}}`, `{{var}}`)

Choose a reason for hiding this comment

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

reported by reviewdog 🐶
[semgrep] Backtick in JS handler may cause XSS since they are typically not auto escaped in variables.

Consider using single or double apices, instead of backticks.


Source: https://github.com/brave/security-action


Cc @thypon @bcaller

@@ -0,0 +1,6 @@
// ruleid: no-backticks-in-js-handlers
onclick="call('good', `{{var}}`, `{{var}}`)"

Choose a reason for hiding this comment

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

reported by reviewdog 🐶
[semgrep] Backtick in JS handler may cause XSS since they are typically not auto escaped in variables.

Consider using single or double apices, instead of backticks.


Source: https://github.com/brave/security-action


Cc @thypon @bcaller

// ruleid: no-backticks-in-js-handlers
onclick="call('good', `{{var}}`, `{{var}}`)"
// ruleid: no-backticks-in-js-handlers
onclick='call("good", `{{var}}`, `{{var}}`)'

Choose a reason for hiding this comment

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

reported by reviewdog 🐶
[semgrep] Backtick in JS handler may cause XSS since they are typically not auto escaped in variables.

Consider using single or double apices, instead of backticks.


Source: https://github.com/brave/security-action


Cc @thypon @bcaller

// ruleid: no-backticks-in-js-handlers
onclick='call("good", `{{var}}`, `{{var}}`)'
// ruleid: no-backticks-in-js-handlers
onclick=call('good', `{{var}}`, `{{var}}`)

Choose a reason for hiding this comment

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

reported by reviewdog 🐶
[semgrep] Backtick in JS handler may cause XSS since they are typically not auto escaped in variables.

Consider using single or double apices, instead of backticks.


Source: https://github.com/brave/security-action


Cc @thypon @bcaller

@thypon thypon force-pushed the features/ruleset-no-backticks-in-js-handlers branch from 54a2e41 to 29ee4de Compare July 27, 2023 12:24
@thypon thypon merged commit 22bf8b6 into main Jul 27, 2023
7 checks passed
Copy link
Contributor

@bcaller bcaller left a comment

Choose a reason for hiding this comment

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

sorry to nit

@thypon thypon deleted the features/ruleset-no-backticks-in-js-handlers branch June 7, 2024 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants