Skip to content

Commit

Permalink
t3sts: fix semgrep rule ids
Browse files Browse the repository at this point in the history
  • Loading branch information
thypon committed Jul 17, 2023
1 parent 61961af commit b340491
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions t3sts/semgrep_rules/false-positive.cpp
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
// ok: raptor-typos
void TearDown() { settings_map_->ShutdownOnUIThread(); }
4 changes: 2 additions & 2 deletions t3sts/semgrep_rules/uaf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ v8::Local<v8::Promise> 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,
Expand All @@ -33,7 +33,7 @@ v8::Local<v8::Promise> uaf(v8::Isolate* isolate) {
c->DoSomethingElse();
}
};
// chromium-bind-uaf
// ruleid: chromium-bind-uaf
base::BindOnce(&func, this);

// ok: chromium-bind-uaf
Expand Down
2 changes: 2 additions & 0 deletions t3sts/semgrep_rules/ucast.c
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit b340491

Please sign in to comment.