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

nodejs-insecure-url-parse: add inline require('url') #300

Merged
merged 3 commits into from
Aug 4, 2023

Conversation

thypon
Copy link
Member

@thypon thypon commented Aug 4, 2023

No description provided.


function() {
// ruleid: nodejs-insecure-url-parse
uparser.parse("here lies dragons");
Copy link

Choose a reason for hiding this comment

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

reported by reviewdog 🐶
[semgrep] Avoid using url.parse() as it may cause security issues. Consider using the URL class instead.

Source: https://github.com/brave/security-action/blob/main/assets/semgrep_rules/web/nodejs-insecure-url-parse.yaml


Cc @thypon @fmarier

}

// ruleid: nodejs-insecure-url-parse
setTimeout(()=> uparser.parse("here lies dragons"), 1000);
Copy link

Choose a reason for hiding this comment

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

reported by reviewdog 🐶
[semgrep] Avoid using url.parse() as it may cause security issues. Consider using the URL class instead.

Source: https://github.com/brave/security-action/blob/main/assets/semgrep_rules/web/nodejs-insecure-url-parse.yaml


Cc @thypon @fmarier

@@ -1,2 +1,17 @@
// ruleid: nodejs-insecure-url-parse
url.parse("here lies dragons");
// ruleid: nodejs-insecure-url-parse
require('url').parse("here lies dragons");
Copy link

Choose a reason for hiding this comment

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

reported by reviewdog 🐶
[semgrep] Avoid using url.parse() as it may cause security issues. Consider using the URL class instead.

Source: https://github.com/brave/security-action/blob/main/assets/semgrep_rules/web/nodejs-insecure-url-parse.yaml


Cc @thypon @fmarier

var uparser = require('url');

// ruleid: nodejs-insecure-url-parse
uparser.parse("here lies dragons");
Copy link

Choose a reason for hiding this comment

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

reported by reviewdog 🐶
[semgrep] Avoid using url.parse() as it may cause security issues. Consider using the URL class instead.

Source: https://github.com/brave/security-action/blob/main/assets/semgrep_rules/web/nodejs-insecure-url-parse.yaml


Cc @thypon @fmarier

@thypon thypon merged commit 87c0cb9 into main Aug 4, 2023
7 checks passed
@thypon thypon deleted the bugfix/insecure-url-nodejs-v2 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