<?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 Sanya Wadhawan on Medium]]></title>
        <description><![CDATA[Stories by Sanya Wadhawan on Medium]]></description>
        <link>https://medium.com/@sanyaw12722?source=rss-8ef93f66f5f4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*GwkkV-thQhczXbJY</url>
            <title>Stories by Sanya Wadhawan on Medium</title>
            <link>https://medium.com/@sanyaw12722?source=rss-8ef93f66f5f4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 23:58:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sanyaw12722/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[ArgoCD RBAC SetUp]]></title>
            <link>https://medium.com/@sanyaw12722/argocd-rbac-setup-571c4eaceedb?source=rss-8ef93f66f5f4------2</link>
            <guid isPermaLink="false">https://medium.com/p/571c4eaceedb</guid>
            <category><![CDATA[gitops]]></category>
            <category><![CDATA[rbac]]></category>
            <category><![CDATA[kubernetes-argocd]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[argo-cd]]></category>
            <dc:creator><![CDATA[Sanya Wadhawan]]></dc:creator>
            <pubDate>Fri, 17 Jul 2026 10:04:03 GMT</pubDate>
            <atom:updated>2026-07-17T10:06:59.283Z</atom:updated>
            <content:encoded><![CDATA[<h4>How to implement RBAC for Argo CD?</h4><p>1.) If setup is already done, most of the RBAC configuration is done by modifying these two ConfigMaps:</p><p>kubectl edit configmap argocd-cm-n argocd</p><p>(Setting user accounts as per choice)</p><p>data:<br> accounts.sanya: login<br> accounts.developer: login</p><p>and</p><p>kubectl edit configmap argocd-rbac-cm-n argocd</p><p>(Setting policy as per choice)</p><p>policy.csv: |<br> p, role:developer, applications, get, *, allow<br> p, role:developer, applications, sync, *, allow</p><p>g, sanya, role:developer</p><p>2.) Set passwords with:</p><p>argocd account update-password — account &lt;insert-user-name&gt;</p><p>3.) If changes aren’t picked up, restart:</p><p>kubectl rollout restart deployment argocd-server -n argocd</p><p><strong>Steps to implement (with setup):</strong></p><p>Step 1: Install docker and kind, check using docker — version and kind — version</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*tUmEEdHCznVRm1B3P9U_gQ.png" /><figcaption>Installation</figcaption></figure><p>Step 2: Create a cluster with kind create cluster — name &lt;insert-name&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*35Aczy7kf0WCSvXhIoYxzQ.png" /><figcaption>Cluster creation</figcaption></figure><p>Step 3: Verify with kubectl get nodes (One control-plane node should be created)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*YEigZnBjDiLYmkdPSVGbfg.png" /><figcaption>Verification with kubectl get nodes</figcaption></figure><p>Step 4: Create the namespace with kubectl create namespace argocd and Install argoCD: kubectl apply -n argocd -f <a href="https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml">https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dv6nve4t1iOUSUDlH1cPmw.png" /><figcaption>Installation of argoCD</figcaption></figure><p>Step 5: Once everything is setup, run kubectl get pods -n argocd</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*9-XCJN7Kxyg9Mn9pB3A81Q.png" /><figcaption>Running pods</figcaption></figure><p>Step 6: Use port-forwarding to access the UI</p><p>kubectl port-forward svc/argocd-server -n argocd 8080:443</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*OXsH4t4yahm1Wti8I91TOQ.png" /><figcaption>Accessing UI</figcaption></figure><p>Step 7: Try checking with:</p><p><a href="https://localhost:8080/">https://localhost:8080</a></p><p>Step 8: Run on another terminal:</p><p>Get your admin password:</p><p>kubectl -n argocd get secret argocd-initial-admin-secret \<br> -o jsonpath=”{.data.password}” | base64 -d</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MAGeiTdS-juUqfFMkJIDQg.png" /><figcaption>Logging in</figcaption></figure><p>Step 9: List the ConfigMaps:</p><p>kubectl get cm -n argocd</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/1*quGBxgS8TPYpsE16w3fIhA.png" /><figcaption>Checking Configmaps</figcaption></figure><p>Step 10: kubectl edit cm argocd-cm -n argocd</p><p>Edit the current ArgoCD configuration:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*6RzrCGAngCYYJaZ-qenB8Q.png" /><figcaption>Configuration before changes</figcaption></figure><p>Step 11: Add inside the “data:” section</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/1*8B0FTGscTxJ25OpaeFbt0Q.png" /><figcaption>Configuration after changes</figcaption></figure><p>Save and exit</p><p>Step 12: Verify:</p><p>kubectl get cm argocd-cm -n argocd -o yaml</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*EEhv54yjqjxADOm6ipbHPg.png" /><figcaption>Verification of changes to add users</figcaption></figure><p>Step 13: Install ArgoCD CLI</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*hqaSBB_ZMm6Htj-xi38qdQ.png" /><figcaption>Installation of CLI</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*OFV2HMWzv4l6Ldn3vaZz2Q.png" /><figcaption>Checking if it worked</figcaption></figure><p>Step 14: Login via argoCD CLI</p><p>argocd login localhost:8080 — insecure</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*aHmY07oSJokWrX1g13jUew.png" /><figcaption>Logging in via console</figcaption></figure><p>Step 15: Now, edit the RBAC ConfigMap</p><p>Add inside the data section or create one if not present</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*Rwyr9UIqgfuS_0ImCGkrIQ.png" /><figcaption>Adding RBAC policy</figcaption></figure><p>Step 16: Verification</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*Rn89uv7nsg70MGhIhJL26g.png" /><figcaption>Checking to see its implemented</figcaption></figure><p>Step 17: Update password for users with argocd account update-password — account &lt;insert-user-name&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*S_-9bdZDy-5KP3IlEI_D1Q.png" /><figcaption>Setting up passwords for users</figcaption></figure><p>Step 18: LogOut: argocd logout localhost:8080</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BwTgXxb0XKijvor0MY5DhA.png" /><figcaption>Logging out</figcaption></figure><p>Step 19: LogIn as user:</p><p>argocd login localhost:8080 — username sanya — password &lt;your-password&gt; — insecure</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/326/1*fks93MXwHKrMK05TwQJwKA.png" /><figcaption>Logging in as user</figcaption></figure><p>Step 20: Verify with argocd account get-user-info</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*Q1cRf43Gzyw0wESC1jJBdw.png" /><figcaption>Checking user log in</figcaption></figure><p>Step 21: Test RBAC: Can view applications</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*odvbcZdyv7oiA0OeKFg6Kg.png" /><figcaption>Accessing GUI to test policy</figcaption></figure><p>Can’t delete</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1l2Hf1a4CSBoq8KR_osqMA.png" /><figcaption>Accessing GUI to test policy</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=571c4eaceedb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Database encryption during exports]]></title>
            <link>https://medium.com/@sanyaw12722/database-encryption-during-exports-2387f3b64d2c?source=rss-8ef93f66f5f4------2</link>
            <guid isPermaLink="false">https://medium.com/p/2387f3b64d2c</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[encryption]]></category>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[postgresql]]></category>
            <dc:creator><![CDATA[Sanya Wadhawan]]></dc:creator>
            <pubDate>Tue, 14 Jul 2026 12:20:13 GMT</pubDate>
            <atom:updated>2026-07-29T07:48:22.260Z</atom:updated>
            <content:encoded><![CDATA[<h4>A bit about it</h4><p><strong>How it works?</strong></p><ol><li>Export command</li><li>Database server starts backup file generation</li><li>Before writing to storage, database engine applies encryption using a configured encryption key/certificate.</li><li>The generated backup is stored as an encrypted file. If someone gets access to that backup file, they cannot read the contents without the required key.</li><li>When an authorized person wants to restore the database:</li></ol><ul><li>They provide access to the encryption key/certificate.</li><li>The database server decrypts the backup automatically during restoration.</li></ul><p>Master Key → Certificate Key → Database Encryption Key (DEK) → Backup Data Encryption</p><ul><li>Databases usually read/write fixed-size pages.</li><li>Multiple key design: The actual data encryption key changes frequently so master key is protected separately.</li><li>The backup file alone is useless. Security depends on key protection. Common methods: Certificate store</li></ul><h4>Steps to implement:</h4><p><strong>Case 1: Database supports it</strong></p><p>Step 1: Check native encryption</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdatawrapper.dwcdn.net%2FEoFBJ%2F1%2F&amp;display_name=Datawrapper&amp;url=https%3A%2F%2Fdatawrapper.dwcdn.net%2FEoFBJ%2F1%2F&amp;image=https%3A%2F%2Fdatawrapper.dwcdn.net%2FEoFBJ%2Fplain-s.png%3Fv%3D1&amp;type=text%2Fhtml&amp;schema=dwcdn" width="600" height="268" frameborder="0" scrolling="no"><a href="https://medium.com/media/73275dd629acdadcb63747f256894da1/href">https://medium.com/media/73275dd629acdadcb63747f256894da1/href</a></iframe><p>Step 2: Create encryption keys</p><p>The database needs: Master Key → Certificate Key → Database Encryption Key (DEK) → Backup Data Encryption</p><ul><li>Run the database’s key creation command.</li><li>Provide a password or connect it to a KMS</li></ul><p>Step 3: Create certificate</p><p>Create certificate/key pair → Database generates certificate → Export and store private key securely in KMS/Vault.</p><p>Step 4: Generate encryption key</p><p>Generate AES-256 DEK → Encrypt/protect DEK using certificate/master key → Use DEK to encrypt backup data.</p><p>Step 5: Connect database encryption with key</p><p>Step 6: Configure access permissions</p><p>Step 7: Run database export command and try opening</p><p>Step 8: Test Restoration</p><p>Step 9: Add key management</p><p>Now test recovery.</p><p><strong>Case 2: Database does not support it well</strong></p><p>Then use a backup platform. Examples:</p><ul><li>Veeam</li><li>Commvault</li><li>Veritas NetBackup</li></ul><h4>Sample demo with postgres:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*onGR4KT2YQRA-whhMQ3zJg.png" /><figcaption>Creating database and records</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*Rp7XaWCrM4KW4C89at6CuA.png" /><figcaption>Generated key for encryption</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*djh95Y0tiNUBCbiQi4a6mw.png" /><figcaption>Encrypt using key</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*wlclLJ7d_93NkDexCne-8w.png" /><figcaption>Testing</figcaption></figure><p>Most systems use AES-256. AES-128 block size: 128 bits = 16 bytes, AES-256 uses: 256-bit key, 14 encryption rounds. AES encrypts blocks, but databases encrypt large files.</p><p>They use modes. Common: Cipher Block Chaining (Needs padding and can be vulnerable if implemented incorrectly.)</p><p>Block1 → AES → Cipher1 then Block2 XOR Cipher1 → AES → Cipher2</p><p>GCM (modern) : The tag proves the file was not modified.</p><p>AES-GCM Flow: Data → AES encryption → Ciphertext + Authentication Tag</p><h4>Initialization Vector (IV):</h4><ul><li>Without IV: a particular value always produces same value (Attackers can detect repeated patterns.)</li><li>With IV: IV: random value (Same data gives different ciphertext)</li></ul><h4>User executes:</h4><p>Database reads pages → Pages converted into backup stream → Generate random IV → Fetch encryption key → AES encryption → Generate authentication tag → Write encrypted backup file</p><h4>Reverse</h4><p>Encrypted backup → Database reads metadata → Find encryption key → Verify authentication tag → AES decrypt → Restore database pages → Database available</p><p><em>Note: This article had some content written with the help of AI.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2387f3b64d2c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Want approvals before someone merges a PR on Github?]]></title>
            <link>https://medium.com/@sanyaw12722/want-approvals-before-someone-merges-a-pr-on-github-f7822a8f0b06?source=rss-8ef93f66f5f4------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7822a8f0b06</guid>
            <category><![CDATA[pull-request]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[ruleset]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[organization]]></category>
            <dc:creator><![CDATA[Sanya Wadhawan]]></dc:creator>
            <pubDate>Wed, 08 Jul 2026 07:27:30 GMT</pubDate>
            <atom:updated>2026-07-24T12:17:01.945Z</atom:updated>
            <content:encoded><![CDATA[<h4>A bit about Github Rulesets</h4><p>Try rulesets, you can control how people engage with branches and tags in a repository.</p><p>Any read access member is able to view the rulesets but you need admin or custom role with editing permissions to configure rulesets.</p><p><em>Limit: </em><strong><em>Only available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud</em></strong><em>, with up to 75 rulesets per repository, and 75 organization-wide rulesets (for public accounts on the Github free plan). Due to a struggle of applying rulesets to every individual repository, some people prefer organization-wide rulesets (not inclusive for private repositories on user or organization on the free plan).</em></p><p>Multiple rulesets can be applied simultaneously given that they if point to the same branch or tag, it will be aggregated. If the same rule is defined in different ways across rulesets, the most restrictive version is applied.</p><p>Here’s a demo of how to set approvals for enabling approvals.</p><p>1.) Open repository → Click Settings → Go in rules → rulesets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*TQeUpzv7jLMa2IUCZz4-VQ.png" /></figure><p>2.) Choose New ruleset → pick branch ruleset (depends on what you want the ruleset for).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/312/1*7FeFo5JBhT2BAwjtwkwDSA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*b12Wfsubt7yC04waBpqA8Q.png" /></figure><p>3.) Change enforcement status to active.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/1*iwDWISuqm8Ue5eWKNY7vrg.png" /></figure><p>4.) Add target under target branches -&gt; select include by pattern → add branch naming pattern (production) in my case.</p><p><em>(This will apply it to all the files under production branch.)</em></p><p>Note: if you want it to apply to a specific branch or tag, you need the fnmatch syntax.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*fi54HE2VG3KnsehwoNFdIw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*HyCqoCInFoFwAKJ2qUW90g.png" /></figure><p>5.) Remember to enable Require a pull request before merging, and set your number of approvals. Lets say the repository has 3 collaborators and 1 raises a PR, the other 2 need to review and approve before it can be merged.</p><p>Select other Branch rules (as per need).</p><p>For me I chose:</p><ul><li><em>Restrict Updates, Restrict Deletions, Require linear history</em></li><li><strong><em>Require a pull request before merging → Required approvals =2</em></strong></li><li><em>Dismiss stale pull request approvals when new commits are pushed</em></li><li><em>Require approval of the most recent reviewable push</em></li><li><em>Require conversation resolution before merging</em></li><li><em>Block force pushes</em></li></ul><p>If you want more information on rules for rulesets, refer to <a href="https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets#metadata-restrictions">github docs on rules for rulesets</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*EH5CLguMOAX--jb8vEVEgw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*CoW6JZ7HhgQH7kBIwbI_SQ.png" /></figure><p>If you made a mistake, no worries. Simply, go to rulesets, click the dots, and select delete ruleset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*50wkyOJxWjFee8HCL3zHrA.png" /></figure><p>6.) Testing it with a dummy file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*9TH5RfJ__biYeXTQk57v2A.png" /></figure><p>7.) For approval by specific people, select require review from code owners.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*F0MkRRxi5Rr-YzcIx_G-pA.png" /></figure><p><em>Note: If you’re in an organization (if you want to enforce rules for push approvals by specific teams), you cannot enforce rulesets on a private repository. Github Teams plan, Github Pro or Github Enterprise Cloud is required.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*dgTIseKt7o921kzg_gjHDA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*Mm0dDPk82jz8PzYPprYPbg.png" /></figure><p>Here, the CODEOWNERS feature is not visible.</p><p><em>Note: If it’s a public repository in your own account or an organization with collaborators on a free plan, this feature would be visible.</em></p><p>8.) A CODEOWNERS file has to be created with mention of which part needs whose approval.</p><p>Example:</p><pre># Entire repository<br>* @sanyawadhawan<br><br># Backend<br>/backend/ @sanyawadhawan<br><br># Frontend<br>/frontend/ @sanyawadhawan<br><br># Infrastructure<br>/infra/ @sanyawadhawan<br><br># Security<br>/security/ @sanyawadhawan<br><br># Documentation<br>/docs/ @sanyawadhawan</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/437/1*ez2mGwWLpikhJC2-5Ik8Nw.png" /></figure><p>You can put the name of other collaborator users, or add teams too (even multiple).</p><p>Example: src/ @my-org/backend-team @my-org/devops-team</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*HU9oKzPWzJwbBWsHPYnQ1A.png" /></figure><p>You can view the codeowners by selecting tool top from any file in the repository.</p><p>GitHub will search for the file in the following order and will only respect the first one it finds: .github/ directory (Recommended: .github/CODEOWNERS), Root directory (/CODEOWNERS), docs/ directory (docs/CODEOWNERS).</p><p>Some important points to note:</p><ul><li>Name of the File: The name must be capitalized exactly as CODEOWNERS with no file extension (do not name it codeowners.txt).</li><li>Users and teams you choose as codeowners must have explicit write access to the repository, even if the team&#39;s members already have access.</li><li>Branch Specific: The file applies to the specific branch it is merged into. For code owners to automatically receive pull request review requests, the file must exist on the base branch<strong> </strong>of that pull request.</li><li>Different branches can have different codeowners.</li><li>Limit: The file size must be under 3 MB.</li></ul><p>If you have more questions, refer to <a href="https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners">More about codeowners</a>.</p><p>9.) Testing</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xTvFy3Qwi_KMFRgGyEeXaw.png" /></figure><p>Due to a pending approval, the merge got blocked.</p><p>Some more important links for further information:</p><ul><li><a href="https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization">Managing rulesets (github docs</a>)</li><li><a href="https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/creating-rulesets-for-a-repository#granting-bypass-permissions-for-your-ruleset">Creating a ruleset (github docs</a>)</li><li><a href="https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch">fnmatch docs</a></li></ul><p>Thank you for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7822a8f0b06" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Methodology for SAST]]></title>
            <link>https://medium.com/@sanyaw12722/methodology-for-sast-da95a36c1a48?source=rss-8ef93f66f5f4------2</link>
            <guid isPermaLink="false">https://medium.com/p/da95a36c1a48</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[secure-coding]]></category>
            <category><![CDATA[static-code-analysis]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Sanya Wadhawan]]></dc:creator>
            <pubDate>Mon, 06 Jul 2026 09:19:03 GMT</pubDate>
            <atom:updated>2026-07-08T10:10:55.719Z</atom:updated>
            <content:encoded><![CDATA[<h4>A quick read for beginners</h4><h4>Just an overview</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdatawrapper.dwcdn.net%2FkpaMM%2F1%2F&amp;display_name=Datawrapper&amp;url=https%3A%2F%2Fdatawrapper.dwcdn.net%2FkpaMM%2F1%2F&amp;image=https%3A%2F%2Fdatawrapper.dwcdn.net%2FkpaMM%2Fplain-s.png%3Fv%3D1&amp;type=text%2Fhtml&amp;schema=dwcdn" width="600" height="302" frameborder="0" scrolling="no"><a href="https://medium.com/media/5985d99f2d6427af70215de28e3e428a/href">https://medium.com/media/5985d99f2d6427af70215de28e3e428a/href</a></iframe><p><strong>Potential SAST improvement techniques:</strong></p><ol><li><strong>AI-Powered Security Testing: </strong>Improves vulnerability detection accuracy, reduces false positives and analysis effort.</li><li><strong>Machine Learning-Driven Vulnerability Detection:</strong> Detects hidden and emerging vulnerabilities, learns from past attack patterns to improve detection.</li><li><strong>Auto-Remediation Features: </strong>Suggests or automates security fixes, Reduces remediation time and developer workload.</li><li><strong>Real-Time Security Monitoring:</strong> Continuously scans for new vulnerabilities, enables faster threat detection and response.</li></ol><h3><strong>Phase 1: Source Code Collection:</strong></h3><ol><li>Identify the repository to be used</li><li>Identify scope for testing</li></ol><p><strong>In-scope:</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdatawrapper.dwcdn.net%2FSiq2m%2F1%2F&amp;display_name=Datawrapper&amp;url=https%3A%2F%2Fdatawrapper.dwcdn.net%2FSiq2m%2F1%2F&amp;image=https%3A%2F%2Fdatawrapper.dwcdn.net%2FSiq2m%2Fplain-s.png%3Fv%3D1&amp;type=text%2Fhtml&amp;schema=dwcdn" width="600" height="502" frameborder="0" scrolling="no"><a href="https://medium.com/media/4cad70ab35e55026d3f076ed5352b4b4/href">https://medium.com/media/4cad70ab35e55026d3f076ed5352b4b4/href</a></iframe><p><strong>Out of scope:</strong></p><ol><li>Runtime application behavior (DAST : separate engagement)</li><li>Production infrastructure access</li><li>Third-party SaaS integrations unless credentials are exposed in-repo</li></ol><h3><strong>Phase 2: Code parsing and analysis:</strong></h3><ol><li><strong>Repository Metadata Survey:</strong> Converts code into analyzable structures like syntax and flow trees. Examines functions, variables and execution relationships. Detects abnormal or insecure programming constructs.</li></ol><p>1.1 Identify languages, frameworks, dependency files</p><p>1.2 GitHub UI: Insights &gt; Languages,</p><p>1.3 Look for:</p><ul><li>Primary language (Python, Node.js, Go, Java, etc.)</li><li>Presence of Dockerfile, docker-compose.yml</li><li>Presence of .github/workflows/, Jenkinsfile, .gitlab-ci.yml</li><li>README references to cloud providers (AWS, GCP, Azure)</li><li>Open issues mentioning security or credentials</li></ul><p>2. <strong>OpenSSF Scorecard Check (Automated Supply Chain Health):</strong></p><p>Run an OpenSSF Scorecard to assess supply chain hygiene of the target repo before deep analysis. This checks branch protection, dependency pinning, CI security, vulnerability disclosure policy, and more.</p><p>Why?: Scorecard gives a rapid supply chain risk baseline before any scanning begins. Projects with unpinned actions, no branch protection, or no vulnerability disclosure policy are higher-risk targets.</p><h3><strong>Phase 3: Manual review and and rule matching:</strong></h3><ol><li><strong>Repository Preparation:</strong></li></ol><ul><li>Clone the repository and fetch all branches for complete coverage.</li><li>Record the commit hash to ensure assessment traceability.</li></ul><p>2. <strong>Static Application Security Testing (SAST):</strong></p><ul><li>Analyse source code against security rules and best practices.</li><li>Detect vulnerabilities such as injection flaws, insecure APIs, and unsafe coding patterns.</li></ul><p>3. <strong>Initial File Survey:</strong></p><ul><li>Repository Enumeration Inventory project files and directories to understand the application structure.</li></ul><p>4. <strong>Git History:</strong> Review commit history, branches, and tags for exposed secrets or sensitive files.</p><p>5. <strong>Manual Secret Discovery:</strong></p><ul><li>Perform targeted keyword searches to complement automated scanning tools.</li><li>Validate findings and provide context for effective triage and remediation.</li><li>Hardcoded Secret Review (Manual + Automated): Search source code and Git history for exposed credentials, API keys, tokens, and passwords using grep and validate findings to eliminate false positives and confirm actual secret exposure.</li></ul><p>6. <strong>Dockerfile Security Review:</strong></p><ul><li>Assess Dockerfiles for insecure configurations such as root execution, unpinned base images, embedded secrets, and excessive packages.</li><li>Use Hadolint to automatically identify Docker security and best-practice violations.</li></ul><h3><strong>Phase 4: Data Flow Analysis Tools:</strong></h3><p><strong>Tools:</strong> Semgrep, CodeQL, SonarQube</p><p>Track user-controlled data from input to sensitive operations. Identify missing validation, sanitization, hardcoded credentials, and injection vulnerabilities.</p><h3><strong>Phase 5: Control Flow Analysis:</strong></h3><p><strong>Tools:</strong> CodeQL, Semgrep, Bandit, Checkmarx, Veracode, Fortify</p><p>Analyze execution paths, conditions, loops, and decision logic. Detect authentication/authorization flaws, dangerous functions, and security-control bypasses.</p><h3><strong>Phase 6: Tools:</strong></h3><ol><li><strong>Vulnerability Detection Secret Detection:</strong> Tools:<strong> </strong>Gitleaks, TruffleHog</li></ol><p>Identify exposed API keys, tokens, passwords, and cloud credentials. Scan both the working tree and Git history.</p><p>2.<strong> Dependency Security (SCA):</strong> Tools: Trivy, Grype, Snyk, Dependabot</p><p>Detect vulnerable and outdated dependencies, including transitive packages. Assess CVE severity and remediation requirements.</p><p>3.<strong> Infrastructure-as-Code (IaC) Security:</strong> Tools: Checkov, Trivy Config</p><p>Identify cloud and infrastructure misconfigurations. Detect excessive permissions, public exposure, and insecure defaults.</p><p>4. <strong>Container Security:</strong> Tools: Hadolint, Trivy, Grype</p><p>Docker Bench Review Dockerfiles and container images for vulnerabilities and misconfigurations. Assess container hardening and runtime security practices.</p><p>5. <strong>SBOM &amp; License Compliance:</strong> Tools: Syft, Trivy</p><p>Generate Software Bill of Materials (SBOM) for dependency visibility and vulnerability tracking. Identify license compliance risks and unsupported components.</p><p>6.<strong> CI/CD Pipeline Security Tools:</strong> Tools:<strong> </strong>OpenSSF Scorecard, Semgrep</p><p>Manual Review Assess workflows for exposed secrets, excessive permissions, and supply-chain risks. Verify security controls and security gates are enforced</p><h3><strong>Phase 7: Reporting and Remediation:</strong></h3><ol><li><strong>Validation &amp; Risk Classification:</strong></li></ol><ul><li>Validate findings to remove false positives and confirm exploitability.</li><li>Classify issues by severity (Critical, High, Medium, Low, Informational) and provide remediation recommendations.</li></ul><p>2. <strong>Remediation Guidance:</strong></p><p>2.1 Secret Remediation:</p><ul><li>Tools: Git Filter-Repo, Secret Managers Rotate exposed credentials immediately and remove them from Git history.</li><li>Store secrets securely using GitHub Secrets, Jenkins Credentials, or a Secret Manager.</li></ul><p>2.2 Dockerfile Remediation:</p><ul><li>Use pinned base images, non-root users, and exec-form commands.</li><li>Remove embedded secrets and follow container hardening best practices.</li></ul><p>2.3 Dependency Remediation:</p><ul><li>Upgrade vulnerable packages and rebuild from updated base images when necessary.</li><li>Prioritize remediation based on vulnerability severity and available fixes.</li></ul><p>2.4 IaC Remediation:</p><ul><li>Apply secure defaults such as encryption, least privilege, and resource limits.</li><li>Correct cloud and Kubernetes misconfigurations identified during scanning.</li></ul><p><strong>3 Reporting:</strong></p><p>3.1 Report Contents:</p><ul><li>Executive summary, scope, methodology, and risk overview.</li><li>Detailed findings with severity, evidence, affected files, and remediation guidance.</li><li>Tool output summary, remediation roadmap, and supporting evidence.</li></ul><p>3.2 Finding Documentation:</p><ul><li>Finding ID, title, severity, affected file/location, and detection tool.</li><li>Description, risk impact, evidence, validation status, and remediation steps.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdatawrapper.dwcdn.net%2FJ8Izc%2F1%2F&amp;display_name=Datawrapper&amp;url=https%3A%2F%2Fdatawrapper.dwcdn.net%2FJ8Izc%2F1%2F&amp;image=https%3A%2F%2Fdatawrapper.dwcdn.net%2FJ8Izc%2Fplain-s.png%3Fv%3D1&amp;type=text%2Fhtml&amp;schema=dwcdn" width="600" height="1039" frameborder="0" scrolling="no"><a href="https://medium.com/media/f13f79fd30aaf065d30c307835d5350e/href">https://medium.com/media/f13f79fd30aaf065d30c307835d5350e/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdatawrapper.dwcdn.net%2FoD7kY%2F1%2F&amp;display_name=Datawrapper&amp;url=https%3A%2F%2Fdatawrapper.dwcdn.net%2FoD7kY%2F1%2F&amp;image=https%3A%2F%2Fdatawrapper.dwcdn.net%2FoD7kY%2Fplain-s.png%3Fv%3D1&amp;type=text%2Fhtml&amp;schema=dwcdn" width="600" height="492" frameborder="0" scrolling="no"><a href="https://medium.com/media/df3a5939e9192bf98561c3832fa071d0/href">https://medium.com/media/df3a5939e9192bf98561c3832fa071d0/href</a></iframe><p><strong><em>Author’s Note:</em></strong><em> Portions of this article were generated with the assistance of ChatGPT and subsequently reviewed, fact-checked, and expanded based on the author’s research and understanding.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da95a36c1a48" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>