-
Notifications
You must be signed in to change notification settings - Fork 62
Address false positives seen with argocd, grafana, jupyterhub, and reflex #475
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
Changes from 4 commits
a3d417f
a60582c
7cb0342
bd8a2d8
40df779
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,6 +60,8 @@ rule multiple_browser_refs : critical { | |
| $not_ff_js = "Firefox can even throw an error" | ||
| $not_generated_comment = "// This file is generated" | ||
| $not_generated_file = "/utils/generate_types/index.js" | ||
| $not_microsoft = "Copyright (c) Microsoft Corporation." | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also change criticality to high |
||
| $not_microsoft_playwright = "Microsoft.Playwright" | ||
| condition: | ||
| 2 of ($name*) and 3 of ($fs*) and none of ($not*) | ||
| } | ||
|
|
@@ -152,4 +154,4 @@ rule chrome_encrypted_cookies : critical { | |
| $select = /SELECT.{0,64}encrypted_value{0,64}cookies/ | ||
| condition: | ||
| $select | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,8 @@ rule js_crypto_stealer : critical { | |
| $url = /https{0,1}:\/\/[\w][\w\.\/\-_\?=\@]{8,64}/ | ||
|
|
||
| $POST = "POST" | ||
|
|
||
| $not_grafana = "self.webpackChunkgrafana=self.webpackChunkgrafana" | ||
| condition: | ||
| filesize < 50KB and $url and $POST and any of ($pk*) | ||
| filesize < 50KB and $url and $POST and any of ($pk*) and none of ($not_*) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also change criticality to high |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,9 +13,12 @@ rule child_process : critical { | |
| $a_shift = "shift" | ||
| $a_push = "push" | ||
|
|
||
| $const = "const " | ||
| $function = "function(" | ||
| $return = "{return" | ||
| $a_const = "const " | ||
| $a_function = "function(" | ||
| $a_return = "{return" | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also mark this as a "high"
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we move these to high, I can remove the exclusions. That would be a lot cleaner. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Works for me. In my mind, "CRITICAL" rules should never be broad enough for false positives to easily happen. |
||
| $not_sw_bundle = "Recorded click position in absolute coordinates did not match the center of the clicked element." | ||
| $not_sw_bundle2 = "This is likely due to a difference between the test runner and the trace viewer operating systems." | ||
| condition: | ||
| filesize < 128KB and all of them | ||
| filesize < 128KB and all of ($a_*) and none of ($not_*) | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,21 @@ rule js_const_func_obfuscation : critical { | |
| $const = "const " | ||
| $function = "function(" | ||
| $return = "{return" | ||
|
|
||
| $not_bootstrap = "* Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)" | ||
| $not_bindonce1 = "* Bindonce - Zero watches binding for AngularJs" | ||
| $not_bindonce2 = "@link https://github.com/Pasvaz/bindonce" | ||
| $not_bindonce3 = "@author Pasquale Vazzana <pasqualevazzana@gmail.com>" | ||
| $not_fb = "Copyright (c) Facebook, Inc. and its affiliates." | ||
| $not_floating_ui_react_dom = "@floating-ui/react-dom" | ||
| $not_grafana1 = "/*! For license information please see module.js.LICENSE.txt */" | ||
| $not_grafana2 = "@grafana/data" | ||
| $not_grafana3 = "@grafana/runtime" | ||
| $not_grafana4 = "@grafana/ui" | ||
| $not_lodash = "Released under MIT license <https://lodash.com/license>" | ||
| $not_lodash2 = {4C 6F 64 61 73 68 20 3C 68 74 74 70 73 3A 2F 2F 6C 6F 64 61 73 68 2E 63 6F 6D 2F 3E} | ||
| $not_mit = "This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree." | ||
| $not_openjs = "Copyright OpenJS Foundation and other contributors <https://openjsf.org/>" | ||
| condition: | ||
| filesize < 256KB and #const > 32 and #function > 48 and #return > 64 | ||
| filesize < 256KB and #const > 32 and #function > 48 and #return > 64 and none of ($not_*) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change criticality to medium |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,8 @@ rule js_const_func_obfuscation : critical { | |
| $function = "function(" | ||
| $return = "{return" | ||
| $parseInt = "parseInt" | ||
|
|
||
| $not_grafana = "self.webpackChunkgrafana=self.webpackChunkgrafana" | ||
| condition: | ||
| filesize < 256KB and #const > 16 and #function > 32 and #parseInt > 8 and #return > 32 | ||
| filesize < 256KB and #const > 16 and #function > 32 and #parseInt > 8 and #return > 32 and none of ($not_*) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change criticality to high |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # javascript/clean/bootstrap.bundle.min.js | ||
| encoding/json/decode | ||
| ref/site/url | ||
| time/clock/sleep |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # javascript/clean/index-DVt3E1Ef.js | ||
| encoding/json/decode | ||
| encoding/json/encode | ||
| evasion/int_to_char | ||
| exec/cmd | ||
| fs/mount | ||
| net/download | ||
| ref/site/url | ||
| ref/words/password | ||
| techniques/code_eval |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # javascript/clean/sw.bundle.js | ||
| archives/zip | ||
| encoding/base64 | ||
| encoding/json/decode | ||
| encoding/json/encode | ||
| evasion/int_to_char | ||
| fd/read | ||
| fd/write | ||
| kernel/platform | ||
| net/upload | ||
| net/url | ||
| obfuscation/js/high_entropy | ||
| ref/site/url | ||
| ref/words/password |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # linux/clean/api.json | ||
| archives/zip | ||
| combo/recon/system_network | ||
| encoding/json/decode | ||
| encoding/json/encode | ||
| env/USER | ||
| fs/file/delete/forcibly | ||
| net/download | ||
| net/http/auth | ||
| net/http/cookies | ||
| net/http/form/upload | ||
| net/http/post | ||
| net/http/request | ||
| net/socket/listen | ||
| net/socket/send | ||
| net/socks5 | ||
| net/upload | ||
| net/url | ||
| net/url/encode | ||
| net/websocket | ||
| ref/daemon | ||
| ref/ip_port | ||
| ref/path/tmp | ||
| ref/site/url | ||
| ref/words/agent | ||
| ref/words/intercept | ||
| ref/words/password | ||
| ref/words/server_address | ||
| techniques/code_eval |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # python/clean/playwright/async_api/_generated.py | ||
| archives/zip | ||
| combo/recon/system_network | ||
| encoding/json/decode | ||
| fs/file/delete/forcibly | ||
| net/download | ||
| net/http/cookies | ||
| net/http/form/upload | ||
| net/http/post | ||
| net/http/request | ||
| net/socket/listen | ||
| net/socket/send | ||
| net/upload | ||
| net/url | ||
| net/url/encode | ||
| net/websocket | ||
| ref/path/tmp | ||
| ref/site/url | ||
| ref/words/agent | ||
| ref/words/intercept | ||
| ref/words/password | ||
| ref/words/server_address |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # python/clean/playwright/sync_api/_generated.py | ||
| archives/zip | ||
| combo/recon/system_network | ||
| encoding/json/decode | ||
| fs/file/delete/forcibly | ||
| net/download | ||
| net/http/cookies | ||
| net/http/form/upload | ||
| net/http/post | ||
| net/http/request | ||
| net/socket/listen | ||
| net/socket/send | ||
| net/upload | ||
| net/url | ||
| net/url/encode | ||
| net/websocket | ||
| ref/path/tmp | ||
| ref/site/url | ||
| ref/words/agent | ||
| ref/words/intercept | ||
| ref/words/password | ||
| ref/words/server_address |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # windows/clean/PrintDeps.exe | ||
| data/emdedded/app/manifest | ||
| evasion/anti/debugger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also change criticality to high