Why it matters

Pinning protects against a mis-issued but publicly trusted certificate, a real concern for banking, health and government apps. OWASP places it in the L2 profile, and a pin that cannot be rotated can lock every installed copy out of its own backend.

How to meet it

  • Pin public key hashes of an issuing CA or of keys you hold, never only the current leaf certificate.
  • Ship a backup pin you control, and an expiry date on Android, so you can rotate keys without stranding users.
  • Use the platform mechanism (NSPinnedDomains, Network Security Configuration pin-set) rather than custom validation code.

MASTG tests in the local projects

Neither local project runs a MASTG test for MASVS-NETWORK-2. The guides below explain the platform mechanisms, and the control’s page on mas.owasp.org links the MASTG tests and weaknesses OWASP maps to it.

Guides on this site

Practice

References

  1. MASVS-NETWORK-2 (OWASP MASVS v2.1.0)
  2. MASVS-NETWORK: Network Communication (OWASP MASVS v2.1.0)

List data from the publisher. A guide is listed as the main subject when the weakness or risk is what the guide is about, and as covering it when a dedicated section or worked example addresses it.

Control statements are quoted from OWASP MASVS v2.1.0, licensed CC BY-SA 4.0; the rest is this site's summary. MASTG tests are those the iOS and Android projects here run, with their titles from mas.owasp.org. License.