forked from Privado-Inc/privado
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new threats & policies related to Leakages & Storages (Privado-In…
…c#257) * Add new threats & policies related to Leakages & Storages * Update the threats with config * Update the policy rules * Update the threats with template * Remove unwanted rule
- Loading branch information
Showing
8 changed files
with
173 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,21 @@ policies: | |
- "accounts.*" | ||
|
||
tags: | ||
|
||
|
||
- id: Policy.Deny.Sharing.PIISavedToDatabase | ||
name: "{PII} saved to cache or Storage" | ||
type: Compliance | ||
description: "Don't save {PII} to cache or Storage" | ||
fix: "Talk to the Data Protection team: [email protected]" | ||
action: Deny | ||
dataFlow: | ||
sources: | ||
- Data.Sensitive.* | ||
sinks: | ||
- Storages.*Write | ||
repositories: | ||
- "**" | ||
tags: | ||
|
||
- id: Policy.Allow.Processing.FinancialData | ||
name: "Example: Don't use financial data outside of payments services" | ||
|
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
sinks: | ||
|
||
- id: Leakages.Log.Error | ||
name: Log Error | ||
patterns: | ||
|
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 |
---|---|---|
@@ -1,19 +1,38 @@ | ||
sinks: | ||
- id: Storages.Web.Cookie | ||
name: Web Storage Cookie | ||
- id: Storages.Web.Cookie.Write | ||
name: Web Storage Cookie(Write) | ||
patterns: | ||
- "(?i).*(getCookie|setCookie|deleteCookie|removeCookie|useCookies)" | ||
- "(?i).*(setCookie|deleteCookie|removeCookie)" | ||
tags: | ||
law: GDPR | ||
|
||
- id: Storages.Web.LocalStorage | ||
name: Web LocalStorage | ||
- id: Storages.Web.LocalStorage.Write | ||
name: Web LocalStorage(Write) | ||
patterns: | ||
- "(?i)(localStorage).*(setItem|clear|removeItem|getItem)" | ||
- "(?i)(localStorage).*(setItem|clear|removeItem)" | ||
tags: | ||
|
||
- id: Storages.Web.SessionStorage | ||
name: Web SessionStorage | ||
- id: Storages.Web.SessionStorage.Write | ||
name: Web SessionStorage(Write) | ||
patterns: | ||
- "(?i)(\\bstorage\\b|sessionstorage)(.*)(setItem|clear|removeItem|getItem)" | ||
- "(?i)(\\bstorage\\b|sessionstorage)(.*)(setItem|clear|removeItem)" | ||
tags: | ||
|
||
- id: Storages.Web.Cookie.READ | ||
name: Web Storage Cookie(READ) | ||
patterns: | ||
- "(?i).*(getCookie|useCookies)" | ||
tags: | ||
law: GDPR | ||
|
||
- id: Storages.Web.LocalStorage.READ | ||
name: Web LocalStorage(READ) | ||
patterns: | ||
- "(?i)(localStorage).*(clear|getItem)" | ||
tags: | ||
|
||
- id: Storages.Web.SessionStorage.READ | ||
name: Web SessionStorage(READ) | ||
patterns: | ||
- "(?i)(\\bstorage\\b|sessionstorage)(.*)(getItem)" | ||
tags: |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# This file contains policies related to data leakages such as writing sensitive data to log files, file system or streams. | ||
|
||
threats: | ||
threats: | ||
- id: Threats.Leakage.isDataLeakingToLog | ||
name: "PII data is written to the log files" | ||
type: Threat | ||
|
@@ -18,3 +18,15 @@ threats: | |
"CWE-532" : "https://cwe.mitre.org/data/definitions/532.html" | ||
"MSTG-STORAGE-3" : "https://github.com/OWASP/owasp-mstg/blob/master/Document/0x05d-Testing-Data-Storage.md#Testing-Logs-for-Sensitive-Data-MSTG-STORAGE-3" | ||
"MITRE" : "Sharing.Exposure" | ||
|
||
- id: Threats.Leakage.CustomPrivacyLoggerMustbeUsed | ||
name: "Infosys privacy logger required in all applications" | ||
type: Threat | ||
description: "Infosys Privacy Logger component is a reusable component available for Java, C#, etc that protects the logs from leaking PII data. This component needs to be used in all applications." | ||
fix: "Talk to the Data Protection team: [email protected]" | ||
repositories: | ||
- "**" | ||
config: | ||
customLoggerModulePattern: "(?i)(portfolio).*(?:error|severe|fatal|warn|debug|trace|info|log|exception)" | ||
tags: | ||
"policyPurpose": "Security Audit" |
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