From 264c9493fa1065318a8a03f80916e91ec119ce43 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Mon, 17 Jul 2023 13:58:12 +0200 Subject: [PATCH] t3sts: fix semgrep rule ids --- t3sts/semgrep_rules/false-positive.cpp | 1 + t3sts/semgrep_rules/uaf.cpp | 4 ++-- t3sts/semgrep_rules/ucast.c | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/t3sts/semgrep_rules/false-positive.cpp b/t3sts/semgrep_rules/false-positive.cpp index 107d9d2b..99f8bd17 100644 --- a/t3sts/semgrep_rules/false-positive.cpp +++ b/t3sts/semgrep_rules/false-positive.cpp @@ -1 +1,2 @@ +// ok: raptor-typos void TearDown() { settings_map_->ShutdownOnUIThread(); } diff --git a/t3sts/semgrep_rules/uaf.cpp b/t3sts/semgrep_rules/uaf.cpp index 0836de34..b0300c57 100644 --- a/t3sts/semgrep_rules/uaf.cpp +++ b/t3sts/semgrep_rules/uaf.cpp @@ -19,7 +19,7 @@ v8::Local uaf(v8::Isolate* isolate) { base::BindOnce(&PageContentExtractor::OnDistillResult, weak_ptr_factory_.GetWeakPtr(), std::move(callback))); // ok: chromium-bind-uaf - // chromium-unretained-uaf + // ruleid: chromium-unretained-uaf DistillPageText( render_frame(), base::BindOnce(&PageContentExtractor::OnDistillResult, @@ -33,7 +33,7 @@ v8::Local uaf(v8::Isolate* isolate) { c->DoSomethingElse(); } }; - // chromium-bind-uaf + // ruleid: chromium-bind-uaf base::BindOnce(&func, this); // ok: chromium-bind-uaf diff --git a/t3sts/semgrep_rules/ucast.c b/t3sts/semgrep_rules/ucast.c index ed9859e9..71baba6e 100644 --- a/t3sts/semgrep_rules/ucast.c +++ b/t3sts/semgrep_rules/ucast.c @@ -1,5 +1,7 @@ int main() { + // ruleid: cast-signed-to-unsigned int y = 42; + // ruleid: cast-signed-to-unsigned uint x = (uint)y; return 0;