Skip to content

Align TESTs 242-244 with iOS (Pinning) - #3882

Draft
cpholguera wants to merge 2 commits into
masterfrom
align-242-244-with-ios
Draft

Align TESTs 242-244 with iOS (Pinning)#3882
cpholguera wants to merge 2 commits into
masterfrom
align-242-244-with-ios

Conversation

@cpholguera

@cpholguera cpholguera commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR aligns TESTs 242, 243 and 244 with the iOS counterparts and uses the new prerequisite.

@cpholguera cpholguera changed the title align with iOS Align TESTs 242-244 with iOS (Pinning) Jun 15, 2026
Apps can configure [certificate pinning using the Network Security Configuration](../../../knowledge/android/MASVS-NETWORK/MASTG-KNOW-0015.md#pinning-via-network-security-configuration-api-24). For each domain, one or multiple digests can be pinned.

The goal of this test is to check if the app does not implement certificate pinning using the NSC. However, note that the app may be using other pinning methods covered in other tests.
This test checks whether the app configures certificate pinning in the NSC for the relevant first-party domains it connects to. Relevant domains are remote endpoints under the developer's control that support the app's core or security-sensitive functionality. Third-party domains outside the developer's control **should not be reported** as missing pins only because they appear in app traffic. Note that the app may implement certificate pinning through other mechanisms covered in other tests.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is NSC?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This test checks whether the app configures certificate pinning in the NSC for the relevant first-party domains it connects to. Relevant domains are remote endpoints under the developer's control that support the app's core or security-sensitive functionality. Third-party domains outside the developer's control **should not be reported** as missing pins only because they appear in app traffic. Note that the app may implement certificate pinning through other mechanisms covered in other tests.
This test checks whether the app configures certificate pinning in the [Network Security Configuration](../../../knowledge/android/MASVS-NETWORK/MASTG-KNOW-0015.md#pinning-via-network-security-configuration-api-24) for the relevant first-party domains it connects to. Relevant domains are remote endpoints under the developer's control that support the app's core or security-sensitive functionality. Third-party domains outside the developer's control **should not be reported** as missing pins only because they appear in app traffic. Note that the app may implement certificate pinning through other mechanisms covered in other tests.


The test case should not fail only because unrelated third-party domains are not pinned.

If another certificate pinning implementation is identified for the same domains, such as a custom `TrustManager` or a third-party library, the result should be treated as not covered by NSC pinning rather than as a confirmed absence of certificate pinning.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If another certificate pinning implementation is identified for the same domains, such as a custom `TrustManager` or a third-party library, the result should be treated as not covered by NSC pinning rather than as a confirmed absence of certificate pinning.
If another certificate pinning implementation is identified for the same domains, such as a custom `TrustManager` or a third-party library, the result should be treated as not covered by Network Security Configuration pinning rather than as a confirmed absence of certificate pinning.

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