-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(policies): ignore PHI data category group for policies unless hea…
…lth context flag is set (#230) * feat: consider health context for policy category grouping * feat: add test cases for health context
- Loading branch information
Showing
13 changed files
with
105 additions
and
26 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
15 changes: 15 additions & 0 deletions
15
integration/policies/.snapshots/TestPolicesWithHealthContext-logger_leaking
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 @@ | ||
high: | ||
- policy_name: Logger leaking | ||
policy_description: Logger leaks detected. Avoid passing sensitive data to loggers. | ||
line_number: 1 | ||
filename: testdata/ruby/logger_leaking.rb | ||
category_groups: | ||
- PHI | ||
- PII | ||
parent_line_number: 1 | ||
parent_content: logger.info(user.address) | ||
omit_parent: false | ||
|
||
|
||
-- | ||
|
46 changes: 46 additions & 0 deletions
46
.../policies/.snapshots/TestPolicesWithHealthContext-sending_data_in_category_to_third_party
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,46 @@ | ||
high: | ||
- policy_name: Third-party data category exposure | ||
policy_description: Sending data in category to third party. Ensure data sent to third party is intended and secured. | ||
line_number: 12 | ||
filename: testdata/ruby/sending_data_in_category_to_third_party.rb | ||
category_groups: | ||
- PHI | ||
- PII | ||
parent_line_number: 10 | ||
parent_content: |- | ||
Sentry::Breadcrumb.new( | ||
category: "auth", | ||
message: "Authenticated user #{user.email}", | ||
level: "info" | ||
) | ||
omit_parent: false | ||
- policy_name: Third-party data category exposure | ||
policy_description: Sending data in category to third party. Ensure data sent to third party is intended and secured. | ||
line_number: 18 | ||
filename: testdata/ruby/sending_data_in_category_to_third_party.rb | ||
category_groups: | ||
- PHI | ||
- PII | ||
parent_line_number: 16 | ||
parent_content: |- | ||
Sentry.init do |config| | ||
config.before_breadcrumb = lambda do |breadcrumb, hint| | ||
breadcrumb.message = "Authenticated user #{current_user.email}" | ||
breadcrumb | ||
end | ||
end | ||
omit_parent: false | ||
- policy_name: Third-party data category exposure | ||
policy_description: Sending data in category to third party. Ensure data sent to third party is intended and secured. | ||
line_number: 24 | ||
filename: testdata/ruby/sending_data_in_category_to_third_party.rb | ||
category_groups: | ||
- PHI | ||
- PII | ||
parent_line_number: 24 | ||
parent_content: 'Sentry.set_user(email: user.email)' | ||
omit_parent: false | ||
|
||
|
||
-- | ||
|
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
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
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
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
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
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
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
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
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
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