From a36f82c42e3b872e38a85d710fc212b3a1b72ac3 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Fri, 4 Aug 2023 14:13:22 +0200 Subject: [PATCH] nodejs-insecure-url-parse.js test: add more t cases --- t3sts/semgrep_rules/nodejs-insecure-url-parse.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/t3sts/semgrep_rules/nodejs-insecure-url-parse.js b/t3sts/semgrep_rules/nodejs-insecure-url-parse.js index 9c377d44..e9d421d0 100644 --- a/t3sts/semgrep_rules/nodejs-insecure-url-parse.js +++ b/t3sts/semgrep_rules/nodejs-insecure-url-parse.js @@ -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"); + +var uparser = require('url'); + +// ruleid: nodejs-insecure-url-parse +uparser.parse("here lies dragons"); + +function() { + // ruleid: nodejs-insecure-url-parse + uparser.parse("here lies dragons"); +} + +// ruleid: nodejs-insecure-url-parse +setTimeout(()=> uparser.parse("here lies dragons"), 1000);