Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 2, 2025

This PR closes #3020

Description

Ports the v1 test "Testing Object Persistence" (MASTG-TEST-0079) to v2 format as MASTG-TEST-0313 and adds a demo.

New v2 test (tests-beta/ios/MASVS-CODE/MASTG-TEST-0313.md):

  • Title: "Insecure Object Deserialization"
  • Type: static, dynamic
  • Weakness: MASWE-0006
  • Profiles: L1, L2
  • Covers: NSCoding/NSSecureCoding, Codable, JSON, property lists, XML, Core Data, Realm
  • References: @MASTG-KNOW-0075, @MASTG-TECH-0058, @MASTG-TECH-0095

New demo (demos/ios/MASVS-CODE/MASTG-DEMO-0076/):

  • MastgTest.swift - Sample code demonstrating insecure object persistence using NSCoding instead of NSSecureCoding
  • nscoding.r2 - radare2 script to identify object persistence APIs in the binary
  • run.sh and output.txt - Analysis script and expected output
  • MASTG-DEMO-0076.md - Demo documentation

Deprecated v1 test (tests/ios/MASVS-CODE/MASTG-TEST-0079.md):

  • Added deprecation metadata pointing to MASTG-TEST-0313

Note: MASWE-0006 (Insecure Data Storage) used as weakness since no specific MASWE exists for insecure deserialization. This is appropriate given object persistence inherently involves data storage concerns.


[x] I have read the contributing guidelines.

Original prompt

This section details on the original issue you should resolve

<issue_title>MASTG v1->v2 MASTG-TEST-0079: Testing Object Persistence (ios)</issue_title>
<issue_description>
Create a new MASTG v2 test covering for":

Follow the guidelines
</issue_description>

Comments on the Issue (you are @copilot in this section)


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

Copilot AI changed the title [WIP] Add MASTG v2 test for object persistence Port MASTG-TEST-0079 (iOS Object Persistence) to v2 format Dec 2, 2025
Copilot AI requested a review from cpholguera December 2, 2025 17:26
@cpholguera
Copy link
Collaborator

@copilot please create a demo in demos/ for this test

Copy link
Contributor Author

Copilot AI commented Dec 2, 2025

@copilot please create a demo in demos/ for this test

Created demo MASTG-DEMO-0076 in demos/ios/MASVS-CODE/MASTG-DEMO-0076/ with:

  • MastgTest.swift - Sample code demonstrating insecure object persistence using NSCoding instead of NSSecureCoding
  • nscoding.r2 - radare2 script to identify object persistence APIs
  • run.sh and output.txt - Analysis script and expected output

Commit: 1076fa1

Copilot AI changed the title Port MASTG-TEST-0079 (iOS Object Persistence) to v2 format Port MASTG-TEST-0079 (iOS Object Persistence) to v2 format with demo Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants