React NativeSecurity Best Practices

69 items

1

Disabling Debugging & Logging in Production

Slides / Video
2

Enforcing HTTPS on Requests

Code Quiz
3

Checking Token Expiry

Code Quiz
4

Secure OTA Update Delivery

Slides / Video
5

Preventing Screen Capture & Backgrounding Leaks

Slides / Video
6

Biometric Auth with Face ID & Fingerprint

Slides / Video
7

Protecting Data at Rest with Encryption

Slides / Video
8

Handling Runtime Permissions Securely

Slides / Video
9

Detecting Jailbroken/Rooted Devices

Slides / Video
10

Token Lifecycle: Expiry, Refresh & Revocation

Slides / Video
11

Safe Deep Link Handling & Validation

Slides / Video
12

Securing WebView & JS Bridge

Slides / Video
13

Preventing Injection in WebView

Slides / Video
14

Validating & Sanitizing User Input

Slides / Video
15

Certificate Pinning Against MITM

Slides / Video
16

Your JS Bundle Is Not Secret

Slides / Video
17

Managing Secrets with Env Variables

Slides / Video
18

Never Hardcode Secrets in the Bundle

Slides / Video
19

Auditing Dependencies for Vulnerabilities

Slides / Video
20

Blur Overlay in App Switcher

Code Quiz
21

Root/Jailbreak Detection Check

Code Quiz
22

Blocking Screenshots on Android

Code Quiz
23

Parsing JSON Without eval

Code Quiz
24

WebView Origin Allowlist

Code Quiz
25

Clearing Data on Logout

Code Quiz
26

Gating Access with Biometrics

Code Quiz
27

Sanitizing User Input

Code Quiz
28

Opening URLs Safely

Code Quiz
29

Blocking Android Cleartext Traffic

Code Quiz
30

Trusting Deep Link Params

Code Quiz
31

Storing Auth Tokens Securely

Code Quiz
32

Certificate Pinning Configuration

Code Quiz
33

iOS App Transport Security Setup

Code Quiz
34

Enforcing HTTPS and TLS

Flashcard
35

Securing WebView Usage

Flashcard
36

Preventing Log Data Leakage

Flashcard
37

Deep Link Validation

Flashcard
38

Encrypting Data at Rest

Flashcard
39

Detecting Rooted/Jailbroken Devices

Flashcard
40

Clipboard Security

Flashcard
41

Dependency Vulnerability Scanning

Flashcard
42

App Transport Security (iOS)

Flashcard
43

Securing OTA Updates

Flashcard
44

Biometric Authentication

Flashcard
45

Preventing Screen Capture

Flashcard
46

Avoiding Hardcoded Secrets

Flashcard
47

SSL/Certificate Pinning

Flashcard
48

Input Validation and Sanitization

Flashcard
49

Verifying an OTA Update Signature

Code Quiz
50

Logging During a Login Request

Code Quiz
51

Handling a Redirect from a Deep Link

Code Quiz
52

Storing an API Secret with react-native-config

Code Quiz
53

Preventing Injection in WebViews

Quiz
54

Auditing Third-Party Dependencies

Quiz
55

Hardcoding API Keys in the Bundle

Quiz
56

Secure Token Handling

Quiz
57

Disabling Debugging in Production

Quiz
58

Securing Over-the-Air Updates

Quiz
59

Validating User Input

Quiz
60

Jailbreak / Root Detection

Quiz
61

Clipboard Security

Quiz
62

Screen Capture Protection

Quiz
63

Secure Deep Link Validation

Quiz
64

Biometric Authentication

Quiz
65

The JS Bundle Can Be Reverse-Engineered

Quiz
66

WebView Security Configuration

Quiz
67

Code Obfuscation and Hardening

Quiz
68

Preventing Sensitive Data in Logs

Quiz
69

SSL / Certificate Pinning

Quiz
Code QuizAdvanced

Verifying an OTA Update Signature

See why merely checking that a signature exists does not verify update integrity.

Codejavascript
import { sha256, verifySignature } from './crypto';
import { PUBLIC_KEY } from './keys';

async function applyUpdate(bundle, signature) {
  const hash = sha256(bundle);

  // Ensure the update is authentic before installing
  if (signature) {
    installBundle(bundle);
  }
}

What is the bug in this OTA update verification?