<?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 Chaskarshailesh on Medium]]></title>
        <description><![CDATA[Stories by Chaskarshailesh on Medium]]></description>
        <link>https://medium.com/@chaskarshailesh?source=rss-8d10ea2e0567------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KwTdUvCDVoCsqmm5lPcnBg.jpeg</url>
            <title>Stories by Chaskarshailesh on Medium</title>
            <link>https://medium.com/@chaskarshailesh?source=rss-8d10ea2e0567------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 07:47:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chaskarshailesh/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[GHAS Default vs. Advanced: The 2-Minute Decision]]></title>
            <link>https://medium.com/javarevisited/ghas-default-vs-advanced-the-2-minute-decision-c27fe3a04a9e?source=rss-8d10ea2e0567------2</link>
            <guid isPermaLink="false">https://medium.com/p/c27fe3a04a9e</guid>
            <category><![CDATA[codeql]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[code-scanning]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[letssailtogether]]></category>
            <dc:creator><![CDATA[Chaskarshailesh]]></dc:creator>
            <pubDate>Mon, 09 Nov 2026 06:13:38 GMT</pubDate>
            <atom:updated>2026-11-09T06:13:38.515Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A practical decision framework for GitHub Advanced Security code scanning.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MhB8kfM50v9a3vle2cKfWw.png" /></figure><blockquote><strong><em>The 10-second version:</em></strong><em> GHAS (GitHub Advanced Security) gives you two ways to turn on code scanning — a one-click </em>default setup<em> and a fully customizable </em>advanced setup<em>. Most teams overthink the choice. This post is the decision framework I wish I’d had: what each actually does, a worked </em><em>codeql-analysis.yml, and the one rule that keeps you out of trouble.</em></blockquote><p>If you’ve just turned on GitHub Advanced Security (GHAS) and hit the code scanning page, GitHub asks you a deceptively simple question: <strong>Default setup</strong> or <strong>Advanced setup</strong>?</p><p>Pick wrong and you either drown a repo in config you didn’t need, or you hit a wall three months later when default setup can’t do the thing you now need it to do. Here’s how to decide — and when to switch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qd6c1SAAbRObwLZfYVLvKA.png" /></figure><h3>First, what each one actually is</h3><p><strong>Default setup</strong> is the one-click option. GitHub automatically detects the languages in your repo, picks a CodeQL query suite, configures the scan triggers (push, PR, and a weekly schedule), and runs everything as a managed GitHub Actions job you never see. No YAML file lands in your repo.</p><p><strong>Advanced setup</strong> generates a codeql-analysis.yml workflow file in .github/workflows/. Now <em>you</em> own the pipeline. You control the languages, the query suites, the triggers, the build steps, the runners, and anything else you want to bolt on.</p><p>The mental model: <strong>default setup is a managed appliance; advanced setup is a workflow you maintain.</strong></p><h3>Go with Default Setup when…</h3><p><strong>You’re scaling across many repos.</strong> This is the single biggest reason. Default setup can be enabled org-wide through security configurations, so you can switch on code scanning for hundreds of repos without touching a single workflow file. For a platform or security team, that’s the whole game.</p><p><strong>Your languages “just build.”</strong> Default setup shines on interpreted and auto-buildable languages — JavaScript/TypeScript, Python, Ruby, Go, C#, Java/Kotlin (in most cases), and Swift. If CodeQL can analyze your code without a custom build, default setup handles it cleanly.</p><p><strong>You want low maintenance.</strong> There’s no workflow file to drift out of date, no Actions version to bump, no YAML to review in every PR. GitHub updates the CodeQL engine and queries under the hood.</p><p><strong>You’re standardizing, not customizing.</strong> If your goal is “every repo gets a baseline scan and we see results in the Security tab,” default is exactly calibrated for that.</p><p><strong>Rule of thumb:</strong> If you’d struggle to explain <em>why</em> you need a custom workflow, you don’t. Start with default.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*EkmcWsE1YAhINl00bPXWWg.png" /></figure><h3>Go with Advanced Setup when…</h3><p><strong>Your project needs a custom build.</strong> This is the classic forcing function. Compiled languages like <strong>C/C++</strong>, and C#/Java projects with non-standard build steps, often can’t be auto-built. If CodeQL needs to watch a specific make, msbuild, Gradle, or Bazel invocation to see your code, you need advanced setup&#39;s manual build steps.</p><p><strong>You need to pin a specific JDK and build-tool version.</strong> This is a Java reality default setup can’t handle. Say your pom.xml only compiles cleanly on <strong>JDK 11</strong> with <strong>Maven 3.8.x</strong> — a newer JDK or Maven breaks the build, and if the build breaks, CodeQL sees no code and the scan is worthless. Default setup gives you no say over the toolchain; it uses whatever it picks. Advanced setup lets you pin the exact versions before you build, so CodeQL analyzes your code the same way your CI actually compiles it:</p><pre># Pin the toolchain so the pom.xml builds exactly as it does in CI<br>      - name: Set up JDK 11<br>        uses: actions/setup-java@v4<br>        with:<br>          distribution: &#39;temurin&#39;<br>          java-version: &#39;11&#39;      # match your project&#39;s required JDK</pre><pre>      - name: Set up Maven 3.8.8<br>        uses: stCarolas/setup-maven@v5<br>        with:<br>          maven-version: &#39;3.8.8&#39;  # match your project&#39;s required Maven</pre><pre>      - name: Build with Maven<br>        run: mvn -B clean compile  # CodeQL watches this to see your code</pre><p><strong>You need custom queries or query packs.</strong> Want to run your org’s own CodeQL queries, pull in community query packs, or tune which query suite runs (e.g. security-extended or security-and-quality)? That lives in the workflow config.</p><p><strong>You need control over triggers or scope.</strong> Scanning only certain paths, changing the schedule, running on specific branches, matrix builds across configurations, or gating merges on particular conditions — all advanced-setup territory.</p><p><strong>You’re integrating with a bigger pipeline.</strong> If code scanning has to run on self-hosted runners, inside a container, after a dependency install, alongside other security steps, or feed artifacts somewhere, you want the workflow in your hands.</p><p><strong>You’re uploading third-party SARIF.</strong> Bringing results from another scanner (a non-CodeQL SAST tool) into GitHub’s code scanning requires a workflow to upload the SARIF — default setup won’t do that.</p><h3>What advanced setup actually looks like</h3><p>Here’s a real-world codeql-analysis.yml that shows why teams reach for advanced setup — a custom build, an extended query suite, and controlled triggers:</p><pre># For most projects, this workflow file will not need changing; you simply need<br># to commit it to your repository.<br>#<br># You may wish to alter this file to override the set of languages analyzed,<br># or to provide custom queries or build logic.<br>#<br># ******** NOTE ********<br># We have attempted to detect the languages in your repository. Please check<br># the `language` matrix defined below to confirm you have the correct set of<br># supported CodeQL languages.<br>#<br>name: &quot;CodeQL Advanced&quot;</pre><pre>on:<br>  push:<br>    branches: [ &quot;master&quot; ]<br>  pull_request:<br>    branches: [ &quot;master&quot; ]<br>  schedule:<br>    - cron: &#39;27 23 * * 6&#39;</pre><pre>jobs:<br>  analyze:<br>    name: Analyze (${{ matrix.language }})<br>    # Runner size impacts CodeQL analysis time. To learn more, please see:<br>    #   - <a href="https://gh.io/recommended-hardware-resources-for-running-codeql">https://gh.io/recommended-hardware-resources-for-running-codeql</a><br>    #   - <a href="https://gh.io/supported-runners-and-hardware-resources">https://gh.io/supported-runners-and-hardware-resources</a><br>    #   - <a href="https://gh.io/using-larger-runners">https://gh.io/using-larger-runners</a> (GitHub.com only)<br>    # Consider using larger runners or machines with greater resources for possible analysis time improvements.<br>    runs-on: ${{ (matrix.language == &#39;swift&#39; &amp;&amp; &#39;macos-latest&#39;) || &#39;ubuntu-latest&#39; }}<br>    permissions:<br>      # required for all workflows<br>      security-events: write</pre><pre># required to fetch internal or private CodeQL packs<br>      packages: read</pre><pre># only required for workflows in private repositories<br>      actions: read<br>      contents: read</pre><pre>strategy:<br>      fail-fast: false<br>      matrix:<br>        include:<br>        - language: actions<br>          build-mode: none<br>        - language: python<br>          build-mode: none<br>        # CodeQL supports the following values keywords for &#39;language&#39;: &#39;actions&#39;, &#39;c-cpp&#39;, &#39;csharp&#39;, &#39;go&#39;, &#39;java-kotlin&#39;, &#39;javascript-typescript&#39;, &#39;python&#39;, &#39;ruby&#39;, &#39;rust&#39;, &#39;swift&#39;<br>        # Use `c-cpp` to analyze code written in C, C++ or both<br>        # Use &#39;java-kotlin&#39; to analyze code written in Java, Kotlin or both<br>        # Use &#39;javascript-typescript&#39; to analyze code written in JavaScript, TypeScript or both<br>        # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,<br>        # see <a href="https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning">https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning</a>.<br>        # If you are analyzing a compiled language, you can modify the &#39;build-mode&#39; for that language to customize how<br>        # your codebase is analyzed, see <a href="https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages">https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages</a><br>    steps:<br>    - name: Checkout repository<br>      uses: actions/checkout@v7</pre><pre># Add any setup steps before running the `github/codeql-action/init` action.<br>    # This includes steps like installing compilers or runtimes (`actions/setup-node`<br>    # or others). This is typically only required for manual builds.<br>    # - name: Setup runtime (example)<br>    #   uses: actions/setup-example@v1</pre><pre># Initializes the CodeQL tools for scanning.<br>    - name: Initialize CodeQL<br>      uses: github/codeql-action/init@v4<br>      with:<br>        languages: ${{ matrix.language }}<br>        build-mode: ${{ matrix.build-mode }}<br>        # If you wish to specify custom queries, you can do so here or in a config file.<br>        # By default, queries listed here will override any specified in a config file.<br>        # Prefix the list here with &quot;+&quot; to use these queries and those in the config file.</pre><pre># For more details on CodeQL&#39;s query packs, refer to: <a href="https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs">https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs</a><br>        # queries: security-extended,security-and-quality</pre><pre># If the analyze step fails for one of the languages you are analyzing with<br>    # &quot;We were unable to automatically build your code&quot;, modify the matrix above<br>    # to set the build mode to &quot;manual&quot; for that language. Then modify this step<br>    # to build your code.<br>    # ℹ️ Command-line programs to run using the OS shell.<br>    # 📚 See <a href="https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun">https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun</a><br>    - name: Run manual build steps<br>      if: matrix.build-mode == &#39;manual&#39;<br>      shell: bash<br>      run: |<br>        echo &#39;If you are using a &quot;manual&quot; build mode for one or more of the&#39; \<br>          &#39;languages you are analyzing, replace this with the commands to build&#39; \<br>          &#39;your code, for example:&#39;<br>        echo &#39;  make bootstrap&#39;<br>        echo &#39;  make release&#39;<br>        exit 1</pre><pre>- name: Perform CodeQL Analysis<br>      uses: github/codeql-action/analyze@v4<br>      with:<br>        category: &quot;/language:${{matrix.language}}&quot;</pre><p>The three things default setup <em>can’t</em> give you are all visible here: the <strong>matrix build</strong>, the <strong>queries: security-extended</strong> suite (and the commented packs: line for custom queries), and the <strong>manual Gradle build step</strong> that lets CodeQL see compiled code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mTu-QFB1I1lq48m6SJlsdQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e3AR7UxZC3LkVuT0MPMxAA.png" /></figure><h3>A simple decision flow</h3><ol><li><strong>Is your language auto-buildable and standard?</strong> → Lean default.</li><li><strong>Do you need a custom build, custom queries, custom triggers, or third-party SARIF?</strong> → Advanced.</li><li><strong>Are you rolling out to many repos at once?</strong> → Default (org-level), then selectively move the repos that need more to advanced.</li><li><strong>Still unsure?</strong> → Start with default. It’s reversible.</li></ol><h3>The part people miss: you can switch</h3><p>Default setup isn’t a one-way door. If a repo outgrows it, you can <strong>switch from default to advanced</strong> — GitHub will generate the workflow file for you as a starting point. The reverse works too: if an advanced workflow has become more maintenance than it’s worth, you can fall back to default.</p><p>Critically, <strong>a repo can only use one at a time.</strong> Enabling default setup on a repo that already has a CodeQL workflow will disable that workflow (and vice versa). So the real-world pattern for most orgs is:</p><blockquote><strong><em>Default everywhere as the baseline. Advanced for the handful of repos that genuinely need it.</em></strong></blockquote><p>That gives you broad coverage cheaply, and surgical control where it matters — without paying the maintenance tax on repos that were fine with the defaults.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PFgBAhG_ZqrrMd7HfxYQHw.png" /></figure><ul><li><strong>Default setup</strong> = managed, one-click, scales org-wide, zero maintenance. Best for standard projects and broad rollout.</li><li><strong>Advanced setup</strong> = a workflow you own. Best for custom builds, custom queries, special triggers, pipeline integration, and third-party SARIF.</li><li><strong>Start with default. Escalate to advanced per-repo when a concrete need appears.</strong> It’s a reversible choice, so don’t overthink the first move.</li></ul><p><em>Have you standardized on default setup, or does your org live in advanced-setup land? I’d love to hear what tipped the decision — drop a comment.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c27fe3a04a9e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/javarevisited/ghas-default-vs-advanced-the-2-minute-decision-c27fe3a04a9e">GHAS Default vs. Advanced: The 2-Minute Decision</a> was originally published in <a href="https://medium.com/javarevisited">Javarevisited</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Commit to Production: What a Secure-by-Design Delivery Pipeline Actually Looks Like]]></title>
            <link>https://medium.com/javarevisited/from-commit-to-production-what-a-secure-by-design-delivery-pipeline-actually-looks-like-bd6bf52efd4d?source=rss-8d10ea2e0567------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd6bf52efd4d</guid>
            <category><![CDATA[agh]]></category>
            <category><![CDATA[letssailtogether]]></category>
            <category><![CDATA[application-security]]></category>
            <category><![CDATA[secure-by-design]]></category>
            <category><![CDATA[devsecops]]></category>
            <dc:creator><![CDATA[Chaskarshailesh]]></dc:creator>
            <pubDate>Sun, 01 Nov 2026 06:17:41 GMT</pubDate>
            <atom:updated>2026-11-01T06:17:41.196Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g6wzk-MRjoDYhNXU3UWWmA.png" /></figure><p>Plenty of teams agree security should “shift left.” Fewer can show you the pipeline that makes it real. The gap between the principle and the plumbing is where most security programs stall.</p><p>This post is about the plumbing. It walks a change from a developer’s keyboard all the way to production, stage by stage, and shows where security is wired into each step — not as a gate bolted on at the end, but as a series of checks the change simply can’t skip. Everything here is described generically, so you can map it onto your own stack and change-management process.</p><h3>The shape of the pipeline</h3><p>A mature delivery pipeline usually moves a change through four environments:</p><pre>BUILD &amp; SECURITY  →  QA  →  UAT  →  PRODUCTION</pre><p>Each boundary between environments is a promotion, and each promotion is gated. The key design idea: <strong>the same artifact is promoted across environments — it is never rebuilt.</strong> What you tested in QA is bit-for-bit what reaches production. Rebuilding per environment quietly reintroduces risk and destroys your provenance story.</p><p>Here is the same pipeline stage by stage — each gate and the evidence it produces, top to bottom:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q2CRhzbsA5IRpYZIsjIN9A.png" /></figure><p>Let’s walk the stages.</p><h3>Before the first commit: provisioning is a security event</h3><p>It’s tempting to think security starts at commit. It actually starts earlier — at provisioning.</p><p><strong>Infrastructure provisioning.</strong> New infrastructure shouldn’t be clicked into existence. A request is raised, reviewed, signed off, and then provisioned through infrastructure-as-code and automation. The security value is twofold: a human review happens <em>before</em> resources exist, and the actual creation is automated and repeatable rather than manual and ad hoc.</p><p><strong>Repository provisioning and access.</strong> Who can create a repository, and who can access it, is a governance decision. A good model enforces:</p><ul><li>Two-level approval for access (for example, a team lead <em>and</em> a manager).</li><li>Scoping rules — access within the same team/cluster is straightforward; access across trust boundaries is restricted or denied by default.</li><li>Elevated or “premium” repositories requiring higher approval.</li><li>Automated granting once approvals are in place, so the policy is enforced by the system, not remembered by a person.</li></ul><p>Getting provisioning right means every downstream stage inherits a clean, least-privilege foundation.</p><h3>Build &amp; Security: catch it at the source</h3><p><strong>Commit.</strong> The developer pushes a branch and opens a pull request. Pre-commit hooks and push protection stop secrets <em>before</em> they ever land in history — the cheapest possible place to catch them.</p><p><strong>CI + security scanning.</strong> On every pull request, the build runs a layered set of checks:</p><ul><li><strong>Automated static code analysis</strong> for code-level vulnerabilities.</li><li><strong>Secret scanning</strong> to catch credentials that slipped past push protection.</li><li><strong>Open-source dependency analysis</strong> for known-vulnerable and non-compliant third-party components.</li></ul><p>A critical finding fails the build. This is <em>fail securely</em> in action — the application vulnerability check must be green to progress. No green, no merge.</p><p><strong>Artifact creation and signing.</strong> Only signed-off images make it into the artifact repository. A build-image sign-off gates the upload, so you always know <em>what</em> you’re shipping and that it hasn’t been tampered with. A worthwhile addition most teams miss: an automated, scheduled cleanup of stale images. It’s partly hygiene and partly a real cost saving — artifact storage grows silently and forever if you let it.</p><p><strong>Architecture and change review (shift-left governance).</strong> A recurring review of architecture and upcoming changes — from a security and risk standpoint — happens <em>before</em> work is promoted toward QA. Catching an architectural risk at design time is dramatically cheaper than catching it at the production gate.</p><h3>QA: security rides with quality</h3><p><strong>Automated deployment to QA.</strong> Deployment is automated through reusable pipeline components. A critical control here: <strong>no direct access to the runtime environment.</strong> Nobody hand-deploys. Database access, where needed, goes through role-based access with just-in-time elevation rather than standing permissions.</p><p><strong>QA testing.</strong> Beyond functional and regression tests, this stage runs:</p><ul><li><strong>Dynamic testing against the running application</strong>, probing it the way an attacker would.</li><li><strong>Image vulnerability checks</strong> on what’s actually deployed.</li></ul><p>The QA sign-off produced here becomes a piece of evidence that later promotions depend on. Security testing isn’t a separate track — it rides along with quality assurance.</p><h3>Promotion gates: where governance gets real</h3><p>Promotion to higher environments (UAT, then production) is where a secure pipeline earns its keep. A well-designed promotion gate validates a bundle of evidence before anything moves:</p><ul><li><strong>QA sign-off</strong> — the change passed quality and security testing.</li><li><strong>Open-source / license approval</strong> — dependencies are vulnerability- and license-clean.</li><li><strong>System vulnerability assessment</strong> — the hosting environment is clean.</li><li><strong>Application vulnerability assessment</strong> — the code and APIs are clean.</li></ul><p>Only when that evidence is complete does an automated promotion run. The deploy itself is triggered by the <em>approved</em> change request — automation executes policy, humans approve risk. Those are two different jobs, and keeping them separate is the whole point.</p><p><strong>UAT sign-off.</strong> Business and QA validate against acceptance criteria, and the sign-off is recorded as evidence attached to the change. Evidence, not promises.</p><h3>The production gate: risk, exceptions, and change orders</h3><p>Production is where the strongest controls live.</p><p><strong>Change control board review.</strong> A cross-functional board reviews the change for risk and grants exceptions where genuinely needed. A quorum-based vote (for example, a minimum of three of five members approving) prevents any single person from waving a risky change through. This is <em>separation of duties</em> at the organizational level.</p><p><strong>Change order for new architecture or APIs.</strong> If a change introduces new architecture or a new public interface, it should trigger a heavier review requiring explicit approvals: security architecture sign-off, system and application vulnerability assessments, and configuration assessment when new infrastructure is involved. The scan reports are attached as evidence <em>before</em> the change order can progress — so the approval is backed by artifacts, not assertions.</p><p><strong>Change types matter.</strong> Not every change deserves the same ceremony. A good model distinguishes:</p><ul><li><strong>Standard</strong> changes — pre-approved, low-risk, and allowed to skip the heavyweight board.</li><li><strong>Normal</strong> changes — the full approval path.</li><li><strong>Emergency</strong> changes — an expedited path for genuine incidents, reviewed after the fact.</li></ul><p>Right-sizing the process to the risk is what keeps security from becoming the thing everyone routes around.</p><h3>Production and beyond: the job isn’t done at deploy</h3><p><strong>Automated production deployment.</strong> Same automated, no-direct-access model as the lower environments, driven by the approved change request. Same artifact, controlled rollout.</p><p><strong>Runtime monitoring.</strong> Deployment is the start of the security story, not the end:</p><ul><li><strong>System vulnerability assessment</strong> across the live fleet of clusters.</li><li><strong>Configuration / policy compliance assessment</strong> against hardening baselines.</li><li><strong>Aggregation and correlation</strong> of findings in a single, centralized view of security posture — and cross-referencing against public feeds of actively exploited vulnerabilities so you fix what’s actually being attacked first.</li></ul><p>Runtime is where new vulnerabilities in old code get discovered. A pipeline that stops caring at deploy is blind to most of its real-world risk window.</p><h3>What makes it “secure by design” and not just “a pipeline with scans”</h3><p>Three things distinguish a genuinely secure-by-design pipeline from one that just has some security tools bolted on:</p><ol><li><strong>The checks are unskippable.</strong> They’re required gates, not optional steps a busy team can click past. Fail securely is the default.</li><li><strong>Evidence is a by-product of the workflow.</strong> Sign-offs, scan reports, approvals, and audit trails accumulate automatically. Compliance becomes something you <em>have</em>, not something you <em>scramble to assemble</em>.</li><li><strong>Automation executes; humans approve.</strong> The pipeline runs the mechanics identically every time, while people make the risk decisions. No direct environment access, no manual deploys, no heroics.</li></ol><p>Map every stage against the functions a security program needs — prevent, detect, govern, protect, respond, measure — and you’ll find each one is exercised somewhere across the lifecycle. That full-grid coverage, enforced automatically, <em>is</em> secure by design.</p><h3>Where to start if you’re building this</h3><p>You don’t need the whole pipeline on day one:</p><ol><li>Make <strong>one</strong> security check a required merge gate — and actually enforce it.</li><li>Stop manual deploys to one environment; replace them with an automated, access-controlled pipeline.</li><li>Start attaching evidence (scan reports, sign-offs) to your change records, even manually, so the habit forms before you automate it.</li></ol><p>Each piece delivers value on its own, and together they compound into a pipeline where shipping securely is simply the only way to ship.</p><p><em>Curious how other teams structure their promotion gates and change-control boards — especially how you balance rigor against developer velocity. What’s working for you?</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd6bf52efd4d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/javarevisited/from-commit-to-production-what-a-secure-by-design-delivery-pipeline-actually-looks-like-bd6bf52efd4d">From Commit to Production: What a Secure-by-Design Delivery Pipeline Actually Looks Like</a> was originally published in <a href="https://medium.com/javarevisited">Javarevisited</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Secure by Design: Why Security Is How You Build, Not a Box You Check]]></title>
            <link>https://medium.com/javarevisited/secure-by-design-why-security-is-how-you-build-not-a-box-you-check-8d10693190c1?source=rss-8d10ea2e0567------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d10693190c1</guid>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[shiftleft]]></category>
            <category><![CDATA[shift-left-security]]></category>
            <category><![CDATA[secure-by-design]]></category>
            <category><![CDATA[letssailtogether]]></category>
            <dc:creator><![CDATA[Chaskarshailesh]]></dc:creator>
            <pubDate>Sun, 01 Nov 2026 06:17:39 GMT</pubDate>
            <atom:updated>2026-11-01T06:17:39.166Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V6jsTGJQ43hkNuqCbeD_-w.png" /></figure><p>For a long time, security was the last stop before a release. Code got written, features got tested, and then — somewhere near the finish line — a security review happened. If something turned up, everyone scrambled. If nothing turned up, we told ourselves the software was safe.</p><p>That model is quietly broken, and most teams already feel it. The fix isn’t a bigger review at the end. It’s moving security into the way software is designed and built from the first commit. That shift has a name: <strong>Secure by Design</strong>.</p><p>This post is a practical walk through what “secure by design” actually means day to day — the mindset, the principles behind it, where it lives across the lifecycle, and why it ends up being cheaper and faster, not slower.</p><h3>The mindset shift: bolt-on is dead</h3><p>The old approach treated security as a gate — a point-in-time checkpoint owned by one team, applied late, asking a single question: <em>“Can we ship?”</em> The problem is that by the time you ask that question, the expensive decisions are already made. A flaw found in production can cost orders of magnitude more to fix than the same flaw caught at commit, because now it’s tangled up with data, dependencies, and users.</p><p>Secure by design flips every part of that:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*YieyHN0m4xWta6mUvWdweg.png" /></figure><p>The goal isn’t to add more gates. It’s to make the secure path the <em>default</em> path — so that doing the right thing is also the easy thing.</p><h3>Eight principles that have held up for decades</h3><p>Most of what we call modern application security rests on a small set of design principles. They predate the cloud, predate DevOps, and still hold. Here they are in plain language.</p><p><strong>1. Least privilege — only what you need, nothing more.</strong> Every identity — human, service, pipeline, or workload — should run with the minimum access for the minimum time. Scoped tokens, short-lived credentials, and role-based access beat standing admin rights every time.</p><p><strong>2. Secure defaults — safe by default, risk by exception.</strong> Security features should be on unless someone deliberately turns them off, and turning them off should be a logged, visible exception — not quiet silence. TLS on. Deny by default. Push protection enabled.</p><p><strong>3. Defense in depth — no single point of trust.</strong> Overlapping layers — static analysis, secret scanning, dependency checks, container scanning, runtime monitoring — mean one failure is never fatal. No single control has to be perfect.</p><p><strong>4. Fail securely — when in doubt, block.</strong> On error or uncertainty, default to the safe state. A broken check should block the merge or deploy, not wave it through. “Fail open” is how silent gaps become incidents.</p><p><strong>5. Minimize attack surface — less to attack, less to defend.</strong> Every open port, dead endpoint, unused dependency, and embedded secret is attack surface. Keep a complete inventory of everything you ship, use minimal base images, and prune aggressively.</p><p><strong>6. Complete mediation — check everything, every time.</strong> Policy should be verified on every access and every change. No “trusted” path gets to skip the checks — nothing is assumed safe simply because of where it came from. This is that never-trust-by-default mindset applied to your own pipeline.</p><p><strong>7. Separation of duties — no one ships alone.</strong> The author is never the sole approver. Independent review and change approval are mandatory, enforced through required reviews and code ownership rules — not goodwill.</p><p><strong>8. Economy of mechanism — simple is secure.</strong> Simple, standardized designs are easier to secure and audit. Complexity is where bugs hide. Golden paths and reusable components beat bespoke one-offs.</p><p>If you only remember one thing: these aren’t a checklist you complete. They’re lenses you apply to every design decision.</p><h3>Security lives in every stage, not one</h3><p>Secure by design means security shows up in each phase of the delivery lifecycle — not as a bolt-on step, but woven into what’s already happening.</p><ul><li><strong>Plan</strong> — Design it secure. Threat modeling, security requirements, trust boundaries, and secure architecture decisions happen <em>before</em> code exists.</li><li><strong>Code</strong> — Stop problems at the keyboard. Secure coding standards, pre-commit hooks, push protection, and in-IDE feedback catch issues the moment they’re typed.</li><li><strong>Build</strong> — Scan before you merge. Automated code analysis, secret scanning, and open-source dependency checks run as merge gates, not afterthoughts.</li><li><strong>Test</strong> — Security rides with QA. Security tests sit alongside functional tests; testing against the running application happens where it’s relevant; findings get validated.</li><li><strong>Ship</strong> — Prove what you deploy. Signed artifacts, build provenance, and environment approvals make the deployment verifiable.</li><li><strong>Run</strong> — Watch it live. Continuous container and configuration assessment, correlation with public feeds of actively exploited vulnerabilities, and drift detection.</li><li><strong>Govern</strong> — Own the risk. Identity and access control, a risk and exception registry, audit trails, and dashboards that make posture visible.</li></ul><p>The point of listing all seven is simple: no single stage carries the whole burden. Each one does a slice, and together they close the gaps.</p><h3>A useful operating model: six pillars</h3><p>When you zoom out, a security program tends to organize around six repeating functions. They’re a handy way to check that you have full coverage rather than a pile of disconnected tools:</p><ul><li><strong>Prevent</strong> — stop issues at the source (secure coding, secure defaults).</li><li><strong>Detect</strong> — see everything (scanning across the lifecycle).</li><li><strong>Govern</strong> — own the risk (policy, approvals, exceptions).</li><li><strong>Protect</strong> — guard the gates (identity, access, environment controls).</li><li><strong>Respond</strong> — fix it fast (remediation, incident handling).</li><li><strong>Measure</strong> — prove it (metrics, dashboards, evidence).</li></ul><p>A healthy program exercises every pillar across every stage. If you map your controls to this grid and find an empty column, that’s your next investment.</p><h3>Why it actually wins: safer, cheaper, faster</h3><p>The business case for secure by design isn’t abstract:</p><ul><li><strong>Roughly 100× cheaper early.</strong> A flaw caught at commit costs a fraction of the same flaw caught in production. The earlier you catch it, the less context has been built on top of it.</li><li><strong>It scales to every repository.</strong> Automation enforces security everywhere, with no human bottleneck. A policy that lives in the pipeline applies to the thousandth repo exactly as it did to the first.</li><li><strong>Evidence, not promises.</strong> Scans, approvals, and audit trails make compliance a by-product of how you already work — not a separate, painful exercise at audit time.</li></ul><p>That last point matters more every year, because secure by design is no longer just good practice — it’s an expectation.</p><h3>It’s now a regulatory expectation</h3><p>Several frameworks now codify what secure by design means, and they increasingly show up in procurement and compliance conversations:</p><ul><li><strong>CISA Secure by Design</strong> — asks vendors to be secure out of the box, take ownership of customer security outcomes, and be transparent about vulnerabilities.</li><li><strong>NIST SSDF (SP 800–218)</strong> — the Secure Software Development Framework.</li><li><strong>OWASP SAMM / ASVS</strong> — maturity and verification standards for application security.</li><li><strong>SLSA</strong> — supply-chain integrity levels for build provenance.</li><li><strong>ISO/IEC 27034</strong> — application security management.</li></ul><p>You don’t have to adopt all of them at once. But knowing they exist — and that they broadly agree with each other — gives you a map and a shared vocabulary.</p><h3>Where to start</h3><p>If this all feels like a lot, start small and let it compound:</p><ol><li>Turn on secure defaults you already have — secret scanning, push protection, dependency alerts. Zero code changes, immediate value.</li><li>Make one meaningful check a required merge gate. Just one, enforced for real.</li><li>Pick a single principle — least privilege is a good one — and apply it to your most sensitive system this quarter.</li></ol><p>Secure by design isn’t a project with an end date. It’s a direction. Every commit, every pipeline, every deploy nudged a little more toward <em>secure by default</em> — until “is it secure?” stops being a question you ask at the end, because the answer is already yes.</p><p><em>If you’re building or maturing a DevSecOps practice, I’d love to hear which of these principles your team found hardest to operationalize — and what finally made it stick.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d10693190c1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/javarevisited/secure-by-design-why-security-is-how-you-build-not-a-box-you-check-8d10693190c1">Secure by Design: Why Security Is How You Build, Not a Box You Check</a> was originally published in <a href="https://medium.com/javarevisited">Javarevisited</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ GitHub Actions: The DevSecOps Backbone for Azure Cloud]]></title>
            <link>https://medium.com/javarevisited/github-actions-the-devsecops-backbone-for-azure-cloud-22566c61f4f0?source=rss-8d10ea2e0567------2</link>
            <guid isPermaLink="false">https://medium.com/p/22566c61f4f0</guid>
            <category><![CDATA[azure-cloud]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[letssailtogether]]></category>
            <category><![CDATA[github-actions]]></category>
            <dc:creator><![CDATA[Chaskarshailesh]]></dc:creator>
            <pubDate>Sat, 05 Sep 2026 17:03:23 GMT</pubDate>
            <atom:updated>2026-09-06T15:58:16.060Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Automating your deployment secures the safest 20% of production changes. Here’s how to bring the other 80% — migrations, data fixes, and investigations — into the pipeline too.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mt6lHoTAvnOSRmxis3dEfg.png" /></figure><p>Most teams ship code through a clean pipeline: tests on every pull request, approvals before production, full traceability back to a commit.</p><p>Then a batch job misfires on a Tuesday evening, someone opens SSMS with a shared admin login, and fixes 4,000 rows by hand. No review. No record. No evidence for the auditor.</p><p>That’s the real DevSecOps gap — not the build, but everything after it. Here’s how GitHub Actions closes it on Azure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3etq8W8DGozj82fYrAetLA.png" /></figure><p><em>The deploy was already the safest change you make. Everything in the dashed box is riskier, touches data rather than code, and runs outside every control the team built.</em></p><h3>🚀 Across the SDLC</h3><ul><li>Continuous Integration — build, test, and lint on every commit</li><li>Continuous Delivery — deploy to App Service or AKS behind an approval</li><li>Security Gates — dependency and IaC checks that <em>block</em> merges, not just report</li><li>Feedback Loops — Azure Monitor and Defender for runtime visibility</li></ul><pre>on: [pull_request]<br><br>permissions:<br>  contents: read<br>jobs:<br>  build-test:<br>    runs-on: ubuntu-latest<br>    steps:<br>      - uses: actions/checkout@v5<br>      - name: Unit tests<br>        run: dotnet test<br>      - name: Fail on vulnerable packages<br>        run: dotnet list package --vulnerable --include-transitive<br>      - name: Validate infrastructure<br>        uses: bridgecrewio/checkov-action@v12<br>        with:<br>          directory: infra/<br>          soft_fail: false      # a check that can&#39;t fail <br>                                # the build is a dashboard</pre><h3>🧪 Testing &amp; Regression Suites</h3><ul><li>Unit tests on every push</li><li>Integration tests against an ephemeral Azure SQL database, created and destroyed per run</li><li>Regression suite on a nightly schedule to catch drift</li><li>Parallel shards to keep the cycle time short</li></ul><pre>on:<br>  schedule:<br>    - cron: &quot;0 18 * * *&quot;<br>  workflow_dispatch:          # always allow a manual run<br><br>jobs:<br>  regression:<br>    runs-on: ubuntu-latest<br>    strategy:<br>      fail-fast: false        # don&#39;t let one bad shard hide the rest<br>      matrix:<br>        shard: [1, 2, 3, 4]<br>    steps:<br>      - uses: actions/checkout@v5<br>      - run: npm run test:regression -- --shard=${{ matrix.shard }}/4</pre><h3>🗄 Database Change Management</h3><p>Databases are the riskiest part of any deployment, so this is where the pipeline earns its keep.</p><ul><li>Schema in Git — every change diffable, reviewable, replayable</li><li>Separate approval — schema changes get their own environment and their own approver, usually a DBA</li><li>A restore point first — take a copy before you migrate</li><li>Expand and contract — add and backfill in one release, drop in a later one</li></ul><pre>jobs:<br>  migrate:<br>    runs-on: ubuntu-latest<br>    environment: production-database    # separate approval from app deploys<br>    steps:<br>      - uses: actions/checkout@v5<br>      - name: Show pending migrations<br>        run: flyway info<br>      - name: Take a pre-migration copy<br>        run: |<br>          az sql db copy -g rg-orders-prod -s sql-orders-prod \<br>            -n orders --dest-name &quot;orders-pre-${{ github.run_id }}&quot;<br>      - name: Apply<br>        run: flyway migrate</pre><blockquote><em>⚠️ A common snippet to avoid: </em><em>flyway undo on failure. Undo is a paid Flyway feature — on the free edition it fails with a licensing error at exactly the wrong moment. And rolling back a half-applied migration rarely recovers the data anyway. Take a copy first, or use Liquibase, whose open-source edition does support rollback.</em></blockquote><h3>🔧 Data Fixes &amp; Investigations</h3><p>The Tuesday-evening scenario. Make the fix a workflow, and it gets a reviewer, a dry run, and a permanent record — without slowing anything down.</p><ul><li>Dry-run by default — run the real script inside a transaction that always rolls back, so the row count is true</li><li>Approval to apply — mutations route to an environment with required reviewers</li><li>Evidence retained — the ticket, the script, the output, the approver, kept on the run</li><li>Read-only for investigations — a db_datareader identity, returning counts rather than rows</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2GkmrQGZOM__DrMv_Bscuw.png" /></figure><p><em>The same file runs in both lanes. Only the wrapper and the environment change — which is what makes the dry-run row count worth trusting.</em></p><pre>on:<br>  workflow_dispatch:<br>    inputs:<br>      ticket: { description: &#39;Ticket reference&#39;, required: true }<br>      mode:<br>        type: choice<br>        options: [dry-run, apply]<br>        default: dry-run<br>jobs:<br>  datafix:<br>    runs-on: ubuntu-latest<br>    environment: ${{ inputs.mode == &#39;apply&#39; &amp;&amp; &#39;production-data&#39; || &#39;production-readonly&#39; }}<br>    steps:<br>      - uses: actions/checkout@v5<br>      - name: Execute<br>        run: |<br>          if [ &quot;${{ inputs.mode }}&quot; = &quot;dry-run&quot; ]; then<br>            { echo &quot;BEGIN TRANSACTION;&quot;; cat fix.sql; echo &quot;ROLLBACK;&quot;; } &gt; run.sql<br>          else<br>            cp fix.sql run.sql<br>          fi<br>          sqlcmd -S sql-orders-prod.database.windows.net -d orders \<br>                 -G -b -i run.sql | tee result.log<br>      - uses: actions/upload-artifact@v4<br>        if: always()<br>        with:<br>          name: datafix-${{ inputs.ticket }}<br>          path: result.log</pre><blockquote><em>⚠️ Don’t drop the </em><em>-b flag. Without it </em><em>sqlcmd exits 0 on SQL errors and your workflow goes green over a failed fix. And never </em><em>SELECT * production data into a log — return counts, not customer records.</em></blockquote><h3>🔑 No Stored Credentials, Anywhere</h3><p>Notice what’s missing from every example above: a connection string.</p><p>GitHub Actions requests a short-lived OIDC token, Entra ID validates it, and Azure issues access. Nothing is stored, so nothing can leak.</p><pre>permissions:<br>  contents: read<br>  id-token: write<br>steps:<br>  - uses: azure/login@v2<br>    with:<br>      client-id: ${{ vars.AZURE_CLIENT_ID }}<br>      tenant-id: ${{ vars.AZURE_TENANT_ID }}<br>      subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}</pre><p>Scope the federated credential to repo:org/repo:environment:production, not to a branch. Then the token is only issued <em>after</em> the environment&#39;s approval — the gate sits on the critical path of authentication, not beside it.</p><p><em>Branch-scoped, any run on </em><em>main can mint the token. Environment-scoped, only an approved one can.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4AER5C4tpiT-Ug5LcEiGpg.png" /></figure><h3>📊 The Modernization Timeline</h3><p>Stage 1 — Legacy. Manual deploys, schema changes emailed as .sql files, fixes run from laptops. <em>You&#39;re here if nobody can tell you what ran against production last Tuesday.</em></p><p>Stage 2 — Transition. CI/CD is automated, but Day 2 is still manual. This stage looks finished from the outside, which is why teams stay in it for years. <em>You’re here if your deploy is automated and your last data fix wasn’t.</em></p><p>Stage 3 — Modern DevSecOps. Every action — deploy, migrate, fix, investigate — is a workflow run with federated identity, an approval, and a retained artifact. <em>You’re here if “show me every production change in March and who authorized it” takes ten minutes and no phone calls.</em></p><p><em>Stage 2 is the comfortable one. It passes a demo, and it fails an audit.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*raCVMyn9Di5qsY2ieMpXHg.png" /></figure><h3>✨ Conclusion</h3><p>GitHub Actions is usually sold as CI/CD, and CI/CD is the least interesting thing it does.</p><p>Its real value on Azure is being the single place where <em>everything</em> that touches production happens — with an identity that expires, a reviewer who approved, a script that was diffed, and a record that persists.</p><blockquote><em>The build pipeline was never the risky part. The risky part is the 11 p.m. </em><em>UPDATE that nobody will remember running.</em></blockquote><p>Pick the most dangerous thing your team still does by hand against production, and move that one into a workflow this month.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22566c61f4f0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/javarevisited/github-actions-the-devsecops-backbone-for-azure-cloud-22566c61f4f0">🔐 GitHub Actions: The DevSecOps Backbone for Azure Cloud</a> was originally published in <a href="https://medium.com/javarevisited">Javarevisited</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ From Jump Box to AVD: The Week Our Migration Broke]]></title>
            <link>https://medium.com/javarevisited/from-jump-box-to-avd-the-week-our-migration-broke-eeca1c4f2d09?source=rss-8d10ea2e0567------2</link>
            <guid isPermaLink="false">https://medium.com/p/eeca1c4f2d09</guid>
            <category><![CDATA[avd]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[azure-avd]]></category>
            <category><![CDATA[azure-virtual-desktop]]></category>
            <category><![CDATA[letssailtogether]]></category>
            <dc:creator><![CDATA[Chaskarshailesh]]></dc:creator>
            <pubDate>Tue, 01 Sep 2026 15:21:59 GMT</pubDate>
            <atom:updated>2026-09-05T17:05:13.288Z</atom:updated>
            <content:encoded><![CDATA[<p><em>We retired the jump box in a month. Then our first architecture failed at 9 a.m. on a Tuesday, in front of everyone.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FTIeqOqMnLmsZFywdfAP3Q.png" /></figure><p><em>What follows is a composite, drawn from real migrations across regulated multi-tenant platforms. The failures are real. The company name isn’t.</em></p><h3>🏢 Chapter 1: The Jump Box That Worked</h3><p>At Letssailtogether, mornings began with a ritual that felt safe.</p><p>Developers, DBAs, and production operations logged into one Windows jump box using local accounts. From that single console they reached Dev, QA, Stage, UAT, and Prod. Scripts lived on the desktop, right where you needed them. Passwords were shared in chat threads. A data fix took four minutes, start to finish.</p><p>Nobody was being careless. The jump box was genuinely <em>fast</em> — and that’s the part worth sitting with, because it’s why it survived five years of good intentions to replace it. Every proposal to change it ran into the same unanswerable question: <strong>“Faster than four minutes?”</strong></p><h3>⚠️ Chapter 2: The Fragility Underneath</h3><p>Four minutes buys a lot of forgiveness. Here’s what it was hiding:</p><ul><li><strong>No governance.</strong> Anyone with access could run anything against production.</li><li><strong>No audit trail.</strong> Changes weren’t versioned, reviewed, or attributable to a person.</li><li><strong>Security gaps.</strong> Connection strings and credentials sat in unmanaged scripts on a shared disk.</li><li><strong>No toll gates.</strong> Nothing stood between an idea and a production change.</li></ul><p>The failure mode of a jump box isn’t that something goes wrong. Things go wrong everywhere. It’s that <strong>when something goes wrong, nobody can reconstruct what happened</strong> — and across 51 Azure environments and 10 on-premises ones, “we think it was Ravi, last Tuesday, probably” is not an incident report.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qGMiPrY2wKD3C1aAodz6JA.png" /></figure><h3>🔄 Chapter 3: The Decision Nobody Liked</h3><p>The proposal was Azure Virtual Desktop, with identity through Microsoft Entra ID and scripts moved into GitHub.</p><blockquote><em>“We’ve always used jump boxes.” “Will this slow us down?” “What if we lose control?”</em></blockquote><p>None of those objections were really technical. Each one was the same objection wearing a different hat: <em>change means giving up manual control and trusting a system instead.</em></p><p>We didn’t argue anyone out of it. We ran a pilot with three teams and let the results do the talking.</p><p>For two weeks, it looked like a clean win.</p><h3>💥 Chapter 4: The Week It Broke</h3><p>Then we put the CI/CD runners on the AVD session hosts.</p><p>It seemed elegant at the time. The session hosts were already inside the network, already domain-joined, already governed. Why stand up separate infrastructure when the compute was right there?</p><p>Tuesday, 9:04 a.m. Everyone logged in for the day, and the pipeline queue stopped moving.</p><p>Three things went wrong at once, and they compounded:</p><p><strong>The runners vanished on reimage.</strong> Pooled session hosts recycle. Every reset wiped the runner registration, so the fleet quietly shrank through the day and nobody noticed until it hit zero.</p><p><strong>Pipeline capacity was tied to desktop sessions.</strong> At peak login, session hosts were busy being desktops. Builds queued behind people opening Outlook. Our CI throughput now depended on how many humans happened to be awake.</p><p><strong>The blast radius went the wrong direction.</strong> A runner executes arbitrary repository code. Putting that on the same host where an engineer has an interactive session means a compromised workflow and a human desktop share an OS. We had built the jump box again, with extra steps.</p><p>The fix took a day and the lesson took longer:</p><blockquote><strong><em>AVD is where humans work. The runner is where scripts execute. Never the same box.</em></strong></blockquote><p>Runners moved to dedicated VMs and an AKS pool inside the same VNet — private, no public exposure, scaled to pipeline demand rather than headcount. Session hosts went back to being desktops.</p><p>That separation <em>is</em> the governance story. Everything else is detail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oRcXAAxdJDtt2bqyW8IOTA@2x.png" /></figure><h3>🚪 Chapter 5: The Toll Gate Someone Bypassed</h3><p>Six weeks later, a P1 at 2 a.m. A production data fix needed to run, and the approval gate wanted a reviewer who was asleep.</p><p>The on-call engineer used a break-glass account and ran it by hand.</p><p>The instinct in the postmortem was to tighten the gate. That instinct is wrong, and it’s worth naming why: <strong>a control with no emergency path doesn’t get respected in an emergency — it gets bypassed permanently.</strong> Once someone proves the gate is optional, it’s optional for everyone.</p><p>So we built the emergency path <em>into</em> the system instead. A documented break-glass workflow, self-service, no approver required — that automatically opens an incident, notifies the security channel, and forces a review within 24 hours. Using it is legitimate. Using it invisibly is not.</p><p>Bypasses went to zero, because there was nothing left to bypass.</p><h3>🔑 Chapter 6: Three Layers of Authority</h3><p>The most expensive misconception in the whole migration was assuming “Entra ID RBAC” was one gate that covered everything.</p><p>It isn’t. There are three, and they answer different questions:</p><p><strong>Conditional Access — <em>can you sign in at all?</em></strong> Device compliance, location, MFA, risk level. This is the outermost gate.</p><p><strong>Azure RBAC — <em>can you reach the AVD resources?</em></strong> The host pool, the application group, the session itself. The Desktop Virtualization User role lives here.</p><p><strong>Directory groups and database permissions — <em>what can you do once you’re inside?</em></strong> This is the one teams forget. Azure RBAC has no opinion whatsoever about whether your Windows account can drop a table.</p><p>We found this the way most teams do: an engineer with correctly scoped Azure RBAC discovered they still had db_owner on a production database, inherited from an AD group nobody had reviewed since 2021. RBAC was perfect. The gap was one layer down, exactly where everyone assumed they were already covered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wb3qkEbqlqg14yWNDlAjJg@2x.png" /></figure><h3>💾 Chapter 7: Stateless by Design</h3><p>The hardest idea to sell was non-persistent desktops.</p><blockquote><em>“Why would I lose my work every time it reboots?”</em></blockquote><p>Fair question — and it has a real answer that too many rollouts skip. <strong>You don’t lose your profile. You lose machine state.</strong> FSLogix profile containers keep the user profile on a file share and attach it at sign-in, so settings and personalization follow you to whichever pooled host you land on.</p><p>What doesn’t survive a reimage is exactly what shouldn’t: the half-finished script on the desktop, the manually installed tool nobody documented, the config change someone made in a hurry in 2022 that three pipelines now silently depend on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qN3F5jos7vv_A-gZI-lxYQ@2x.png" /></figure><p>The trade: malware and misconfiguration get a short shelf life, every session starts from a known-good image, and there are no sprawling per-user disks to pay for.</p><p>Non-persistence isn’t a limitation. It’s the forcing function: <strong>if it matters, it’s in Git.</strong></p><h3>🧩 Chapter 8: What Each Team Had to Learn</h3><p>Transformation is a people problem wearing a technology costume.</p><p><strong>Development</strong> — GitHub Actions and YAML pipelines, and how Entra ID authentication actually works. → Automated builds and deployments with identity-based access.</p><p><strong>Quality Automation</strong> — CI/CD test automation, self-hosted runners, containerized test environments. → Governed test execution that can’t stray into production.</p><p><strong>Database</strong> — Infrastructure as Code with Terraform, and change-management toll gates for schema work. → Data fixes that go through review instead of SSMS.</p><p><strong>Production Operations</strong> — Azure Monitor, Azure Policy, GitHub audit logs, incident automation. → Compliance evidence generated by default rather than assembled before an audit.</p><p><strong>Security &amp; Compliance</strong> — Conditional Access and Privileged Identity Management for time-bound elevation. → Least privilege that holds without slowing anyone down.</p><p>Five teams, one shared vocabulary. That last part mattered more than any individual skill.</p><h3>📊 Chapter 9: What Actually Changed</h3><p>Not adjectives. Numbers.</p><ul><li><strong>~90% fewer manual access requests.</strong> Removing standing credentials meant access became a policy outcome, not a ticket.</li><li><strong>Entra ID risk fell from 88% to 12%</strong>, as part of a broader identity governance and Well-Architected security review.</li><li><strong>51 Azure and 10 on-premises environments</strong> brought under one access model, where each had previously been reachable from a single unaudited console.</li><li><strong>A data fix still takes about four minutes</strong> of human attention. It just now includes a reviewer, a dry run, and a permanent record.</li></ul><p>That last one is the answer to the question that had blocked this for five years. The honest version isn’t “we got faster.” It’s: <strong>we kept the speed and bought back the evidence.</strong></p><h3>✨ Epilogue</h3><p>Technology moves fast. Mindsets don’t.</p><p>The migration didn’t succeed because AVD is good software. It succeeded because two failures happened early enough to be survivable — a runner architecture that collapsed at 9 a.m., and a toll gate that got bypassed at 2 a.m. Both taught us more than the plan did.</p><blockquote><em>A jump box was yesterday’s bridge. AVD with Entra ID and governed pipelines is today’s highway — secure, scalable, and built for what comes next.</em></blockquote><h3>💬 Your Turn</h3><p>If your organization still runs on local accounts and a shared jump box, start with one question:</p><p><strong>Can you name every script that ran against production last month, and who approved each one?</strong></p><p>If that takes more than a minute, you already know where to begin.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eeca1c4f2d09" width="1" height="1" alt=""><hr><p><a href="https://medium.com/javarevisited/from-jump-box-to-avd-the-week-our-migration-broke-eeca1c4f2d09">🌟 From Jump Box to AVD: The Week Our Migration Broke</a> was originally published in <a href="https://medium.com/javarevisited">Javarevisited</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[One Pipeline, Three Roles: Operationalizing GHAS Secret Scanning]]></title>
            <link>https://medium.com/javarevisited/one-pipeline-three-roles-operationalizing-ghas-secret-scanning-97d63bb1ba25?source=rss-8d10ea2e0567------2</link>
            <guid isPermaLink="false">https://medium.com/p/97d63bb1ba25</guid>
            <category><![CDATA[agh]]></category>
            <category><![CDATA[github-advanced-security]]></category>
            <category><![CDATA[letssailtogether]]></category>
            <category><![CDATA[github-secret-scanning]]></category>
            <category><![CDATA[devsecops]]></category>
            <dc:creator><![CDATA[Chaskarshailesh]]></dc:creator>
            <pubDate>Fri, 28 Aug 2026 15:32:23 GMT</pubDate>
            <atom:updated>2026-08-28T15:32:23.545Z</atom:updated>
            <content:encoded><![CDATA[<h3>Part 2 of 3 — Making dev, SecOps, and the build pipeline work as a single DevSecOps unit</h3><p><em>How a single GHAS alert becomes a local fix, an ITIL incident, and a failed build — instead of a dashboard nobody checks.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5uGKLjrnxmnxoxWgPYvd_w@2x.png" /></figure><blockquote><em>GHAS Secret Scanning for DevSecOps — a 3-part series Part 2: One Pipeline, Three Roles ← you are here </em><a href="https://medium.com/@chaskarshailesh/from-detection-to-remediation-ghas-secret-scanning-for-devsecops-0100dfb76a2f"><em>Part 1: Detection &amp; Remediation</em></a><em> · </em><a href="https://medium.com/@chaskarshailesh/cleaning-up-github-commit-history-a-devsecops-engineers-guide-e6a9691f2fa8"><em>Part 3: Cleaning Commit History</em></a></blockquote><h3>Where Part 1 left off</h3><p><a href="#">Part 1</a> covered the mechanics: why a committed credential is a key sitting in a lock, how GHAS secret scanning detects one across pattern matching, partner validation, and custom regex — and the six-step fix prompt a DevSecOps engineer runs when an alert fires: revoke, rotate, update secret managers, clean history, document, re-scan.</p><p>That’s the individual response. It works, and it’s necessary. But it also depends entirely on someone noticing the alert and knowing the runbook — which means your security posture is a function of who happens to be paying attention on a given Tuesday.</p><p>DevSecOps only works when detection, triage, and enforcement live in the same pipeline instead of three disconnected tools. A GHAS alert should mean something concrete and immediate to whoever is closest to it — the developer at the keyboard, the SecOps engineer on call, and the pipeline itself. Here’s what that looks like for each.</p><h3>Role 1 — Developer: fix it before it leaves your laptop</h3><p>Say a developer commits appsettings.Development.json with a live Azure Service Bus connection string still in it, and pushes. Push protection catches it at the gate, before the object ever reaches main:</p><pre>remote: error: GH013: Repository rule violations found<br>remote: —— Azure Service Bus Connection String ——<br>remote:   locations:<br>remote:     - commit: 8f3a1c2<br>remote:       path: appsettings.Development.json:14<br>remote:<br>remote: To push, remove the secret from the commit(s), or<br>remote: request a bypass with a reason at the link below.<br>remote: https://github.com/myco/payments-api/security/secret-scanning/unblock-secret/…</pre><p><em>What a developer sees in the terminal when push protection blocks the push.</em></p><p>The instinct here is to delete the line and push again — which doesn’t work, because the secret is still in the commit object. The fix has to pull it out of the commit, not just out of the working file:</p><pre>git reset --soft HEAD~1</pre><pre># replace the live value with a placeholder<br>sed -i &#39;s#Endpoint=sb://.*#Endpoint=&lt;set-via-user-secrets&gt;#&#39; \<br>  appsettings.Development.json</pre><pre>git add appsettings.Development.json<br>git commit -m &quot;Remove hardcoded Service Bus connection string&quot;<br>git push</pre><pre># keep the real value out of the repo entirely<br>dotnet user-secrets set &quot;ServiceBus:ConnectionString&quot; &quot;&lt;value&gt;&quot;</pre><p><em>Amend the commit, not just the working copy — then move the real value to local user-secrets or a Key Vault reference.</em></p><p>Two things make this work as a developer experience rather than a blocker:</p><ul><li>The feedback is immediate and local. No ticket, no waiting on a security review — the developer fixes it in under a minute, at the moment they still have full context on what they were doing.</li><li>The bypass is deliberate. Push protection offers an unblock link, but it requires a written reason and notifies the security team. Bypassing is possible, auditable, and slightly uncomfortable — exactly the right friction.</li></ul><p>One important limit: if the secret already reached a shared branch before scanning was enabled, push protection won’t see it retroactively. That’s what the six-step fix prompt from Part 1 is for — revoke, rotate, update, clean history, re-scan.</p><h3>Role 2 — SecOps: route every alert through an ITIL-aligned process</h3><p>A GHAS alert shouldn’t depend on someone remembering to check a dashboard. Wire the webhook straight into your incident tooling — ServiceNow, Jira Service Management, whatever runs your queue — so every alert opens a ticket the moment it’s created, pre-tagged with secret type, repository visibility, and environment.</p><p>The prioritization question — <em>how fast does someone have to care?</em> — should be answered by a lookup, not a judgment call:</p><p>P1 · Critical — respond in 15 minutes, contain within 1 hour Production credential in a public repository, still active at the provider.</p><p>P2 · High — respond in 1 hour, contain within 4 hours Production credential in a private repository, still active at the provider.</p><p>P3 · Moderate — respond in 4 hours, contain within 1 business day Non-production or test credential in a private repository.</p><p>P4 · Low — respond next business day, then confirm and close Auto-revoked by partner scanning before triage even began.</p><p>Underneath the matrix, the ticket moves through a standard ITIL incident lifecycle — the stages are familiar, but each one gets a security-specific exit criterion:</p><ol><li>Identification &amp; logging — The GHAS webhook opens the ticket automatically on secret_scanning_alert.created. No manual step, no dependency on someone watching the Security tab.</li><li>Categorization &amp; prioritization — The alert payload’s secret type, repository visibility, and environment map straight onto the P1–P4 matrix above. Prioritization becomes a lookup, not a debate.</li><li>Diagnosis &amp; escalation — On-call SecOps confirms the secret is actually <em>live at the provider</em>, not just present in the diff, and pages the owning team directly for P1/P2.</li><li>Resolution — The owning dev team runs the fix prompt; SecOps independently verifies revocation happened at the provider. A closed GitHub alert is not proof the credential is dead.</li><li>Closure — The ticket closes only once GHAS shows the alert Resolved and a re-scan comes back clean. Closure is evidence-based, not time-based.</li><li>Post-incident review — A repository or secret type that keeps recurring gets logged as a Problem, not repeated as an Incident. Three alerts from the same repo is a process defect, not three accidents.</li></ol><p>That last point is where most programs quietly fail. If the same team leaks the same class of credential every quarter and each one closes cleanly as its own incident, your metrics look excellent while nothing actually improves. The Problem record is what forces the fix upstream.</p><h3>Role 3 — DevOps: make the pipeline the enforcement point</h3><p>Push protection stops a <em>new</em> secret from entering history. It doesn’t stop a secret that slipped in before scanning was enabled, or one that went through an approved bypass, from quietly reaching production. That’s the pipeline’s job: fail the build if the repository has any open, validated alert at all.</p><pre>name: Secret Scan Gate<br>on:<br>  pull_request:<br>    branches: [main]</pre><pre>jobs:<br>  block-on-open-alerts:<br>    runs-on: ubuntu-latest<br>    steps:<br>      - name: Fail if active secret scanning alerts exist<br>        env:<br>          # NOT the default GITHUB_TOKEN — it cannot read secret scanning alerts.<br>          # Use a fine-grained PAT or GitHub App token with &quot;Secret scanning alerts: read&quot;.<br>          GH_TOKEN: ${{ secrets.SECURITY_READ_TOKEN }}<br>        run: |<br>          ALERTS=$(gh api &quot;/repos/${{ github.repository }}/secret-scanning/alerts?state=open&quot;)</pre><pre>          ACTIVE=$(echo &quot;$ALERTS&quot;  | jq &#39;[.[] | select(.validity==&quot;active&quot;)]  | length&#39;)<br>          UNKNOWN=$(echo &quot;$ALERTS&quot; | jq &#39;[.[] | select(.validity==&quot;unknown&quot;)] | length&#39;)</pre><pre>          if [ &quot;$ACTIVE&quot; -gt 0 ]; then<br>            echo &quot;::error::$ACTIVE active secret scanning alert(s) — blocking merge until SecOps clears them.&quot;<br>            exit 1<br>          fi</pre><pre>          if [ &quot;$UNKNOWN&quot; -gt 0 ]; then<br>            echo &quot;::error::$UNKNOWN alert(s) of unknown validity — enable validity checks or triage manually.&quot;<br>            exit 1<br>          fi</pre><p><em>A required check that fails the pipeline while any active — or unverifiable — secret scanning alert remains open on the repository.</em></p><p>Three details in that workflow are load-bearing, and skipping any of them gives you a gate that looks green while enforcing nothing:</p><ul><li>The token is not GITHUB_TOKEN. The default Actions token cannot read the secret scanning alerts API — the job returns 403, not a clean pass. You need a fine-grained PAT or GitHub App token granted <em>Secret scanning alerts: read</em>, stored as a repository secret.</li><li>unknown validity is treated as a failure. select(.validity==&quot;active&quot;) only means something when validity checks are enabled in the repository&#39;s security settings. If they aren&#39;t, every alert comes back unknown, an active-only filter counts zero, and the gate waves live credentials straight through. Failing closed on unknown is what keeps the control honest.</li><li>exit 1 is the whole point. A warning annotation gets scrolled past. A red required check does not.</li></ul><p>Add the job as a required status check in the branch ruleset for main, alongside push protection at the repository level. The two enforcement points cover each other: push protection catches a secret going in, the pipeline gate catches one that&#39;s already there. Between them, a leaked credential is caught by whichever layer sees it first — and neither developer intent nor SecOps bandwidth is the only thing standing between a mistake and production.</p><h3>Best Practices That Prevent the Alert Entirely</h3><p>Every layer above is a net. Nets are essential, and you should still aim to need them less:</p><ul><li>Use Azure Key Vault, always. If a credential’s permanent home is Key Vault, “I accidentally committed it” stops being a category of incident your team has to plan for. Where a workload can authenticate with a Managed Identity instead, skip the secret entirely — there’s nothing to leak if nothing was ever written down.</li><li>Automate rotation. A secret rotated automatically every 30–90 days has a shelf life shorter than most attackers’ dwell time. Long-lived static credentials are the ones that turn into headlines.</li><li>Enable GHAS across every repository — not just the visible ones. Coverage gaps cluster in the repos nobody’s watching: the old internal tool, the prototype that went to prod, the fork someone forgot to archive. Turn on organization-wide default enablement rather than opting in repo by repo.</li><li>Train developers on secure coding. Scanning is the safety net, not the strategy. A team that understands why .env belongs in .gitignore, and why config templates use placeholders, generates far fewer alerts for the net to catch.</li></ul><h3>Conclusion: Building a Proactive Security Culture</h3><p>Secret scanning doesn’t fix a broken security culture, but it’s hard to build one without it. It turns an invisible risk into a visible, actionable, ownable one — an alert with a name, a timestamp, and a runbook, instead of a live credential sitting quietly in history hoping nobody looks.</p><p>The difference between a tool and a pipeline is what happens automatically. When the developer gets blocked at push, the ticket opens itself with the right priority, and the build refuses to merge while a live secret is exposed — no single person has to be the reason security worked that day.</p><blockquote><em>The teams that treat GHAS as a compliance checkbox get incident logs. The teams that treat it as a DevSecOps enabler get muscle memory.</em></blockquote><p>That’s the real payoff — not a clean dashboard, but a team that doesn’t flinch when an alert fires, because everyone already knows exactly what happens next: revoke, rotate, update, clean, document, re-scan.</p><p>Enable secret scanning and push protection on your repositories today — then wire up the gate, so the next leaked credential never has to depend on someone noticing.</p><p><em>Missed Part 1? → </em><a href="https://medium.com/@chaskarshailesh/from-detection-to-remediation-ghas-secret-scanning-for-devsecops-0100dfb76a2f"><em>From Detection to Remediation: GHAS Secret Scanning for DevSecOps</em></a></p><p><em>Next → Part 3: </em><a href="https://medium.com/@chaskarshailesh/cleaning-up-github-commit-history-a-devsecops-engineers-guide-e6a9691f2fa8"><em>Cleaning Up GitHub Commit History: A DevSecOps Engineer’s Guide</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97d63bb1ba25" width="1" height="1" alt=""><hr><p><a href="https://medium.com/javarevisited/one-pipeline-three-roles-operationalizing-ghas-secret-scanning-97d63bb1ba25">One Pipeline, Three Roles: Operationalizing GHAS Secret Scanning</a> was originally published in <a href="https://medium.com/javarevisited">Javarevisited</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Detection to Remediation: GHAS Secret Scanning for DevSecOps]]></title>
            <link>https://medium.com/javarevisited/from-detection-to-remediation-ghas-secret-scanning-for-devsecops-0100dfb76a2f?source=rss-8d10ea2e0567------2</link>
            <guid isPermaLink="false">https://medium.com/p/0100dfb76a2f</guid>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[agh]]></category>
            <category><![CDATA[github-advanced-security]]></category>
            <category><![CDATA[github-secret-scanning]]></category>
            <category><![CDATA[letssailtogether]]></category>
            <dc:creator><![CDATA[Chaskarshailesh]]></dc:creator>
            <pubDate>Tue, 25 Aug 2026 15:43:26 GMT</pubDate>
            <atom:updated>2026-08-25T15:43:26.941Z</atom:updated>
            <content:encoded><![CDATA[<h3>Part 1 of 3 — How secrets leak, how GHAS finds them, and the six-step fix prompt</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hTXxSdbtd0bpZ4ZXcuK5UA.png" /></figure><h3>Introduction</h3><p>Every API key, database password, and cloud credential your team writes down is a small, sharp object left lying around a very large room. Most of the time nothing happens. Then someone runs a script that searches every public commit on GitHub for the string AZURE_CLIENT_SECRET, and the room stops being large.</p><p>Secrets are different from most other bugs. A SQL injection needs a motivated attacker who finds your app and tries something. A leaked credential needs nothing — it’s a key sitting in a lock, and the only question is how long until someone tries the handle. Once it’s committed, it doesn’t matter how strong your firewall is, how tight your access policy is, or how good your code review process is elsewhere: the secret grants exactly the access it was scoped for, to anyone holding the string.</p><p>And secrets travel further than developers expect. A single push puts a credential into every clone, every fork, every CI cache, and — if the repository is public even briefly — every scraper and bot that indexes GitHub in near real time. Deleting the file in the next commit doesn’t help; the secret is still sitting in history, one git log -p away.</p><p>The consequences aren’t hypothetical:</p><ul><li>Uber (2016) — Attackers found AWS credentials committed to a private repository and used them to reach a storage bucket holding rider and driver data, affecting tens of millions of accounts. The breach was bad; the eighteen-month cover-up that followed made it a landmark case in how <em>not</em> to handle credential exposure.</li><li>Toyota (2022) — A contractor published source code to a public GitHub repository containing a hardcoded access key. It sat exposed for nearly five years before anyone noticed, reportedly putting customer data for hundreds of thousands of people at risk — five years of silent exposure, from one committed string.</li><li>Codecov (2021) — A credential leaked through a flawed Docker image let attackers modify a widely used CI upload script. One exposed secret became a supply-chain foothold, quietly siphoning environment variables and secrets from thousands of downstream customers’ pipelines.</li></ul><p>None of these started with an exotic zero-day. Each one started with a string of characters that should never have been committed, sitting in version control until someone found it. That’s precisely the gap secret scanning is built to close.</p><h3>Why Secret Scanning Matters</h3><p>Code review catches logic errors. Linters catch style violations. Neither is built to notice that a 40-character string in a config file happens to be a live production credential — that requires something purpose-built.</p><p>Early detection A secret is cheapest to fix in the seconds after it’s pushed, not the weeks after it’s exploited. Automated scanning catches what reviewers don’t — humans read logic, not entropy.</p><p>Compliance benefits SOC 2, ISO 27001, PCI DSS, and FedRAMP all expect evidence that credential exposure is actively monitored. Scanning gives you an auditable trail — an alert, a timestamp, a resolution.</p><p>Shift-left security Push protection stops a secret before it ever lands in history, turning “detect after the fact” into “prevent at the commit” — the cheapest possible place to stop it.</p><p>Incident prevention Every leaked secret is a potential incident that never has to happen. Scanning converts a future 2 a.m. page into a routine Tuesday-afternoon rotation.</p><h3>How GHAS Secret Scanning Works</h3><p>GHAS secret scanning isn’t one feature — it’s four layers that work together, from generic pattern detection to organization-specific rules.</p><p><strong>Pattern </strong>matching GitHub ships hundreds of built-in detectors that match the structural signature of real tokens — an Azure Storage account key’s fixed length and base64 padding, a Slack token’s format, a Stripe key’s checksum-like structure. This isn’t a generic high-entropy-string guess; it’s built directly from the token formats issuing providers publish.</p><p><strong>Partner </strong>scanning For supported providers — Azure, AWS, Google Cloud, Stripe, Slack, npm, and well over a hundred others — a match doesn’t just raise an alert in your repository. GitHub notifies the provider directly, and Microsoft’s own validators can flag Azure Storage, Azure DevOps, and Entra ID app secrets for revocation, often before you’ve opened the alert email.</p><p><strong>Custom regex patterns </strong>Every codebase has secrets GitHub can’t predict — internal service tokens, homegrown API keys, connection strings with a company-specific prefix. Custom patterns let you teach GHAS your own format, at the repository or organization level.</p><pre>AccountKey=[A-Za-z0-9+/]{86}==</pre><p><em>Custom pattern — matches an Azure Storage connection string’s embedded account key: an 88-character base64 string ending in </em><em>==.</em></p><p><strong>Alerts and workflows</strong> Enabling secret scanning surfaces alerts in the Security tab. Push protection is what actually changes behavior: it blocks the git push itself when a high-confidence secret is detected, forcing a decision before the secret ever reaches a shared branch.</p><pre>gh api --method PATCH -H &quot;Accept: application/vnd.github+json&quot; \<br>  /repos/{owner}/{repo} \<br>  -f security_and_analysis[secret_scanning][status]=enabled \<br>  -f security_and_analysis[secret_scanning_push_protection][status]=enabled</pre><p><em>Enabling secret scanning and push protection on a single repository via the GitHub API.</em></p><h3>DevSecOps Engineer’s Fix Prompt</h3><p>An alert firing is a process, not a panic. Run these six steps, in this order, the moment GHAS flags a live secret.</p><p>1. Revoke the exposed secret Go straight to the issuing provider — the Azure Portal, Entra ID app registration, Key Vault, or the third-party dashboard — and revoke or delete the credential before doing anything else. A secret that’s already public is public forever; revocation is the only step that actually stops the bleeding.</p><pre>az ad app credential delete \<br>  --id &lt;app-id&gt; --key-id &lt;credential-key-id&gt;</pre><p>2. Rotate with a new secret Issue a replacement scoped to least privilege, not a copy of the old one’s permissions. Treat rotation as a chance to shrink the blast radius, not just restore service.</p><pre>az storage account keys renew \<br>  --account-name mycostorage --key key1 \<br>  --resource-group myco-prod-rg</pre><pre>gh secret set AZURE_STORAGE_KEY \<br>  --body &quot;$(az storage account keys list \<br>    --account-name mycostorage \<br>    --resource-group myco-prod-rg \<br>    --query &#39;[0].value&#39; -o tsv)&quot; \<br>  --repo myco/payments-api</pre><p>3. Update secret managers Point every consumer — CI pipelines, AKS workloads, App Service configuration, local .env templates — at the new credential in Azure Key Vault, wherever secrets actually live. If it was hardcoded in the first place, this is the moment to move it out of the codebase entirely — or better, onto a Managed Identity so there&#39;s no static secret left to leak.</p><p>4. Clean the repository history Revocation handles the credential; history cleanup handles the record. Use git filter-repo (BFG works too) to strip the secret from every commit, not just HEAD — then force-push the rewritten history and have every collaborator re-clone. A rewrite that half the team still holds the old copy of isn&#39;t clean.</p><pre>git filter-repo --replace-text replacements.txt</pre><p>Note the position of this step. Rewriting history revokes nothing — if you rewrite before rotating, the credential stays live for the entire duration of the cleanup, which on a large repo with collaborators to coordinate can run to hours. Containment happens in steps 1–3; this step closes the record. <em>(Part 3 covers the rewrite in full, including what it can’t fix.)</em></p><p>5. Document the incident Record what leaked, how long it was exposed, who had access, what was rotated, and what changed to prevent recurrence. This record is what turns a scramble into evidence for your next audit — and what makes the postmortem useful instead of just uncomfortable.</p><p>6. Re-scan with GHAS Confirm the alert closes, then run a full-repository scan to make sure cleanup didn’t miss a second copy of the secret sitting in another branch, a fork, or an old tag.</p><h3>Detection is the easy half</h3><p>Turning scanning on is a config change. Knowing what to do in the ninety seconds after an alert fires is a runbook. Both are solvable in an afternoon.</p><p>What’s harder is making the alert <em>mean something</em> to everyone it touches — so the developer who triggered it knows how to fix it locally, the SecOps engineer on call knows how urgently to treat it, and the pipeline itself refuses to ship code while a live credential is still exposed. A GHAS alert that only exists on a dashboard someone remembers to check is not a control. It’s a notification.</p><p>Part 2 covers exactly that: a worked developer remediation at the terminal, an ITIL-aligned triage process with a P1–P4 severity matrix for SecOps, and a GitHub Actions gate that fails the build while any active alert remains open — the three pieces that turn secret scanning from a tool into a pipeline.</p><p>Part 3 then takes on step 4 above in full: how to rewrite history without breaking your repository, and the three things a textbook rewrite still leaves behind.</p><p>In the meantime: enable secret scanning and push protection on your repositories today — before the next commit finds them for you.</p><p><em>Part 2 → </em><a href="https://medium.com/@chaskarshailesh/one-pipeline-three-roles-operationalizing-ghas-secret-scanning-97d63bb1ba25"><em>One Pipeline, Three Roles: Operationalizing GHAS Secret Scanning</em></a></p><p><em>Part 3 → </em><a href="https://medium.com/@chaskarshailesh/cleaning-up-github-commit-history-a-devsecops-engineers-guide-e6a9691f2fa8"><em>Cleaning Up GitHub Commit History: A DevSecOps Engineer’s Guide</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0100dfb76a2f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/javarevisited/from-detection-to-remediation-ghas-secret-scanning-for-devsecops-0100dfb76a2f">From Detection to Remediation: GHAS Secret Scanning for DevSecOps</a> was originally published in <a href="https://medium.com/javarevisited">Javarevisited</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cleaning Up GitHub Commit History: A DevSecOps Engineer’s Guide]]></title>
            <link>https://medium.com/javarevisited/cleaning-up-github-commit-history-a-devsecops-engineers-guide-e6a9691f2fa8?source=rss-8d10ea2e0567------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6a9691f2fa8</guid>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[agh]]></category>
            <category><![CDATA[github-advanced-security]]></category>
            <category><![CDATA[letssailtogether]]></category>
            <category><![CDATA[github-secret-scanning]]></category>
            <dc:creator><![CDATA[Chaskarshailesh]]></dc:creator>
            <pubDate>Tue, 25 Aug 2026 15:42:54 GMT</pubDate>
            <atom:updated>2026-08-25T15:42:54.833Z</atom:updated>
            <content:encoded><![CDATA[<h3>Part 3 of 3 — Rewriting history safely, and what rewriting history can’t fix</h3><p><em>Why deleting the file isn’t enough, which tool to reach for, and the order of operations that keeps a cleanup from becoming an outage.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aIrnbcI9WybDtxRFlJzy-A@2x.png" /></figure><blockquote><em>GHAS Secret Scanning for DevSecOps — a 3-part series Part 3: Cleaning Commit History ← you are here </em><a href="https://medium.com/@chaskarshailesh/from-detection-to-remediation-ghas-secret-scanning-for-devsecops-0100dfb76a2f"><em>Part 1: Detection &amp; Remediation</em></a><em> · </em><a href="https://medium.com/@chaskarshailesh/one-pipeline-three-roles-operationalizing-ghas-secret-scanning-97d63bb1ba25"><em>Part 2: One Pipeline, Three Roles</em></a></blockquote><h3>Where the series left off</h3><p><a href="https://medium.com/@chaskarshailesh/from-detection-to-remediation-ghas-secret-scanning-for-devsecops-0100dfb76a2f">Part 1</a> covered detection and the six-step fix prompt. <a href="https://medium.com/@chaskarshailesh/one-pipeline-three-roles-operationalizing-ghas-secret-scanning-97d63bb1ba25">Part 2</a> wired that response into a pipeline — push protection at the developer’s terminal, an ITIL-aligned triage process for SecOps, and a build gate that fails while any live credential is exposed.</p><p>Step 4 of that fix prompt was a single line: <em>clean the repository history</em>. It deserved more than a line.</p><p>Secrets have a way of sneaking into code. A quick test, a rushed commit, a misconfigured .env file — and suddenly your repository contains an Azure Storage key or a Service Principal credential. Deleting the file in a later commit doesn&#39;t solve it, because Git still remembers everything. git log -p walks right back to the original value.</p><p>History cleanup isn’t something developers do every day. But when GHAS raises an alert on a secret that’s already reached main, it&#39;s the difference between a remediated incident and a credential that quietly lives in your repository forever.</p><h3>Why History Cleanup Matters</h3><ul><li>Secrets linger. Even after deletion, every old commit object still holds the sensitive value — in your clone, and in everyone else’s.</li><li>Attackers know this. Public repositories are scanned continuously for leaked credentials, and history is the first place automated tooling looks.</li><li>Compliance expects proof. SOC 2 and ISO 27001 want evidence that a leak was actually remediated, not just that the file was removed going forward.</li><li>The Azure blast radius is real. A leaked SAS token, SQL connection string, or Service Principal secret can expose an entire workload — storage, database, and the pipeline that deploys them.</li></ul><h3>Choosing a Tool</h3><p><strong>git filter-repo </strong>— <em>the default choice for secret removal</em> Very fast even on large repositories, and it preserves tags and branches correctly. Requires CLI familiarity, but it’s scriptable and auditable — which is what you want when the cleanup itself has to appear in an audit trail. Best for precise removal of specific secrets, files, or patterns.</p><p><strong>BFG Repo-Cleaner </strong>— <em>the quick option</em> Fast on simple jobs and close to a single-line command, so it’s the lowest-friction way to strip a large file or an obvious credential. Less granular than filter-repo, which is exactly the trade: easier to run, harder to target narrowly.</p><p><strong>GitHub UI (manual) </strong>— <em>limited to small, contained cases</em> Safe but incomplete. Fine for deleting a single commit or closing a pull request; it cannot rewrite history across branches, so it won’t remove a secret that’s been in the repo for any length of time.</p><p>For enterprise Azure projects, git filter-repo is the right default. It&#39;s scriptable, auditable, and — importantly — it&#39;s what the Git project itself now recommends over the long-deprecated git filter-branch.</p><p>One warning that catches people out: git filter-repo refuses to run on a repository that isn&#39;t a fresh clone. That&#39;s a deliberate safety feature, not a bug. It wants a clone it can rewrite without destroying uncommitted work or a configured remote. Clone fresh, rewrite there, then push.</p><h3>The Order of Operations (this part matters)</h3><p>Here’s the sequencing mistake almost every cleanup guide makes, including some internal runbooks: rewriting history does not revoke anything.</p><p>If you clean history first and rotate afterwards, the credential stays live for the entire duration of the cleanup — which, on a large repository with collaborators to coordinate, can be hours. Anyone who cloned the repo before the rewrite still holds a working key.</p><p>The correct order is always:</p><ol><li>Revoke at the provider — the credential is dead before anything else happens.</li><li>Rotate and redistribute — new secret in Key Vault, consumers updated, service healthy again.</li><li>Then rewrite history — cleanup is a <em>hygiene and compliance</em> step, not a containment step.</li></ol><p>Treat the rewrite as the thing you do once the emergency is already over. It removes the record; revocation removed the risk.</p><h3>Step-by-Step Cleanup Workflow</h3><p>1. Clone fresh — never rewrite a working repo</p><pre>git clone --mirror https://github.com/myco/payments-api.git<br>cd payments-api.git</pre><p>A --mirror clone brings every ref — branches, tags, notes — so the rewrite covers all of them, not just the branch you happened to have checked out.</p><p>2. Build the replacement file</p><pre># replacements.txt<br>Endpoint=sb://myco.servicebus.windows.net/;SharedAccessKey=abc123...==&gt;REMOVED<br>DefaultEndpointsProtocol=https;AccountKey=xyz789...==&gt;REMOVED</pre><p>Each line maps a literal secret to its replacement, separated by ==&gt;. Name it something neutral like replacements.txt and keep it outside the repository — a file called secrets.txt containing your actual secrets is exactly the thing you&#39;re trying to stop committing.</p><p>3. Run the rewrite</p><pre>git filter-repo --replace-text ../replacements.txt</pre><p>filter-repo deliberately removes the origin remote after rewriting, so you can&#39;t reflex-push over the original before verifying. Re-add it consciously:</p><pre>git remote add origin https://github.com/myco/payments-api.git</pre><p>4. Verify before pushing</p><pre>git log --all -p -S &#39;SharedAccessKey&#39; | head</pre><p>An empty result means the string is gone from every reachable commit. Check <em>before</em> the force-push, not after.</p><p>5. Force-push the rewritten history</p><pre>git push origin --force --all<br>git push origin --force --tags</pre><p>Tags are a separate push. Skipping that second line is the most common way a cleanup leaves the secret sitting in a release tag.</p><p>6. Confirm the rotation already happened</p><p>This is a checkpoint, not a task. Per the order of operations above, the credential was revoked and rotated <em>before</em> you started rewriting — so what you’re doing here is verifying that the value in Key Vault is the new one and that every consumer picked it up:</p><pre>az keyvault secret show \<br>  --vault-name myco-prod-kv \<br>  --name ServiceBusConnectionString \<br>  --query &quot;attributes.updated&quot;</pre><p>If that timestamp predates the incident, stop the cleanup and go rotate. You are not remediating; you are tidying up around a live credential.</p><p>7. Tell every collaborator to re-clone</p><p>This is a communication step, not a technical one, and it’s the one that gets skipped. Anyone who pulls instead of re-cloning will merge the old history — including the secret — straight back in. A rewrite that half the team still holds the old copy of isn’t clean.</p><p>8. Document the incident</p><p>What leaked, how long it was exposed, when it was revoked, what was rotated, and what changed to prevent recurrence. This is the artifact your next audit asks for.</p><h3>What History Cleanup Does Not Fix</h3><p>This is the section most guides leave out, and it’s where cleanups quietly fail.</p><ul><li>Forks keep their own copies. A fork made before the rewrite still contains the full original history. You cannot rewrite someone else’s fork — you can only identify them and ask.</li><li>Pull request refs survive. GitHub stores PR head commits under refs/pull/*, which a force-push to branches does not touch. The commit stays reachable by URL.</li><li>GitHub caches old commit views. A rewritten commit can still be viewable at its original SHA for some time.</li></ul><p>For the last two, the only complete fix is to contact GitHub Support and request they purge the cached views and stale refs for the affected repository. Do that as part of the cleanup, not as an afterthought.</p><p>And note what all three have in common: they’re reasons the <em>record</em> may persist even after a textbook rewrite. Which is precisely why revocation, not cleanup, is what actually contains the incident.</p><h3>Safety Considerations</h3><ul><li>Safe when planned. Schedule the rewrite in a maintenance window, with the owning team notified in advance.</li><li>Risky when rushed. Rewriting invalidates every existing commit SHA — open PRs, CI runs pinned to a commit, deployment references, and anything else that quoted a SHA will break.</li><li>Rotate first. Worth repeating: cleanup does not revoke a credential.</li><li>Keep the audit trail. Log what was rewritten and why. A history rewrite is itself a change worth being able to explain later.</li></ul><h3>Best Practices for Azure DevSecOps</h3><ul><li>Use Azure Key Vault for all secrets — or better, a Managed Identity, so there’s no static credential to leak in the first place.</li><li>Automate rotation via CLI, Bicep, or ARM templates rather than relying on someone remembering.</li><li>Enable GHAS everywhere so leaks surface in seconds instead of after five years — as they did at Toyota.</li><li>Train developers on .gitignore, user-secrets, and config placeholders. Prevention costs minutes; cleanup costs a maintenance window.</li></ul><h3>Conclusion: The Last Mile of Remediation</h3><p>Cleaning up commit history isn’t glamorous. It’s careful, procedural work that no one gets credit for. But it’s the step that determines whether a leaked secret is genuinely gone or merely out of sight.</p><p>Across this series, the shape of a mature response comes into focus: GHAS detects the secret (Part 1), the pipeline enforces the response across dev, SecOps, and CI (Part 2), and a disciplined rewrite closes the record (Part 3). Detection without enforcement is a dashboard. Enforcement without cleanup leaves evidence behind. You need all three.</p><blockquote><em>Revocation contains the incident. Cleanup closes it. Never confuse the two.</em></blockquote><p>So the next time GHAS raises the alarm, don’t just delete the file. Revoke the credential, rotate it in Key Vault, update every consumer, rewrite the history properly — tags, forks, and cached refs included — and let the pipeline verify you’re actually clean.</p><p>Enable GHAS secret scanning and push protection on your repositories today. The best history cleanup is the one you never have to run.</p><p><em>Start of the series → Part 1: </em><a href="https://medium.com/@chaskarshailesh/from-detection-to-remediation-ghas-secret-scanning-for-devsecops-0100dfb76a2f"><em>From Detection to Remediation: GHAS Secret Scanning for DevSecOps</em></a></p><p><em>Previous → Part 2: </em><a href="https://medium.com/@chaskarshailesh/one-pipeline-three-roles-operationalizing-ghas-secret-scanning-97d63bb1ba25"><em>One Pipeline, Three Roles: Operationalizing GHAS Secret Scanning</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6a9691f2fa8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/javarevisited/cleaning-up-github-commit-history-a-devsecops-engineers-guide-e6a9691f2fa8">Cleaning Up GitHub Commit History: A DevSecOps Engineer’s Guide</a> was originally published in <a href="https://medium.com/javarevisited">Javarevisited</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure SRE Agent, Part 2: What It Does With Real Resources]]></title>
            <link>https://medium.com/javarevisited/azure-sre-agent-part-2-what-it-does-with-real-resources-414b521a5856?source=rss-8d10ea2e0567------2</link>
            <guid isPermaLink="false">https://medium.com/p/414b521a5856</guid>
            <category><![CDATA[sre-agent]]></category>
            <category><![CDATA[letssailtogether]]></category>
            <category><![CDATA[azure-ai-services]]></category>
            <category><![CDATA[azuresreagent]]></category>
            <category><![CDATA[aiops]]></category>
            <dc:creator><![CDATA[Chaskarshailesh]]></dc:creator>
            <pubDate>Sun, 09 Aug 2026 17:15:27 GMT</pubDate>
            <atom:updated>2026-08-19T15:58:14.217Z</atom:updated>
            <content:encoded><![CDATA[<h3>Hands on · Azure SRE Agent (Preview) · Part 2 of 2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kjZhlg8anUh9fyl4Wp--Fg.jpeg" /></figure><p>Scoping it to two resource groups, watching it work a Postgres incident, and finally getting a straight answer on cost.</p><p><a href="https://medium.com/@chaskarshailesh/i-gave-an-ai-agent-reader-access-to-my-azure-subscription-heres-what-actually-happened-6a1887b8c72d">Part 1</a> was the wizard — what Azure SRE Agent deploys, what Reader vs Privileged means, and how it’s billed. It ended with a warning that you can’t evaluate the product on an empty resource group. This post fixes that: two resource groups, a PostgreSQL flexible server, a real alert storm, and a scheduled task the agent created on its own. That’s the whole product, so this is the last post on it.</p><blockquote>Assigning resource groups grants three roles, not one. With real topology the agent stops giving generic advice and starts citing resource IDs. It works an incident from a visible five-step plan, writes SQL for you to run yourself, and will schedule recurring work from a one-word reply. The AAU limit <em>is</em> settable — but hitting it doesn’t stop the bill, it stops the agent.</blockquote><h3>Scoping it properly</h3><p>Part 1 skipped this step, which is why nothing worked. Settings → Managed resource groups → Add opens a three-step flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_PCznNvZE54O53OZ-Y1BVA.png" /></figure><p><em>Up to 100 resource groups, with a filter for the types the preview handles best.</em></p><p>You can pick up to 100 resource groups you have permissions on, with a “Show only recommended” toggle that filters to the types the preview handles well. I took two: rg-apim-oct-play-ground and rg-flexi-db-play-ground, both in Central India, while the agent itself sits in East US 2. That split is the right shape — your incident tooling shouldn&#39;t share a region with the thing it&#39;s watching.</p><p>Step two checks you have Owner or User Access Administrator on each group. Step three is the one worth reading.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*498UZytDvS-ru6WOLT_u9w.png" /></figure><p>“Reader mode” is three role assignments, not one.</p><ul><li><strong>Reader</strong> — view all resources, but does not allow you to make any changes</li><li><strong>Monitoring Reader</strong> — can read all monitoring data</li><li><strong>Log Analytics Reader</strong> — view and search all monitoring data, and view monitoring settings including the configuration of Azure diagnostics on all Azure resources</li></ul><p>Part 1 called Reader mode read-only. True, but incomplete: <strong>“Reader” is three role assignments per resource group, not one.</strong> Nothing alarming — you can’t diagnose anything without reading telemetry. But if your access reviews flag new role assignments, expect three per group, and expect two of them to have names your reviewers won’t recognise from the product docs.</p><h3>What changes when there’s actually something there</h3><p>Part 1’s resource analysis read Total resources: 1 with every category zero. Same panel, two resource groups later:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GDm2lp7SUrhdNYkUmMqKjg.png" /></figure><p>Nine resources, seven databases. The same panel Part 1 showed reading “1”.</p><p>Nine resources, seven databases. That’s the difference between a product that looks broken and one that works, and it’s entirely down to the scoping step.</p><p>I asked it to analyse the health of resources in my subscription. It returned an inventory first:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DH4NoPJZwWiYvEhzPyrucw.png" /></figure><p>Discovery output, broken down by ARM resource type.</p><pre>microsoft.dbforpostgresql/flexibleservers: 1<br>microsoft.app/agents: 1<br>microsoft.insights/actiongroups: 1<br>microsoft.insights/components (Application Insights): 1<br>microsoft.managedidentity/userassignedidentities: 1<br>microsoft.operationalinsights/workspaces (Log Analytics): 1<br>microsoft.resources/deployments: 4</pre><p>microsoft.app/agents is the agent. The action group, App Insights component, managed identity and workspace are what its own deployment created, and the four deployments entries are its own deployment history.</p><blockquote><strong>Nine of the ten discovered items are the agent’s own footprint; exactly one is a real workload.</strong> Not wrong — they are resources in scope — but adjust for it before you judge coverage by the headline count.</blockquote><p>Incidentally, that action group is a fifth resource the wizard creates which Part 1’s four-resource table missed.</p><h3>It plans before it acts</h3><p>The response opened with a plan object rather than prose — a To-Do Plan card reading <em>“Discover available Azure subscriptions and present options for selection”</em> — then worked it and reported against a specific server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*muukjxy2flb3mH7OyTUyUQ.png" /></figure><p>Full ARM IDs, a posture finding nobody asked for, and an honest “Unknown”.</p><pre>oct-2025-flexidb (PostgreSQL flexible server)<br>  Provisioning state: Ready<br>  Version: 17, SKU: Burstable Standard_B1ms, Storage: 128 GB<br>  High availability: Not enabled, Public access: Enabled<br>  Health signal (graph): Unknown (no recent telemetry available here)</pre><p>Three things there. It cited full ARM resource IDs for everything it found, so every claim traces to a specific resource — compare Part 1, where it claimed to have analysed multiple subscriptions above an empty table. <strong>With scope it cites; without scope it narrates.</strong> It volunteered High availability: Not enabled, Public access: Enabled when I&#39;d only asked about health. And Health signal: Unknown (no recent telemetry available here) is the line I&#39;d point to on the trust question — it had no data and said so, in a field it could easily have guessed at.</p><p>The follow-up offer was bounded too: deeper analysis for <strong>up to five resources at a time</strong>, selected by index. That’s a rate limit expressed as a conversation, and it stops the agent fanning out across a fleet on one vague instruction.</p><h3>Reader mode, made concrete</h3><p>I asked for the deeper check. It ran a numbered procedure — STEP 1: Database Overview through STEP 10 — pulling autovacuum settings, dead tuple counts and connection stats. The last step is the interesting one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eIwcac5GDM3gM0yxUfzibA.png" /></figure><p><em>Reader mode’s output format: a patch you apply yourself.</em></p><pre>ALTER TABLE public.audit_logs SET (autovacuum_enabled = true);</pre><pre>-- Tune Autovacuum Settings (example)<br>ALTER TABLE public.user_activities SET (autovacuum_vacuum_scale_factor = 0.1);<br>ALTER TABLE public.audit_logs SET (autovacuum_vacuum_scale_factor = 0.1);</pre><pre>-- Add Index (example; adjust names/columns accordingly)<br>CREATE INDEX CONCURRENTLY idx_user_activities_user_id ON public.user_activities(user_id);<br>CREATE INDEX CONCURRENTLY idx_audit_logs_created_at ON public.audit_logs(created_at);</pre><blockquote>STEP 10 COMPLETE — SQL Remediation Commands presented to user</blockquote><p>“Presented to user” is Reader mode working as designed. It can read your database’s configuration but not change it, so the output is a patch you apply yourself. You get the analysis; you keep the decision.</p><p>The SQL is decent — CREATE INDEX CONCURRENTLY avoids a write lock, which is correct on a live server and not the default someone reaches for by accident. But read the comments: (example; adjust names/columns accordingly). Index choice depends on query patterns the agent hasn&#39;t seen. Treat it as a first draft from someone who has read your table definitions and none of your queries.</p><h3>It will schedule recurring work from one word</h3><p>The check ended with an offer to set up a temporary health watch. I replied “yes.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-la6oG9Dn99j9XtrUX7CTg.png" /></figure><p>Created from a one-word reply. Note “Execution Details: No limit”.</p><pre>Name               PG flex server health watch (oct-2025-flexidb)<br>Description        Probe PostgreSQL flexible server health every 10m for 2h;<br>                   alert on breaches; deliver a PDF report<br>Schedule           Every 10 minutes   */10 * * * *<br>Status             Active<br>Execution Details  No limit</pre><p>Two things. First, a one-word reply created a recurring job. Reader mode governs what the agent does to <em>your Azure resources</em> — it does not govern what the agent does to <em>its own control plane</em>. Scheduling and task creation live inside the agent and aren’t gated by the permission level you picked in the wizard.</p><p>Second, the confirmation message said it would run <em>“every 10 minutes for the next 2 hours.”</em> The record says Execution Details: No limit. The sentence promises two hours; the artifact has no end condition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xwUE94Sj0SzO0QZ6Xkuqrg.png" /></figure><p>Two active tasks, next run in four minutes, no stop date on either.</p><blockquote>Take the chat message at face value and walk away, and you’ve left a job polling a database every ten minutes indefinitely — and paying for it. <strong>Check the task grid after any conversation where you said yes to something. The chat message is a summary, not the record.</strong></blockquote><h3>A real incident</h3><p>An Azure Monitor alert on the Postgres server fired into the agent’s incident queue. This is what Part 1 couldn’t show, because Part 1 had nothing that could break.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bwt6KIghAqSPLendBefVQA.png" /></figure><p><em>A per-incident runbook with live progress. The “Review mode” label is the permission level, surfaced where it matters.</em></p><p>The agent acknowledged [Sev3] [oct-2025-flexidb] and opened an investigation. Every message carries a <strong>Review mode</strong> label next to the timestamp — the permission level surfaced in the incident timeline, where it matters. The right panel shows a checklist reading 0 of 5 completed:</p><ol><li>Validate alert context and PostgreSQL Flexible Server resource ID</li><li>Run immediate health diagnostics (CPU, memory, connections, storage/IOPS, errors)</li><li>Assess recent maintenance/events, failover status, and configuration changes</li><li>Recommend and, if safe, initiate mitigations (scaling, connection limits, query killer, restart if necessary)</li><li>Set a temporary watch to confirm stabilization post-mitigation</li></ol><p>A runbook, generated per incident, with live progress. You can read it before it finishes and disagree with it — worth more than a faster answer.</p><p>Sit with step 4. In Review mode “initiate mitigations” means recommend. Under Privileged, the same step means restart the database. Same wording, same reasoning, different outcome, and the only thing between them is the radio button from Part 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lvCLuQC-bB5r3lM7WWvbKw.png" /></figure><p>Nine alerts, seven critical, seventy minutes. The agent engaged one of them.</p><p>For context: nine alerts in about seventy minutes, seven Critical, all still New. The agent engaged one. It didn&#39;t triage the queue, group related alerts or suppress duplicates. Alert correlation is the obvious next thing this product needs.</p><h3>Cost: the answer Part 1 couldn’t get</h3><p>Part 1’s consumption chart failed to load, so the billing advice was guesswork. It loads now — Always-on flow + 2,000 active flow AAUs, with 4.545/2,000 used for November, and Change AAU allocation live rather than greyed out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2jnKACEwa4zmSyh0ZgH8uw.png" /></figure><blockquote>The cap tops out at 200,000 — and the sentence above it explains what hitting it actually does.</blockquote><blockquote>If the agent reaches the active flow limit, it continues running only in the always-on flow but is unavailable for chat and actions.</blockquote><blockquote>That is not a spending cap. <strong>Hit the limit and the agent stops being useful while you keep paying the always-on floor</strong> — a circuit breaker on activity, not on cost.</blockquote><p>Set it too low and the agent goes quiet mid-incident, which is the worst possible time to discover a quota. And since it caps neither the floor nor the Log Analytics ingestion underneath, you still want a Cost Management budget on the resource group.</p><p>For scale: full discovery, a ten-step database analysis, an incident investigation and a scheduled task came to 4.545 AAUs.</p><h3>Where this leaves it</h3><p>Part 1 called it context assembly with a permission model attached. With real resources in scope I’d extend that: <strong>it’s a diagnostic runbook generator that shows its work.</strong> The plan objects are the product — not the chat, not the topology map. A five-step incident checklist you can read while it executes, and a ten-step analysis ending in SQL you review before running, are artifacts an SRE can argue with. Everything Part 1 praised as smart onboarding turned out to be templated; the plans aren’t.</p><p>It cites resource IDs, admits when telemetry is missing, volunteers posture findings you didn’t ask for, and bounds its own scope. Against that: no alert correlation, chat summaries that don’t always match the artifacts created, an AAU cap that protects activity rather than spend, and agent-internal actions that ignore the permission level entirely.</p><p>If you run it — scope it to real resource groups on day one, expect three role assignments per group, set the AAU allocation deliberately with a Cost Management budget behind it, and check the Scheduled tasks tab after anything you agreed to in chat.</p><p>And stay on Reader until you can predict what step 4 will say. That’s the whole evaluation, and there’s now a concrete way to do it: every incident produces a written plan you can compare against what you’d have done yourself. Run that for a month. If the plans hold up, Privileged is a much smaller leap than it looks from the wizard.</p><p><em>Preview product, subject to change. Screenshots captured November 2025 — verify current behaviour and pricing in Microsoft’s docs before making decisions on this.</em></p><p><em>Dark </em><strong><em>REDACTED</em></strong><em> bars are mine, covering the subscription ID, the PostgreSQL server’s public FQDN, and a scheduled task’s internal ID. If you publish your own captures, the agent’s chat output is the risky part — it prints full ARM resource IDs and connection endpoints inline, which is exactly what makes it useful and exactly what you don’t want in a screenshot.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=414b521a5856" width="1" height="1" alt=""><hr><p><a href="https://medium.com/javarevisited/azure-sre-agent-part-2-what-it-does-with-real-resources-414b521a5856">Azure SRE Agent, Part 2: What It Does With Real Resources</a> was originally published in <a href="https://medium.com/javarevisited">Javarevisited</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Gave an AI Agent Reader Access to My Azure Subscription. Here’s What Actually Happened.]]></title>
            <link>https://medium.com/javarevisited/i-gave-an-ai-agent-reader-access-to-my-azure-subscription-heres-what-actually-happened-6a1887b8c72d?source=rss-8d10ea2e0567------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a1887b8c72d</guid>
            <category><![CDATA[agentic-workflow]]></category>
            <category><![CDATA[letssailtogether]]></category>
            <category><![CDATA[azuresreagent]]></category>
            <category><![CDATA[sre-agent]]></category>
            <category><![CDATA[microsoft-azure]]></category>
            <dc:creator><![CDATA[Chaskarshailesh]]></dc:creator>
            <pubDate>Sun, 09 Aug 2026 07:31:39 GMT</pubDate>
            <atom:updated>2026-08-19T15:58:15.934Z</atom:updated>
            <content:encoded><![CDATA[<p>A hands-on walkthrough of Azure SRE Agent (Preview) — what it deploys, what it costs, and the permission decision you should think about before you click Create.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/1*o66ZOC5vTA8jbNwOhgBozA.png" /></figure><blockquote>Azure SRE Agent (Preview) is a managed agent that sits on your resource groups, builds a topology map, watches your alerts, and can take remediation actions if you let it. Standing it up takes about five minutes and four Azure resources. The interesting decisions aren’t in the wizard — they’re in the permission model and the billing unit, and both are easy to click past.</blockquote><h3>Why bother</h3><p>The on-call loop hasn’t changed in fifteen years. An alert fires. A human wakes up, opens three portals, pattern-matches against a runbook someone wrote in 2019, and either restarts the thing or escalates. The judgment involved is real, but the first ten minutes almost never are — it’s context assembly. Which resource, which deployment, what changed, what does the log say.</p><p>That first ten minutes is exactly the shape of work an agent should be good at. So the pitch for Azure SRE Agent is straightforward: give it read access to your resource groups, let it ingest your alerts, and let it do the context assembly before you’re fully awake.</p><p>The question isn’t whether that’s useful. It’s what you have to hand over to get it.</p><h3>What the wizard actually asks you</h3><p>Creating the agent is a two-tab blade. Tab one, <strong>Basics</strong>, is unremarkable Azure: subscription, resource group, a name, a region, and an Application Insights instance (create new or bring your own).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*4xBVn6mfdw4zDd7KVRNtEQ.png" /></figure><p>Tab one is standard Azure — until you read the fine print under Managed resource groups.</p><p>The one line worth slowing down for is at the bottom, under <strong>Managed resource groups</strong>:</p><blockquote>To assign the agent managed resource groups across subscriptions, you need Owner or User Access Administrator permissions on those resource groups.</blockquote><p>That’s your first real signal. This isn’t a monitoring tool you bolt on with Reader — the act of <em>scoping</em> the agent is a role-assignment operation. If you’re an SRE in an org where the platform team owns IAM, you’re filing a ticket before you get past step one. Worth knowing on day zero rather than day three.</p><p>The agent resource and the resource groups it manages can live in different regions and subscriptions, which is a sane call — you don’t want your incident-response tooling co-located with the blast radius.</p><h3>The decision that matters: Reader vs Privileged</h3><p>Tab two is the whole product in one radio button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*-79Yl2Y8PVde4hHM49xIMw.png" /></figure><p>The entire operational posture of the product, expressed as one radio button.</p><p><strong>Reader</strong> — the agent has read-only permissions on the resource groups it manages. Then this sentence, which is the important one: <em>“It takes the user’s permissions temporarily for approved actions.”</em></p><p><strong>Privileged</strong> — the agent has permissions to take approved actions on resources and resource types detected in its assigned resource groups.</p><p>Read those twice, because the difference is subtle and it’s the difference between two very different operational postures.</p><p>Under Reader, <strong>the agent can’t change anything on its own. </strong>When it wants to act, it borrows <em>your</em> identity for that specific approved action. The audit trail points at a human. The blast radius is bounded by whatever that human could already do. Nothing happens while everyone’s asleep.</p><p>Under Privileged, the agent holds its own standing permissions on the resource types it discovered. <strong>It can act without a human in the loop at that moment. </strong>Faster. Also: a non-human principal with write access to your production resource groups, whose decisions come from a model.</p><p>Both modes still gate on “approved actions,” so this isn’t Reader-means-safe and Privileged-means-chaos. But the identity that shows up in your activity log is different, and the answer to “could this have happened at 3am with nobody watching” is different.</p><blockquote><strong>My take:</strong> start on Reader. Not because Privileged is reckless, but because you have no baseline yet. You don’t know what this agent proposes, how often it’s right, or which of your alert types it handles well.</blockquote><blockquote>Reader gives you a period where every action is a human-approved diff you can review — which is exactly the data you need to decide whether Privileged is earned. You can change the level later; you can’t un-restart a production node.</blockquote><p>There’s also a <strong>Detected resource types</strong> table on this tab that renders empty until the agent has actually scanned something. Don’t expect it to tell you anything at create time.</p><h3>What it deploys</h3><p>Hit Create and you get four resources plus a role assignment:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*vRHIQEWORYZHQ3ivbErUtw.png" /></figure><p>Four resources land in the group: the agent, Application Insights, a user-assigned managed identity, and a Log Analytics workspace.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*tTPJk14GDKm5_3RYLS6wmg.png" /></figure><p>Two things to flag for anyone doing capacity or cost planning. First, this is a <strong>user-assigned managed identity</strong> — it’s a standalone principal with its own lifecycle, which means it survives the agent and you own cleaning it up. Second, that Log Analytics workspace is a real workspace with real ingestion costs. The agent’s own bill is not your only new line item.</p><p>Deployment took a couple of minutes end to end.</p><h3>First contact</h3><p>The agent opens on an <strong>Activities</strong> tab with a chat thread, and immediately tells you it’s working.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*bSQidS7CKyNtBxDhV304fg.jpeg" /></figure><p>The agent runs discovery on its own before you ask it anything, then reports what it found.</p><blockquote>I’m currently gathering information about your setup and analyzing your resources, which might take a few minutes.</blockquote><p>Then, once it’s done:</p><blockquote>I analyzed your application’s resources across multiple resource groups, regions, and subscriptions. I then generated a resource map of the connections I identified based on the primary resource.</blockquote><p>This is the part I actually liked. It doesn’t wait for you to prompt it — it does discovery on its own and builds a topology before you ask a question. It also generates <strong>suggested prompts derived from what it found</strong>, which is a smarter onboarding pattern than a static example list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*y6-COuu3-ylGvdfeon3c6g.png" /></figure><p>Note the shape of these: fleet-wide posture questions, not “restart my app.”</p><p>That’s not “restart my app” — that’s <strong>fleet-wide posture querying</strong>, and it’s genuinely the thing that’s tedious to do by hand across subscriptions. “Show me everything with public ingress” is a question I’ve written a Resource Graph query for more than once.</p><p>The honest caveat: my playground resource group had exactly one resource in it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*4nJwJz-RLPC1Y1HDj1TVFA.png" /></figure><p>One resource, nothing to connect. This is what evaluating the product badly looks like.</p><blockquote><strong>You cannot evaluate this product on an empty resource group.</strong> Point it at something with actual topology or you’ll conclude it does nothing.</blockquote><h3>The tabs that reveal the actual product</h3><p>The chat is the demo. The other five tabs are the product.</p><h3>Incident management</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*4nJwJz-RLPC1Y1HDj1TVFA.png" /></figure><p>Two status columns, tracked separately: what the alert is doing, and what the agent is doing about it.</p><p>The incident grid tracks two status columns side by side: <em>Alert status</em> (New, Acknowledged) and <em>Agent status</em> (Pending user input, In progress, Completed). That’s the design tell. The agent is modeled as a <strong>participant in your existing incident flow</strong>, not a replacement for it. “Pending user input” as a first-class state is the Reader permission model showing up in the UI.</p><p><strong>Response plans</strong> is the piece I’d want to spend real time on. An agent that reasons from scratch every time is unpredictable; an agent executing a plan you wrote is a runbook that can read logs. That’s the version of this I’d actually trust in production.</p><h3>Scheduled tasks</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*U-3rkVOFUCudFQ9Ulv3HDA.png" /></figure><p>Where the agent stops being reactive — and where I’d start, rather than with live incidents.</p><p>“Create and manage scheduled tasks to automatically run agent actions at regular intervals,” tracked by active tasks, total tasks, and total runs. A nightly drift check or a weekly posture sweep is a much easier first win than trusting it with live incidents.</p><p><strong>Resource mapping</strong> gives you visual and grid views of discovered topology, filterable by subscription and primary resource type, and <strong>Daily reports</strong> are date-picker driven summaries.</p><h3>Knowledge base</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*7SpkrD6QekYFwz1p7RdUBw.png" /></figure><p>The difference between generic Azure advice and advice about <em>your</em> system.</p><p>The Knowledge base is underrated. Attaching your actual runbooks and architecture docs is what moves the agent from reciting general best practice to reasoning about your environment.</p><h3>Connectors</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*3kdH6mJL4Lp3bT16f1jgzA.jpeg" /></figure><p>Connector types available in preview: Kusto, TsgCrawler, KustoDataIndexer.</p><h3>Settings</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*NHYVL6DQhBqWncAczVOY0A.png" /></figure><p>The plumbing pane. Note “Agent permissions level: Reader” — and the Preview Upgrade Channel toggle, which I’d leave off.</p><p>The rest is plumbing: managed resource groups, a Grafana dashboard hookup, IAM, identity, and consumption. There’s a <strong>Stop agent</strong> button that halts all activity, and a <strong>Preview Upgrade Channel</strong> toggle — leave that off unless you want preview-of-the-preview behavior changing under you.</p><h3>Billing: learn this unit before you scale it</h3><p>Consumption is measured in <strong>Azure Agent Units (AAU)</strong>, and the model has two components:</p><blockquote>Monthly AAU billing reflects both the fixed always-on flow and variable usage from active flow.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*18-3irKCc0hDwxX-CIIqkg.png" /></figure><p>A fixed floor plus variable usage — and, this being preview, a consumption chart that wouldn’t load.</p><p>So: a <strong>fixed floor</strong> you pay for having the agent exist, plus <strong>variable cost</strong> for what it does. You set a monthly AAU limit and can adjust the active AAU allocation at any time.</p><p>Two operational consequences. One, the always-on component means an idle agent is not a free agent — parking one on every resource group “just in case” has a standing cost. Two, the variable component means anything that increases agent activity increases spend: a noisy alert source, an aggressive scheduled task cadence, a chatty incident. Wire the AAU limit up before you connect it to a production alert firehose, not after.</p><p>Worth noting: the consumption chart itself failed to load for me. It’s preview. Budget for rough edges.</p><h3>Where I’ve landed</h3><p>The framing that makes sense to me: this isn’t autonomous SRE, and pitching it that way sets it up to fail. It’s <strong>context assembly with a permission model attached</strong>. The value is in the first ten minutes of an incident — what changed, what’s connected to it, what does the telemetry say — and Reader mode is a bet that automating those ten minutes is worth something even if a human still makes every call.</p><p>If you’re going to try it, the sequence I’d suggest:</p><ol><li><strong>Reader mode, non-prod resource group with real topology.</strong> Empty groups teach you nothing.</li><li><strong>Load the Knowledge base with your actual runbooks</strong> before judging answer quality.</li><li><strong>Start with scheduled tasks, not live incidents.</strong> Nightly posture checks are low-stakes and they build the track record you need.</li><li><strong>Set the AAU limit on day one.</strong></li><li><strong>Only then</strong> consider whether Privileged has been earned — and scope it to one resource group, not the fleet.</li></ol><p>The permission radio button is the whole ballgame. Everything else in the wizard is defaults.</p><p><em>Preview product, subject to change — verify current behavior and pricing in Microsoft’s docs before making decisions on this. Subscription and endpoint identifiers in the screenshots above have been redacted. If you publish your own, check for subscription IDs, tenant and object principal IDs, agent endpoint hostnames, and the account email in the portal header — preview UIs put all of them on screen at once.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a1887b8c72d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/javarevisited/i-gave-an-ai-agent-reader-access-to-my-azure-subscription-heres-what-actually-happened-6a1887b8c72d">I Gave an AI Agent Reader Access to My Azure Subscription. Here’s What Actually Happened.</a> was originally published in <a href="https://medium.com/javarevisited">Javarevisited</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>