Skip to content

Port MASTG-TEST-0084 to v2 for iOS: Verbose Error Logging#3587

Draft
Copilot wants to merge 8 commits intomasterfrom
copilot/add-mastg-v2-debugging-test
Draft

Port MASTG-TEST-0084 to v2 for iOS: Verbose Error Logging#3587
Copilot wants to merge 8 commits intomasterfrom
copilot/add-mastg-v2-debugging-test

Conversation

Copy link
Contributor

Copilot AI commented Dec 13, 2025

This PR closes #3585

Description

Ports MASTG-TEST-0084 from v1 to v2 for iOS, targeting verbose logging that exposes implementation details (MASWE-0094). This complements existing sensitive data logging tests (MASTG-TEST-0296/0297) by focusing on debug messages that reveal function names, code paths, error handling logic, and internal configuration.

Changes

  • MASTG-TEST-0318: New v2 test for iOS

    • Static and dynamic analysis approaches for detecting verbose logging
    • References knowledge files MASTG-KNOW-0064 (Debugging Code) and MASTG-KNOW-0101 (Logs)
    • Profile: R (Resilience)
  • MASTG-DEMO-0081: Working demonstration

    • Swift sample code with 8 FAIL examples (API endpoints, auth tokens, error codes, network config, stack traces)
    • 1 PASS example showing properly guarded debug logging with #if DEBUG
    • Radare2 script for static analysis of logging APIs and strings
    • Sample output showing detected verbose logging patterns
  • v1 test deprecation: Updated MASTG-TEST-0084 metadata with deprecation status and reference to new test

Sample Swift Code

// FAIL: Exposes internal API endpoint and auth details
NSLog("[DEBUG] Attempting to connect to API endpoint: https://internal-api.example.com/v2/auth/login")
debugPrint("✅ [DEBUG] Authentication successful - Session token generated: \(token)")
NSLog("[DEBUG] Error code: AUTH_001, Module: AuthenticationService.validateCredentials()")

// PASS: Properly guarded debug logging
#if DEBUG
print("[DEBUG] This message only appears in debug builds")
#endif

[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-0084: Testing for Debugging Code and Verbose Error Logging (ios)</issue_title>
<issue_description>
Create a new MASTG v2 test covering for":

Follow the guidelines
</issue_description>

<agent_instructions>In this test focus on the "verbose" logging part, which is the one that goes better with MASWE-0094.

In the test metadata include:

knowledge: [MASTG-KNOW-0064, MASTG-KNOW-0101]

No need to cover sensitive data since we have MASTG-TEST-0296 and MASTG-TEST-0297.

Also add a demo.
</agent_instructions>

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 and others added 3 commits December 13, 2025 18:38
Co-authored-by: cpholguera <29175115+cpholguera@users.noreply.github.com>
Co-authored-by: cpholguera <29175115+cpholguera@users.noreply.github.com>
Co-authored-by: cpholguera <29175115+cpholguera@users.noreply.github.com>
Copilot AI changed the title [WIP] Add test for debugging code and verbose error logging Port MASTG-TEST-0084 to v2 for iOS: Verbose Error Logging Dec 13, 2025
Copilot AI requested a review from cpholguera December 13, 2025 18:44
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.

MASTG v1->v2 MASTG-TEST-0084: Testing for Debugging Code and Verbose Error Logging (ios)

2 participants