Skip to content

Create content for MASTG-TEST-0287 SharedPreferences security test#3707

Merged
cpholguera merged 2 commits into
cpholguera-patch-2from
copilot/sub-pr-3706
Feb 13, 2026
Merged

Create content for MASTG-TEST-0287 SharedPreferences security test#3707
cpholguera merged 2 commits into
cpholguera-patch-2from
copilot/sub-pr-3706

Conversation

Copilot AI commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

Replaced placeholder for MASTG-TEST-0287, which detects sensitive data stored unencrypted via Android's SharedPreferences API.

Changes

  • Overview: Frames the security risk of storing sensitive data in plaintext XML files within the app sandbox, explaining threat scenarios (device compromise, backup extraction, physical access)

  • Steps: Dynamic testing approach using method tracing (@MASTG-TECH-0033) with Frooky (@MASTG-TOOL-0145) to monitor:

    • SharedPreferences.Editor.putString and putStringSet calls
    • Cryptographic API usage (Cipher, KeyStore, KeyGenerator, Base64)
  • Evaluation: Four complementary methods for identifying unencrypted storage:

    1. Trace sequence analysis (presence/absence of Cipher operations before write calls)
    2. Pattern matching with secrets detection tools
    3. Stack trace-based code location inspection
    4. Direct file system examination of SharedPreferences XML files
  • Metadata: Added prerequisites: [identify-sensitive-data] field; removed status and note fields

The test complements MASTG-DEMO-0059 which demonstrates the vulnerability using MASTestApp.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: cpholguera <29175115+cpholguera@users.noreply.github.com>
Copilot AI changed the title [WIP] Update MASTG-KNOW-0036 with EncryptedSharedPreferences links Create content for MASTG-TEST-0287 SharedPreferences security test Feb 13, 2026
Copilot AI requested a review from cpholguera February 13, 2026 18:04
@cpholguera
cpholguera marked this pull request as ready for review February 13, 2026 18:06
@cpholguera
cpholguera merged commit d49374d into cpholguera-patch-2 Feb 13, 2026
5 checks passed
@cpholguera
cpholguera deleted the copilot/sub-pr-3706 branch February 13, 2026 18:07
cpholguera added a commit that referenced this pull request Jun 4, 2026
* Update MASTG-KNOW-0036 with EncryptedSharedPreferences links

Clarified the usage of EncryptedSharedPreferences and added a link to its source code. Updated the warning regarding the Jetpack security crypto library deprecation.

* fix test ref

* Add Deterministic AEAD

* Create content for MASTG-TEST-0287 SharedPreferences security test (#3707)

* Initial plan

* Create content for MASTG-TEST-0287 and remove status/note fields

Co-authored-by: cpholguera <29175115+cpholguera@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: cpholguera <29175115+cpholguera@users.noreply.github.com>

* draft best

* Apply suggestions from code review

Co-authored-by: Jaco <43786394+jacobocasado@users.noreply.github.com>

* Apply suggestion from @jacobocasado

Co-authored-by: Jaco <43786394+jacobocasado@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Jaco <43786394+jacobocasado@users.noreply.github.com>
Co-authored-by: Carlos Holguera <perezholguera@gmail.com>

* Update MASTG-KNOW-0036.md to clarify SharedPreferences usage and deprecation of insecure modes

* fix md

* Apply suggestions from code review

Co-authored-by: Jaco <43786394+jacobocasado@users.noreply.github.com>

* Update MASTG-TEST-0287.md to change test type and refine steps for validating sensitive data storage in SharedPreferences

* fix best ID

* update title

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Jaco <43786394+jacobocasado@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants