Port MASTG-TEST-0041: Testing for Debugging Code and Verbose Error Logging (android) (by @guardsquare)#3242
Merged
Merged
Conversation
Collaborator
Author
|
I am unsure about the test itself. It was a dynamic test before, so I kept it like this. But it could very well be a static test, or even both... The Test IDs are wrong at the moment, I will update them when we are close to merging the PR. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR aims to update Android documentation and testing assets for detecting unclosed SQL Cursors via StrictMode by ensuring debug-only execution and verbose logging for development builds.
- Added a demo markdown file (MASTG-DEMO-0x41.md) illustrating a sample scenario of StrictMode detecting an unclosed SQL Cursor.
- Introduced a new test markdown file (MASTG-TEST-0x41.md) to verify that StrictMode is enabled in production builds.
- Updated documentation (0x05i-Testing-Code-Quality-and-Build-Settings.md) and weaknesses metadata to reflect changes such as using BuildConfig.DEBUG and emphasizing verbose logging and testing utilities.
Reviewed Changes
Copilot reviewed 4 out of 7 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| demos/android/MASVS-RESILIENCE/MASTG-DEMO-0x41/MASTG-DEMO-0x41.md | New demo file detailing a sample StrictMode violation scenario. |
| tests-beta/android/MASVS-RESILIENCE/MASTG-TEST-0x41.md | New test file for verifying StrictMode activation in production builds. |
| Document/0x05i-Testing-Code-Quality-and-Build-Settings.md | Updated to use BuildConfig.DEBUG for conditionally enabling StrictMode. |
| weaknesses/MASVS-RESILIENCE/MASWE-0094.md | Adjusted topics to include verbose logging and enabled testing utilities. |
Files not reviewed (3)
- demos/android/MASVS-RESILIENCE/MASTG-DEMO-0x41/MastgTest.kt: Language not supported
- demos/android/MASVS-RESILIENCE/MASTG-DEMO-0x41/output.txt: Language not supported
- demos/android/MASVS-RESILIENCE/MASTG-DEMO-0x41/run.sh: Language not supported
Comments suppressed due to low confidence (1)
tests-beta/android/MASVS-RESILIENCE/MASTG-TEST-0x41.md:4
- The test ID uses an uppercase 'X' while the demo file uses a lowercase 'x'. Consider standardizing the test ID across files.
id: MASTG-TEST-0X41
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
cpholguera
requested changes
Mar 26, 2025
Co-authored-by: Carlos Holguera <perezholguera@gmail.com>
Co-authored-by: Carlos Holguera <perezholguera@gmail.com>
Co-authored-by: Carlos Holguera <perezholguera@gmail.com>
cpholguera
approved these changes
Mar 26, 2025
cpholguera
reviewed
Mar 26, 2025
Collaborator
There was a problem hiding this comment.
This was missing but I just added it so we can merge.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR closes #3020