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

brave-isolated-world.yaml: catch extra regex #280

Merged
merged 1 commit into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}