<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Barış Kandemir on Medium]]></title>
        <description><![CDATA[Stories by Barış Kandemir on Medium]]></description>
        <link>https://medium.com/@bariskandemirx?source=rss-615861199122------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*TTj7C23rpjE8Bsbr1OcPHw@2x.jpeg</url>
            <title>Stories by Barış Kandemir on Medium</title>
            <link>https://medium.com/@bariskandemirx?source=rss-615861199122------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 20:48:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bariskandemirx/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[OWASP Mobile Top 10 — M3: Insecure Authentication/Authorization]]></title>
            <link>https://medium.com/@bariskandemirx/owasp-mobile-top-10-m3-insecure-authentication-authorization-91a62fc15482?source=rss-615861199122------2</link>
            <guid isPermaLink="false">https://medium.com/p/91a62fc15482</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[owasp]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[mobile-security]]></category>
            <category><![CDATA[authorization]]></category>
            <dc:creator><![CDATA[Barış Kandemir]]></dc:creator>
            <pubDate>Sun, 26 Jul 2026 12:04:46 GMT</pubDate>
            <atom:updated>2026-09-21T19:35:59.382Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SIjgVm7k9uR8MNl3M45Wfg.png" /></figure><p>Welcome to the third article in our OWASP Mobile Top 10 2024 series! In our previous articles, we examined <a href="https://medium.com/@bariskandemirx/credential-security-in-react-native-owasp-mobile-top-10-m1-5da9cb7666dd">M1: Improper Credential Usage</a> and <a href="https://medium.com/@bariskandemirx/owasp-mobile-top-10-m2-inadequate-supply-chain-security-47f72461e4d8">M2: Inadequate Supply Chain Security</a>. Today, we’ll dive into one of the most critical topics in mobile application security: authentication and authorization weaknesses.</p><h4>Introduction</h4><p>In 2024, OWASP merged the previously separate categories <strong>M4: Insecure Authentication</strong> and <strong>M6: Insecure Authorization</strong> to create <strong>M3: Insecure Authentication/Authorization</strong>. This merger emphasizes how intertwined authentication and authorization are and that they need to be addressed together.</p><blockquote><strong>Key Statistic:</strong> In 2024, more than 75% of mobile applications had at least one security vulnerability. A significant portion of these stemmed from authentication and authorization weaknesses.</blockquote><h3>Authentication vs Authorization</h3><p>Understanding these two concepts is critical for detecting and preventing security vulnerabilities:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*BwkwLzdHwe_Rj0RiicHqEw.png" /></figure><h4>Critical Point</h4><p><strong>Insecure authorization</strong> occurs when an organization fails to authenticate an individual before executing a requested API endpoint from a mobile device. It’s virtually impossible to conduct authorization checks on an incoming request without an established caller’s identity.</p><h3>Why Is This So Critical?</h3><h4>1. Unique Challenges of Mobile Devices</h4><p>Mobile applications face different authentication requirements than traditional web applications:</p><p><strong>Offline Usability</strong> Internet connectivity isn’t always reliable in mobile environments, which forces apps to support offline authentication. But this convenience comes at a cost — when authentication logic moves to the client side, it opens the door to bypass attacks.</p><p><strong>Limited Input Methods</strong> Typing long passwords on a small screen is frustrating, so users naturally gravitate toward short PINs. Four-digit codes become the norm, and apps quietly accept them. The result is an authentication layer that’s trivially vulnerable to brute-force attacks.</p><p><strong>Persistent Session Expectations</strong> Users expect to stay logged in — opening an app and being asked to authenticate every time feels broken. This makes “Remember Me” and auto-login features practically unavoidable. The trade-off is that tokens end up stored on the device for extended periods, increasing the risk of theft or misuse.</p><p><strong>Biometric Integration</strong> FaceID and TouchID dramatically improve the login experience, but the security risk hides in the implementation. Biometric checks typically happen on the client side rather than the server, and a misconfigured integration can allow attackers to bypass the check entirely without ever touching a real fingerprint or face.</p><h4>2. Expanding Attack Surface</h4><p>2024–2025 Mobile Security Statistics:</p><ul><li>75%+ of mobile apps have at least 1 vulnerability</li><li>60% of data breaches from unpatched vulnerabilities</li><li>40% of data breaches linked to mobile app vulnerabilities</li><li>703% increase in mobile phishing attacks (2024 H2)</li><li>SMS phishing (smishing) accounts for 2/3 of all mobile phishing</li></ul><h3>Attack Vectors</h3><p>According to OWASP, attackers exploit authentication and authorization weaknesses through two main methods:</p><h4>1. Authentication Bypass</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*FH78MXNKaGWu7sfsQBaFRA.png" /></figure><h4>2. Authorization Bypass</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*NbYWk5z9XQ7-GbuYR9rlSw.png" /></figure><h3>Common Vulnerability Indicators</h3><h4>Insecure Authorization Indicators</h4><pre># ❌ IDOR (Insecure Direct Object Reference) Vulnerability<br># User ID used directly in URL without authorization check<br><br># Vulnerable API endpoint<br>GET /api/users/12345/profile<br># Attacker can access another user&#39;s profile by simply changing the ID:<br>GET /api/users/12346/profile<br><br># ❌ Hidden Endpoint Security Fallacy<br># Developers assume &quot;hidden&quot; functions are secure<br>GET /api/admin/delete-user/12345<br># Even if endpoint is hidden, it can be attacked without auth check<br><br># ❌ User Role/Permission Transmission<br>POST /api/action<br>{<br>    &quot;user_id&quot;: 12345,<br>    &quot;role&quot;: &quot;admin&quot;,  // ⚠️ Role info from client!<br>    &quot;action&quot;: &quot;delete&quot;<br>}</pre><h4>Insecure Authentication Indicators</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*_KB1LyAXDAhuBnb_DzyjZA.png" /></figure><h3>Real-World Examples</h3><h4><strong>🔴 OAuth Device Flow Attacks (2024–2025)</strong></h4><p><strong>What happened?</strong></p><ul><li>ShinyHunters (UNC6040) group exploited OAuth device authorization vulnerabilities</li><li>Dozens of major companies affected including Google, Qantas, Allianz Life</li><li>Millions of customer records compromised</li></ul><p><strong>How it worked:</strong></p><pre>1. Attacker created legitimate-looking OAuth application<br>2. Used social engineering to convince users to approve device code<br>3. Bypassed all security controls including MFA<br>4. No software vulnerability exploited - only trust relationship abused</pre><p><strong>Impact:</strong></p><ul><li>Google’s Salesforce environment was compromised</li><li>Over 1.1 million Allianz customer records exposed</li><li>Qantas customer information leaked</li></ul><h4>🔴 TikTok Memory Privacy IDOR (2023)</h4><p><strong>What happened?</strong></p><ul><li>HackerOne researcher could access other users’ “Memories” by manipulating the aweme_id parameter</li><li>Privacy settings of private memories could be changed from “friends” to “everyone”</li></ul><h4>🔴 Instagram Interests Feature IDOR (2022)</h4><p><strong>What happened?</strong></p><ul><li>Attacker could change the user_id in intercepted POST data</li><li>Could add or modify other users’ account interests</li></ul><h4>🔴 Peloton API Authorization Bypass</h4><p><strong>What happened?</strong></p><ul><li>Researchers discovered that user data was accessible via API even when profiles were set to “private”</li><li>Proper authorization checks were missing in backend APIs</li></ul><h3>JWT Token Vulnerabilities</h3><p>JSON Web Token (JWT) is widely used for authentication in mobile applications. However, incorrect implementation can lead to serious security vulnerabilities.</p><h4>JWT Structure</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*nkF-w_F_4wGRfXxuv4zH6g.png" /></figure><h3>Critical JWT Vulnerabilities</h3><h4>1. Algorithm None Attack</h4><pre>// ❌ VULNERABLE: &quot;alg&quot;: &quot;none&quot; accepted<br><br>// Original JWT Header<br>{<br>  &quot;alg&quot;: &quot;RS256&quot;,<br>  &quot;typ&quot;: &quot;JWT&quot;<br>}<br><br>// Attacker modifies header<br>{<br>  &quot;alg&quot;: &quot;none&quot;,  // or &quot;None&quot;, &quot;NONE&quot;, &quot;nOnE&quot;<br>  &quot;typ&quot;: &quot;JWT&quot;<br>}<br><br>// Signature removed, payload manipulated<br>// Server accepts the token as valid!<br><br>// This vulnerability occurred TWICE at Auth0 (alg:nonE re-bug)</pre><h4>2. Algorithm Confusion Attack (RS256 → HS256)</h4><pre>// Server uses RS256 (asymmetric)<br>// Public key: publicly available<br>// Private key: kept secret on server<br><br>// Attacker:<br>// 1. Obtains public key<br>// 2. Changes algorithm to HS256<br>// 3. Signs using public key as secret<br><br>// WRONG Implementation<br>jwt.verify(token, publicKey, { algorithms: [&#39;RS256&#39;, &#39;HS256&#39;] });<br><br>// CORRECT Implementation<br>jwt.verify(token, publicKey, { algorithms: [&#39;RS256&#39;] }); // Only expected!</pre><h4>3. Signature Verification Bypass</h4><pre>// ❌ WRONG: Using jwt.decode()<br>const payload = jwt.decode(token);<br>// Signature not verified! Attacker can modify payload.<br><br>// ✅ CORRECT: Using jwt.verify()<br>try {<br>  const payload = jwt.verify(token, secretKey);<br>} catch (err) {<br>  // Invalid token<br>}</pre><h4>4. KID (Key ID) Injection</h4><pre>// Vulnerable Header<br>{<br>  &quot;alg&quot;: &quot;HS256&quot;,<br>  &quot;typ&quot;: &quot;JWT&quot;,<br>  &quot;kid&quot;: &quot;key1&quot;  // Server uses this as file path<br>}<br><br>// Attacker: Directory Traversal<br>{<br>  &quot;alg&quot;: &quot;HS256&quot;,<br>  &quot;typ&quot;: &quot;JWT&quot;,<br>  &quot;kid&quot;: &quot;../../../dev/null&quot;  // Empty file = empty secret<br>}<br><br>// Token signed with empty string is accepted!</pre><h4>JWT Security Best Practices</h4><pre>// ✅ SECURE JWT IMPLEMENTATION<br><br>const jwt = require(&#39;jsonwebtoken&#39;);<br><br>// 1. Use strong secret (at least 256 bits)<br>const SECRET = process.env.JWT_SECRET; // Never hardcode!<br><br>// 2. Use algorithm whitelist<br>const verifyOptions = {<br>  algorithms: [&#39;HS256&#39;],  // Only allowed algorithm<br>  issuer: &#39;your-app&#39;,<br>  audience: &#39;your-api&#39;,<br>  maxAge: &#39;1h&#39;  // Token time limit<br>};<br><br>// 3. Proper verification<br>function verifyToken(token) {<br>  try {<br>    return jwt.verify(token, SECRET, verifyOptions);<br>  } catch (err) {<br>    if (err.name === &#39;TokenExpiredError&#39;) {<br>      throw new Error(&#39;Token expired&#39;);<br>    }<br>    if (err.name === &#39;JsonWebTokenError&#39;) {<br>      throw new Error(&#39;Invalid token&#39;);<br>    }<br>    throw err;<br>  }<br>}<br><br>// 4. Don&#39;t put sensitive info in payload<br>const payload = {<br>  sub: userId,<br>  // ❌ WRONG: role: &#39;admin&#39;, password: &#39;...&#39;<br>  // Payload is not encrypted, only encoded!<br>};<br><br>// 5. Token rotation and refresh mechanism<br>const accessToken = jwt.sign(payload, SECRET, { expiresIn: &#39;15m&#39; });<br>const refreshToken = jwt.sign({ sub: userId }, REFRESH_SECRET, { expiresIn: &#39;7d&#39; });</pre><h3>Biometric Authentication Risks</h3><h4>Biometric Authentication Weaknesses</h4><p>LAContext.evaluatePolicy() is a method in Apple&#39;s LocalAuthentication framework that allows applications to verify the user&#39;s identity using Face ID, Touch ID (biometrics), or the device passcode.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*hAciJnRHZvZlJsXGEojlQw.png" /></figure><blockquote><strong>Note:</strong> evaluatePolicy() on its own only returns a boolean — true/false. It does not produce any cryptographic proof. This is why tools like Frida can manipulate the callback and force success = true. The diagram below illustrates this vulnerability. However, in the BIOMETRY_CURRENT_SET + Keychain approach we&#39;ll see in the next section, authentication is bound to cryptography — so even if Frida bypasses the callback, the Secure Enclave remains locked and the token cannot be read.</blockquote><h4>React Native: Vulnerable Biometric Implementation</h4><pre>// ❌ VULNERABLE - Using react-native-biometrics without Keychain<br>// This can be bypassed with Frida!<br><br>import ReactNativeBiometrics from &#39;react-native-biometrics&#39;;<br><br>const rnBiometrics = new ReactNativeBiometrics();<br><br>async function unsafeLogin() {<br>  const { success } = await rnBiometrics.simplePrompt({<br>    promptMessage: &#39;Confirm your identity&#39;<br>  });<br>  <br>  if (success) {<br>    // ❌ DANGEROUS: Attacker can hook this callback with Frida<br>    // and always return success = true<br>    navigateToHome();<br>    loadSensitiveData();<br>  }<br>}<br><br>// Why is this vulnerable?<br>// - simplePrompt() only returns a boolean (success/failure)<br>// - No cryptographic proof of authentication<br>// - Frida can intercept and modify the return value<br>// - No secret is tied to biometric verification</pre><h4>React Native: Secure Biometric Implementation</h4><p>The secure approach integrates biometric authentication with Keychain/Keystore. This way:</p><ol><li>A real secret (token) is stored in <strong>Secure Enclave</strong></li><li>Accessing this secret requires biometric verification</li><li>Cannot be bypassed with Frida because the secret is hardware-protected</li></ol><pre>// ✅ SECURE - Using react-native-keychain with biometric protection<br>import * as Keychain from &#39;react-native-keychain&#39;;<br><br>// Step 1: Enable biometric login (call after successful password login)<br>async function enableBiometricLogin(accessToken, refreshToken) {<br>  try {<br>    // Check if biometrics are available<br>    const biometryType = await Keychain.getSupportedBiometryType();<br>    if (!biometryType) {<br>      console.log(&#39;Biometrics not supported&#39;);<br>      return false;<br>    }<br><br>    // Store tokens with biometric protection<br>    const tokenData = JSON.stringify({<br>      accessToken,<br>      refreshToken,<br>      enabledAt: Date.now(),<br>    });<br><br>    await Keychain.setGenericPassword(&#39;biometric_auth&#39;, tokenData, {<br>      service: &#39;com.myapp.biometric&#39;,<br>      // ✅ CRITICAL: This setting requires biometric authentication<br>      accessControl: Keychain.ACCESS_CONTROL.BIOMETRY_CURRENT_SET,<br>      // Only accessible when device passcode is set and device is unlocked<br>      accessible: Keychain.ACCESSIBLE.WHEN_PASSCODE_SET_THIS_DEVICE_ONLY,<br>    });<br><br>    return true;<br>  } catch (error) {<br>    console.error(&#39;Failed to enable biometric login:&#39;, error);<br>    return false;<br>  }<br>}<br><br>// Step 2: Authenticate with biometrics (call on subsequent logins)<br>async function authenticateWithBiometric() {<br>  try {<br>    // This automatically shows biometric prompt because of accessControl setting<br>    const credentials = await Keychain.getGenericPassword({<br>      service: &#39;com.myapp.biometric&#39;,<br>      authenticationPrompt: {<br>        title: &#39;Biometric Login&#39;,<br>        subtitle: &#39;Use your fingerprint or face to access your account&#39;,<br>        cancel: &#39;Cancel&#39;,<br>      },<br>    });<br><br>    if (!credentials) {<br>      return { success: false, error: &#39;Biometric login not enabled&#39; };<br>    }<br><br>    // Parse and return tokens<br>    const tokenData = JSON.parse(credentials.password);<br>    return {<br>      success: true,<br>      accessToken: tokenData.accessToken,<br>      refreshToken: tokenData.refreshToken,<br>    };<br>  } catch (error) {<br>    // Handle biometric change (new fingerprint added)<br>    if (error.message?.includes(&#39;changed&#39;) || error.message?.includes(&#39;invalidated&#39;)) {<br>      await disableBiometricLogin();<br>      return { <br>        success: false, <br>        error: &#39;Biometric data changed. Please login with password.&#39; <br>      };<br>    }<br>    return { success: false, error: error.message };<br>  }<br>}<br><br>// Step 3: Disable biometric login<br>async function disableBiometricLogin() {<br>  await Keychain.resetGenericPassword({ service: &#39;com.myapp.biometric&#39; });<br>}</pre><h4>Why Keychain Integration is Secure</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*4WeHt4AqD80FxULYMOFTGA.png" /></figure><h3>IDOR and Broken Object Level Authorization</h3><h4>What is IDOR (Insecure Direct Object Reference)?</h4><p>IDOR occurs when an application uses user-supplied input to directly access objects without performing authorization checks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*GjxZgOnsVCK2t0DSB2Y3TA.png" /></figure><h4>IDOR Types and Examples</h4><ol><li><strong>Horizontal Privilege Escalation</strong></li></ol><pre># Original request (User A)<br>GET /api/user/profile?id=100 HTTP/1.1<br>Authorization: Bearer &lt;userA_token&gt;<br><br># Attacker request (User A accessing User B&#39;s data)<br>GET /api/user/profile?id=101 HTTP/1.1<br>Authorization: Bearer &lt;userA_token&gt;<br><br># Server returns User B&#39;s profile - IDOR!</pre><p><strong>2. Vertical Privilege Escalation</strong></p><pre># Normal user accessing admin endpoint<br>GET /api/admin/users HTTP/1.1<br>Authorization: Bearer &lt;normal_user_token&gt;<br><br># Server returns all user list - BFLA!</pre><p><strong>3. Account Takeover via IDOR</strong></p><pre># Password reset IDOR<br>POST /api/reset-password HTTP/1.1<br>Content-Type: application/json<br><br>{<br>  &quot;user_id&quot;: 12345,  # Another user&#39;s ID<br>  &quot;new_password&quot;: &quot;hacked123&quot;<br>}<br><br># Email change IDOR<br>PUT /api/user/12345/email HTTP/1.1<br>Content-Type: application/json<br><br>{<br>  &quot;new_email&quot;: &quot;attacker@evil.com&quot;<br>}</pre><h4>BOLA (Broken Object Level Authorization)</h4><p>BOLA is the #1 risk in OWASP API Security Top 10. It’s the API context equivalent of IDOR.</p><pre>// ❌ VULNERABLE API Endpoint<br>app.get(&#39;/api/orders/:orderId&#39;, authenticateUser, async (req, res) =&gt; {<br>  const order = await Order.findById(req.params.orderId);<br>  res.json(order);  // No ownership check!<br>});<br><br>// ✅ SECURE API Endpoint<br>app.get(&#39;/api/orders/:orderId&#39;, authenticateUser, async (req, res) =&gt; {<br>  const order = await Order.findById(req.params.orderId);<br>  <br>  // Ownership check<br>  if (order.userId !== req.user.id) {<br>    return res.status(403).json({ error: &#39;Forbidden&#39; });<br>  }<br>  <br>  res.json(order);<br>});</pre><h3>Technical and Business Impacts</h3><h4>Technical Impacts</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*5KyECnii3WAMIHSkyGTmeQ.png" /></figure><h4>Business Impacts</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*ruxYHIuxsyi-eiXb4Bk8GQ.png" /></figure><h3>Prevention Strategies</h3><h4>1. Avoid Weak Authentication Patterns</h4><pre>// ❌ PATTERNS TO AVOID<br><br>// 1. Fewer factors on mobile than web app<br>// Web: username + password + MFA<br>// Mobile: only PIN ← WRONG!<br><br>// 2. Local authentication (client-side bypass risk)<br>function localAuth(pin) {<br>  if (pin === storedPin) {<br>    return true;  // Can be bypassed on jailbroken device!<br>  }<br>}<br><br>// 3. Password storage with &quot;Remember Me&quot;<br>localStorage.setItem(&#39;password&#39;, userPassword);  // NEVER!<br><br>// 4. Auth with spoofable values<br>function authenticate(deviceId, geoLocation) {<br>  // Device ID and location can be spoofed!<br>}<br><br>// 5. 4-digit PIN<br>if (pin.length === 4) {<br>  // Can be cracked in seconds with rainbow table<br>}</pre><h4>2. Secure Authentication Implementation</h4><pre>// ✅ SECURE AUTHENTICATION<br><br>// 1. Server-side verification<br>async function authenticate(credentials) {<br>  const response = await fetch(&#39;/api/auth/login&#39;, {<br>    method: &#39;POST&#39;,<br>    headers: { &#39;Content-Type&#39;: &#39;application/json&#39; },<br>    body: JSON.stringify(credentials)<br>  });<br>  <br>  if (response.ok) {<br>    const { accessToken, refreshToken } = await response.json();<br>    // Use secure storage<br>    await SecureStore.setItemAsync(&#39;accessToken&#39;, accessToken);<br>    await SecureStore.setItemAsync(&#39;refreshToken&#39;, refreshToken);<br>  }<br>}<br><br>// 2. Device-specific revokable token<br>const tokenPayload = {<br>  userId: user.id,<br>  deviceId: await getUniqueDeviceId(),<br>  iat: Date.now(),<br>  exp: Date.now() + (15 * 60 * 1000)  // 15 minutes<br>};<br><br>// 3. Strong password policy<br>const passwordPolicy = {<br>  minLength: 12,<br>  requireUppercase: true,<br>  requireLowercase: true,<br>  requireNumbers: true,<br>  requireSpecialChars: true,<br>  preventCommonPasswords: true<br>};<br><br>// 4. MFA implementation<br>async function verifyMFA(userId, code) {<br>  const secret = await getUserMFASecret(userId);<br>  return speakeasy.totp.verify({<br>    secret: secret,<br>    encoding: &#39;base32&#39;,<br>    token: code,<br>    window: 1<br>  });<br>}</pre><h4>3. Secure Authorization Implementation</h4><pre>// ✅ SECURE AUTHORIZATION<br><br>// 1. Ownership check on every request<br>async function getOrder(req, res) {<br>  const order = await Order.findById(req.params.orderId);<br>  <br>  if (!order) {<br>    return res.status(404).json({ error: &#39;Not found&#39; });<br>  }<br>  <br>  // Ownership check - MUST be done!<br>  if (order.userId.toString() !== req.user.id.toString()) {<br>    // Log suspicious activity<br>    logger.warn(`Unauthorized access attempt: User ${req.user.id} tried to access order ${order.id}`);<br>    return res.status(403).json({ error: &#39;Forbidden&#39; });<br>  }<br>  <br>  res.json(order);<br>}<br><br>// 2. Role-Based Access Control (RBAC)<br>const permissions = {<br>  admin: [&#39;read&#39;, &#39;write&#39;, &#39;delete&#39;, &#39;manage_users&#39;],<br>  editor: [&#39;read&#39;, &#39;write&#39;],<br>  viewer: [&#39;read&#39;]<br>};<br><br>function checkPermission(user, requiredPermission) {<br>  const userPermissions = permissions[user.role] || [];<br>  return userPermissions.includes(requiredPermission);<br>}<br><br>// 3. Don&#39;t trust role info from client!<br>app.post(&#39;/api/action&#39;, authenticateUser, async (req, res) =&gt; {<br>  // ❌ WRONG<br>  // const userRole = req.body.role;<br>  <br>  // ✅ CORRECT - Get from server<br>  const user = await User.findById(req.user.id);<br>  const userRole = user.role;<br>  <br>  if (!checkPermission({ role: userRole }, &#39;write&#39;)) {<br>    return res.status(403).json({ error: &#39;Forbidden&#39; });<br>  }<br>});<br><br>// 4. Use Indirect Object Reference<br>// ❌ WRONG: /api/documents/12345<br>// ✅ CORRECT: /api/documents/{random-uuid}<br>const documentId = uuidv4();  // Unpredictable ID</pre><h3>React Native Specific Security</h3><h4>OAuth 2.0 + PKCE Implementation</h4><p>When using OAuth 2.0 in React Native, <strong>PKCE (Proof Key for Code Exchange)</strong> must be used. Mobile applications are “public clients” and cannot securely store client secrets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*OaSY4puMF5_sr5nwegxqBQ.png" /></figure><h4>Using react-native-app-auth</h4><pre>// App.tsx<br>import { authorize, refresh, revoke } from &#39;react-native-app-auth&#39;;<br>import * as Keychain from &#39;react-native-keychain&#39;;<br><br>// OAuth configuration<br>const config = {<br>  issuer: &#39;https://auth.example.com&#39;,<br>  clientId: &#39;your-client-id&#39;,<br>  redirectUrl: &#39;com.yourapp.auth://oauth2redirect&#39;,<br>  scopes: [&#39;openid&#39;, &#39;profile&#39;, &#39;email&#39;, &#39;offline_access&#39;],<br>  usePKCE: true,  // 🔐 PKCE must be active!<br>  // ❌ clientSecret: &#39;secret&#39;  // NOT used on mobile!<br>};<br><br>// Login function<br>async function login() {<br>  try {<br>    const authState = await authorize(config);<br>    <br>    // Store tokens securely<br>    await Keychain.setGenericPassword(<br>      &#39;tokens&#39;,<br>      JSON.stringify({<br>        accessToken: authState.accessToken,<br>        refreshToken: authState.refreshToken,<br>        accessTokenExpirationDate: authState.accessTokenExpirationDate<br>      }),<br>      {<br>        accessible: Keychain.ACCESSIBLE.WHEN_UNLOCKED_THIS_DEVICE_ONLY,<br>        // Add biometric protection (optional)<br>        accessControl: Keychain.ACCESS_CONTROL.BIOMETRY_ANY<br>      }<br>    );<br>    <br>    return authState;<br>  } catch (error) {<br>    console.error(&#39;Login failed:&#39;, error);<br>    throw error;<br>  }<br>}<br><br>// Token refresh<br>async function refreshTokens() {<br>  const credentials = await Keychain.getGenericPassword();<br>  if (!credentials) {<br>    throw new Error(&#39;No stored credentials&#39;);<br>  }<br>  <br>  const tokens = JSON.parse(credentials.password);<br>  <br>  // Check if token expired<br>  if (new Date(tokens.accessTokenExpirationDate) &lt; new Date()) {<br>    const newAuthState = await refresh(config, {<br>      refreshToken: tokens.refreshToken<br>    });<br>    <br>    // Store new tokens<br>    await Keychain.setGenericPassword(<br>      &#39;tokens&#39;,<br>      JSON.stringify({<br>        accessToken: newAuthState.accessToken,<br>        refreshToken: newAuthState.refreshToken || tokens.refreshToken,<br>        accessTokenExpirationDate: newAuthState.accessTokenExpirationDate<br>      })<br>    );<br>    <br>    return newAuthState.accessToken;<br>  }<br>  <br>  return tokens.accessToken;<br>}<br><br>// Logout<br>async function logout() {<br>  const credentials = await Keychain.getGenericPassword();<br>  if (credentials) {<br>    const tokens = JSON.parse(credentials.password);<br>    <br>    // Revoke token on server<br>    await revoke(config, {<br>      tokenToRevoke: tokens.accessToken,<br>      sendClientId: true<br>    });<br>    <br>    // Clear local storage<br>    await Keychain.resetGenericPassword();<br>  }<br>}</pre><h4>Secure Token Storage</h4><pre>// ❌ WRONG - AsyncStorage is not secure!<br>import AsyncStorage from &#39;@react-native-async-storage/async-storage&#39;;<br>await AsyncStorage.setItem(&#39;accessToken&#39;, token);  // Not encrypted!<br><br>// ✅ CORRECT - Use Keychain/Keystore<br>import * as Keychain from &#39;react-native-keychain&#39;;<br><br>// Store token<br>await Keychain.setGenericPassword(&#39;auth&#39;, token, {<br>  accessible: Keychain.ACCESSIBLE.WHEN_UNLOCKED_THIS_DEVICE_ONLY,<br>  // iOS: Stored encrypted in Keychain<br>  // Android: Stored encrypted in Keystore<br>});<br><br>// Read token<br>const credentials = await Keychain.getGenericPassword();<br>const token = credentials ? credentials.password : null;<br><br>// Delete token<br>await Keychain.resetGenericPassword();</pre><h4>API Client with Automatic Token Refresh</h4><pre>// services/apiClient.js<br>import axios from &#39;axios&#39;;<br>import * as Keychain from &#39;react-native-keychain&#39;;<br><br>const apiClient = axios.create({<br>  baseURL: &#39;https://api.yourapp.com&#39;,<br>  timeout: 30000,<br>});<br><br>let isRefreshing = false;<br>let requestQueue = [];<br><br>// Request interceptor - add token<br>apiClient.interceptors.request.use(async (config) =&gt; {<br>  const credentials = await Keychain.getGenericPassword();<br>  if (credentials) {<br>    const { accessToken } = JSON.parse(credentials.password);<br>    config.headers.Authorization = `Bearer ${accessToken}`;<br>  }<br>  return config;<br>});<br><br>// Response interceptor - handle 401<br>apiClient.interceptors.response.use(<br>  (response) =&gt; response,<br>  async (error) =&gt; {<br>    const originalRequest = error.config;<br><br>    if (error.response?.status === 401 &amp;&amp; !originalRequest._retry) {<br>      if (isRefreshing) {<br>        // Queue requests while refreshing<br>        return new Promise((resolve, reject) =&gt; {<br>          requestQueue.push({ resolve, reject, config: originalRequest });<br>        });<br>      }<br><br>      originalRequest._retry = true;<br>      isRefreshing = true;<br><br>      try {<br>        const newToken = await refreshTokens();<br>        <br>        // Process queued requests<br>        requestQueue.forEach(({ resolve, config }) =&gt; {<br>          config.headers.Authorization = `Bearer ${newToken}`;<br>          resolve(apiClient(config));<br>        });<br>        requestQueue = [];<br><br>        // Retry original request<br>        originalRequest.headers.Authorization = `Bearer ${newToken}`;<br>        return apiClient(originalRequest);<br>      } catch (refreshError) {<br>        // Refresh failed - logout user<br>        requestQueue.forEach(({ reject }) =&gt; reject(refreshError));<br>        requestQueue = [];<br>        await handleLogout();<br>        return Promise.reject(refreshError);<br>      } finally {<br>        isRefreshing = false;<br>      }<br>    }<br><br>    return Promise.reject(error);<br>  }<br>);<br><br>export default apiClient;</pre><h4>SSL Pinning</h4><pre>// Prevent MITM attacks with SSL Pinning<br>import { fetch } from &#39;react-native-ssl-pinning&#39;;<br><br>async function secureApiCall(url, options = {}) {<br>  try {<br>    const response = await fetch(url, {<br>      method: options.method || &#39;GET&#39;,<br>      headers: {<br>        &#39;Content-Type&#39;: &#39;application/json&#39;,<br>        ...options.headers,<br>      },<br>      body: options.body ? JSON.stringify(options.body) : undefined,<br>      sslPinning: {<br>        certs: [&#39;api-cert&#39;]  // Certificate in DER format<br>      },<br>      timeoutInterval: 30000,<br>    });<br>    <br>    return response.json();<br>  } catch (error) {<br>    if (error.message?.includes(&#39;SSL&#39;) || error.message?.includes(&#39;certificate&#39;)) {<br>      console.error(&#39;SSL Pinning failed - possible MITM attack!&#39;);<br>      throw new Error(&#39;Secure connection failed. Please check your network.&#39;);<br>    }<br>    throw error;<br>  }<br>}</pre><h4>Jailbreak/Root Detection</h4><pre>// services/securityCheck.js<br>import JailMonkey from &#39;jail-monkey&#39;;<br>import { Platform } from &#39;react-native&#39;;<br><br>export async function performSecurityCheck() {<br>  const issues = [];<br><br>  // Jailbreak/Root check<br>  if (JailMonkey.isJailBroken()) {<br>    issues.push(&#39;Device is jailbroken/rooted&#39;);<br>  }<br><br>  // Debug mode check<br>  if (await JailMonkey.isDebuggedMode()) {<br>    issues.push(&#39;App is running in debug mode&#39;);<br>  }<br><br>  // Mock location check (Android)<br>  if (Platform.OS === &#39;android&#39; &amp;&amp; JailMonkey.canMockLocation()) {<br>    issues.push(&#39;Mock location is enabled&#39;);<br>  }<br><br>  // Determine risk level<br>  let riskLevel = &#39;low&#39;;<br>  if (issues.length === 1) riskLevel = &#39;medium&#39;;<br>  if (issues.length === 2) riskLevel = &#39;high&#39;;<br>  if (issues.length &gt;= 3) riskLevel = &#39;critical&#39;;<br><br>  return {<br>    isSecure: issues.length === 0,<br>    issues,<br>    riskLevel,<br>  };<br>}<br><br>// Use in app initialization<br>async function initApp() {<br>  const security = await performSecurityCheck();<br>  <br>  if (security.riskLevel === &#39;critical&#39;) {<br>    // Block sensitive features or show warning<br>    Alert.alert(<br>      &#39;Security Warning&#39;,<br>      &#39;Security risks detected on this device. Some features may be restricted.&#39;<br>    );<br>  }<br>}</pre><h4>Complete Auth Context Example</h4><pre>// contexts/AuthContext.jsx<br>import React, { createContext, useContext, useState, useEffect } from &#39;react&#39;;<br>import * as Keychain from &#39;react-native-keychain&#39;;<br>import apiClient from &#39;../services/apiClient&#39;;<br><br>const AuthContext = createContext(null);<br><br>export function AuthProvider({ children }) {<br>  const [user, setUser] = useState(null);<br>  const [isLoading, setIsLoading] = useState(true);<br>  const [biometricEnabled, setBiometricEnabled] = useState(false);<br><br>  useEffect(() =&gt; {<br>    checkAuthState();<br>  }, []);<br><br>  async function checkAuthState() {<br>    try {<br>      const credentials = await Keychain.getGenericPassword();<br>      if (credentials) {<br>        const { accessToken } = JSON.parse(credentials.password);<br>        // Validate token with API<br>        const response = await apiClient.get(&#39;/auth/me&#39;);<br>        setUser(response.data);<br>      }<br>    } catch (error) {<br>      await logout();<br>    } finally {<br>      setIsLoading(false);<br>    }<br>  }<br><br>  async function login(email, password) {<br>    const response = await apiClient.post(&#39;/auth/login&#39;, { email, password });<br>    const { accessToken, refreshToken, user } = response.data;<br><br>    await Keychain.setGenericPassword(&#39;auth&#39;, JSON.stringify({<br>      accessToken,<br>      refreshToken,<br>    }), {<br>      accessible: Keychain.ACCESSIBLE.WHEN_UNLOCKED_THIS_DEVICE_ONLY,<br>    });<br><br>    setUser(user);<br>    return true;<br>  }<br><br>  async function logout() {<br>    await Keychain.resetGenericPassword();<br>    await Keychain.resetGenericPassword({ service: &#39;com.myapp.biometric&#39; });<br>    setUser(null);<br>  }<br><br>  async function enableBiometric() {<br>    const credentials = await Keychain.getGenericPassword();<br>    if (!credentials) return false;<br><br>    const { accessToken, refreshToken } = JSON.parse(credentials.password);<br>    <br>    await Keychain.setGenericPassword(&#39;biometric&#39;, JSON.stringify({<br>      accessToken,<br>      refreshToken,<br>    }), {<br>      service: &#39;com.myapp.biometric&#39;,<br>      accessControl: Keychain.ACCESS_CONTROL.BIOMETRY_CURRENT_SET,<br>      accessible: Keychain.ACCESSIBLE.WHEN_PASSCODE_SET_THIS_DEVICE_ONLY,<br>    });<br><br>    setBiometricEnabled(true);<br>    return true;<br>  }<br><br>  return (<br>    &lt;AuthContext.Provider value={{<br>      user,<br>      isLoading,<br>      biometricEnabled,<br>      login,<br>      logout,<br>      enableBiometric,<br>    }}&gt;<br>      {children}<br>    &lt;/AuthContext.Provider&gt;<br>  );<br>}<br><br>export const useAuth = () =&gt; useContext(AuthContext);</pre><h4>React Native Security Checklist</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*n79Prgr6fH-W9PDRapmZyg.png" /></figure><h4>Tools and Resources</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*B22ADIWjsetih_G2G30c1w.png" /></figure><h3>Conclusion</h3><p>Insecure authentication and authorization represent one of the most critical weaknesses in mobile application security. OWASP merging these two categories emphasizes how intertwined they are.</p><h4>🎯 Security Roadmap</h4><pre>1. BEGINNER LEVEL<br>   └── Server-side authentication mandatory<br>   └── Strong password policy (min 12 characters)<br>   └── HTTPS + SSL Pinning<br>   └── Secure storage (Keychain/Keystore)<br><br>2. INTERMEDIATE LEVEL<br>   └── OAuth 2.0 + PKCE implementation<br>   └── JWT best practices (algorithm whitelist, expiry)<br>   └── MFA implementation<br>   └── Authorization check on every endpoint<br><br>3. ENTERPRISE LEVEL<br>   └── Biometric + Keychain integration<br>   └── Zero-trust architecture<br>   └── Continuous authentication<br>   └── Anomaly detection and rate limiting<br>   └── Penetration testing and bug bounty</pre><h4>Key Takeaways</h4><ol><li><strong>Client-side security is not enough:</strong> All security controls must be reinforced server-side.</li><li><strong>Authentication ≠ Authorization:</strong> Even if authentication succeeds, authorization checks must be performed for every operation.</li><li><strong>JWT must be used carefully:</strong> Measures must be taken against algorithm none, key confusion, and other attacks.</li><li><strong>Biometrics alone is not enough:</strong> Must be integrated with Keychain/Keystore, protected against client-side bypass.</li><li><strong>Test, test, test:</strong> Automated tests for authentication and authorization should be written, regular penetration tests conducted.</li></ol><h4>References</h4><ul><li><a href="https://owasp.org/www-project-mobile-top-10/2023-risks/m3-insecure-authentication-authorization">OWASP Mobile Top 10 2024 — M3</a></li><li><a href="https://mas.owasp.org/">OWASP MASVS</a></li><li><a href="https://datatracker.ietf.org/doc/html/rfc7636">RFC 7636 — PKCE</a></li><li><a href="https://datatracker.ietf.org/doc/html/rfc8252">RFC 8252 — OAuth 2.0 for Native Apps</a></li><li><a href="https://portswigger.net/web-security/jwt">PortSwigger JWT Attacks</a></li><li><a href="https://reactnative.dev/docs/security">React Native Security</a></li><li><a href="https://github.com/FormidableLabs/react-native-app-auth">react-native-app-auth</a></li></ul><p><em>This article is the third in the OWASP Mobile Top 10 2024 series. In our previous articles, we examined M1: Improper Credential Usage and M2: Inadequate Supply Chain Security.</em></p><p>#MobileSecurity #OWASP #Authentication #Authorization #OAuth #JWT #PKCE #ReactNative #AppSec #Cybersecurity #IDOR #BOLA</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91a62fc15482" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OWASP Mobile Top 10 — M2: Inadequate Supply Chain Security]]></title>
            <link>https://medium.com/@bariskandemirx/owasp-mobile-top-10-m2-inadequate-supply-chain-security-47f72461e4d8?source=rss-615861199122------2</link>
            <guid isPermaLink="false">https://medium.com/p/47f72461e4d8</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[ios-development]]></category>
            <category><![CDATA[android-development]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Barış Kandemir]]></dc:creator>
            <pubDate>Sun, 15 Feb 2026 14:32:47 GMT</pubDate>
            <atom:updated>2026-02-15T14:32:47.153Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NHknVkOfshIX0O8_LuBCgg.png" /></figure><p>Welcome to the second article in our OWASP Mobile Top 10 2024 series! In our previous article, we examined <a href="https://medium.com/@bariskandemirx/credential-security-in-react-native-owasp-mobile-top-10-m1-5da9cb7666dd">M1: Improper Credential Usage</a>. Today, we’ll dive into one of the most critical and often overlooked risks in modern mobile application development: supply chain security.</p><h3>Introduction</h3><p>In 2024, OWASP updated the Mobile Top 10 list for the first time since 2016. One of the most notable changes in this update was the addition of <strong>M2: Inadequate Supply Chain Security</strong> to the list.</p><p>Why is this category so important? Because the vast majority of modern mobile applications are built on <strong>third-party libraries, SDKs, and frameworks</strong>. Research shows that <strong>60% to 95%</strong> of the code in a mobile application comes from third-party components, not from the developer.</p><blockquote><strong>Key Statistic:</strong> In 2023, more than 245,000 open-source software attacks were detected. This number nearly tripled compared to 2022.</blockquote><h3>What is the Supply Chain?</h3><p>In the context of mobile applications, the supply chain encompasses the entire process from application development to delivery to the end user:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eIzPAgVGjT1dwMMQM9t6hA.png" /></figure><h3>Supply Chain Components</h3><ul><li><strong>SDKs</strong> — Analytics, advertising, payment, social media integrations 🔴 High Risk</li><li><strong>Open Source Libraries</strong>— NPM, Maven, CocoaPods, Gradle dependencies 🔴 High Risk</li><li><strong>Native Libraries</strong> —Performance-critical components written in C/C++ 🟠 Medium-High Risk</li><li><strong>Build Tools</strong> — Gradle plugins, Xcode extensions 🟠 Medium Risk</li><li><strong>CI/CD Pipeline</strong> — Jenkins, GitHub Actions, Azure DevOps 🟡 Medium Risk</li></ul><h3>Why Did It Make the OWASP Top 10?</h3><p>OWASP considered the following factors when adding the M2 category:</p><h4>1. Expanding Attack Surface</h4><p>A modern mobile application contains an average of <strong>528 open-source components</strong>. Each component creates a potential attack vector.</p><h4>2. Delayed Updates</h4><p>Research shows that developers are <strong>slow to update</strong> security vulnerabilities in third-party libraries and often continue using older versions despite known security flaws.</p><h4>3. Chain of Trust Problem</h4><p>An SDK can have its own dependencies (transitive dependencies). While you use a library you trust, a vulnerability in another library that your library uses can also affect your application.</p><h4>4. Detection Difficulty - <strong><em>OWASP Assessment:</em></strong></h4><ul><li><strong>Prevalence:</strong> COMMON</li><li><strong>Detectability:</strong> DIFFICULT</li><li><strong>Impact:</strong> SEVERE</li></ul><h3>Attack Vectors</h3><p>OWASP defines several vectors through which supply chain attacks can be executed:</p><h4>1. Malicious Code Injection</h4><pre>An attacker injects malicious code into the application&#39;s <br>codebase during the development phase. This code can:<br><br>- Contain backdoors<br>- Harbor spyware<br>- Carry data exfiltration mechanisms</pre><h4>2. Compromising App Signing Keys</h4><p>Attackers can compromise app signing keys or certificates to sign malicious code as trusted.</p><h4>3. Third-Party Library Vulnerabilities</h4><pre># Example: Using a vulnerable library<br>dependencies {<br>    # This version has a known security vulnerability!<br>    implementation &#39;com.vulnerable:library:1.0.0&#39;<br>    <br>    # Updated and secure version<br>    implementation &#39;com.vulnerable:library:2.1.0&#39;<br>}</pre><h4>4. Dependency Confusion Attacks</h4><p>An attacker uploads a package to a public registry with the same name as your company’s internal package. The build system may accidentally download the malicious public package.</p><h3>Real-World Examples</h3><h4>🔴 SpinOK Malware (2023)</h4><p><strong>What happened?</strong></p><ul><li>Malware was distributed as an advertising SDK</li><li>Affected applications with <strong>over 400 million</strong> downloads</li><li><strong>More than 100</strong> apps were infected on Google Play Store</li></ul><p><strong>Impact:</strong></p><ul><li>Stole files from devices</li><li>Collected Wi-Fi and Bluetooth device information</li><li>Exfiltrated location data</li><li>Manipulated clipboard contents</li></ul><h4>🔴 Goldoson Malware (2023)</h4><p><strong>What happened?</strong></p><ul><li>Infected 60 mobile apps through a third-party library</li><li>Affected <strong>over 100 million</strong> downloads</li><li>Included popular apps like L.POINT and Money Manager</li></ul><p><strong>Critical Point:</strong></p><blockquote><em>“In supply chain attacks, attackers inject their code into free open-source libraries. Even app store security scans cannot detect these attacks until the app is deployed.” — VMX Labs</em></blockquote><h4>🔴 Necro Malware (2024)</h4><p><strong>What happened?</strong></p><ul><li>Spread through a compromised SDK</li><li>Affected <strong>11 million</strong> devices</li><li>Distributed on both Google Play and third-party stores</li><li>Targeted modified versions of apps like WhatsApp, Spotify, and Minecraft</li></ul><h4>🔴 3CX Supply Chain Attack (2023)</h4><p><strong>What happened?</strong></p><ul><li>Voice and video calling app 3CX was targeted</li><li>Trojan virus spread through both Mac and Windows installers</li><li>Gopuram backdoor was used</li><li>Linked to North Korean Lazarus group</li></ul><h3>Technical Impacts</h3><p>Technical consequences of a successful supply chain attack:</p><h4>Impact Matrix</h4><pre>┌────────────────────────────────────────────────────────────────┐<br>│                      TECHNICAL IMPACT LEVELS                    │<br>├────────────────────────────────────────────────────────────────┤<br>│                                                                 │<br>│  DATA BREACH                    ████████████████████  Critical │<br>│  • Credentials                                                  │<br>│  • Personal data                                                │<br>│  • Financial information                                        │<br>│                                                                 │<br>│  MALWARE INFECTION             ████████████████████  Critical │<br>│  • Data theft                                                   │<br>│  • Remote control                                               │<br>│  • Persistence                                                  │<br>│                                                                 │<br>│  UNAUTHORIZED ACCESS           ███████████████████   High     │<br>│  • Server access                                                │<br>│  • Device control                                               │<br>│  • Data manipulation                                            │<br>│                                                                 │<br>│  SYSTEM COMPROMISE             ██████████████████    High     │<br>│  • Complete loss of control                                     │<br>│  • Denial of service                                            │<br>│  • Long-term damage                                             │<br>│                                                                 │<br>└────────────────────────────────────────────────────────────────┘</pre><h3>Detailed Technical Impacts</h3><p><strong>Data Breach</strong></p><ul><li>Login credentials</li><li>Personal data (PII)</li><li>Financial information</li><li>Result: Identity theft, financial fraud</li></ul><p><strong>Malware Infection</strong></p><ul><li>Difficult to detect</li><li>Hard to remove</li><li>Significant damage to device and data</li></ul><p><strong>Unauthorized Access</strong></p><ul><li>Unauthorized operations on server or device</li><li>Data modification or deletion</li><li>Service disruption</li></ul><p><strong>System Compromise</strong></p><ul><li>Loss of control over the entire application system</li><li>Application shutdown</li><li>Long-term reputation damage</li></ul><h4>Risk Factors</h4><ul><li><strong>Lack of security in third-party components</strong> — Vulnerabilities can be exploited 🔴 High</li><li><strong>Malicious insider threats</strong> — Intentional vulnerability injection 🔴 High</li><li><strong>Inadequate testing and validation</strong> — Vulnerabilities go undetected 🟠 Medium</li><li><strong>Lack of security awareness</strong> — Necessary controls not implemented 🟠 Medium</li></ul><h3>Prevention Strategies</h3><p>Core prevention methods recommended by OWASP:</p><h4>1. Secure Coding Practices</h4><pre>// ❌ WRONG: Adding dependencies without security checks<br>dependencies {<br>    implementation &#39;com.unknown:library:latest&#39;<br>}<br><br>// ✅ CORRECT: Fixed version + security scanning<br>dependencies {<br>    implementation &#39;com.trusted:library:2.1.0&#39; // Specific version<br>}<br><br>// Add to build.gradle<br>dependencyCheck {<br>    failBuildOnCVSS = 7 // Fail build on CVSS 7+ vulnerabilities<br>    suppressionFile = &#39;suppressions.xml&#39;<br>}</pre><h4>2. Secure Signing and Distribution</h4><pre>┌─────────────────────────────────────────────────────────────┐<br>│               SECURE SIGNING PROCESS                         │<br>├─────────────────────────────────────────────────────────────┤<br>│                                                              │<br>│  1. Key Management                                          │<br>│     • Use HSM (Hardware Security Module)                    │<br>│     • Never store keys in code repos                        │<br>│     • Keep access to minimum level                          │<br>│                                                              │<br>│  2. Certificate Control                                     │<br>│     • Monitor certificate expiration                        │<br>│     • Define rotation policy                                │<br>│     • Create backup strategy                                │<br>│                                                              │<br>│  3. Distribution Security                                   │<br>│     • Official stores only                                  │<br>│     • Signature verification                                │<br>│     • Integrity check mechanisms                            │<br>│                                                              │<br>└─────────────────────────────────────────────────────────────┘</pre><h4>3. Third-Party Component Management</h4><p><strong>Selection Criteria:</strong></p><ul><li>✅ Is it actively maintained?</li><li>✅ Are there known security vulnerabilities?</li><li>✅ Is community support strong?</li><li>✅ Is the license compatible?</li><li>✅ When was the last commit?</li></ul><p><strong>Update Strategy:</strong></p><pre># Dependabot example configuration<br>version: 2<br>updates:<br>  - package-ecosystem: &quot;gradle&quot;<br>    directory: &quot;/&quot;<br>    schedule:<br>      interval: &quot;weekly&quot;<br>    open-pull-requests-limit: 10<br>    <br>  - package-ecosystem: &quot;npm&quot;<br>    directory: &quot;/&quot;<br>    schedule:<br>      interval: &quot;weekly&quot;</pre><h4>4. Security Controls</h4><pre>Security controls for updates:<br>├── Automated security scanning<br>├── Code review (security-focused)<br>├── Penetration testing<br>├── Static analysis (SAST)<br>├── Dynamic analysis (DAST)<br>└── Component analysis (SCA)</pre><h4>5. Monitoring and Detection</h4><pre># Example: Using OWASP Dependency-Check<br>dependency-check --project &quot;MyApp&quot; \<br>                 --scan ./app \<br>                 --format HTML \<br>                 --out ./reports \<br>                 --enableExperimental</pre><h3>SBOM: Software Bill of Materials</h3><h4>What is SBOM?</h4><p><strong>Software Bill of Materials (SBOM)</strong> is a comprehensive list of all components, dependencies, and metadata that make up a software product. Think of it like the ingredient list on food labels.</p><pre>┌─────────────────────────────────────────────────────────────┐<br>│                        SBOM STRUCTURE                        │<br>├─────────────────────────────────────────────────────────────┤<br>│                                                              │<br>│  ┌─────────────────────────────────────────────────────┐    │<br>│  │                  Your Application                    │    │<br>│  └─────────────────────────────────────────────────────┘    │<br>│         │                                                    │<br>│         ├── Component A (v1.2.0)                            │<br>│         │   ├── Sub-component A1 (v2.0.1)                   │<br>│         │   └── Sub-component A2 (v1.0.0)                   │<br>│         │                                                    │<br>│         ├── Component B (v3.1.0)                            │<br>│         │   └── Sub-component B1 (v1.5.2)                   │<br>│         │       └── Sub-sub-component B1a (v0.9.0)          │<br>│         │                                                    │<br>│         └── Component C (v2.0.0)                            │<br>│             ├── Sub-component C1 (v1.1.0)                   │<br>│             └── Sub-component C2 (v1.2.3)                   │<br>│                                                              │<br>└─────────────────────────────────────────────────────────────┘</pre><h3>Importance of SBOM</h3><p><strong>Vulnerability Detection</strong></p><ul><li>Quickly detect known vulnerabilities (CVE)</li><li>Identify affected components</li><li>Prioritize remediation</li></ul><p><strong>Incident Response</strong></p><ul><li>Quickly assess when a vulnerability is announced</li><li>Analysis that could take days/weeks without SBOM takes minutes</li></ul><p><strong>Compliance</strong></p><ul><li>US Executive Order 14028 requirements</li><li>NIST standards</li><li>Industry regulations</li></ul><h3>SBOM Formatları</h3><p><strong>CycloneDX</strong></p><ul><li>Open standard supported by OWASP</li><li>Security-focused uses</li></ul><p><strong>SPDX</strong></p><ul><li>Linux Foundation standard</li><li>License compliance</li></ul><p><strong>SWID</strong></p><ul><li>ISO/IEC 19770–2 standard</li><li>Enterprise software management</li></ul><h4>SBOM for Mobile Applications</h4><pre># Binary-based SBOM generation for Android<br># Analyzing from APK is important - source-level is not enough!<br><br># Generate SBOM using Syft<br>syft packages ./app-release.apk -o cyclonedx-json &gt; sbom.json<br><br># Scan with OWASP Dependency-Check<br>dependency-check --project &quot;MobileApp&quot; \<br>                 --scan . \<br>                 --format JSON \<br>                 --out sbom-vulnerabilities.json</pre><blockquote><strong><em>Critical Point:</em></strong><em> Source-level SBOM can miss SDKs injected during build time. Binary-level analysis closes this gap.</em></blockquote><h3>Google Play Data Safety Compliance</h3><p>SBOM data helps you complete the Data Safety section required by Google Play:</p><ul><li>Which third-party libraries collect data?</li><li>Where is this data being sent?</li><li>Is user consent obtained?</li></ul><h3>React Native Specific Security</h3><p>React Native applications inherit all the risks of the JavaScript ecosystem. Millions of packages on NPM and complex dependency networks create a wide attack surface for supply chain attacks.</p><h4>React Native Specific Risks</h4><pre>┌─────────────────────────────────────────────────────────────────────┐<br>│                 REACT NATIVE SUPPLY CHAIN                           │<br>├─────────────────────────────────────────────────────────────────────┤<br>│                                                                      │<br>│  ┌───────────────┐                                                  │<br>│  │   NPM/Yarn    │ ← Direct risk point                             │<br>│  │  Dependencies │   (package.json, yarn.lock)                     │<br>│  └───────┬───────┘                                                  │<br>│          │                                                           │<br>│          ▼                                                           │<br>│  ┌───────────────┐                                                  │<br>│  │  Metro Bundler │ ← CVE-2025-11953 (CVSS 9.8)                    │<br>│  │  &amp; CLI Tools   │   Targets developer machines                   │<br>│  └───────┬───────┘                                                  │<br>│          │                                                           │<br>│          ▼                                                           │<br>│  ┌───────────────┐    ┌───────────────┐                            │<br>│  │ index.android │    │  main.jsbundle│                            │<br>│  │   .bundle     │    │    (iOS)      │                            │<br>│  │   (Android)   │    │               │                            │<br>│  └───────┬───────┘    └───────┬───────┘                            │<br>│          │                    │                                      │<br>│          ▼                    ▼                                      │<br>│  ┌───────────────────────────────────────┐                          │<br>│  │         Native Modules (Bridge)        │                         │<br>│  │  • react-native-* packages            │                         │<br>│  │  • Expo SDK modules                    │                         │<br>│  │  • Third-party native libraries       │                         │<br>│  └───────────────────────────────────────┘                          │<br>│                                                                      │<br>└─────────────────────────────────────────────────────────────────────┘</pre><h4>Recent React Native Attacks (2024–2025)</h4><h4>1. CVE-2025–11953: React Native CLI Critical Vulnerability</h4><p><strong>Affected Package:</strong> @react-native-community/cli<br><strong>CVSS Score:</strong> 9.8 (Critical)<br><strong>Weekly Downloads:</strong> ~2 million</p><pre># Check if vulnerable<br>npm list @react-native-community/cli-server-api<br><br># Update immediately!<br>npm update @react-native-community/cli-server-api@20.0.0</pre><p><strong>What happened?</strong></p><ul><li>Attackers could execute remote code by sending POST requests to the Metro development server</li><li>Windows, macOS, and Linux systems were affected</li><li>Developer machines were directly targeted</li><li>Actively exploited in the wild as of January 2025</li></ul><h4>2. React Native Aria Attack (June 2025)</h4><p><strong>Affected Packages:</strong> 17 packages (@react-native-aria/* and @gluestack-ui/utils)<br> <strong>Total Weekly Downloads:</strong> 1 million+</p><p><strong>Malicious Package List:</strong></p><pre>@react-native-aria/focus (0.2.10)<br>@react-native-aria/utils (0.2.13)<br>@react-native-aria/overlays (0.3.16)<br>@react-native-aria/interactions (0.2.17)<br>@react-native-aria/toggle (0.2.12)<br>@react-native-aria/switch (0.2.5)<br>@react-native-aria/checkbox (0.2.11)<br>@react-native-aria/radio (0.2.14)<br>@react-native-aria/button (0.2.11)<br>@react-native-aria/menu (0.2.16)<br>@react-native-aria/listbox (0.2.10)<br>@react-native-aria/tabs (0.2.14)<br>@react-native-aria/combobox (0.2.8)<br>@react-native-aria/disclosure (0.2.9)<br>@react-native-aria/slider (0.2.13)<br>@react-native-aria/separator (0.2.7)<br>@gluestack-ui/utils (0.1.16, 0.1.17)</pre><p><strong>Attack Details:</strong></p><ul><li>Contained a Remote Access Trojan (RAT)</li><li>Could execute arbitrary shell commands</li><li>Could upload/download files</li><li>Established persistence on Windows (%LOCALAPPDATA%\Programs\Python\Python3127)</li><li>C2 servers: 136.0.9[.]8 and 85.239.62[.]36</li></ul><h4>3. Major NPM Attack (September 2025)</h4><p><strong>Affected Packages:</strong> 18 packages including chalk, debug, ansi-styles, strip-ansi<br> <strong>Weekly Downloads:</strong> 2.6 billion!</p><p>While this attack wasn’t specific to React Native, it affected almost all React Native projects because these packages are fundamental dependencies. Attackers injected malicious code targeting cryptocurrency transactions.</p><h3>Security Tools for React Native</h3><h4>1. NPM Audit (Built-in)</h4><pre># Basic scan<br>npm audit<br><br># Production dependencies only<br>npm audit --production<br><br># Auto-fix<br>npm audit fix<br><br># Allow breaking changes (use carefully!)<br>npm audit fix --force<br><br># JSON output (for CI/CD)<br>npm audit --json &gt; audit-report.json</pre><h4>2. Yarn Audit</h4><pre># If using Yarn<br>yarn audit<br><br># Specific level and above<br>yarn audit --level moderate</pre><h4>3. Snyk (Recommended)</h4><pre># Installation<br>npm install -g snyk<br><br># Authentication<br>snyk auth<br><br># Project scan<br>snyk test<br><br># Start continuous monitoring<br>snyk monitor<br><br># Specific for React Native project<br>snyk test --all-projects --detection-depth=4</pre><p><strong>VS Code Integration:</strong> Install the Snyk VS Code extension to get real-time security vulnerability notifications while coding.</p><h4>4. OWASP Dependency-Check</h4><pre># Using Docker<br>docker run --rm \<br>  -v $(pwd):/src \<br>  owasp/dependency-check \<br>  --project &quot;ReactNativeApp&quot; \<br>  --scan /src \<br>  --format HTML \<br>  --out /src/reports</pre><h4>5. Socket.dev (NPM Supply Chain Specific)</h4><pre># Installation<br>npm install -g @socketsecurity/cli<br><br># Scan<br>socket scan<br><br># Integrate with CI/CD<br>socket ci</pre><h4>Hermes and Code Protection</h4><p>With React Native 0.70+, Hermes became the default JavaScript engine. Hermes compiles JavaScript to bytecode, providing an extra layer of protection.</p><h4>How Does Hermes Provide Protection?</h4><pre>JavaScript Bundle (Old Method - JSC)<br>─────────────────────────────────────<br>const API_KEY = &quot;sk_live_abc123&quot;;<br>const apiUrl = &quot;https://api.myapp.com&quot;;<br><br>function authenticate(user) {<br>  // All code is readable!<br>}<br><br><br>Hermes Bytecode (.hbc)<br>─────────────────────────────────────<br>89 48 45 52 4D 45 53 00 00 00 60 00 <br>00 00 04 00 00 00 0A 00 00 00 52 65 <br>61 63 74 4E 61 74 69 76 65 00 00 00<br><br>LoadParam 0<br>LoadParam 1<br>GetGlobalObject<br>LoadConstString &quot;app_secret&quot;<br>CallBuiltin customHashFunction<br>...</pre><h4>Enabling Hermes</h4><p><strong>Android (android/app/build.gradle):</strong></p><pre>project.ext.react = [<br>    enableHermes: true,<br>    hermesCommand: &quot;../../node_modules/hermes-engine/%OS-BIN%/hermes&quot;,<br>]</pre><p><strong>iOS (Podfile):</strong></p><pre>use_react_native!(<br>  :hermes_enabled =&gt; true<br>)</pre><h4>Hermes Alone Is Not Enough!</h4><p>Hermes bytecode can be reverse-engineered:</p><pre># Bytecode disassembly<br>hbcdump index.android.bundle<br><br># Output:<br># Function · 0(1 params, 15 registers, 0 symbols):<br>#   LoadConstUndefined r0<br>#   CreateEnvironment r1<br>#   LoadConstString r2, &quot;use strict&quot;<br>#   ...</pre><p><strong>Recommended Protection Combination:</strong></p><ol><li>JavaScript obfuscation (before build)</li><li>Hermes bytecode compilation</li><li>ProGuard/R8 (for Android native code)</li><li>Symbol stripping (for iOS)</li></ol><h4>JavaScript Obfuscation</h4><p><strong>Metro Plugin Obfuscation</strong></p><pre># Installation<br>npm install --save-dev obfuscator-io-metro-plugin</pre><p><strong>metro.config.js:</strong></p><pre>const obfuscatorPlugin = require(&#39;obfuscator-io-metro-plugin&#39;)(<br>  {<br>    compact: true,<br>    controlFlowFlattening: true,<br>    controlFlowFlatteningThreshold: 0.75,<br>    deadCodeInjection: true,<br>    deadCodeInjectionThreshold: 0.4,<br>    debugProtection: false,<br>    disableConsoleOutput: true,<br>    identifierNamesGenerator: &#39;hexadecimal&#39;,<br>    renameGlobals: false,<br>    selfDefending: true,<br>    stringArray: true,<br>    stringArrayEncoding: [&#39;base64&#39;],<br>    stringArrayThreshold: 0.75,<br>  },<br>  {<br>    runInDev: false,<br>    logObfuscatedFiles: true,<br>  }<br>);<br><br>module.exports = {<br>  ...obfuscatorPlugin,<br>};</pre><h3>Native Layer Security</h3><h4><strong>Android: ProGuard/R8</strong></h4><p><strong>android/app/build.gradle:</strong></p><pre>android {<br>    buildTypes {<br>        release {<br>            minifyEnabled true<br>            shrinkResources true<br>            proguardFiles getDefaultProguardFile(&#39;proguard-android-optimize.txt&#39;), &#39;proguard-rules.pro&#39;<br>        }<br>    }<br>}</pre><p><strong>proguard-rules.pro:</strong></p><pre># React Native core<br>-keep class com.facebook.react.** { *; }<br>-keep class com.facebook.hermes.** { *; }<br>-keep class com.facebook.jni.** { *; }<br><br># Native methods<br>-keepclassmembers class * {<br>    @com.facebook.react.bridge.ReactMethod *;<br>    @com.facebook.react.bridge.ReactProp *;<br>}<br><br># JavaScript Interface<br>-keepclassmembers class * {<br>    @android.webkit.JavascriptInterface &lt;methods&gt;;<br>}</pre><h4>iOS: Symbol Stripping</h4><p><strong>Xcode Build Settings:</strong></p><pre>STRIP_INSTALLED_PRODUCT = YES<br>STRIP_STYLE = all<br>DEPLOYMENT_POSTPROCESSING = YES</pre><h3>SBOM Generation for React Native</h3><pre># CycloneDX format SBOM<br>npx @cyclonedx/cyclonedx-npm --output-format json --output-file sbom.json<br><br># SPDX format<br>npx @spdx/sbom-generator -p . -o sbom-spdx.json<br><br># Snyk with SBOM + Vulnerability analysis<br>snyk sbom --format cyclonedx1.4+json &gt; sbom-snyk.json</pre><h3>React Native Security Best Practices</h3><h4>1. package-lock.json / yarn.lock Control</h4><pre># Never install without lock file!<br>npm ci  # Instead of npm install<br><br># Monitor lock file changes<br>git diff package-lock.json</pre><h4>2. Dependency Pinning</h4><pre>// package.json<br>{<br>  &quot;dependencies&quot;: {<br>    &quot;react-native&quot;: &quot;0.73.4&quot;,  // ✅ Fixed version<br>    &quot;axios&quot;: &quot;^1.6.0&quot;          // ⚠️ Risky - can receive minor updates<br>  }<br>}</pre><h4>3. Trusted Source Control</h4><pre># Check package owner<br>npm view &lt;package-name&gt; maintainers<br><br># Check last release date<br>npm view &lt;package-name&gt; time<br><br># Check download count<br>npm view &lt;package-name&gt; | grep &quot;downloads&quot;</pre><h4>4. Dependabot Configuration</h4><p><strong>.github/dependabot.yml:</strong></p><pre>version: 2<br>updates:<br>  - package-ecosystem: &quot;npm&quot;<br>    directory: &quot;/&quot;<br>    schedule:<br>      interval: &quot;weekly&quot;<br>    open-pull-requests-limit: 10<br>    reviewers:<br>      - &quot;security-team&quot;<br>    labels:<br>      - &quot;dependencies&quot;<br>      - &quot;security&quot;<br>    ignore:<br>      # Handle major version updates manually<br>      - dependency-name: &quot;react-native&quot;<br>        update-types: [&quot;version-update:semver-major&quot;]</pre><h4><strong>React Native Security Tools Comparison</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YvQr-ETihZq35d9OeRCLpA.png" /></figure><h3>Tools and Resources</h3><h4>General Security Tools</h4><p><strong>OWASP Dependency-Check</strong></p><pre># Installation and usage<br>dependency-check --project &quot;MyMobileApp&quot; \<br>                 --scan ./app/build.gradle \<br>                 --format HTML \<br>                 --out ./security-reports/<br><br># CI/CD integration (Jenkins)<br>dependencyCheck additionalArguments: &#39;--format HTML&#39;, <br>                odcInstallation: &#39;dependency-check&#39;</pre><p><strong>Features:</strong></p><ul><li>Integration with NVD (National Vulnerability Database)</li><li>Support for Java, .NET, Python, Ruby, JavaScript</li><li>Jenkins, Maven, Gradle, Ant integrations</li><li>Free and open source</li></ul><h4>OWASP Dep-Scan</h4><pre># Using Docker<br>docker run --rm \<br>  -v $PWD:/app \<br>  ghcr.io/appthreat/dep-scan \<br>  --src /app \<br>  --reports-dir /app/reports<br><br># Features<br># - SBOM generation (CycloneDX)<br># - VEX (Vulnerability Exploitability eXchange) support<br># - Reachability analysis<br># - Dependency confusion detection</pre><h4>Mobile Security Testing Tools</h4><pre>Android:<br>├── MobSF (Mobile Security Framework)<br>├── APKTool<br>├── jadx<br>├── Frida<br>└── objection<br><br>iOS:<br>├── MobSF<br>├── class-dump<br>├── Hopper<br>├── Frida<br>└── objection</pre><h3>Conclusion</h3><p>Supply chain security is no longer a “nice to have” but a <strong>mandatory</strong> security measure. OWASP adding it as M2 to the 2024 Mobile Top 10 list demonstrates the severity of this risk.</p><h4>Supply Chain Security Roadmap</h4><pre>1. BEGINNER LEVEL<br>   └── Run npm audit / yarn audit daily<br>   └── Enable Dependabot<br>   └── Version control lock files<br>   └── Use fixed versions<br><br>2. INTERMEDIATE LEVEL<br>   └── Snyk integration<br>   └── Mandatory security scanning in CI/CD<br>   └── SBOM generation and management<br>   └── Hermes + Obfuscation (React Native)<br><br>3. ENTERPRISE LEVEL<br>   └── Socket.dev (supply chain specific)<br>   └── ProGuard/R8 + iXGuard<br>   └── Custom security policies<br>   └── Penetration testing<br>   └── Bug bounty program</pre><h4>Key Takeaways</h4><ol><li><strong>Visibility is essential:</strong> You cannot provide assurance without knowing what’s in your application. Use SBOM.</li><li><strong>Be proactive:</strong> Adopt a proactive rather than reactive security approach. Perform regular scans and updates.</li><li><strong>Use automation:</strong> Manual processes make mistakes. Integrate security controls into your CI/CD pipeline.</li><li><strong>Verify what you trust:</strong> The “trust but verify” principle is critical for the supply chain.</li><li><strong>Stay updated:</strong> Security vulnerabilities are discovered every day. Follow the news, subscribe to security lists.</li></ol><h4>Next Steps</h4><p>In our next article, we’ll examine <strong>M3: Insecure Authentication/Authorization</strong>. We’ll cover authentication and authorization weaknesses in mobile applications, attack methods, and protection strategies.</p><h4>Resources</h4><ul><li><a href="https://owasp.org/www-project-mobile-top-10/">OWASP Mobile Top 10 2024</a></li><li><a href="https://owasp.org/www-project-mobile-top-10/2023-risks/m2-inadequate-supply-chain-security.html">OWASP M2: Inadequate Supply Chain Security</a></li><li><a href="https://owasp.org/www-project-dependency-check/">OWASP Dependency-Check</a></li><li><a href="https://www.cisa.gov/sbom">CISA SBOM Resources</a></li><li><a href="https://www.nist.gov/cyberframework">NIST Cybersecurity Framework</a></li><li><a href="https://mas.owasp.org/">OWASP MASVS</a></li><li><a href="https://snyk.io/blog/getting-started-react-native-security/">Snyk React Native Security</a></li><li><a href="https://www.securityweek.com/critical-flaw-in-popular-react-native-npm-package-exposes-developers-to-attacks/">React Native CLI CVE-2025–11953</a></li></ul><p>#MobileSecurity #OWASP #SupplyChainSecurity #Cybersecurity #AppSec #MobileAppSecurity #SBOM #DevSecOps #ReactNative #NPM</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47f72461e4d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OWASP Mobile Top 10 — M2: Yetersiz Tedarik Zinciri Güvenliği (Inadequate Supply Chain Security)]]></title>
            <link>https://medium.com/@bariskandemirx/owasp-mobile-top-10-m2-yetersiz-tedarik-zinciri-g%C3%BCvenli%C4%9Fi-inadequate-supply-chain-security-3b1e811c6181?source=rss-615861199122------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b1e811c6181</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[ios-development]]></category>
            <category><![CDATA[android-development]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Barış Kandemir]]></dc:creator>
            <pubDate>Sun, 15 Feb 2026 14:32:05 GMT</pubDate>
            <atom:updated>2026-02-15T14:32:05.321Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N-1fCqzxjDQ42WNwIilpZg.png" /></figure><p>OWASP Mobile Top 10 2024 serimizin ikinci yazısına hoş geldiniz! Bir önceki yazımızda <a href="https://medium.com/@bariskandemirx/owasp-mobile-top-10-hatal%C4%B1-kimlik-bilgisi-kullan%C4%B1m%C4%B1-m1-b8cb6ce8df67">M1: Improper Credential Usage</a> konusunu incelemiştik. Bugün ise modern mobil uygulama geliştirmenin en kritik ve göz ardı edilen risklerinden biri olan tedarik zinciri güvenliğine dalacağız.</p><h3>Giriş</h3><p>2024 yılında OWASP, 2016&#39;dan bu yana ilk kez Mobile Top 10 listesini güncelledi. Bu güncellemede dikkat çeken en önemli değişikliklerden biri, <strong>M2: Inadequate Supply Chain Security</strong> kategorisinin listeye eklenmesiydi.</p><p>Bu kategori neden bu kadar önemli? Çünkü modern mobil uygulamaların büyük çoğunluğu <strong>üçüncü parti kütüphaneler, SDK’lar ve framework’ler</strong> üzerine inşa edilmekte. Araştırmalar, bir mobil uygulamadaki kodun <strong>%60 ila %95&#39;inin</strong> geliştirici tarafından değil, üçüncü parti bileşenlerden geldiğini göstermektedir.</p><blockquote><strong>Önemli İstatistik:</strong> 2023 yılında 245.000&#39;den fazla açık kaynak yazılım saldırısı tespit edildi. Bu rakam, 2022&#39;ye göre neredeyse üç kat artış gösterdi.</blockquote><h3>Tedarik Zinciri Nedir?</h3><p>Mobil uygulama bağlamında tedarik zinciri, uygulamanın geliştirilmesinden son kullanıcıya ulaşmasına kadar geçen tüm süreci kapsar:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KIZPtKpibZTfSFXURpQd7A.png" /></figure><h3>Tedarik Zincirinin Bileşenleri</h3><ul><li><strong>SDK’lar</strong> — Analitik, reklam, ödeme, sosyal medya entegrasyonları 🔴 Yüksek Risk</li><li><strong>Açık Kaynak Kütüphaneler</strong> — NPM, Maven, CocoaPods, Gradle bağımlılıkları 🔴 Yüksek Risk</li><li><strong>Native Kütüphaneler</strong> — C/C++ ile yazılmış performans kritik bileşenler 🟠 Orta-Yüksek Risk</li><li><strong>Build Araçları</strong> — Gradle plugins, Xcode extensions 🟠 Orta Risk</li><li><strong>CI/CD Pipeline</strong> — Jenkins, GitHub Actions, Azure DevOps 🟡 Orta Risk</li></ul><h3>Neden OWASP Top 10&#39;a Girdi?</h3><p>OWASP, M2 kategorisini eklerken şu faktörleri göz önünde bulundurdu:</p><h4>1. Artan Saldırı Yüzeyi</h4><p>Modern bir mobil uygulama ortalama <strong>528 açık kaynak bileşen</strong> içermektedir. Her bileşen potansiyel bir saldırı vektörü oluşturuyor.</p><h4>2. Gecikmeli Güncellemeler</h4><p>Araştırmalar, geliştiricilerin üçüncü parti kütüphanelerdeki güvenlik açıklarını <strong>güncellemede yavaş kaldığını</strong> ve hatta bilinen güvenlik açıklarına rağmen eski sürümleri kullanmaya devam ettiğini göstermektedir.</p><h4>3. Güven Zinciri Problemi</h4><p>Bir SDK’nın kendi bağımlılıkları (transitive dependencies) olabilir. Siz güvendiğiniz bir kütüphaneyi kullanırken, o kütüphanenin kullandığı başka bir kütüphaneden gelen açık sizin uygulamanızı da etkiler.</p><h4>4. Tespit Zorluğu — OWASP Değerlendirmesi</h4><ul><li><strong>Yaygınlık:</strong> COMMON (Yaygın)</li><li><strong>Tespit Edilebilirlik:</strong> DIFFICULT (Zor)</li><li><strong>Etki:</strong> SEVERE (Şiddetli)</li></ul><h3>Saldırı Vektörleri</h3><p>OWASP, tedarik zinciri saldırılarının gerçekleştirilebileceği birçok vektör tanımlamaktadır:</p><h4>1. Kötü Niyetli Kod Enjeksiyonu</h4><p>Saldırgan, geliştirme aşamasında uygulamanın kod tabanına <br>zararlı kod enjekte eder. Bu kod:</p><p>- Arka kapılar (backdoors) içerebilir<br>- Casus yazılım (spyware) barındırabilir<br>- Veri sızdırma mekanizmaları taşıyabilir</p><h4>2. Uygulama İmza Anahtarlarının Ele Geçirilmesi</h4><p>Saldırganlar, uygulama imza anahtarlarını veya sertifikalarını ele geçirerek kötü amaçlı kodu güvenilir olarak imzalayabilir.</p><h4>3. Üçüncü Parti Kütüphane Açıkları</h4><pre># Örnek: Savunmasız bir kütüphanenin kullanımı<br>dependencies {<br>    # Bu sürümde bilinen bir güvenlik açığı var!<br>    implementation &#39;com.vulnerable:library:1.0.0&#39;<br>    <br>    # Güncel ve güvenli sürüm<br>    implementation &#39;com.vulnerable:library:2.1.0&#39;<br>}</pre><h4>4. Dependency Confusion Saldırıları</h4><p>Saldırgan, şirketinizin dahili paket adıyla aynı isimde bir paketi public registry’ye yükler. Build sistemi yanlışlıkla zararlı public paketi indirebilir.</p><h3>Gerçek Dünya Örnekleri</h3><h4>🔴 SpinOK Malware (2023)</h4><p><strong>Ne oldu?</strong></p><ul><li>Zararlı yazılım, bir reklam SDK’sı olarak dağıtıldı</li><li><strong>400 milyondan fazla</strong> indirmeye sahip uygulamaları etkiledi</li><li>Google Play Store’da <strong>100&#39;den fazla</strong> uygulama enfekte oldu</li></ul><p><strong>Etki:</strong></p><ul><li>Cihazlardaki dosyaları çaldı</li><li>Wi-Fi ve Bluetooth cihaz bilgilerini topladı</li><li>Konum verilerini sızdırdı</li><li>Pano içeriklerini manipüle etti</li></ul><h4>🔴 Goldoson Malware (2023)</h4><p><strong>Ne oldu?</strong></p><ul><li>Üçüncü parti bir kütüphane aracılığıyla 60 mobil uygulamaya bulaştı</li><li><strong>100 milyonun üzerinde</strong> indirme etkilendi</li><li>L.POINT, Money Manager gibi popüler uygulamalar dahil</li></ul><p><strong>Kritik Nokta:</strong></p><blockquote><em>“Tedarik zinciri saldırılarında, saldırganlar kodlarını ücretsiz açık kaynak kütüphanelere enjekte eder. Uygulama mağazası güvenlik taramaları bile bu saldırıları uygulama dağıtılana kadar tespit edemez.” — VMX Labs</em></blockquote><h4>🔴 Necro Malware (2024)</h4><p><strong>Ne oldu?</strong></p><ul><li>Kompromize edilmiş bir SDK aracılığıyla yayıldı</li><li><strong>11 milyon</strong> cihazı etkiledi</li><li>Hem Google Play hem de üçüncü parti mağazalarda dağıtıldı</li><li>WhatsApp, Spotify, Minecraft gibi uygulamaların modlanmış versiyonlarını hedef aldı</li></ul><h4>🔴 3CX Supply Chain Attack (2023)</h4><p><strong>Ne oldu?</strong></p><ul><li>Sesli ve görüntülü arama uygulaması 3CX hedef alındı</li><li>Trojan virüsü hem Mac hem Windows yükleyicileri aracılığıyla yayıldı</li><li>Gopuram arka kapısı kullanıldı</li><li>Kuzey Koreli Lazarus grubuyla ilişkilendirildi</li></ul><h3>Teknik Etkiler</h3><p>Başarılı bir tedarik zinciri saldırısının teknik sonuçları:</p><pre>┌────────────────────────────────────────────────────────────────┐<br>│                      TEKNİK ETKİ SEVİYELERİ                    │<br>├────────────────────────────────────────────────────────────────┤<br>│                                                                 │<br>│  VERİ İHLALİ                    ████████████████████  Kritik   │<br>│  • Kimlik bilgileri                                             │<br>│  • Kişisel veriler                                              │<br>│  • Finansal bilgiler                                            │<br>│                                                                 │<br>│  MALWARE ENFEKSİYONU           ████████████████████  Kritik   │<br>│  • Veri hırsızlığı                                              │<br>│  • Uzaktan kontrol                                              │<br>│  • Kalıcılık                                                    │<br>│                                                                 │<br>│  YETKİSİZ ERİŞİM               ███████████████████   Yüksek   │<br>│  • Sunucu erişimi                                               │<br>│  • Cihaz kontrolü                                               │<br>│  • Veri manipülasyonu                                           │<br>│                                                                 │<br>│  SİSTEM ELE GEÇİRME            ██████████████████    Yüksek   │<br>│  • Tam kontrol kaybı                                            │<br>│  • Servis dışı bırakma                                          │<br>│  • Uzun vadeli hasar                                            │<br>│                                                                 │<br>└────────────────────────────────────────────────────────────────┘</pre><h3>Detaylı Teknik Etkiler</h3><p><strong>Veri İhlali (Data Breach)</strong></p><ul><li>Oturum açma bilgileri</li><li>Kişisel veriler (PII)</li><li>Finansal bilgiler</li><li>Sonuç: Kimlik hırsızlığı, finansal dolandırıcılık</li></ul><p><strong>Malware Enfeksiyonu</strong></p><ul><li>Tespit edilmesi zor</li><li>Kaldırılması güç</li><li>Cihaz ve veriye önemli hasar</li></ul><p><strong>Yetkisiz Erişim</strong></p><ul><li>Sunucu veya cihaz üzerinde yetkisiz işlemler</li><li>Veri değişikliği veya silme</li><li>Servis kesintisi</li></ul><p><strong>Sistem Ele Geçirme</strong></p><ul><li>Uygulamanın tüm sisteminin kontrolünün kaybı</li><li>Uygulama kapatılabilir</li><li>Uzun vadeli itibar hasarı</li></ul><h3>Risk Faktörleri</h3><ul><li><strong>Üçüncü parti bileşenlerde güvenlik eksikliği</strong> — Güvenlik açıkları sömürülebilir 🔴 Yüksek Risk</li><li><strong>Kötü niyetli içeriden tehditler</strong> — Kasıtlı açık enjeksiyonu 🔴 Yüksek Risk</li><li><strong>Yetersiz test ve doğrulama</strong> — Açıklar tespit edilemez 🟠 Orta Risk</li><li><strong>Güvenlik farkındalığı eksikliği</strong> — Gerekli kontroller uygulanmaz 🟠 Orta Risk</li></ul><h3>Önleme Stratejileri</h3><p>OWASP’ın önerdiği temel önleme yöntemleri:</p><h4>1. Güvenli Kodlama Pratikleri</h4><pre>// ❌ YANLIŞ: Güvenlik kontrolü olmadan bağımlılık ekleme<br>dependencies {<br>    implementation &#39;com.unknown:library:latest&#39;<br>}<br><br>// ✅ DOĞRU: Sabit sürüm + güvenlik taraması<br>dependencies {<br>    implementation &#39;com.trusted:library:2.1.0&#39; // Belirli sürüm<br>}<br><br>// build.gradle&#39;a ekleyin<br>dependencyCheck {<br>    failBuildOnCVSS = 7 // CVSS 7+ açıklarda build başarısız<br>    suppressionFile = &#39;suppressions.xml&#39;<br>}<br><br></pre><h4>2. Güvenli İmza ve Dağıtım</h4><pre>┌─────────────────────────────────────────────────────────────┐<br>│               GÜVENLİ İMZA SÜRECİ                           │<br>├─────────────────────────────────────────────────────────────┤<br>│                                                              │<br>│  1. Anahtar Yönetimi                                        │<br>│     • HSM (Hardware Security Module) kullanın               │<br>│     • Anahtarları asla kod reposunda saklamayın             │<br>│     • Erişimi minimum seviyede tutun                        │<br>│                                                              │<br>│  2. Sertifika Kontrolü                                      │<br>│     • Sertifika süresini izleyin                            │<br>│     • Rotasyon politikası belirleyin                        │<br>│     • Yedekleme stratejisi oluşturun                        │<br>│                                                              │<br>│  3. Dağıtım Güvenliği                                       │<br>│     • Yalnızca resmi mağazalar                              │<br>│     • İmza doğrulama kontrolü                               │<br>│     • Integrity check mekanizmaları                         │<br>│                                                              │<br>└─────────────────────────────────────────────────────────────┘</pre><h4>3. Üçüncü Parti Bileşen Yönetimi</h4><p><strong>Seçim Kriterleri:</strong></p><ul><li>✅ Aktif olarak bakımı yapılıyor mu?</li><li>✅ Bilinen güvenlik açıkları var mı?</li><li>✅ Topluluk desteği güçlü mü?</li><li>✅ Lisans uyumlu mu?</li><li>✅ Son commit ne zaman yapıldı?</li></ul><p><strong>Güncelleme Stratejisi:</strong></p><pre># Dependabot örnek konfigürasyonu<br>version: 2<br>updates:<br>  - package-ecosystem: &quot;gradle&quot;<br>    directory: &quot;/&quot;<br>    schedule:<br>      interval: &quot;weekly&quot;<br>    open-pull-requests-limit: 10<br>    <br>  - package-ecosystem: &quot;npm&quot;<br>    directory: &quot;/&quot;<br>    schedule:<br>      interval: &quot;weekly&quot;</pre><h4>4. Güvenlik Kontrolleri</h4><pre><br>Güncellemeler için güvenlik kontrolleri:<br>├── Otomatik güvenlik taraması<br>├── Kod incelemesi (security-focused)<br>├── Penetrasyon testi<br>├── Statik analiz (SAST)<br>├── Dinamik analiz (DAST)<br>└── Bileşen analizi (SCA)</pre><h4>5. İzleme ve Tespit</h4><pre># Örnek: OWASP Dependency-Check kullanımı<br>dependency-check --project &quot;MyApp&quot; \<br>                 --scan ./app \<br>                 --format HTML \<br>                 --out ./reports \<br>                 --enableExperimental</pre><h3>SBOM: Software Bill of Materials</h3><h4>SBOM Nedir?</h4><p><strong>Software Bill of Materials (SBOM)</strong>, bir yazılım ürününü oluşturan tüm bileşenlerin, bağımlılıkların ve meta verilerin kapsamlı listesidir. Gıda etiketlerindeki içerik listesi gibi düşünebilirsiniz.</p><pre>┌─────────────────────────────────────────────────────────────┐<br>│                        SBOM YAPISI                          │<br>├─────────────────────────────────────────────────────────────┤<br>│                                                              │<br>│  ┌─────────────────────────────────────────────────────┐    │<br>│  │                    Uygulamanız                       │    │<br>│  └─────────────────────────────────────────────────────┘    │<br>│         │                                                    │<br>│         ├── Bileşen A (v1.2.0)                              │<br>│         │   ├── Alt-bileşen A1 (v2.0.1)                     │<br>│         │   └── Alt-bileşen A2 (v1.0.0)                     │<br>│         │                                                    │<br>│         ├── Bileşen B (v3.1.0)                              │<br>│         │   └── Alt-bileşen B1 (v1.5.2)                     │<br>│         │       └── Alt-alt-bileşen B1a (v0.9.0)            │<br>│         │                                                    │<br>│         └── Bileşen C (v2.0.0)                              │<br>│             ├── Alt-bileşen C1 (v1.1.0)                     │<br>│             └── Alt-bileşen C2 (v1.2.3)                     │<br>│                                                              │<br>└─────────────────────────────────────────────────────────────┘</pre><h3>SBOM’un Önemi</h3><p><strong>Güvenlik Açığı Tespiti</strong></p><ul><li>Bilinen açıkları (CVE) hızla tespit edin</li><li>Etkilenen bileşenleri belirleyin</li><li>Önceliklendirme yapın</li></ul><p><strong>Olay Müdahalesi</strong></p><ul><li>Bir açık duyurulduğunda hızla değerlendirin</li><li>SBOM olmadan günler/haftalar sürebilecek analiz dakikalara iner</li></ul><p><strong>Uyumluluk</strong></p><ul><li>ABD Executive Order 14028 gereklilikleri</li><li>NIST standartları</li><li>Sektörel düzenlemeler</li></ul><h3>SBOM Formatları</h3><p><strong>CycloneDX</strong></p><ul><li>OWASP tarafından desteklenen açık standart</li><li>Güvenlik odaklı kullanımlar</li></ul><p><strong>SPDX</strong></p><ul><li>Linux Foundation standardı</li><li>Lisans uyumluluğu</li></ul><p><strong>SWID</strong></p><ul><li>ISO/IEC 19770–2 standardı</li><li>Kurumsal yazılım yönetimi</li></ul><h3>Mobil Uygulamalar için SBOM</h3><pre># Android için binary tabanlı SBOM oluşturma<br># APK&#39;dan analiz yapmak önemli - source-level yeterli değil!<br><br># Syft kullanarak SBOM oluşturma<br>syft packages ./app-release.apk -o cyclonedx-json &gt; sbom.json<br><br># OWASP Dependency-Check ile tarama<br>dependency-check --project &quot;MobileApp&quot; \<br>                 --scan . \<br>                 --format JSON \<br>                 --out sbom-vulnerabilities.json</pre><blockquote><strong>Kritik Nokta:</strong> Kaynak kod seviyesinde SBOM, build sırasında enjekte edilen SDK’ları kaçırabilir. Binary seviyesinde analiz bu boşluğu kapatır.</blockquote><h4>Google Play Data Safety Uyumu</h4><p>SBOM verileri, Google Play’in zorunlu tuttuğu Data Safety bölümünü doldurmanıza yardımcı olur:</p><ul><li>Hangi üçüncü parti kütüphaneler veri topluyor?</li><li>Bu veriler nereye gönderiliyor?</li><li>Kullanıcı izni alınıyor mu?</li></ul><h3>React Native Özelinde Tedarik Zinciri Güvenliği</h3><p>React Native uygulamaları, JavaScript ekosisteminin tüm risklerini miras alır. NPM üzerindeki milyonlarca paket ve karmaşık bağımlılık ağacı, tedarik zinciri saldırıları için geniş bir yüzey oluşturur.</p><h3>React Native’e Özgü Riskler</h3><pre>┌─────────────────────────────────────────────────────────────────────┐<br>│                 REACT NATIVE TEDARİK ZİNCİRİ                        │<br>├─────────────────────────────────────────────────────────────────────┤<br>│                                                                      │<br>│  ┌───────────────┐                                                  │<br>│  │   NPM/Yarn    │ ← Doğrudan risk noktası                         │<br>│  │  Bağımlılıklar│   (package.json, yarn.lock)                     │<br>│  └───────┬───────┘                                                  │<br>│          │                                                           │<br>│          ▼                                                           │<br>│  ┌───────────────┐                                                  │<br>│  │  Metro Bundler │ ← CVE-2025-11953 (CVSS 9.8)                    │<br>│  │  &amp; CLI Tools   │   Geliştirici makinelerini hedef alır          │<br>│  └───────┬───────┘                                                  │<br>│          │                                                           │<br>│          ▼                                                           │<br>│  ┌───────────────┐    ┌───────────────┐                            │<br>│  │ index.android │    │  main.jsbundle│                            │<br>│  │   .bundle     │    │    (iOS)      │                            │<br>│  │   (Android)   │    │               │                            │<br>│  └───────┬───────┘    └───────┬───────┘                            │<br>│          │                    │                                      │<br>│          ▼                    ▼                                      │<br>│  ┌───────────────────────────────────────┐                          │<br>│  │         Native Modüller (Bridge)       │                         │<br>│  │  • react-native-* paketleri           │                         │<br>│  │  • Expo SDK modülleri                  │                         │<br>│  │  • Üçüncü parti native kütüphaneler   │                         │<br>│  └───────────────────────────────────────┘                          │<br>│                                                                      │<br>└─────────────────────────────────────────────────────────────────────┘</pre><h4>Güncel React Native Saldırıları (2024–2025)</h4><h4>1. CVE-2025–11953: React Native CLI Kritik Açığı</h4><p><strong>Etkilenen Paket:</strong> @react-native-community/cli<br><strong>CVSS Skoru:</strong> 9.8 (Kritik)<br><strong>Haftalık İndirme:</strong> ~2 milyon</p><pre># Savunmasız mı kontrol et<br>npm list @react-native-community/cli-server-api<br><br># Hemen güncelle!<br>npm update @react-native-community/cli-server-api@20.0.0</pre><p><strong>Ne oldu?</strong></p><ul><li>Saldırganlar, Metro geliştirme sunucusuna POST isteği göndererek uzaktan kod çalıştırabiliyordu</li><li>Windows, macOS ve Linux sistemleri etkilendi</li><li>Geliştirici makineleri doğrudan hedef alındı</li><li>Ocak 2025 itibarıyla aktif olarak sömürülüyor</li></ul><h4>2. React Native Aria Saldırısı (Haziran 2025)</h4><p><strong>Etkilenen Paketler:</strong> 17 adet (@react-native-aria/* ve @gluestack-ui/utils)<br><strong>Toplam Haftalık İndirme:</strong> 1 milyon+</p><p><strong>Zararlı Paket Listesi:</strong></p><pre>@react-native-aria/focus (0.2.10)<br>@react-native-aria/utils (0.2.13)<br>@react-native-aria/overlays (0.3.16)<br>@react-native-aria/interactions (0.2.17)<br>@react-native-aria/toggle (0.2.12)<br>@react-native-aria/switch (0.2.5)<br>@react-native-aria/checkbox (0.2.11)<br>@react-native-aria/radio (0.2.14)<br>@react-native-aria/button (0.2.11)<br>@react-native-aria/menu (0.2.16)<br>@react-native-aria/listbox (0.2.10)<br>@react-native-aria/tabs (0.2.14)<br>@react-native-aria/combobox (0.2.8)<br>@react-native-aria/disclosure (0.2.9)<br>@react-native-aria/slider (0.2.13)<br>@react-native-aria/separator (0.2.7)<br>@gluestack-ui/utils (0.1.16, 0.1.17)</pre><p><strong>Saldırı Detayları:</strong></p><ul><li>Remote Access Trojan (RAT) içeriyordu</li><li>Keyfi shell komutları çalıştırabiliyordu</li><li>Dosya yükleme/indirme yapabiliyordu</li><li>Windows’ta kalıcılık sağlıyordu (%LOCALAPPDATA%\Programs\Python\Python3127)</li><li>C2 sunucuları: 136.0.9[.]8 ve 85.239.62[.]36</li></ul><h4>3. Büyük NPM Saldırısı (Eylül 2025)</h4><p><strong>Etkilenen Paketler:</strong> chalk, debug, ansi-styles, strip-ansi dahil 18 paket<br><strong>Haftalık İndirme:</strong> 2.6 milyar!</p><p>Bu saldırı React Native’e özgü olmasa da, neredeyse tüm React Native projelerini etkiledi çünkü bu paketler temel bağımlılıklardır. Saldırganlar kripto para işlemlerini hedef alan zararlı kod enjekte etti.</p><h4><strong>1. NPM Audit (Yerleşik)</strong></h4><pre># Temel tarama<br>npm audit<br><br># Sadece üretim bağımlılıkları<br>npm audit --production<br><br># Otomatik düzeltme<br>npm audit fix<br><br># Kırıcı değişikliklere izin ver (dikkatli kullanın!)<br>npm audit fix --force<br><br># JSON çıktısı (CI/CD için)<br>npm audit --json &gt; audit-report.json</pre><h4>2. Yarn Audit</h4><pre># Yarn kullanıyorsanız<br>yarn audit<br><br># Belirli seviye ve üstü<br>yarn audit --level moderate</pre><h4>3. Snyk (Önerilen)</h4><pre># Kurulum<br>npm install -g snyk<br><br># Kimlik doğrulama<br>snyk auth<br><br># Proje tarama<br>snyk test<br><br># Sürekli izleme başlat<br>snyk monitor<br><br># React Native projesi için özel<br>snyk test --all-projects --detection-depth=4</pre><p><strong>VS Code Entegrasyonu:</strong> Snyk VS Code extension’ı kurarak, kod yazarken anlık güvenlik açığı bildirimi alabilirsiniz.</p><h4>4. OWASP Dependency-Check</h4><pre># Docker ile kullanım<br>docker run --rm \<br>  -v $(pwd):/src \<br>  owasp/dependency-check \<br>  --project &quot;ReactNativeApp&quot; \<br>  --scan /src \<br>  --format HTML \<br>  --out /src/reports</pre><h4>5. Socket.dev (NPM Supply Chain Özel)</h4><pre># Kurulum<br>npm install -g @socketsecurity/cli<br><br># Tarama<br>socket scan<br><br># CI/CD&#39;ye entegre<br>socket ci</pre><h4>Hermes ve Kod Koruma</h4><p>React Native 0.70+ ile Hermes varsayılan JavaScript engine oldu. Hermes, JavaScript’i bytecode’a derleyerek ekstra bir koruma katmanı sağlar.</p><h4>Hermes Nasıl Koruma Sağlar?</h4><pre>JavaScript Bundle (Eski Yöntem - JSC)<br>─────────────────────────────────────<br>const API_KEY = &quot;sk_live_abc123&quot;;<br>const apiUrl = &quot;https://api.myapp.com&quot;;<br><br>function authenticate(user) {<br>  // Tüm kod okunabilir!<br>}<br><br><br>Hermes Bytecode (.hbc)<br>─────────────────────────────────────<br>89 48 45 52 4D 45 53 00 00 00 60 00 <br>00 00 04 00 00 00 0A 00 00 00 52 65 <br>61 63 74 4E 61 74 69 76 65 00 00 00<br><br>LoadParam 0<br>LoadParam 1<br>GetGlobalObject<br>LoadConstString &quot;app_secret&quot;<br>CallBuiltin customHashFunction<br>...</pre><h4>Hermes Aktifleştirme</h4><p><strong>Android (android/app/build.gradle):</strong></p><pre>project.ext.react = [<br>    enableHermes: true,<br>    hermesCommand: &quot;../../node_modules/hermes-engine/%OS-BIN%/hermes&quot;,<br>]</pre><p><strong>iOS (Podfile):</strong></p><pre>use_react_native!(<br>  :hermes_enabled =&gt; true<br>)</pre><h4>Hermes Tek Başına Yeterli Değil!</h4><p>Hermes bytecode’u tersine mühendislikle çözülebilir.</p><p><strong>Önerilen Koruma Kombinasyonu:</strong></p><ol><li>JavaScript obfuscation (build öncesi)</li><li>Hermes bytecode derleme</li><li>ProGuard/R8 (Android native kod için)</li><li>Symbol stripping (iOS için)</li></ol><h4>JavaScript Obfuscation</h4><p><strong>Metro Plugin ile Obfuscation</strong></p><pre># Kurulum<br>npm install --save-dev obfuscator-io-metro-plugin</pre><p><strong>metro.config.js:</strong></p><pre>const obfuscatorPlugin = require(&#39;obfuscator-io-metro-plugin&#39;)(<br>  {<br>    compact: true,<br>    controlFlowFlattening: true,<br>    controlFlowFlatteningThreshold: 0.75,<br>    deadCodeInjection: true,<br>    deadCodeInjectionThreshold: 0.4,<br>    debugProtection: false,<br>    disableConsoleOutput: true,<br>    identifierNamesGenerator: &#39;hexadecimal&#39;,<br>    renameGlobals: false,<br>    selfDefending: true,<br>    stringArray: true,<br>    stringArrayEncoding: [&#39;base64&#39;],<br>    stringArrayThreshold: 0.75,<br>  },<br>  {<br>    runInDev: false,<br>    logObfuscatedFiles: true,<br>  }<br>);<br><br>module.exports = {<br>  ...obfuscatorPlugin,<br>};</pre><h3>Native Katman Güvenliği</h3><h4>Android: ProGuard/R8</h4><p><strong>android/app/build.gradle:</strong></p><pre>android {<br>    buildTypes {<br>        release {<br>            minifyEnabled true<br>            shrinkResources true<br>            proguardFiles getDefaultProguardFile(&#39;proguard-android-optimize.txt&#39;), &#39;proguard-rules.pro&#39;<br>        }<br>    }<br>}</pre><p><strong>proguard-rules.pro:</strong></p><pre># React Native core<br>-keep class com.facebook.react.** { *; }<br>-keep class com.facebook.hermes.** { *; }<br>-keep class com.facebook.jni.** { *; }<br><br># Native methods<br>-keepclassmembers class * {<br>    @com.facebook.react.bridge.ReactMethod *;<br>    @com.facebook.react.bridge.ReactProp *;<br>}<br><br># JavaScript Interface<br>-keepclassmembers class * {<br>    @android.webkit.JavascriptInterface &lt;methods&gt;;<br>}</pre><h4>iOS: Symbol Stripping</h4><p><strong>Xcode Build Settings:</strong></p><pre>STRIP_INSTALLED_PRODUCT = YES<br>STRIP_STYLE = all<br>DEPLOYMENT_POSTPROCESSING = YES</pre><h3>React Native için SBOM Oluşturma</h3><pre># CycloneDX formatında SBOM<br>npx @cyclonedx/cyclonedx-npm --output-format json --output-file sbom.json<br><br># SPDX formatında<br>npx @spdx/sbom-generator -p . -o sbom-spdx.json<br><br># Snyk ile SBOM + Vulnerability analizi<br>snyk sbom --format cyclonedx1.4+json &gt; sbom-snyk.json</pre><h3>React Native Güvenlik Best Practices</h3><h4>1. package-lock.json / yarn.lock Kontrolü</h4><pre># Lock dosyası olmadan asla install yapma!<br>npm ci  # npm install yerine<br><br># Lock dosyası değişikliklerini izle<br>git diff package-lock.json</pre><h4>2. Bağımlılık Sabitleme</h4><pre>// package.json<br>{<br>  &quot;dependencies&quot;: {<br>    &quot;react-native&quot;: &quot;0.73.4&quot;,  // ✅ Sabit sürüm<br>    &quot;axios&quot;: &quot;^1.6.0&quot;          // ⚠️ Riskli - minor update alabilir<br>  }<br>}</pre><h4>3. Güvenilir Kaynak Kontrolü</h4><pre># Paket sahibini kontrol et<br>npm view &lt;package-name&gt; maintainers<br><br># Son yayın tarihini kontrol et<br>npm view &lt;package-name&gt; time<br><br># Download sayısını kontrol et<br>npm view &lt;package-name&gt; | grep &quot;downloads&quot;</pre><h4>4. Dependabot Konfigürasyonu</h4><p><strong>.github/dependabot.yml:</strong></p><pre>version: 2<br>updates:<br>  - package-ecosystem: &quot;npm&quot;<br>    directory: &quot;/&quot;<br>    schedule:<br>      interval: &quot;weekly&quot;<br>    open-pull-requests-limit: 10<br>    reviewers:<br>      - &quot;security-team&quot;<br>    labels:<br>      - &quot;dependencies&quot;<br>      - &quot;security&quot;<br>    ignore:<br>      # Major version güncellemelerini manuel yap<br>      - dependency-name: &quot;react-native&quot;<br>        update-types: [&quot;version-update:semver-major&quot;]</pre><h4>React Native Güvenlik Araçları Karşılaştırması</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YjwABpFpIs1zfGF1EHWcbg.png" /></figure><h3>Araçlar ve Kaynaklar</h3><h4>Genel Güvenlik Araçları</h4><p><strong>OWASP Dependency-Check</strong></p><pre># Kurulum ve kullanım<br>dependency-check --project &quot;MyMobileApp&quot; \<br>                 --scan ./app/build.gradle \<br>                 --format HTML \<br>                 --out ./security-reports/<br><br># CI/CD entegrasyonu (Jenkins)<br>dependencyCheck additionalArguments: &#39;--format HTML&#39;, <br>                odcInstallation: &#39;dependency-check&#39;</pre><p><strong>Özellikler:</strong></p><ul><li>NVD (National Vulnerability Database) ile entegrasyon</li><li>Java, .NET, Python, Ruby, JavaScript desteği</li><li>Jenkins, Maven, Gradle, Ant entegrasyonları</li><li>Ücretsiz ve açık kaynak</li></ul><p><strong>OWASP Dep-Scan</strong></p><pre># Docker ile kullanım<br>docker run --rm \<br>  -v $PWD:/app \<br>  ghcr.io/appthreat/dep-scan \<br>  --src /app \<br>  --reports-dir /app/reports<br><br># Özellikler<br># - SBOM oluşturma (CycloneDX)<br># - VEX (Vulnerability Exploitability eXchange) desteği<br># - Reachability analizi<br># - Dependency confusion tespiti</pre><p><strong>Mobil Güvenlik Test Araçları</strong></p><pre>Android:<br>├── MobSF (Mobile Security Framework)<br>├── APKTool<br>├── jadx<br>├── Frida<br>└── objection<br><br>iOS:<br>├── MobSF<br>├── class-dump<br>├── Hopper<br>├── Frida<br>└── objection</pre><h3>Sonuç</h3><p>Tedarik zinciri güvenliği, artık “olsa iyi olur” değil, <strong>zorunlu</strong> bir güvenlik önlemidir. OWASP’ın 2024 Mobile Top 10 listesine M2 olarak eklemesi, bu riskin ciddiyetini göstermektedir.</p><h4>🎯 Tedarik Zinciri Güvenliği Yol Haritası</h4><pre>1. BAŞLANGIÇ SEVİYESİ<br>   └── npm audit / yarn audit günlük çalıştır<br>   └── Dependabot aktifleştir<br>   └── Lock dosyalarını versiyon kontrolüne al<br>   └── Sabit sürümler kullan<br><br>2. GELİŞMİŞ SEVİYE<br>   └── Snyk entegrasyonu<br>   └── CI/CD&#39;de zorunlu güvenlik taraması<br>   └── SBOM oluşturma ve yönetimi<br>   └── Hermes + Obfuscation (React Native)<br><br>3. KURUMSAL SEVİYE<br>   └── Socket.dev (supply chain özel)<br>   └── ProGuard/R8 + iXGuard<br>   └── Özel güvenlik politikaları<br>   └── Penetrasyon testi<br>   └── Bug bounty programı</pre><h4>Önemli Çıkarımlar</h4><ol><li><strong>Görünürlük şart:</strong> Uygulamanızda ne olduğunu bilmeden güvence sağlayamazsınız. SBOM kullanın.</li><li><strong>Proaktif olun:</strong> Reaktif değil, proaktif güvenlik yaklaşımı benimseyin. Düzenli taramalar ve güncellemeler yapın.</li><li><strong>Otomasyon kullanın:</strong> Manuel süreçler hata yapar. CI/CD pipeline’ınıza güvenlik kontrollerini entegre edin.</li><li><strong>Güvendiğinizi doğrulayın:</strong> “Güven ama doğrula” prensibi tedarik zinciri için kritiktir.</li><li><strong>Güncel kalın:</strong> Güvenlik açıkları her gün keşfediliyor. Haberleri takip edin, güvenlik listelerine üye olun.</li></ol><h4>Bir Sonraki Adımlar</h4><p>Bir sonraki yazımızda <strong>M3: Insecure Authentication/Authorization</strong> konusunu inceleyeceğiz. Mobil uygulamalarda kimlik doğrulama ve yetkilendirme zayıflıklarını, saldırı yöntemlerini ve korunma stratejilerini ele alacağız.</p><h4>Kaynaklar</h4><ul><li><a href="https://owasp.org/www-project-mobile-top-10/">OWASP Mobile Top 10 2024</a></li><li><a href="https://owasp.org/www-project-mobile-top-10/2023-risks/m2-inadequate-supply-chain-security.html">OWASP M2: Inadequate Supply Chain Security</a></li><li><a href="https://owasp.org/www-project-dependency-check/">OWASP Dependency-Check</a></li><li><a href="https://www.cisa.gov/sbom">CISA SBOM Resources</a></li><li><a href="https://www.nist.gov/cyberframework">NIST Cybersecurity Framework</a></li><li><a href="https://mas.owasp.org/">OWASP MASVS</a></li><li><a href="https://snyk.io/blog/getting-started-react-native-security/">Snyk React Native Security</a></li><li><a href="https://www.securityweek.com/critical-flaw-in-popular-react-native-npm-package-exposes-developers-to-attacks/">React Native CLI CVE-2025–11953</a></li></ul><p>#MobileSecurity #OWASP #SupplyChainSecurity #Cybersecurity #AppSec #MobileAppSecurity #SBOM #DevSecOps #ReactNative #NPM</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b1e811c6181" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Credential Security in React Native — OWASP Mobile Top 10 (M1)]]></title>
            <link>https://medium.com/@bariskandemirx/credential-security-in-react-native-owasp-mobile-top-10-m1-5da9cb7666dd?source=rss-615861199122------2</link>
            <guid isPermaLink="false">https://medium.com/p/5da9cb7666dd</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[expo]]></category>
            <category><![CDATA[android-development]]></category>
            <category><![CDATA[ios-development]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Barış Kandemir]]></dc:creator>
            <pubDate>Thu, 29 Jan 2026 21:07:45 GMT</pubDate>
            <atom:updated>2026-01-29T21:07:45.568Z</atom:updated>
            <content:encoded><![CDATA[<h3>Credential Security in React Native — OWASP Mobile Top 10 (M1)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8qXhAdCWJz6MtZyGSTe8ag.png" /></figure><p>In my previous article, we explored what OWASP is and examined the top 10 critical security vulnerabilities in mobile applications. (If you want to follow the series from the beginning, you can check it out <a href="https://medium.com/@bariskandemirx/owasp-mobile-security-guide-for-react-native-developers-31770fcbc2f1"><strong>here</strong></a>.)</p><p>Now it’s time to tackle these vulnerabilities one by one. Our first stop: M1 — Improper Credential Usage.</p><p>API keys, tokens, and passwords shouldn’t be in your code. So where should they be?</p><p>M1 — Improper Credential Usage ranks first in OWASP’s 2024 Mobile Top 10 list as the most critical mobile application security vulnerability. This vulnerability spans a wide spectrum from hardcoded credentials to insecure credential storage, and falls into the easily exploitable category for attackers. According to Symantec’s 2022 research, hardcoded AWS credentials were detected in 1,859 mobile applications, and 77% of them were confirmed to contain valid access tokens.</p><h3>OWASP Official Definition and Scope</h3><p>According to OWASP’s official documentation, the M1 category covers all weak points in credential management in mobile applications. While M1 was “Improper Platform Usage” in the 2016 list, this position was given to credential security in the 2024 version — this change is based on real threat data from the industry.</p><p>The Threat Agent definition states: “Threat agents exploiting hardcoded credentials and improper credential usage can perform automated attacks using publicly available or custom-built tools.” OWASP has determined the Exploitability rating as “EASY” and the Detectability rating as “EASY” — meaning attackers can easily find and exploit these vulnerabilities.</p><p>The vulnerability includes four main scenarios:</p><ul><li><strong>Hardcoded Credentials:</strong> API keys, passwords, and tokens embedded in source code or configuration files</li><li><strong>Insecure Credential Transmission:</strong> Credential transmission without encryption or through insecure channels</li><li><strong>Insecure Credential Storage:</strong> Insecure credential storage on the device (plaintext SharedPreferences, NSUserDefaults)</li><li><strong>Weak User Authentication:</strong> Weak protocols or bypassable authentication mechanisms</li></ul><h3>Technical Details and MASTG Test Methodology</h3><p>The Mobile Application Security Testing Guide (MASTG) defines comprehensive test cases and weakness enumeration for credential security. MASWE-0005 (API Keys Hardcoded in the App Package) is the most critical weakness ID in this category.</p><h4>MASVS Control Requirements</h4><p><strong>MASVS-AUTH-1</strong> Use of secure authentication and authorization protocols <strong>MASVS-AUTH-2</strong> Local authentication compliant with platform best practices <strong>MASVS-STORAGE-1</strong> Secure storage of sensitive data on the device <strong>MASVS-CRYPTO-1</strong> Cryptographic functions to protect sensitive data</p><h3>Exploitation Techniques</h3><p>Attackers use three main techniques to extract credentials: static binary analysis, dynamic instrumentation, and man-in-the-middle attacks. Tools like MobSF automate this process, enabling even people without technical knowledge to perform API key extraction within 15 minutes.</p><h4>Real-World Attack Examples and Case Studies</h4><h4>Imperva Cloud WAF Breach (2019)</h4><p>Ironically, as a security company, Imperva suffered a breach due to leaving their own AWS API key on an internet-exposed instance. Result: 13,000+ passwords, 13,500 SSL certificates, and 1,400 API keys were exposed. CEO Chris Hylen lost his job.</p><h4>Rabbit R1 AI Device Scandal (2024)</h4><p>In this breach affecting 130,000+ devices, the Rabbitude research group found ElevenLabs, Azure, Yelp, Google Maps, and SendGrid API keys in plaintext in the codebase. The ElevenLabs key had full admin privileges — access to all text-to-speech history and the ability to disable all devices.</p><h4>Twitter API Key Leak (2022)</h4><p>CloudSEK detected hardcoded Twitter API keys in 3,207 mobile applications. 230 of these contained all four credentials required for complete account takeover — reading DMs, posting/deleting tweets, and modifying profiles.</p><h4>Symantec’s Industry-Wide Findings</h4><p>2022 research: Hardcoded AWS credentials in 1,859 applications (98% iOS), 47% with full access to millions of S3 files. 2024 research: The same issues persist in popular apps like Pic Stitch (5M+ downloads), Crumbl (3.9M reviews), and Meru Cabs.</p><h3>OWASP Recommended Measures and Best Practices</h3><p>OWASP’s official documentation lists these fundamental measures:</p><p><strong>Never hardcode credentials.</strong> Instead, use server-side proxies or fetch credentials at runtime through secure channels. Use EncryptedSharedPreferences and KeyStore on Android, and proper Keychain configuration on iOS.</p><p><strong>Ensure transmission security.</strong> All credential transfers should be over TLS, and MitM attacks should be prevented with certificate pinning implementation. If using OAuth 2.0, PKCE (Proof Key for Code Exchange) should be mandatory.</p><p><strong>Implement token lifecycle management.</strong> Short-lived access tokens, storing refresh tokens in secure local storage, and regular key rotation policies are critical.</p><h3>Secure Credential Management in React Native and Expo</h3><p>Let’s look at how to implement OWASP’s recommended measures in React Native and Expo projects.</p><h4>Secure Storage</h4><p>AsyncStorage stores data as unencrypted plain text. You should use platform-native secure storage for sensitive data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_9rckgZk2o9N9W7ZZeb69Q.png" /></figure><p>expo-secure-store uses Keychain on iOS and Keystore on Android behind the scenes. Things to note:</p><ul><li>Only strings can be stored (use JSON.stringify for objects)</li><li>Maximum 2KB limit</li><li>Biometric protection can be added with requireAuthentication: true</li></ul><p>If you want to use alternatives, packages like react-native-keychain are also available, but expo-secure-store developed by Expo is quite sufficient.</p><h4>OAuth and PKCE</h4><p>There’s a problem with traditional OAuth flow in mobile applications: where will you store the client secret? If you embed it in the application, it will be exposed when decompiled. PKCE (Proof Key for Code Exchange) solves this problem.</p><p>In PKCE, instead of a client secret, a dynamically generated “code verifier” and “code challenge” are used for each authentication request. This eliminates the need to store a fixed secret.</p><p>expo-auth-session supports PKCE built-in:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TSQa2O4taPqdYw9pXUag_A.png" /></figure><h4>Token Lifecycle Management</h4><p>Keeping access tokens valid forever is a major risk. If a token is somehow compromised, the attacker gains indefinite access.</p><p><strong>Core principles:</strong></p><ul><li><strong>Short-lived access token:</strong> 15 minutes to 1 hour lifespan</li><li><strong>Refresh token:</strong> Long-lived but in secure storage (SecureStore)</li><li><strong>Token rotation:</strong> Generate new refresh token on each refresh</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P9RCTzwTGDmQivyFMsJn2w.png" /></figure><h3>Conclusion</h3><p>M1 — Improper Credential Usage continues to be a systemic problem in mobile security. According to CloudSEK data, 1 in every 200 applications contains hardcoded AWS keys. Despite these vulnerabilities being technically easy to detect, the lack of developer awareness and secure coding practices keeps the problem alive.</p><p><strong>Critical takeaways:</strong> Client-side secret security is an illusion — a determined attacker can always extract them. The solution is to completely remove credentials from the client (server-side proxy), use platform-native secure storage when necessary, and integrate automatic secret detection into CI/CD pipelines. As seen in the Imperva example, even security companies can make this mistake.</p><h3>Resources</h3><ul><li><a href="https://owasp.org/www-project-mobile-top-10/2023-risks/m1-improper-credential-usage">OWASP Mobile Top 10 — M1: Improper Credential Usage</a></li><li><a href="https://symantec-enterprise-blogs.security.com/blogs/threat-intelligence/mobile-supply-chain-aws">Symantec — Mobile Supply Chain AWS Credentials Research</a></li><li><a href="https://www.bleepingcomputer.com/news/security/over-3-200-apps-leak-twitter-api-keys-some-allowing-account-hijacks/">CloudSEK — 3,200 Apps Leak Twitter API Keys</a></li><li><a href="https://medium.com/@jackson_davis/rabbit-r1s-catastrophic-code-blunder-ae3a975a5f33">Rabbit R1 Hardcoded API Keys Scandal</a></li><li><a href="https://www.imperva.com/blog/ceoletter/">Imperva Data Breach 2019</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5da9cb7666dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OWASP Mobile Top 10: Hatalı Kimlik Bilgisi Kullanımı (M1)]]></title>
            <link>https://medium.com/@bariskandemirx/owasp-mobile-top-10-hatal%C4%B1-kimlik-bilgisi-kullan%C4%B1m%C4%B1-m1-b8cb6ce8df67?source=rss-615861199122------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8cb6ce8df67</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[ios-development]]></category>
            <category><![CDATA[expo]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[android-development]]></category>
            <dc:creator><![CDATA[Barış Kandemir]]></dc:creator>
            <pubDate>Thu, 29 Jan 2026 20:04:10 GMT</pubDate>
            <atom:updated>2026-01-29T20:04:10.713Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TdMI_8xkkIJ3R-qK6MKTpA.png" /></figure><p>Bir önceki yazımda OWASP’ın ne olduğunu ve mobil uygulamalardaki en kritik 10 güvenlik açığını incelemiştik. (Seriyi baştan takip etmek istersen <a href="https://medium.com/@bariskandemirx/mobil-uygulama-g%C3%BCvenli%C4%9Fine-giri%C5%9F-owasp-mobile-top-10-nedir-c32ff852d972"><strong>buradan</strong></a> bakabilirsin.)</p><p>Şimdi sıra bu açıkları tek tek ele almaya geldi. İlk durağımız:<strong> M1 — Improper Credential Usage.</strong></p><p>API anahtarları, token’lar ve şifreler kodun içinde olmamalı. Peki nerede olmalı?</p><p><strong>M1 — Improper Credential Usage</strong>, OWASP’ın 2024 Mobile Top 10 listesinde <strong>birinci sırada</strong> yer alan en kritik mobil uygulama güvenlik açığıdır. Bu zafiyet, hardcoded kimlik bilgilerinden güvensiz kimlik bilgisi depolamaya kadar geniş bir spektrumu kapsar ve saldırganlar için <strong>kolay bir şekilde kötüye kullanabilir </strong>kategorisindedir. Symantec’in 2022 araştırmasına göre, <strong>1.859 mobil uygulamada</strong> hardcoded AWS kimlik bilgileri tespit edilmiş ve bunların <strong>%77&#39;sinin geçerli access token</strong> içerdiği doğrulanmıştır.</p><h3>OWASP resmi tanımı ve kapsamı</h3><p>OWASP’ın resmi dokümantasyonuna göre M1 kategorisi, mobil uygulamalardaki kimlik bilgisi yönetiminin <strong>tüm zayıf noktalarını</strong> kapsar. 2016 listesinde M1 “Improper Platform Usage” iken, 2024 versiyonunda bu pozisyon kimlik bilgisi güvenliğine verilmiştir — bu değişiklik, sektördeki gerçek tehdit verilerine dayanmaktadır.</p><p><strong>Threat Agent tanımı</strong> şöyle ifade edilir: “Hardcoded kimlik bilgileri ve uygunsuz kimlik bilgisi kullanımını kötüye kullanan tehdit ajanları, halka açık veya özel geliştirilen araçlarla otomatik saldırılar gerçekleştirebilir.” OWASP, <strong>Exploitability</strong> derecesini “EASY”, <strong>Detectability</strong> derecesini ise “EASY” olarak belirlemiştir — yani saldırganlar bu açıkları kolaylıkla bulabilir ve istismar edebilir.</p><p>Zafiyet dört ana senaryoyu içerir:</p><ul><li><strong>Hardcoded Credentials</strong>: Kaynak kodu veya configuration dosyalarında gömülü API anahtarları, şifreler ve token’lar</li><li><strong>Insecure Credential Transmission</strong>: Şifreleme olmadan veya güvensiz kanallar üzerinden kimlik bilgisi iletimi</li><li><strong>Insecure Credential Storage</strong>: Cihaz üzerinde güvensiz kimlik bilgisi depolama (plaintext SharedPreferences, NSUserDefaults)</li><li><strong>Weak User Authentication</strong>: Zayıf protokoller veya bypass edilebilir authentication mekanizmaları</li></ul><h3>Teknik detaylar ve MASTG test metodolojisi</h3><p>Mobile Application Security Testing Guide (MASTG), kimlik bilgisi güvenliği için kapsamlı test case’leri ve weakness enumeration tanımlar. <strong>MASWE-0005</strong> (API Keys Hardcoded in the App Package) bu kategorinin en kritik weakness ID’sidir.</p><h3>MASVS kontrol gereksinimleri</h3><p>Kontrol Açıklama <strong>MASVS-AUTH-1</strong> Güvenli authentication ve authorization protokolleri kullanımı <strong>MASVS-AUTH-2</strong> Platform best practice’lerine uygun local authentication <strong>MASVS-STORAGE-1</strong> Sensitive data’nın cihazda güvenli depolanması <strong>MASVS-CRYPTO-1</strong> Sensitive data korumak için kriptografik fonksiyonlar</p><h3>Kötüye kullanma teknikleri</h3><p>Saldırganlar kimlik bilgilerini ele geçirmek için üç ana teknik kullanır: <strong>static binary analysis</strong>, <strong>dynamic instrumentation</strong> ve <strong>man-in-the-middle attacks</strong>. MobSF gibi araçlar bu süreci otomatize ederek, teknik bilgisi olmayan kişilerin bile <strong>15 dakika içinde</strong> API key extraction yapabilmesini sağlar.</p><h3>Gerçek dünya saldırı örnekleri ve case study’ler</h3><h4>Imperva Cloud WAF ihlali (2019)</h4><p>Imperva, ironik bir şekilde bir <strong>güvenlik şirketi</strong> olarak, kendi AWS API key’inin internet’e açık bir instance’ta bırakılması sonucu ihlale uğradı. Sonuç: <strong>13.000+ şifre</strong>, <strong>13.500 SSL sertifikası</strong> ve <strong>1.400 API key</strong> expose oldu. CEO Chris Hylen işini kaybetti.</p><h4>Rabbit R1 AI cihazı skandalı (2024)</h4><p><strong>130.000+ cihazı</strong> etkileyen bu ihlalde, Rabbitude araştırma grubu codebase’de ElevenLabs, Azure, Yelp, Google Maps ve SendGrid API key’lerini plaintext olarak buldu. ElevenLabs key’i <strong>full admin yetkisine</strong> sahipti — tüm text-to-speech geçmişine erişim ve tüm cihazları devre dışı bırakma kapasitesi.</p><h4>Twitter API key sızıntısı (2022)</h4><p>CloudSEK, <strong>3.207 mobil uygulamada</strong> hardcoded Twitter API key’leri tespit etti. Bunların <strong>230</strong>&#39;<strong>u</strong> hesabı tamamen ele geçirmek için gereken dört kimlik bilgilerinin tamamını içeriyordu— DM okuma, tweet atma/silme, profil değiştirme yetkisi.</p><h3>Symantec’in endüstri çapındaki bulguları</h3><p><strong>2022 araştırması</strong>: 1.859 uygulamada hardcoded AWS credential (%98&#39;i iOS), %47&#39;si milyonlarca S3 dosyasına full access. <strong>2024 araştırması</strong>: Pic Stitch (5M+ indirme), Crumbl (3.9M değerlendirme), Meru Cabs gibi popüler uygulamalarda hala aynı sorunlar.</p><h3>OWASP’ın önerdiği önlemler ve best practice’ler</h3><p>OWASP’ın resmi dokümantasyonu şu temel önlemleri listeliyor:</p><p><strong>Kimlik bilgilerini asla hardcode etmeyin.</strong> Bunun yerine server-side proxy’ler kullanın veya kimlik bilgilerini runtime’da güvenli kanallar üzerinden fetch edin. Android’de EncryptedSharedPreferences ve KeyStore, iOS&#39;ta proper Keychain configuration kullanılmalıdır.</p><p><strong>Transmission güvenliği sağlayın.</strong> Tüm kimlik bilgisi transferleri TLS üzerinden yapılmalı, certificate pinning implementasyonu ile MitM saldırıları engellenmelidir. OAuth 2.0 kullanılıyorsa, PKCE (Proof Key for Code Exchange) zorunlu olmalıdır.</p><p><strong>Token lifecycle yönetimi uygulayın.</strong> Short-lived access token’lar, refresh token’ların secure local storage’da tutulması ve düzenli key rotation politikaları kritiktir.</p><h3>React Native ve Expo’da Güvenli Kimlik Bilgileri Yönetimi</h3><p>OWASP’ın önerdiği önlemleri React Native ve Expo projelerinde nasıl uygulayacağımıza bakalım.</p><h4>Güvenli Depolama</h4><p>AsyncStorage şifrelenmemiş plain text olarak veri saklar. Hassas veriler için platform-native güvenli depolama kullanmalısınız.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x4_5okIgrqxJJX7CHGih6w.png" /></figure><p>expo-secure-store arka planda iOS&#39;ta Keychain, Android&#39;de Keystore kullanır. Dikkat edilmesi gerekenler:</p><ul><li>Sadece string saklanabilir (object için JSON.stringify)</li><li>Maksimum 2KB limit</li><li>requireAuthentication: true ile biometric koruma eklenebilir</li></ul><p>Eğer kullanmak isterseniz react-native-keychain gibi paketler de mevcut ancak hali hazırda expo’nun geliştirdiği expo-secure-store paketi oldukça yeterli.</p><h4>OAuth ve PKCE</h4><p>Mobile uygulamalarda geleneksel OAuth flow’unda bir sorun var: client secret’ı nerede saklayacaksınız? Uygulamanın içine gömerseniz, decompile edildiğinde ortaya çıkar. İşte PKCE (Proof Key for Code Exchange) bu sorunu çözer.</p><p>PKCE’de client secret yerine, her authentication isteğinde dinamik olarak üretilen bir “code verifier” ve “code challenge” kullanılır. Bu sayede sabit bir secret saklamaya gerek kalmaz.</p><p>expo-auth-session PKCE&#39;yi built-in destekler:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TSQa2O4taPqdYw9pXUag_A.png" /></figure><h4>Token Lifecycle Yönetimi</h4><p>Access token’ları sonsuza kadar geçerli tutmak büyük bir risk. Token bir şekilde ele geçirilirse, saldırgan süresiz erişim elde eder.</p><p><strong>Temel prensipler:</strong></p><ul><li><strong>Short-lived access token:</strong> 15 dakika — 1 saat arası ömür</li><li><strong>Refresh token:</strong> Uzun ömürlü ama güvenli storage’da (SecureStore)</li><li><strong>Token rotation:</strong> Her refresh işleminde yeni refresh token üret</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BdKnNBDJR2Kzbay0P-TqGQ.png" /></figure><h3>Sonuç</h3><p>M1 — Improper Credential Usage, mobil güvenlikte <strong>sistemik bir problem</strong> olmaya devam ediyor. CloudSEK verilerine göre her <strong>200 uygulamadan 1&#39;i</strong> hardcoded AWS key içeriyor. Bu zafiyetlerin teknik olarak tespiti kolay olmasına rağmen, geliştirici farkındalığı ve güvenli kodlama pratiklerinin eksikliği sorunu canlı tutuyor.</p><p><strong>Kritik çıkarımlar</strong>: Client-side secret güvenliği bir <strong>illüzyon</strong>dur — belirlenen bir saldırgan her zaman extract edebilir. Çözüm, kimlik bilgilerini client’tan tamamen kaldırmak (server-side proxy), zorunlu durumlarda platform-native güvenli depolama kullanmak ve CI/CD pipeline’larına otomatik secret detection entegre etmektir. Imperva örneğinde görüldüğü gibi, <strong>güvenlik şirketleri bile</strong> bu hataya düşebilmektedir.</p><h3>Kaynaklar</h3><ul><li><a href="https://owasp.org/www-project-mobile-top-10/2023-risks/m1-improper-credential-usage">OWASP Mobile Top 10 — M1: Improper Credential Usage</a></li><li><a href="https://symantec-enterprise-blogs.security.com/blogs/threat-intelligence/mobile-supply-chain-aws">Symantec — Mobile Supply Chain AWS Credentials Research</a></li><li><a href="https://www.bleepingcomputer.com/news/security/over-3-200-apps-leak-twitter-api-keys-some-allowing-account-hijacks/">CloudSEK — 3,200 Apps Leak Twitter API Keys</a></li><li><a href="https://medium.com/@jackson_davis/rabbit-r1s-catastrophic-code-blunder-ae3a975a5f33">Rabbit R1 Hardcoded API Keys Scandal</a></li><li><a href="https://www.imperva.com/blog/ceoletter/">Imperva Data Breach 2019</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8cb6ce8df67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OWASP Mobile Security Guide: For React Native Developers]]></title>
            <link>https://medium.com/@bariskandemirx/owasp-mobile-security-guide-for-react-native-developers-31770fcbc2f1?source=rss-615861199122------2</link>
            <guid isPermaLink="false">https://medium.com/p/31770fcbc2f1</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Barış Kandemir]]></dc:creator>
            <pubDate>Tue, 20 Jan 2026 18:57:55 GMT</pubDate>
            <atom:updated>2026-01-20T19:25:17.396Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aw_KdzxXx0yB-rIOoj6J_Q.png" /></figure><p><strong>Hey there! </strong>👋</p><p>In my previous article, I explained how to fix that annoying flash/flicker problem during splash screen transitions in React Native using the onLayout callback. (If you missed it, you can check it out <a href="https://medium.com/@bariskandemirx/react-nativede-flash-flicker-problemini-root-seviyesinde-%C3%A7%C3%B6zmek-c5aebdb058a4">here</a>.)</p><p>This time, we’re switching to a different topic: <strong>Security</strong>.</p><p>Security is one of the most overlooked aspects of mobile app development. You might think, “My app is small, who would bother hacking it?” But here’s the reality: attackers don’t care about your app’s size — they look for open doors.</p><p>In this article series, we’ll explore the 10 most critical mobile security vulnerabilities identified by OWASP and show you step by step how to prevent them in your React Native projects.</p><h3>What is OWASP?</h3><p>OWASP (Open Web Application Security Project) is a non-profit community founded in 2001. Their core mission is to make software security accessible to everyone.</p><p>What makes OWASP special is its completely open-source and community-driven approach. Thousands of security experts, developers, and researchers come together to:</p><ul><li>Establish security standards</li><li>Develop free tools</li><li>Provide educational resources</li><li>Document best practices</li></ul><p>You’ve probably heard of the “OWASP Top 10” list. This list ranks the most common and dangerous security vulnerabilities in web and mobile applications. It’s used worldwide as a reference in security audits, penetration testing, and development processes.</p><h3>Why OWASP Mobile Top 10?</h3><p>Mobile applications have different attack surfaces compared to web applications:</p><ul><li>You store data on the device</li><li>Network communication occurs in different scenarios</li><li>There’s interaction with platform APIs</li><li>The risk of reverse engineering is much higher</li></ul><p>Considering these differences, OWASP created the Mobile Top 10 list. With the 2024 update, they identified the 10 most common and dangerous security vulnerabilities in the mobile world.</p><h3>OWASP Mobile Top 10 (2024)</h3><p>Here are the 10 critical security vulnerabilities you need to know as a React Native developer:</p><h4>M1 — Improper Credential Usage</h4><p>Embedding API keys, passwords, or tokens directly in your code. When attackers decompile your app, they can access all credentials.</p><h4>M2 — Inadequate Supply Chain Security</h4><p>The npm packages, third-party libraries, or SDKs you use may contain security vulnerabilities. A single malicious package can compromise your entire application.</p><h4>M3 — Insecure Authentication/Authorization</h4><p>Weak session management, missing authorization controls, or easily guessable tokens. Attackers can gain access to other users’ accounts.</p><h4>M4 — Insufficient Input/Output Validation</h4><p>Processing user data without validation. This opens the door to SQL injection, XSS, and other injection attacks.</p><h4>M5 — Insecure Communication</h4><p>Using HTTP, lack of certificate validation, or weak encryption. Data can be intercepted through man-in-the-middle attacks.</p><h4>M6 — Inadequate Privacy Controls</h4><p>Unnecessary collection of user data, improper storage, or sharing with third parties. This can lead to GDPR and other privacy regulation violations.</p><h4>M7 — Insufficient Binary Protections</h4><p>Making your application easy to reverse engineer. Attackers can understand your business logic and bypass security controls.</p><h4>M8 — Security Misconfiguration</h4><p>Mistakes like leaving debug mode on in production, not changing default passwords, or requesting unnecessary permissions.</p><h4>M9 — Insecure Data Storage</h4><p>Storing sensitive data unencrypted in AsyncStorage, writing to log files, or leaving it exposed in backup files.</p><h4>M10 — Insufficient Cryptography</h4><p>Using weak encryption algorithms, hardcoded keys, or incorrect cryptographic implementations.</p><h3>What’s Next?</h3><p>This article was the introduction to our series. Now you know what OWASP is and the 10 most critical security vulnerabilities in mobile applications.</p><p>In the upcoming articles, we’ll dive deep into each item specifically for React Native — with real code examples, common mistakes to avoid, and testing methods.</p><p>Follow me to stay updated on the rest of the series!</p><p>Stay secure! 🛡️</p><h4>Resources</h4><ul><li><a href="https://owasp.org/www-project-mobile-top-10/">OWASP Mobile Top 10 (2024)</a></li><li><a href="https://mas.owasp.org/">OWASP Mobile Application Security</a></li><li><a href="https://mas.owasp.org/MASVS/">OWASP Mobile Application Security Verification Standard (MASVS)</a></li><li><a href="https://mas.owasp.org/MASTG/">OWASP Mobile Application Security Testing Guide (MASTG)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=31770fcbc2f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mobil Uygulama Güvenliğine Giriş: OWASP Mobile Top 10 Nedir?]]></title>
            <link>https://medium.com/@bariskandemirx/mobil-uygulama-g%C3%BCvenli%C4%9Fine-giri%C5%9F-owasp-mobile-top-10-nedir-c32ff852d972?source=rss-615861199122------2</link>
            <guid isPermaLink="false">https://medium.com/p/c32ff852d972</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Barış Kandemir]]></dc:creator>
            <pubDate>Tue, 20 Jan 2026 18:40:15 GMT</pubDate>
            <atom:updated>2026-01-20T19:23:47.987Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O39ZfrYySHwvrpKf1J5lCw.png" /></figure><p><strong>Merhaba! 👋</strong></p><p>Bir önceki yazıda React Native’de splash screen geçişlerindeki o sinir bozucu flash/flicker problemini onLayout callback ile nasıl çözdüğümüzü anlatmıştım. (Okumadıysan <a href="https://medium.com/@bariskandemirx/react-nativede-flash-flicker-problemini-root-seviyesinde-%C3%A7%C3%B6zmek-c5aebdb058a4">buradan</a> bakabilirsin.)</p><p>Bu sefer farklı bir konuya geçiyoruz: <strong>Güvenlik</strong>.</p><p>Mobil uygulama geliştirirken en çok göz ardı edilen konulardan biri güvenlik. “Benim uygulamam küçük, kim hacklesin ki?” diye düşünebilirsin ama gerçek şu ki: saldırganlar uygulama boyutuna değil, açık kapılara bakar.</p><p>Bu yazı serisinde, OWASP’ın belirlediği en kritik 10 mobil güvenlik açığını inceleyeceğiz ve React Native projelerinde bunları nasıl önleyebileceğini adım adım göstereceğim.</p><h3>OWASP Nedir?</h3><p><strong>OWASP (Open Web Application Security Project)</strong>, 2001 yılında kurulan, kâr amacı gütmeyen bir topluluk. Temel misyonları, yazılım güvenliğini herkes için erişilebilir kılmak.</p><p>OWASP’ı özel kılan şey, tamamen açık kaynak ve topluluk odaklı çalışması. Binlerce güvenlik uzmanı, geliştirici ve araştırmacı bir araya gelerek:</p><ul><li><strong>Güvenlik standartları</strong> oluşturuyor</li><li><strong>Ücretsiz araçlar</strong> geliştiriyor</li><li><strong>Eğitim kaynakları</strong> sunuyor</li><li><strong>En iyi uygulamaları</strong> dokümante ediyor</li></ul><p>Muhtemelen “OWASP Top 10” listesini duymuşsundur. Bu liste, web ve mobil uygulamalardaki en yaygın ve tehlikeli güvenlik açıklarını sıralıyor. Dünya genelinde güvenlik denetimleri, penetrasyon testleri ve geliştirme süreçlerinde referans olarak kullanılıyor.</p><h3>Neden OWASP Mobile Top 10?</h3><p>Mobil uygulamalar, web uygulamalarından farklı saldırı yüzeylerine sahip:</p><ul><li><strong>Cihaz üzerinde veri depolama</strong> yapıyorsun</li><li><strong>Ağ iletişimi</strong> farklı senaryolarda gerçekleşiyor</li><li><strong>Platform API’leri</strong> ile etkileşim var</li><li><strong>Reverse engineering</strong> riski çok daha yüksek</li></ul><p>OWASP, bu farklılıkları göz önünde bulundurarak <strong>Mobile Top 10</strong> listesini oluşturdu. 2024 güncellemesiyle birlikte, mobil dünyada en sık karşılaşılan ve en tehlikeli 10 güvenlik açığını belirledi.</p><h3>OWASP Mobile Top 10 (2024)</h3><p>İşte React Native geliştiricisi olarak bilmen gereken 10 kritik güvenlik açığı:</p><h4>M1 — Improper Credential Usage (Hatalı Kimlik Bilgisi Kullanımı)</h4><p>API anahtarlarını, şifreleri veya token’ları kodun içine gömmek. Saldırganlar uygulamanı decompile ettiğinde tüm kimlik bilgilerine erişebilir.</p><h4>M2 — Inadequate Supply Chain Security (Yetersiz Tedarik Zinciri Güvenliği)</h4><p>Kullandığın npm paketleri, third-party kütüphaneler veya SDK’lar güvenlik açığı içerebilir. Tek bir kötü niyetli paket, tüm uygulamanı tehlikeye atabilir.</p><h4>M3 — Insecure Authentication/Authorization (Güvensiz Kimlik Doğrulama)</h4><p>Zayıf oturum yönetimi, eksik yetkilendirme kontrolleri veya kolayca tahmin edilebilir token’lar. Saldırganlar başka kullanıcıların hesaplarına erişebilir.</p><h4>M4 — Insufficient Input/Output Validation (Yetersiz Girdi/Çıktı Doğrulama)</h4><p>Kullanıcıdan gelen verileri doğrulamadan işlemek. SQL injection, XSS ve diğer injection saldırılarına kapı açar.</p><h4>M5 — Insecure Communication (Güvensiz İletişim)</h4><p>HTTP kullanımı, sertifika doğrulama eksikliği veya zayıf şifreleme. Man-in-the-middle saldırılarıyla veriler ele geçirilebilir.</p><h4>M6 — Inadequate Privacy Controls (Yetersiz Gizlilik Kontrolleri)</h4><p>Kullanıcı verilerinin gereksiz yere toplanması, uygunsuz şekilde saklanması veya üçüncü taraflarla paylaşılması. KVKK ve GDPR ihlallerine yol açabilir.</p><h4>M7 — Insufficient Binary Protections (Yetersiz Binary Koruma)</h4><p>Uygulamanın kolayca reverse engineer edilebilmesi. Saldırganlar iş mantığını anlayabilir, güvenlik kontrollerini bypass edebilir.</p><h4>M8 — Security Misconfiguration (Güvenlik Yapılandırma Hataları)</h4><p>Debug modunun production’da açık kalması, varsayılan şifrelerin değiştirilmemesi, gereksiz izinlerin istenmesi gibi hatalar.</p><h4>M9 — Insecure Data Storage (Güvensiz Veri Depolama)</h4><p>Hassas verilerin şifrelenmeden AsyncStorage’da tutulması, log dosyalarına yazılması veya yedekleme dosyalarında açık bırakılması.</p><h4>M10 — Insufficient Cryptography (Yetersiz Kriptografi)</h4><p>Zayıf şifreleme algoritmaları, hardcoded anahtarlar veya yanlış kriptografik implementasyonlar kullanmak.</p><h4>Sırada Ne Var?</h4><p>Bu yazı, serimizin giriş bölümüydü. Artık OWASP’ın ne olduğunu ve mobil uygulamalardaki en kritik 10 güvenlik açığını biliyorsun.</p><p>Sonraki yazılarda, her bir maddeyi React Native özelinde derinlemesine inceleyeceğiz — gerçek kod örnekleri, kaçınılması gereken hatalar ve test yöntemleriyle birlikte.</p><p>Serinin devamını kaçırmamak için beni takip edebilirsin!</p><p>Güvenli kodlamalar!</p><h4>Kaynaklar</h4><ul><li><a href="https://owasp.org/www-project-mobile-top-10/">OWASP Mobile Top 10 (2024)</a></li><li><a href="https://mas.owasp.org/">OWASP Mobile Application Security</a></li><li><a href="https://mas.owasp.org/MASVS/">OWASP Mobile Application Security Verification Standard (MASVS)</a></li><li><a href="https://mas.owasp.org/MASTG/">OWASP Mobile Application Security Testing Guide (MASTG)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c32ff852d972" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Native’de Flash/Flicker Problemini Root Seviyesinde Çözmek]]></title>
            <link>https://medium.com/@bariskandemirx/react-nativede-flash-flicker-problemini-root-seviyesinde-%C3%A7%C3%B6zmek-c5aebdb058a4?source=rss-615861199122------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5aebdb058a4</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[expo]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Barış Kandemir]]></dc:creator>
            <pubDate>Sun, 04 Jan 2026 12:46:28 GMT</pubDate>
            <atom:updated>2026-01-04T12:46:28.559Z</atom:updated>
            <content:encoded><![CDATA[<p>React Native uygulamalarında kullanıcıların en sık karşılaştığı görsel problemlerden biri ilk açılışta beyaz ekran, siyah ekran veya kısa süreli UI sıçramaları (flash / flicker) problemidir. Özellikle profesyonel ürünlerde bu durum, uygulamanın kalitesiz algılanmasına neden olur.</p><p>Bu makalede, flicker sorununu <strong>Root (Kök) seviyesinde</strong> nasıl çözeceğimizi ve neden onLayout event&#39;ine güvenmemiz gerektiğini inceleyeceğiz.</p><h3>Flash / Flicker Nedir ve Neden Oluşur?</h3><p>React Native uygulamaları iki ana katmandan oluşur: <strong>Native Katman</strong> (iOS/Android) ve <strong>JavaScript Thread</strong>.</p><ol><li>Native taraf splash screen’i gösterir.</li><li>JS bundle yüklenir ve React component tree oluşturulur.</li><li><strong>Sorun:</strong> Eğer native splash screen, JS tarafı ve ilk UI render (layout) tam olarak bitmeden kaldırılırsa, arada boş veya stilleri yüklenmemiş bir ekran görünür.</li></ol><h3>Flash Problemini Canlı Görelim</h3><p>Teorik açıklamalardan önce, sorunun gerçekte nasıl göründüğünü görelim. Aşağıdaki videoda, splash screen’in yanlış zamanda kaldırılması sonucu oluşan beyaz flash’ı görebilirsiniz:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*jzaypPbpY5JoyRDMDrZJ3Q.gif" /></figure><h3>Bu Kodda 3 Kritik Hata Var:</h3><ol><li><strong>preventAutoHideAsync() eksik</strong> — Splash screen otomatik kapanıyor</li><li><strong>useEffect içinde direkt </strong><strong>hideAsync()</strong> — Layout beklenmeden splash kaldırılıyor</li><li><strong>Wrapper </strong><strong>&lt;View&gt; ve </strong><strong>onLayout yok</strong> — Native paint zamanlaması kontrol edilmiyor</li></ol><pre>import {<br>  DarkTheme,<br>  DefaultTheme,<br>  ThemeProvider,<br>} from &quot;@react-navigation/native&quot;;<br>import { SplashScreen, Stack } from &quot;expo-router&quot;;<br>import { StatusBar } from &quot;expo-status-bar&quot;;<br>import &quot;react-native-reanimated&quot;;<br><br>import { useColorScheme } from &quot;@/hooks/use-color-scheme&quot;;<br>import { useEffect, useState } from &quot;react&quot;;<br><br>// ❌ YANLIŞ: preventAutoHideAsync yok, splash otomatik kapanacak<br><br>export const unstable_settings = {<br>  anchor: &quot;(tabs)&quot;,<br>};<br><br>export default function RootLayout() {<br>  const colorScheme = useColorScheme();<br>  const [appIsReady, setAppIsReady] = useState(false);<br><br>  useEffect(() =&gt; {<br>    async function prepare() {<br>      try {<br>        // Font yüklemeleri, API kontrolleri veya State hydration burada yapılır<br>        await new Promise((resolve) =&gt; setTimeout(resolve, 2000)); // Simülasyon<br>      } finally {<br>        setAppIsReady(true);<br>      }<br>    }<br>    prepare();<br>  }, []);<br><br>  // ❌ YANLIŞ: useEffect içinde direkt hideAsync çağırıyoruz<br>  // Layout tamamlanmadan splash kalkıyor = FLASH!<br>  useEffect(() =&gt; {<br>    if (appIsReady) {<br>      SplashScreen.hideAsync();<br>    }<br>  }, [appIsReady]);<br><br>  if (!appIsReady) return null;<br><br>  // ❌ YANLIŞ: Wrapper View yok, onLayout yok<br>  return (<br>     &lt;Slot /&gt;<br>  );<br>}</pre><p>Şimdi bu sorunu nasıl düzelteceğimize bakalım.</p><h3>Doğru Yaklaşım: Root Seviyesinde Manuel Kontrol</h3><p>Flash/Flicker’ı tamamen ortadan kaldırmanın temel prensibi şudur: <strong>Splash screen, uygulamanın ilk anlamlı UI’ı native katmanda gerçekten çizilene (layout) kadar ekranda kalmalıdır.</strong></p><p>Bunu projenin en üst katmanında (Root) yönetmek, tüm uygulamanın açılış deneyimini tek bir noktadan kontrol etmenizi sağlar.</p><h3>Neden Navigator’ın Kendisi Değil de Wrapper View?</h3><p>React Navigation kullanırken onReady fonksiyonuna güvenmek bazen yanıltıcı olabilir. onReady navigator&#39;ın hazır olduğunu söyler, ancak cihazın bu görüntüyü ekrana gerçekten &quot;çizdiğini&quot; (painting) garanti etmez. Bu yüzden en dıştaki bir <strong>Wrapper View</strong>&#39;ın onLayout event&#39;ini kullanmak en güvenli yoldur.</p><p>Aşağıdaki diyagram, iki yaklaşım arasındaki kritik farkı göstermektedir:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DoQiiZ87gq4uxYqpueiOiA.png" /></figure><p>Görüldüğü gibi, `<strong>onReady</strong>` tetiklendiğinde UI henüz ekrana çizilmemiştir. Bu 20–50ms’lik boşluk, kullanıcının “beyaz flash” görmesine neden olur.</p><h3>Uygulama: Expo Router (Modern Yaklaşım)</h3><p>Eğer Expo Router kullanıyorsanız, bu işlemi app/_layout.tsx dosyasında şu şekilde kurgulamalısınız:</p><pre>import { useCallback, useEffect, useState } from &#39;react&#39;;<br>import { View } from &#39;react-native&#39;;<br>import { Slot } from &#39;expo-router&#39;;<br>import * as SplashScreen from &#39;expo-splash-screen&#39;;<br><br>// Splash screen&#39;in otomatik kapanmasını engelle<br>SplashScreen.preventAutoHideAsync();<br><br>export default function RootLayout() {<br>  const [appIsReady, setAppIsReady] = useState(false);<br><br>  useEffect(() =&gt; {<br>    async function prepare() {<br>      try {<br>        // Font yüklemeleri, API kontrolleri veya State hydration burada yapılır<br>        await new Promise(resolve =&gt; setTimeout(resolve, 2000)); // Simülasyon<br>      } finally {<br>        setAppIsReady(true);<br>      }<br>    }<br>    prepare();<br>  }, []);<br><br>  const onLayoutRootView = useCallback(async () =&gt; {<br>    if (appIsReady) {<br>      // Sır bu: Layout hazır olduğunda splash&#39;i kaldır!<br>      await SplashScreen.hideAsync();<br>    }<br>  }, [appIsReady]);<br><br>  if (!appIsReady) return null;<br><br>  return (<br>    &lt;View style={{ flex: 1 }} onLayout={onLayoutRootView}&gt;<br>      &lt;Slot /&gt;<br>    &lt;/View&gt;<br>  );<br>}</pre><h3>Bu Kodda 6 Kritik Adım Var:</h3><ol><li><strong>preventAutoHideAsync() çağrısı</strong> — Splash screen kilitlendi, kontrol bizde</li><li><strong>appIsReady state&#39;i</strong> — Yüklenme durumunu takip ediyoruz</li><li><strong>useEffect içinde hazırlık</strong> — Fontlar, API, state arka planda yükleniyor</li><li><strong>onLayout event&#39;ine bağlı </strong><strong>hideAsync()</strong> — useEffect&#39;te değil, native paint sonrası</li><li><strong>if (!appIsReady) return null</strong> — Hazır değilse boş render, splash ekranda kalır</li><li><strong>Wrapper </strong><strong>&lt;View&gt; ile sarmalama</strong> — Native &quot;çizim tamamlandı&quot; sinyalini yakalıyoruz</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*Pq1nKw2qE_rRGF8Zl65ALQ.gif" /></figure><blockquote><strong>“Püf Noktası:</strong> Gerçek bir projede fontlar, ikonlar ve başlangıç dataları (Hydration) yüklenmeden Splash’i kaldırmayın. Ancak bunları beklerken Splash’i kaldırma emrini <em>onLayout</em> event&#39;ine bağlamazsanız, tüm datalar hazır olsa bile o kısa &#39;beyaz parlamayı&#39; engelleyemezsiniz.&quot;</blockquote><h3>Neden Bu Yöntem %100 Çözüm Sunar?</h3><ol><li><strong>Senkronizasyon:</strong> onLayout, native işletim sisteminin görünümü hesapladığı ve yerleştirdiği an tetiklenir. Splash screen tam bu anda kalktığında, kullanıcı doğrudan hazır bir UI görür.</li><li><strong>Kapsayıcılık:</strong> Root seviyesinde olduğu için alt sayfalardaki (Home, Login vs.) hiçbir gecikme kullanıcıya “beyaz ekran” olarak yansımaz.</li><li><strong>Performans:</strong> appIsReady state&#39;i ile verilerin yüklenmesini beklerken, onLayout ile de görselin hazır olmasını bekleriz. Çifte kontrol, kusursuz geçiş sağlar.</li></ol><p>Eğer siz de production’da bu sorunu yaşadıysanız veya farklı bir çözüm bulduysanız, yorumlarda paylaşın — bu tür “küçük ama kritik” detayları birlikte belgelemek hepimizin işini kolaylaştırır.</p><p>Umarım bu makale işinize yaramıştır. Sorularınız veya geri bildirimleriniz için <a href="https://www.linkedin.com/in/bar%C4%B1%C5%9F-kandemir/">LinkedIn’den</a> ulaşabilirsiniz — React Native ile ilgili daha fazla içerik için takipte kalın.</p><p>Kod örneklerine github gist üzerinden ulaşmak için <a href="https://gist.github.com/bariskndmr/44987ea693b047f0a11e051e89b0d9ea"><strong>tıklayınız</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5aebdb058a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hermes JS Engine for React Native]]></title>
            <link>https://medium.com/@bariskandemirx/hermes-js-engine-for-react-native-93541e3b5d14?source=rss-615861199122------2</link>
            <guid isPermaLink="false">https://medium.com/p/93541e3b5d14</guid>
            <category><![CDATA[hermes]]></category>
            <category><![CDATA[cross-platform]]></category>
            <category><![CDATA[js-engine]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Barış Kandemir]]></dc:creator>
            <pubDate>Thu, 05 Sep 2024 13:30:25 GMT</pubDate>
            <atom:updated>2024-09-05T13:30:25.868Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*DVlIoV_2WFkGNNzBib6wOw.png" /></figure><p>Herkese Merhaba, bu yazımda sizlere React Native uygulamalarında performans optimizasyonu için kullanılan Javascript motoru <strong>Hermes’ten </strong>bahsedeceğim.</p><h3>Hermes Nedir?</h3><p><strong>Hermes</strong>, React Native için optimize edilmiş açık kaynaklı bir JavaScript motorudur. Birçok uygulama için Hermes’in kullanılması, daha iyi başlatma süresi, daha az bellek kullanımı ve daha küçük uygulama boyutu sağlar.</p><p>Hermes varsayılan olarak React Native tarafından kullanılır ve bunu etkinleştirmek için herhangi bir ek yapılandırmaya, yani konfigürasyon ile uğraşmanıza gerek yoktur.</p><p>Projenizi oluşturduktan sonra karşılama ekranında Hermes’in projenizde aktif olup olmadığını görebilirsiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*GiRvjRSIIS8g1Fr8vkeuJQ.jpeg" /></figure><h3>Bundled Hermes Nedir?</h3><p>Yeni bir React Native uygulaması oluşturduğumuz da Hermes’in bundled yani paketlenmiş bir versiyonu ile birlikte gelir dolasıyla ekstra bir konfigürasyon yapmaya gerek duymayız.</p><p>Geçmişte Hermes ve React Native sürümleri arasında problemler yaşandığı için, Bundled Hermes adında dağıtım modeli geliştirildi ve versiyon uyumu problemleri ortadan kaldırıldı.</p><p>Ayrıca her bir yeni React Native versiyonu ile birlikte, bu yeni versiyona uyumlu yeni bir Hermes versiyonu oluşturulur.</p><p>Eğer React Native veya Hermes üzerinde uzantılar oluşturuyorsanız ve teknik açıdan daha detaylı bilgiye ihtiyacınız var ise React Native’in <a href="https://reactnative.dev/architecture/bundled-hermes">Bundled Hermes</a> teknik dökümanına göz atabilirsiniz.</p><h4><strong>Burası çokomelli.</strong></h4><p>Bundled Hermes, React Native 0.69 ve üzeri versiyonlarda yer almaktadır. Bundan önceki versiyonlarda Hermes ve React Native sürüm uyumluluklarına dikkat etmek gerekiyor. Aksi takdirde uygulamada aniden çökmeler (crash) yaşanabilir. <a href="https://github.com/facebook/hermes/releases?page=2">Buradan</a> Hermes’in sürümlerine ulaşabilirsiniz.</p><p>Umarım faydalı olmuştur Hermes için kısa ve net bilgiler vermeye çalıştım. İyi çalışmalar herkese.</p><p>Kaynaklar;</p><p><a href="https://reactnative.dev/docs/hermes">Using Hermes · React Native</a></p><p><a href="https://reactnative.dev/architecture/bundled-hermes">https://reactnative.dev/architecture/bundled-hermes</a></p><p><a href="https://github.com/facebook/hermes/blob/main/README.md">https://github.com/facebook/hermes/blob/main/README.md</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93541e3b5d14" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automatic Reference Counting — Swift]]></title>
            <link>https://medium.com/@bariskandemirx/automatic-reference-counting-swift-6ff2f0881aee?source=rss-615861199122------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ff2f0881aee</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[memory-management]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <dc:creator><![CDATA[Barış Kandemir]]></dc:creator>
            <pubDate>Wed, 31 May 2023 14:07:20 GMT</pubDate>
            <atom:updated>2023-07-01T19:09:37.124Z</atom:updated>
            <content:encoded><![CDATA[<h3>Automatic Reference Counting — Swift</h3><p>Swift’de türler iki farklı kategoriden birine girerler; ilki her bir örneğin genellikle bir <strong>Struct, Enum </strong>veya<strong> Tuple </strong>olarak tanımlanan verilerinin benzersiz bir kopyasını tuttuğu “<strong>Value Types (Değer Türleri)”. </strong>İkincisi, örneklerin verilerin tek bir kopyasını paylaştığı ve türün genellikle bir <strong>Class </strong>olarak tanımlandığı “<strong>Reference Types (Referans Türleri)</strong>”.</p><p>Eski programlama dillerinde bellek yönetimi otomatik olarak yapılamıyordu, kodu yazan kişinin bellekte ayırdığı yer ile işi bittiği zaman temizleme yapması gerekiyordu. Ancak modern diller ile bellek yönetimi otomatik hala getirildi ve artık ayrılan yere ihtiyaç duyulmayacaksa bellekten otomatik kaldırılıyor bunu, Swift dilinde otomatik <strong>“Automatic Reference Counting (Otomatik Referans Sayıcı)”</strong> bizim için otomatik olarak yapıyor.</p><h4><strong>Automatic Reference Counting (Otomatik Referans Sayıcı)</strong></h4><p><strong>Swift</strong>, uygulamamızın bellek yönetimi izlemek ve yönetmek için <strong>ARC</strong>. <strong>ARC</strong>, sınıflardan aldığımız nesneleri artık onlara ihtiyacımız olmadığında bellekten temizler. Referans sayımı sadece sınıflardan aldığımız nesnelere uygulanır.</p><p>Bir sınıfın yeni bir nesnesini oluşturduğumuzda, <strong>ARC</strong> bu nesneyle ilgili bilgileri depolamak için bir yığın bellek ayırır. Bu bellek, nesnenin türüyle ilgili bilgileri ve bu nesneyle ilişkili saklanan özelliklerin değerlerini tutar. Ek olarak, bir nesneye artık ihtiyaç duyulmadığında, <strong>ARC</strong> kullanılan hafızayı boşaltır, böylece hafıza başka amaçlar için kullanılabilir. Bu, sınıf nesnelerinin ihtiyaç duyulmadığında bellekte yer kaplamamasını (<strong>deallocated</strong>) sağlar.</p><p><strong>Peki ARC nasıl çalışıyor?</strong></p><p><strong>ARC</strong>’ın nasıl çalıştığını bir örnek ile açıklayalım. <strong>Person</strong> adında, içinde <strong>name</strong> adında sabit bir değişkeni barındıran bir sınıfımız olsun. <strong>Person</strong> sınıfı, nesnenin <strong>name</strong> özelliğini ayarlayan ve başlatmanın devam ettiğini belirtmek için bir <strong>başlatıcıya (init)</strong>sahiptir. Person sınıfı ayrıca, sınıfın nesnesinin yeri değiştiğinde (<strong>deallocatted</strong>) bir mesaj yazdıran başlatıcıdan arındırıcıya (<strong>deinit</strong>) sahiptir.</p><pre>class Person {<br>  let name: String<br>  <br>  init(name: String) {<br>    self.name = name<br>    print(&quot;\(name) is being initialized&quot;)<br>  }<br>  <br>  deinit {<br>    print(&quot;\(name) is being deinitialized&quot;)<br>  }<br>}</pre><p>Daha sonra <strong>Person</strong> sınıfına birden çok referans tanımlamak için üç adet opsiyonel değişken oluşturuyoruz.</p><pre>var reference1: Person?<br>var reference2: Person?<br>var reference3: Person?</pre><p>Nesneler opsiyonel olduğundan otomatik olarak <strong>nil</strong> değerine sahiptir ve Person sınıfından referans almazlar.</p><p>Şimdi yeni bir <strong>Person</strong> nesnesi oluşturup bu üç değişkenden birine atayabiliriz. Kodumuzu çalıştırdığımızda “<strong>John Doe is being initialized</strong>” çıktısını alırız. Bu başlatmanın gerçekleştiğini onaylar.</p><pre>reference1 = Person(name: &quot;John Doe&quot;) // Referans sayısı = 1</pre><p>Yeni <strong>Person</strong> nesnesi <strong>reference1</strong> değişkenine atandığından, artık <strong>reference1</strong>&#39;den yeni <strong>Person</strong> nesnesine güçlü(<strong>strong</strong>) bir referans vardır. Default olarak <strong>strong</strong> referans türünde oluşturulurlar. <strong>ARC</strong>, en az bir güçlü referans olduğundan bu <strong>Person</strong> nesnesini bellekte tutar ve yeniden yer edinmemesini (<strong>deallocated</strong> olmamasını) sağlar.</p><p>Aynı nesneyi iki değişkene daha atarsak o nesneye iki yeni güçlü referans daha oluşturulur. <strong>ARC</strong>, <strong>Person</strong> nesnesinin referans sayısını üç’e çıkarır.</p><pre>reference2 = reference1 // Referans sayısı = 2<br>reference3 = reference1 // Referans sayısı = 3</pre><p>İki değişkene <strong>nil</strong> atayarak bu güçlü referanslardan ikisini (orjinal referans dahil) kırarsınız. Tek bir güçlü referans örneği kalır ve nesnemiz yeniden tahsis edilmez (<strong>deallocated</strong> olmaz).</p><pre>reference1 = nil // Referans sayısı = 2<br>reference2 = nil // Referans sayısı 1</pre><p><strong>ARC</strong>, üçüncü ve son güçlü referans bozulana kadar nesnemizi serbest bırakmaz (<strong>deollaceted</strong> olmaz).</p><p><strong>Person</strong> nesnesini artık kullanmadığımız açıktır ve son güçlü referansımıza <strong>nil</strong> atayarak nesnenimizi <strong>deinit</strong> olmasını sağlarız ve böylece <strong>ARC</strong> referansımızı serbest bırakır ve bellekteki yerini temizler.</p><pre>reference3 = nil // Reference count = 0 &amp;&amp; Deallocated</pre><p>Kaynaklar;</p><p><a href="https://docs.swift.org/swift-book/documentation/the-swift-programming-language/automaticreferencecounting/">Documentation</a></p><p><a href="https://developer.apple.com/swift/blog/?id=10">https://developer.apple.com/swift/blog/?id=10</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ff2f0881aee" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>