-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
pkg/commands/process/settings/rules/javascript/third_parties/rollbar.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
patterns: | ||
- pattern: | | ||
$<ROLLBAR>.$<METHOD>($<...>$<DATA_TYPE>$<...>) | ||
filters: | ||
- variable: DATA_TYPE | ||
detection: datatype | ||
- variable: ROLLBAR | ||
values: | ||
- rollbar | ||
- Rollbar | ||
- variable: METHOD | ||
values: | ||
- critical | ||
- error | ||
- warning | ||
- info | ||
- debug | ||
languages: | ||
- javascript | ||
trigger: local | ||
severity: | ||
default: low | ||
PII: critical | ||
PHI: medium | ||
PD: high | ||
metadata: | ||
description: "Do not send sensitive data to Rollbar." | ||
remediation_message: | | ||
## Description | ||
Leaking sensitive data to third-party error logging tools is a common cause of data leaks and can lead to data breaches. This rule looks for instances of sensitive data sent to Rollbar. | ||
## Remediations | ||
When sending data to logging libraries, ensure all sensitive data is removed. | ||
<!-- | ||
## Resources | ||
Coming soon. | ||
--> | ||
dsr_id: DSR-1 | ||
id: "javascript_rollbar" |
5 changes: 5 additions & 0 deletions
5
...s/TestJavascriptRollbarSummary-summary_javascript_third_parties_rollbar_browser_secure.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{} | ||
|
||
|
||
-- | ||
|
15 changes: 15 additions & 0 deletions
15
...TestJavascriptRollbarSummary-summary_javascript_third_parties_rollbar_browser_unsecure.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
critical: | ||
- rule_dsrid: DSR-1 | ||
rule_display_id: javascript_rollbar | ||
rule_description: Do not send sensitive data to Rollbar. | ||
rule_documentation_url: https://curio.sh/reference/rules/javascript_rollbar | ||
line_number: 1 | ||
filename: pkg/commands/process/settings/rules/javascript/third_parties/rollbar/testdata/browser_unsecure.js | ||
category_groups: | ||
- PII | ||
parent_line_number: 3 | ||
parent_content: Rollbar.critical("Connection error from remote Payments API", user) | ||
|
||
|
||
-- | ||
|
3 changes: 3 additions & 0 deletions
3
...mmands/process/settings/rules/javascript/third_parties/rollbar/testdata/browser_secure.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const user = { uuid: "aacd05fd-8f5b-4bc6-aa8b-35e5fbf37325" }; | ||
|
||
Rollbar.critical("Connection error from remote Payments API", user); |
3 changes: 3 additions & 0 deletions
3
...ands/process/settings/rules/javascript/third_parties/rollbar/testdata/browser_unsecure.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const user = { name: "jhon", email: "jhon@gmail.com" }; | ||
|
||
Rollbar.critical("Connection error from remote Payments API", user); |