Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 2, 2025

This PR closes #3073

Description

Ports MASTG-TEST-0030 (Testing for Vulnerable Implementation of PendingIntent) to MASTG v2 format.

New v2 test: tests-beta/android/MASVS-PLATFORM/MASTG-TEST-0313.md

  • Maps to MASWE-0066 (Insecure Intents)
  • Static analysis test for PendingIntent API usage
  • Covers mutability issues (FLAG_IMMUTABLE vs FLAG_MUTABLE) and implicit intent vulnerabilities
  • References existing knowledge article @MASTG-KNOW-0024

New demo: demos/android/MASVS-PLATFORM/MASTG-DEMO-0076/

  • Kotlin sample code demonstrating 4 PendingIntent scenarios (3 insecure, 1 secure)
  • Reversed Java code for semgrep analysis
  • New semgrep rule rules/mastg-android-pendingintent-mutable.yml to detect PendingIntent API usage
  • Run script and sample output

Deprecated v1 test: Added deprecation metadata to tests/android/MASVS-PLATFORM/MASTG-TEST-0030.md

  • status: deprecated
  • covered_by: [MASTG-TEST-0313]

[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-0030: Testing for Vulnerable Implementation of PendingIntent (android)</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 testing for vulnerable implementation of PendingIntent Port MASTG-TEST-0030 (PendingIntent) to v2 format Dec 2, 2025
Copilot finished work on behalf of cpholguera December 2, 2025 17:21
Copilot AI requested a review from cpholguera December 2, 2025 17:21
@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 with:

  • Kotlin sample code demonstrating 4 PendingIntent scenarios (3 insecure, 1 secure)
  • Reversed Java code for semgrep analysis
  • New semgrep rule mastg-android-pendingintent-mutable.yml to detect PendingIntent API usage
  • Run script and output

Commit: 0f7fe56

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • semgrep.dev
    • Triggering command: /home/REDACTED/.local/bin/pysemgrep osemgrep -c ../../../../rules/mastg-android-pendingintent-mutable.yml ./MastgTest_reversed.java (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf of cpholguera December 2, 2025 20:45
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-0030: Testing for Vulnerable Implementation of PendingIntent (android)

2 participants