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

Add Risk and Test - Sensitive Data Stored Unencrypted in Private Storage Locations [data-unencrypted-private-storage] #2566

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

thomascannon
Copy link
Collaborator

Closes #2544

@thomascannon thomascannon changed the title Add Risk and Test for: Data Unencrypted Internal Add Risk and Test - Sensitive Data Stored Unencrypted in Internal Locations [data-unencrypted-internal] Feb 21, 2024
@cpholguera
Copy link
Collaborator

Thanks a lot @thomascannon, I'll give it a proper review as soon as I can.

@serek8 thanks for starting a first review. You and Thomas made very good points there. We need to think about it.

## Mitigations

- Avoid storing sensitive data locally at all.
- Use the platform's hardware-backed keystore solution to store the key used for encryption.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we offer more options to the users as it's detailed here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which ones would you recommend? The main ones aside from keystore it mentions storing it server side which I probably wouldn't recommend in most cases and key derived from user input which could be good if the UX is acceptable (e.g. for a password manager).

We could just reference this whole section which raises another question about this process....should we just be duplicating (and updating) the current published mitigation advice but inside these risks? Or should we reference out to existing advice?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flagged this to be discussed next week in the call. I think these are supposed to be moved to mitigations documents per the guide but the existing examples don't do that (yet). Also whether we should absorb the info from that link to the MASTG, reference it, or supersede it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the call, for more specific and detailed recommended mitigations we should put them in their own mitigation files and link to them, and keep the high level / generic mitigations here. I'll work on splitting those out and creating mitigation documents based on the additional options @ZabGo linked above.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @thomascannon and @ZabGo. The mitigations dir is here: https://github.com/OWASP/owasp-mastg/tree/master/mitigations

Keep in mind that ideally we'd like to make these mitigations as generic as possible so that they can be reused. Also note that the mitigations may also be platform-specific.

## Mitigations

- Avoid storing sensitive data locally at all.
- Use the platform's hardware-backed keystore solution to store the key used for encryption.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @thomascannon and @ZabGo. The mitigations dir is here: https://github.com/OWASP/owasp-mastg/tree/master/mitigations

Keep in mind that ideally we'd like to make these mitigations as generic as possible so that they can be reused. Also note that the mitigations may also be platform-specific.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please also change the directory name to data-unencrypted-private-storage

@@ -0,0 +1,30 @@
---
platform: android
title: Sensitive Data Written to Private Data Directory (Sandbox) Unencrypted
Copy link
Collaborator

@cpholguera cpholguera May 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
title: Sensitive Data Written to Private Data Directory (Sandbox) Unencrypted
title: Data Stored in the App Sandbox at Runtime

Copy link
Collaborator

@cpholguera cpholguera May 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please create an demo directory demo-1/ with an demo.md and the rest of the required files? (see here, and the guidelines)

@cpholguera cpholguera changed the title Add Risk and Test - Sensitive Data Stored Unencrypted in Internal Locations [data-unencrypted-internal] Add Risk and Test - Sensitive Data Stored Unencrypted in Private Storage Locations [data-unencrypted-private-storage] May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Risk - Sensitive Data Stored Unencrypted in Private Storage Locations [data-unencrypted-private-storage]
4 participants