Skip to content

Commit

Permalink
brave-isolated-world.yaml: catch extra regex
Browse files Browse the repository at this point in the history
  • Loading branch information
thypon committed Jul 17, 2023
1 parent 0569f69 commit fa85efa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ rules:
metadata:
author: Andrea Brancaleoni <abc@pompel.me>
confidence: LOW
assignees: |
thypon
goodov
iefremov
source: https://github.com/brave/security-action/blob/main/assets/semgrep_rules/c/brave-isolated-world-id-content-end.yaml
message: Security hotspot found (`ISOLATED_WORLD_ID_CONTENT_END`). A security-team member should analyze the code security for possible vulnerabilities.
message: Security hotspot found (`ISOLATED_WORLD`). A security-team member should analyze the code security for possible vulnerabilities.
severity: WARNING
languages:
- generic
Expand All @@ -16,4 +20,6 @@ rules:
- "*.h"
- "*.hh"
- "*.hcc"
pattern-regex: ISOLATED_WORLD_ID_CONTENT_END
patterns:
- pattern-regex: ISOLATED_WORLD_ID_CONTENT_END
- pattern-regex: ISOLATED_WORLD_ID_BRAVE_INTERNAL
2 changes: 2 additions & 0 deletions t3sts/semgrep_rules/brave-isolated-world-id-content-end.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ constexpr int kBraveAdsIsolatedWorldId =
int main() {
// ruleid: brave-isolated-world-id-content-end
int a = content::ISOLATED_WORLD_ID_CONTENT_END;
// ruleid: brave-isolated-world-id-content-end
int a = content::ISOLATED_WORLD_ID_BRAVE_INTERNAL;
}

0 comments on commit fa85efa

Please sign in to comment.