<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Devs Brasileiros</title>
    <description>The most recent home feed on Devs Brasileiros.</description>
    <link>https://devbrasil.forem.com</link>
    <atom:link rel="self" type="application/rss+xml" href="https://devbrasil.forem.com/feed"/>
    <language>en</language>
    <item>
      <title>¿Cuánta energía, agua, dinero e infraestructura estamos dispuestos a gastar para sostenerla?</title>
      <dc:creator>Miguel Angel Mendoza Cardenas</dc:creator>
      <pubDate>Sun, 03 May 2026 22:40:08 +0000</pubDate>
      <link>https://devbrasil.forem.com/miigangls/cuanta-energia-agua-dinero-e-infraestructura-estamos-dispuestos-a-gastar-para-sostenerla-57l3</link>
      <guid>https://devbrasil.forem.com/miigangls/cuanta-energia-agua-dinero-e-infraestructura-estamos-dispuestos-a-gastar-para-sostenerla-57l3</guid>
      <description>&lt;p&gt;La conversación sobre IA no debería quedarse solo en lo que la tecnología puede hacer.&lt;br&gt;
También deberíamos preguntarnos:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;¿Cuánta energía, agua, dinero e infraestructura estamos dispuestos a gastar para sostenerla?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hoy vemos una carrera acelerada por construir modelos más grandes, más centros de datos, más GPUs y más automatización. Las grandes empresas están invirtiendo miles de millones como si el retorno económico estuviera garantizado, pero todavía no existe suficiente claridad sobre el costo real por usuario, el margen neto de muchos productos de IA y el impacto energético a largo plazo.&lt;/p&gt;

&lt;p&gt;Y aquí aparece un punto crítico:&lt;/p&gt;

&lt;p&gt;Aunque los modelos se optimicen, el consumo total puede seguir creciendo.&lt;br&gt;
Si una tecnología se vuelve más eficiente y barata de usar, normalmente se usa más. Esto se conoce como efecto rebote. En IA puede pasar lo mismo: modelos más rápidos y económicos podrían llevar a integrar IA en todo: programación, marketing, soporte, publicidad, CRM, ERP, educación, salud, finanzas, agricultura, logística y agentes autónomos trabajando en segundo plano.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;El problema no es que la IA exista.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;El problema es una IA sin límites, sin medición clara y sin responsabilidad ambiental, económica y social.&lt;/p&gt;

&lt;p&gt;La IA puede ser una gran herramienta para mejorar productividad, ciencia, educación, salud y acceso al conocimiento. Pero si se usa principalmente para reemplazar personas, producir contenido basura, automatizar publicidad infinita y aumentar consumo sin medir impacto, deja de ser progreso y empieza a parecer extracción de recursos.&lt;br&gt;
No estamos listos para darle control completo de nuestros recursos a sistemas de IA.&lt;/p&gt;

&lt;p&gt;No estamos listos para una IA que crezca más rápido que la infraestructura eléctrica, las regulaciones y la capacidad ambiental del planeta.&lt;br&gt;
Por eso creo que necesitamos una conversación más seria sobre:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Medición obligatoria de energía, agua y emisiones por data center.&lt;/li&gt;
&lt;li&gt;Modelos grandes solo cuando realmente sean necesarios.&lt;/li&gt;
&lt;li&gt; Modelos pequeños y especializados para tareas concretas.&lt;/li&gt;
&lt;li&gt;Reportes claros de costos e ingresos reales de productos de IA.&lt;/li&gt;
&lt;li&gt; Límites regionales donde la red eléctrica o el agua no alcancen.&lt;/li&gt;
&lt;li&gt; Auditorías externas de impacto ambiental y económico.&lt;/li&gt;
&lt;li&gt;Regulación antes de aprobar nuevas cargas gigantes de infraestructura.
La pregunta no debería ser solo:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;“¿Qué puede hacer la IA?”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;La pregunta más importante debería ser:&lt;/p&gt;

&lt;p&gt;“¿Qué costo estamos dispuestos a pagar como sociedad para usarla sin límites?”&lt;/p&gt;

&lt;p&gt;La IA puede ser parte del futuro, sí.&lt;/p&gt;

&lt;p&gt;Pero no debería convertirse en una excusa para consumir energía, agua, talento, dinero e infraestructura sin control.&lt;/p&gt;

&lt;p&gt;IA sí, pero con límites.&lt;br&gt;
IA útil, no IA desbordada.&lt;br&gt;
IA supervisada, no IA dueña de nuestros recursos.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Mythos Found a 27-Year-Old Bug in OpenBSD. Your Code Is Next.</title>
      <dc:creator>Michelle Jones</dc:creator>
      <pubDate>Sun, 03 May 2026 22:37:32 +0000</pubDate>
      <link>https://devbrasil.forem.com/michelle-jones/mythos-found-a-27-year-old-bug-in-openbsd-your-code-is-next-2om2</link>
      <guid>https://devbrasil.forem.com/michelle-jones/mythos-found-a-27-year-old-bug-in-openbsd-your-code-is-next-2om2</guid>
      <description>&lt;p&gt;Anthropic's new Mythos Preview surfaced a 27-year-old vulnerability in OpenBSD — the most-audited operating system in commercial software — and generated 181 working Firefox exploits in a benchmark where Claude Opus 4.6 managed two. Eleven organizations are inside the launch cohort. The rest of us aren't, and the next Mythos won't be gated.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Mythos is, in hard numbers
&lt;/h2&gt;

&lt;p&gt;On April 7, Anthropic announced &lt;a href="https://red.anthropic.com/2026/mythos-preview/" rel="noopener noreferrer"&gt;Claude Mythos Preview&lt;/a&gt;, a frontier general-purpose model with a step-change in computer security capability. The numbers are the story:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A 27-year-old vulnerability in OpenBSD&lt;/strong&gt;, surfaced by Mythos in the TCP SACK implementation. OpenBSD's audit posture is the high bar in the industry.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A 16-year-old vulnerability in FFmpeg's H.264 codec&lt;/strong&gt; — the media component shipped in nearly every modern browser and video pipeline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A 17-year-old remote code execution vulnerability in FreeBSD's NFS implementation&lt;/strong&gt; (CVE-2026-4747).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Linux kernel vulnerabilities autonomously chained&lt;/strong&gt; by the model into a complete privilege escalation to root.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;181 working Firefox exploits&lt;/strong&gt; in a benchmark where Claude Opus 4.6 produced two — an order-of-magnitude leap in a single model generation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;271 vulnerabilities patched in Firefox 150&lt;/strong&gt; after Mozilla used an early version of Mythos Preview to scan its codebase. Mozilla described the model as "every bit as capable" as the best human security researchers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Thousands of zero-days&lt;/strong&gt; identified in operating systems, browsers, and infrastructure software in the weeks before announcement.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Anthropic was clear about something else worth dwelling on: the company did not explicitly train Mythos for these capabilities. They emerged as a downstream consequence of general improvements in code, reasoning, and autonomy. The same improvements that make the model a better defender make it a better attacker. That equivalence is the whole story.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Mythos isn't a security tool. It's a frontier model that happens to be very good at a security task that turns out to require general intelligence. The distinction matters: capability of this kind doesn't stay siloed.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The asymmetry just collapsed
&lt;/h2&gt;

&lt;p&gt;For thirty years, the offensive-defensive asymmetry in software security was: attackers needed to find one bug, defenders needed to find all of them. The economics favored attackers — but only because finding bugs was hard, slow, and required deep human expertise.&lt;/p&gt;

&lt;p&gt;Mythos didn't flip the asymmetry. It collapsed the cost difference between the two activities. The same model that can find thousands of zero-days for a defender can find thousands of zero-days for an attacker. There is no "attacker mode" and "defender mode." There is one capability with two uses, and the user picks.&lt;/p&gt;

&lt;p&gt;For the launch cohort inside Project Glasswing — including Microsoft, Google, Apple, AWS, JPMorganChase, Nvidia, the Linux Foundation, and major security vendors — this is a defensive windfall. They get to find and patch their own bugs before anyone else can. For everyone else, the math is uglier. When this class of capability becomes broadly available (and it will), the same scan that takes Apple a quiet weekend will take a determined adversary the same quiet weekend.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What this changes about threat modeling&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Pre-Mythos, the assumption underlying most enterprise risk frameworks was that vulnerabilities cost time to discover. Post-Mythos, that assumption no longer holds for sophisticated actors. The vulnerabilities are already there, in code that's already deployed. The only question is who finds them first.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Project Glasswing's narrow gate
&lt;/h2&gt;

&lt;p&gt;Anthropic's response to the dual-use problem is &lt;a href="https://www.anthropic.com/glasswing" rel="noopener noreferrer"&gt;Project Glasswing&lt;/a&gt;: instead of releasing Mythos publicly, the model is gated to vetted partners doing defensive security work on critical infrastructure. The launch cohort is eleven outside organizations — AWS, Apple, Broadcom, Cisco, CrowdStrike, Google, JPMorganChase, the Linux Foundation, Microsoft, NVIDIA, and Palo Alto Networks — with another forty-plus organizations given extended access. Anthropic has committed $100M in Mythos usage credits and additional funding to upstream open-source security ($2.5M to Alpha-Omega and OpenSSF, $1.5M to the Apache Software Foundation). On April 21, Bloomberg and TechCrunch reported that &lt;a href="https://www.bloomberg.com/news/articles/2026-04-21/anthropic-s-mythos-model-is-being-accessed-by-unauthorized-users" rel="noopener noreferrer"&gt;a small group of unauthorized users&lt;/a&gt; — reportedly a third-party Anthropic contractor who guessed the model's online location — had accessed Mythos on the same day Anthropic announced the limited release.&lt;/p&gt;

&lt;p&gt;The Glasswing structure is a reasonable response to a hard problem. The cohort is a serious set of defenders, the Linux Foundation's inclusion broadens the open-source impact, and the upstream funding commitments are not trivial. But the structure has implications worth thinking through:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The launch cohort is well-resourced and concentrated.&lt;/strong&gt; Megacaps, major security vendors, and one open-source foundation. Most enterprises, healthcare systems, utilities, and government agencies are not in the launch cohort.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The cohort is the world's biggest target.&lt;/strong&gt; Concentrating frontier offensive capability inside a known list of well-resourced firms makes those firms exponentially more valuable to compromise. The April 21 unauthorized-access incident is the canary, not the bird.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The gate is temporary.&lt;/strong&gt; The capability emerged from general intelligence improvements. Other labs are on the same trajectory. Within twelve to twenty-four months, equivalent capability will be available somewhere — through a competitor, an open-weights model, or a leak. Anthropic's caution buys the industry time. It does not buy the industry safety.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The defenders inside the gate have a head start.&lt;/strong&gt; The defenders outside the gate don't. By the time Mythos-class capability is broadly available, the cohort will have spent a year hardening their stacks. Everyone else will be starting cold.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of this is criticism of Glasswing. It's a description of where the rest of the industry sits: outside the gate, on the clock, with a year-or-so head start to spend on infrastructure that doesn't assume bug discovery is expensive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why your legacy stack is the easy target
&lt;/h2&gt;

&lt;p&gt;If Mythos found a bug in OpenBSD that survived twenty-seven years of obsessive auditing, what does it find in code that's been quietly running in production since 1998 with no audit at all?&lt;/p&gt;

&lt;p&gt;Legacy systems are uniquely exposed to this class of capability for reasons that have nothing to do with their original quality:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The code was written in a different threat model.&lt;/strong&gt; COBOL batch jobs, C-based middleware, and FORTRAN scientific computing were written assuming network isolation, trusted operators, and small adversary budgets. None of those assumptions hold today.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The maintainers are gone.&lt;/strong&gt; The engineers who wrote the original code retired a decade ago. The people who maintain it now read it; they don't reason about it. A capable adversary scanning the same code reasons about it just fine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The scale is enormous.&lt;/strong&gt; A typical Fortune 100 enterprise runs millions of lines of legacy code. Manual audit is impossible at this volume; automated tools were built for the threat model where bug discovery was expensive. Mythos-class capability inverts that economics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The code is statistically interesting.&lt;/strong&gt; Old code has been running long enough that bugs which never triggered in production are still latent. The defects are there. They just haven't been found yet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The patch path is brittle.&lt;/strong&gt; Even when a bug is found in a legacy system, the cost of patching is often catastrophic — recompiling a forty-year-old build chain, validating against a forty-year-old behavior contract, regression-testing dependencies that may no longer have maintainers. "We can't patch this" is a common honest answer for legacy systems, and adversaries know it.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;The 27-year-old OpenBSD bug is the canary. OpenBSD is among the most-audited code in the world. Your COBOL payroll system, your FORTRAN actuarial engine, your C-based supply chain ETL — they have not had that audit. They have the same age. They do not have the same hardening.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The honest framing is this: Mythos-class capability does not introduce new vulnerabilities. It surfaces vulnerabilities that have been latent in your systems for years or decades. The defects are already there. The economics of finding them just changed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The defender's playbook for the next 90 days
&lt;/h2&gt;

&lt;p&gt;If we accept that Mythos-class capability will be broadly available within twenty-four months and that legacy systems are the most exposed surface, the defensive question is what to do this quarter that materially reduces risk. Five things worth prioritizing.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Get an honest inventory of your legacy attack surface
&lt;/h3&gt;

&lt;p&gt;Most enterprises do not have an accurate inventory of what legacy code they actually run, what it touches, and what depends on it. The first step is unglamorous: catalog the legacy systems, their network exposure, the data they process, and the dependencies that would break if they went down. You cannot defend what you cannot see.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Build the SBOM you should already have
&lt;/h3&gt;

&lt;p&gt;A Software Bill of Materials isn't a compliance artifact; it's the data structure you need to answer the question "is the new zero-day in our stack?" in minutes instead of weeks. Federal contractors will need one for compliance under recent OMB guidance. Build it now, before the next Mythos disclosure forces the question.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Modernize the highest-exposure legacy primitives first
&lt;/h3&gt;

&lt;p&gt;Total legacy modernization is a multi-year program. Prioritized modernization isn't. Identify the legacy components with (a) network exposure, (b) sensitive data flow, and (c) no maintainer — and modernize those first. Pull the C-based parser out of the perimeter. Replace the COBOL service that processes external data with a memory-safe equivalent. Leave the back-office batch job for next year.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Assume the patch tsunami is coming
&lt;/h3&gt;

&lt;p&gt;If Mythos-class scanning produces ten thousand findings against your stack, your security team cannot triage ten thousand findings by hand. Invest in automated patch prioritization, exploit-prediction scoring (EPSS), and patch-deployment automation now — before you need it under pressure. The bottleneck of the next two years is not finding bugs. It's deciding which ones to patch first and shipping the patches without breaking production.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Threat-model with AI-assisted attackers in scope
&lt;/h3&gt;

&lt;p&gt;Update your threat models to assume adversaries have Mythos-class capability. The questions change. "What's our mean-time-to-detect?" matters more than "Is this code vulnerable?" (it almost certainly is). "What's the blast radius if a single legacy primitive is fully compromised?" matters more than "Is this primitive likely to be compromised?" (it is more likely than it was). Defense in depth, network segmentation, and rapid containment become first-class controls, not best-practice nice-to-haves.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The shift in posture&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Pre-Mythos: defenders optimize for bug-finding cost. Post-Mythos: defenders optimize for time-to-patch and blast-radius containment, because bugs will be found whether you find them first or someone else does.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  A note for federal contractors
&lt;/h2&gt;

&lt;p&gt;Federal contractors and agencies have an extra layer of implications: the procurement and compliance machinery that governs federal software is going to reckon with this — slowly, but inexorably. Expect SBOM and provenance requirements (already mandated under EO 14028) to get enforced in earnest. Expect NIST SSDF / SP 800-218 to shift from documentation to continuous attestation. Expect legacy waivers to become harder to defend, with risk-acceptance memos required to explicitly acknowledge Mythos-class threat. Expect patch SLAs to compress — sub-week response on high-severity findings against widely-deployed primitives is the realistic floor, not the ceiling. Vendor due-diligence will move from annual questionnaires to continuous attestation.&lt;/p&gt;

&lt;p&gt;The realistic posture for the next twenty-four months is not "modernize everything." It is "modernize the exposed surface, instrument the rest, and assume the rest will eventually be reached." The agencies and primes that prepare for that reality now will not be the ones writing breach-notification letters in 2027.&lt;/p&gt;

&lt;h2&gt;
  
  
  The honest read
&lt;/h2&gt;

&lt;p&gt;Mythos is not a doomsday model. It is a step on a curve that the entire industry has been on for several years, and Anthropic's decision to gate it through Glasswing is, in our view, the responsible move. We don't think the right reaction is panic, and we don't think the right reaction is dismissal.&lt;/p&gt;

&lt;p&gt;The right reaction is to use the Glasswing window — the twelve to twenty-four months where this capability is concentrated in twelve hands and a national-security agency — to do the unglamorous defensive work that everyone has been deferring. Inventory the legacy. Build the SBOM. Modernize the exposed primitives. Automate the patch path. Threat-model with AI-assisted attackers in scope.&lt;/p&gt;

&lt;p&gt;We don't know exactly when the next Mythos lands or who ships it. We do know it will not be gated like this one. The defenders who used the window will be fine. The defenders who didn't will be writing the postmortem.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;&lt;a href="https://codavyn.com" rel="noopener noreferrer"&gt;Codavyn&lt;/a&gt; helps enterprise and federal teams modernize the exposed surface of legacy stacks before AI-assisted scanning catches up. Custom software, modernization, and a threat model that assumes the attacker is reading your code as fast as you are. &lt;a href="https://codavyn.com/solutions/legacy-modernization.html" rel="noopener noreferrer"&gt;See our modernization services&lt;/a&gt; or &lt;a href="https://calendly.com/codavyn-support/30min" rel="noopener noreferrer"&gt;book a 30-minute risk review&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>ai</category>
      <category>legacy</category>
      <category>devops</category>
    </item>
    <item>
      <title>Logic Apps Agent Loop + MCP: Two Bugs Worth Knowing About</title>
      <dc:creator>Daniel Jonathan</dc:creator>
      <pubDate>Sun, 03 May 2026 22:35:02 +0000</pubDate>
      <link>https://devbrasil.forem.com/imdj/logic-apps-agent-loop-mcp-two-bugs-worth-knowing-about-3h6n</link>
      <guid>https://devbrasil.forem.com/imdj/logic-apps-agent-loop-mcp-two-bugs-worth-knowing-about-3h6n</guid>
      <description>&lt;p&gt;I spent the long weekend pushing Logic Apps MCP server capabilities further than I had before — and hit two bugs worth documenting. Both are filed. If you're building in this space, save yourself the debugging time.&lt;/p&gt;




&lt;h2&gt;
  
  
  Context
&lt;/h2&gt;

&lt;p&gt;If you've been following along, the MCP server and BODMAS Agent are covered in the previous posts. This post is just about what broke when I wired them together.&lt;/p&gt;




&lt;h2&gt;
  
  
  Bug 1 — Intermittent duplicate key error at tool registration
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What happens
&lt;/h3&gt;

&lt;p&gt;The Agent Loop fails with a &lt;code&gt;BadRequest&lt;/code&gt; before making a single MCP call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTTP request failed: 'An item with the same key has already been added. Key: {tool_name}'.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The key referenced in the error — &lt;code&gt;BasicArithmeticMCP&lt;/code&gt;, &lt;code&gt;ExtendedArithmeticMCP&lt;/code&gt;, whatever you name it — appears &lt;strong&gt;exactly once&lt;/strong&gt; in the workflow definition. There is no actual duplicate in the JSON.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F59mjunr8ll2k29ixcbvi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F59mjunr8ll2k29ixcbvi.png" alt=" " width="800" height="299"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What makes it particularly frustrating to diagnose
&lt;/h3&gt;

&lt;p&gt;It is intermittent. Some runs fail, others succeed with identical configuration and identical input. No changes between a failing and a succeeding run — same workflow, same expression, same everything.&lt;/p&gt;

&lt;h3&gt;
  
  
  Load test
&lt;/h3&gt;

&lt;p&gt;I fired 5 to 10 parallel requests at the Agent Loop as a mini stress test. It failed — the duplicate key error appeared across multiple runs in the batch.&lt;/p&gt;

&lt;p&gt;Sequential calls with proper spacing between them worked fine.&lt;/p&gt;

&lt;h3&gt;
  
  
  What you can't do
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;Agent&lt;/code&gt; action has a default retry policy, but it does not help here. A &lt;code&gt;BadRequest&lt;/code&gt; (400) is not treated as a transient error — the retry policy targets server-side failures (5xx), not client errors. So even with retries configured, the duplicate key error causes an immediate terminal failure. There is no clean in-workflow workaround.&lt;/p&gt;




&lt;h2&gt;
  
  
  Bug 2 — MCP Connector does not support OAuth
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What happens
&lt;/h3&gt;

&lt;p&gt;Both the MCP server and the MCP client are Logic Apps Standard. When OAuth is configured on the MCP server side, the workflow doesn't trigger at all — it never reaches the Logic App. The connection gets corrupted at design time with the OAuth setup, and no run is created.&lt;/p&gt;

&lt;p&gt;Tools don't load but you can save the workflow.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F06jgzy48yneghmdigabj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F06jgzy48yneghmdigabj.png" alt=" " width="800" height="325"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You get a 502 bad gateway error when you push a request.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyn8pp4m1d0kf189ppmnj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyn8pp4m1d0kf189ppmnj.png" alt=" " width="800" height="431"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The same endpoint called directly from Postman with a valid bearer token works fine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F881o3w1k4rh7jl8s5n1t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F881o3w1k4rh7jl8s5n1t.png" alt=" " width="800" height="537"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why it matters
&lt;/h3&gt;

&lt;p&gt;To get the Agent Loop working, the MCP server has to run with either &lt;strong&gt;anonymous authentication&lt;/strong&gt; or &lt;strong&gt;key-based authentication&lt;/strong&gt;. OAuth simply does not work with the built-in MCP client connector.&lt;/p&gt;




&lt;h2&gt;
  
  
  Current state
&lt;/h2&gt;

&lt;p&gt;Both issues are filed on the Logic Apps GitHub repo:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/Azure/logicapps/issues/1526" rel="noopener noreferrer"&gt;Agent Loop: "An item with the same key has already been added" when using McpClientTool&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The issue covers both bugs with full workflow JSON, reproduction steps, and screenshots. If you've hit either of these, add a reaction or comment — the more signal on the issue, the better.&lt;/p&gt;




&lt;h2&gt;
  
  
  What works in the meantime
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Set &lt;code&gt;"type": "anonymous"&lt;/code&gt; in the &lt;code&gt;McpServerEndpoints&lt;/code&gt; authentication block in &lt;code&gt;host.json&lt;/code&gt; — removes the OAuth blocker for dev and demo use&lt;/li&gt;
&lt;li&gt;Accept the intermittent failure rate on the Agent Loop and re-trigger manually when it hits — not a fix, but the success rate is high enough to keep building and testing&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Both issues are filed. If you hit either of them, the GitHub issue is the right place to add signal.&lt;/p&gt;

</description>
      <category>logicapps</category>
      <category>mcp</category>
      <category>agentloop</category>
      <category>azure</category>
    </item>
    <item>
      <title>Feature Flags That Actually Ship: Lessons From the Trenches</title>
      <dc:creator>Pravin Khandke</dc:creator>
      <pubDate>Sun, 03 May 2026 22:22:26 +0000</pubDate>
      <link>https://devbrasil.forem.com/pravin-khandke/feature-flags-that-actually-ship-lessons-from-the-trenches-b7a</link>
      <guid>https://devbrasil.forem.com/pravin-khandke/feature-flags-that-actually-ship-lessons-from-the-trenches-b7a</guid>
      <description>&lt;p&gt;It was 2:47 AM when the alerts started. A seemingly straightforward database migration had triggered a cascading failure across three downstream services, and our payment processing pipeline was dropping roughly 12% of transactions. The on-call engineer didn't need to wake anyone, locate a rollback script, or wait for a CI pipeline to churn through another deploy. She opened the LaunchDarkly dashboard, toggled one kill switch, and the system reverted to the stable path within seconds. The migration was still there, still deployed — just no longer live.&lt;/p&gt;

&lt;p&gt;That moment crystallized something I'd been learning across two and a half decades of building software: separating deployment from release isn't a nice-to-have. It's the difference between a system you trust and one you fear touching on a Friday afternoon.&lt;/p&gt;

&lt;p&gt;This article captures what I've learned using feature flags in production — the patterns that held up under pressure, the mistakes I've watched teams repeat (and made myself), and the practical steps you can take whether you're evaluating LaunchDarkly or already deep into your feature flag journey. I'm publishing this here first because the developer community gives the most honest feedback, and I'd rather refine these ideas with you before they land on LeadDev and DZone.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Patterns That Actually Matter
&lt;/h2&gt;

&lt;p&gt;When you first start with feature flags, everything looks like a toggle. The key consideration here is understanding that not all flags serve the same purpose, and conflating them creates the very fragility you're trying to avoid.&lt;/p&gt;

&lt;h3&gt;
  
  
  Release Flags
&lt;/h3&gt;

&lt;p&gt;These gate unfinished features. They're temporary by design — the flag exists while the feature stabilizes, then gets removed. The mistake I see most often is teams treating release flags as permanent configuration knobs. When a flag has been at 100% for three months, nobody remembers which code path is the "real" one, and your test matrix silently doubles.&lt;/p&gt;

&lt;p&gt;In practice, this means setting a removal date the moment you create the flag. Our team attaches an expiration tag to every release flag and runs a weekly script that surfaces anything past its removal window. We borrowed from the FlagShark playbook here: flags older than 90 days that aren't operational kill switches get an automatic ticket filed.&lt;/p&gt;

&lt;p&gt;Centralize your flag keys in a single file, it gives you a one-glance inventory and prevents the typo-driven debugging sessions that scattered string literals create:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// code/src/flags.js — single source of truth for all flag keys&lt;/span&gt;
&lt;span class="c1"&gt;// See companion project: code/src/flags.js&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;FLAGS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Kill switch: wraps the payment provider integration.&lt;/span&gt;
  &lt;span class="c1"&gt;// Defaults to FALSE (safe path) if SDK is unreachable.&lt;/span&gt;
  &lt;span class="na"&gt;PAYMENT_PROVIDER_KILL_SWITCH&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ops_payments_new_provider&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

  &lt;span class="c1"&gt;// Release flag: gates the new checkout UI.&lt;/span&gt;
  &lt;span class="c1"&gt;// Temporary — remove after 100% rollout + 14 days stable.&lt;/span&gt;
  &lt;span class="na"&gt;NEW_CHECKOUT_UI&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;release_checkout_redesigned_ui&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

  &lt;span class="c1"&gt;// Experiment flag: percentage rollout of recommendation engine.&lt;/span&gt;
  &lt;span class="na"&gt;RECOMMENDATION_ENGINE&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;experiment_recommendations_v2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

  &lt;span class="c1"&gt;// Permission flag: enterprise-only feature.&lt;/span&gt;
  &lt;span class="na"&gt;ENTERPRISE_ANALYTICS&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;permission_enterprise_analytics&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The naming convention follows a pattern: &lt;code&gt;{type}_{team/domain}_{feature}_{detail}&lt;/code&gt;. This tells you at a glance what a flag does, who owns it, and when it should be removed. Release flags should be short-lived. Ops flags (kill switches) should be reviewed annually. Experiment flags expire when the experiment ends.&lt;/p&gt;

&lt;p&gt;Here's the LaunchDarkly client initialization — a singleton that streams flag rules and caches them locally so evaluations work even during network interruptions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// code/src/launchdarkly.js — LD client singleton&lt;/span&gt;
&lt;span class="c1"&gt;// See companion project: code/src/launchdarkly.js&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;LaunchDarkly&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@launchdarkly/node-server-sdk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;initLaunchDarkly&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sdkKey&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ldClient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;LaunchDarkly&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;init&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sdkKey&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;ldClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;waitForInitialization&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;timeout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;[LaunchDarkly] Client initialized successfully&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;warn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;[LaunchDarkly] Initialization timed out — operating from cache or defaults&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;ldClient&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Kill Switches
&lt;/h3&gt;

&lt;p&gt;A kill switch is a different animal entirely. It's not about shipping features — it's about operational safety. Every integration point with an external system, every experimental code path, every performance-sensitive refactor gets wrapped in one.&lt;/p&gt;

&lt;p&gt;The pattern that saved us at 2:47 AM looked like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// code/src/server.js — Kill Switch pattern&lt;/span&gt;
&lt;span class="c1"&gt;// See companion project: code/src/server.js, GET /api/payment/status&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/api/payment/status&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ip&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="c1"&gt;// Default: false = use safe fallback path.&lt;/span&gt;
  &lt;span class="c1"&gt;// If LaunchDarkly is unreachable, the SDK returns the default.&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;useNewProvider&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;boolVariation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nx"&gt;FLAGS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PAYMENT_PROVIDER_KILL_SWITCH&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="kc"&gt;false&lt;/span&gt;   &lt;span class="c1"&gt;// &amp;lt;-- THE CRITICAL DEFAULT: safe path&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;useNewProvider&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;provider&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;new-payment-provider&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ok&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c1"&gt;// Safe fallback: the existing, battle-tested provider.&lt;/span&gt;
  &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;provider&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;existing-payment-provider&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ok&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The critical design requirement: the fallback path must be the one that works. If your kill switch guards a new payment provider integration, the fallback routes through the existing, battle-tested provider. If the flag evaluation itself fails due to a network issue, LaunchDarkly's SDK returns the default value you specify — which should always trigger the safe path.&lt;/p&gt;

&lt;h3&gt;
  
  
  Percentage Rollouts
&lt;/h3&gt;

&lt;p&gt;Deterministic hashing based on a stable user attribute means the same user sees the same experience across sessions. This matters more than you'd think — users notice inconsistency, and your metrics become meaningless if a single user bounces between variants.&lt;/p&gt;

&lt;p&gt;Our rollout cadence settled into a rhythm: internal team for one day, 1% of external users for a day, then 5%, 25%, and full release if all guardrails stay green. At each stage, we watch application error rates, API latency, and business metrics. LaunchDarkly's Guarded Releases can automate the pause-or-rollback decision if a threshold breaches, which removes the 3 AM judgment call from the equation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// code/src/server.js — Percentage rollout with string variation&lt;/span&gt;
&lt;span class="c1"&gt;// See companion project: code/src/server.js, GET /api/recommendations&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/api/recommendations&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;anonymous&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="c1"&gt;// stringVariation for multi-variant experiments.&lt;/span&gt;
  &lt;span class="c1"&gt;// Deterministic hashing on user key ensures the same user&lt;/span&gt;
  &lt;span class="c1"&gt;// consistently sees the same variant.&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;variant&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringVariation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nx"&gt;FLAGS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;RECOMMENDATION_ENGINE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;v1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;   &lt;span class="c1"&gt;// default: existing recommendation engine&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;variant&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;v2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;engine&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;collaborative-filtering-v2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;recommendations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Item-A&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Item-B&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Item-C&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;engine&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;popularity-based-v1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;recommendations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Item-X&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Item-Y&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Item-Z&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And here's user targeting in action — enterprise features gated by a custom attribute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// code/src/server.js — Targeting with custom attributes&lt;/span&gt;
&lt;span class="c1"&gt;// See companion project: code/src/server.js, GET /api/analytics/dashboard&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/api/analytics/dashboard&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;anonymous&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;plan&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;plan&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;free&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;// custom attribute for targeting rules&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;canAccess&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;boolVariation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nx"&gt;FLAGS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ENTERPRISE_ANALYTICS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;canAccess&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;403&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Enterprise analytics require the Enterprise plan.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;dashboard&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;advanced-analytics&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;metrics&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;revenue-per-user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;churn-prediction&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cohort-retention&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All the code above comes from the companion project — a fully runnable Express app in &lt;code&gt;code/src/server.js&lt;/code&gt;. Clone it, set your SDK key, and you'll see every pattern respond to flag toggles in real time without a server restart.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Questions Your Team Will Ask (And How to Answer Them)
&lt;/h2&gt;

&lt;p&gt;When you introduce feature flags at scale, you'll hear the same objections. I've had these conversations enough times to recognize the patterns.&lt;/p&gt;

&lt;h3&gt;
  
  
  "Doesn't this just create more code to maintain?"
&lt;/h3&gt;

&lt;p&gt;Yes, if you treat flags as permanent. The entire discipline of flag lifecycle management exists because flags without expiration dates become technical debt with a feature flag logo. The countermeasure is mechanical, not cultural: automation that flags stale toggles, creates cleanup tasks, and blocks new flags when the ratio of creation to removal tips past 2:1.&lt;/p&gt;

&lt;p&gt;We enforce a simple rule: every flag has an owner, an expiration date, and a ticket filed at creation time for its eventual removal. When a release flag hits 100% rollout for two weeks, the cleanup PR gets auto-generated. This isn't optional — it's how you prevent the flag graveyard.&lt;/p&gt;

&lt;h3&gt;
  
  
  "What if the flag service goes down?"
&lt;/h3&gt;

&lt;p&gt;LaunchDarkly SDKs maintain a streaming connection and cache flag rules locally. If the connection drops, evaluations continue against the cached ruleset. The &lt;code&gt;boolVariation&lt;/code&gt; call includes a default value parameter precisely for this scenario — and every code path I write defaults to the safe, existing behavior.&lt;/p&gt;

&lt;p&gt;In the 2:47 AM scenario, the kill switch worked because the SDK had already cached the flag state. Even if LaunchDarkly's service had been unavailable at that exact moment, the toggle would have still evaluated correctly against the local cache.&lt;/p&gt;

&lt;h3&gt;
  
  
  "Can't we just build this ourselves?"
&lt;/h3&gt;

&lt;p&gt;Technically, yes. I've seen teams build internal feature flag systems. I've also seen those same teams spend sprint after sprint maintaining edge-case evaluation logic, building dashboards, and debugging deterministic hashing when they could have been building their actual product. The key consideration here isn't whether you can build it — it's whether maintaining a feature flag platform is where your team's time creates the most value.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where We Go From Here
&lt;/h2&gt;

&lt;p&gt;If you're starting with feature flags, begin with one operational kill switch on a high-risk integration. Get comfortable with the pattern, build the muscle memory for flag cleanup, then expand to release flags and progressive rollouts. The most successful adoptions I've seen started small and grew organically, rather than attempting a company-wide flag-everything initiative overnight.&lt;/p&gt;

&lt;p&gt;For deeper dives, the LaunchDarkly documentation on &lt;a href="https://launchdarkly.com/docs/home/releases/guarded-rollouts" rel="noopener noreferrer"&gt;guarded rollouts&lt;/a&gt; and &lt;a href="https://launchdarkly.com/docs/fed-docs/home/flags/killswitch" rel="noopener noreferrer"&gt;kill switch flags&lt;/a&gt; is excellent. The &lt;a href="https://flagshark.com/blog/feature-flag-best-practices-launchdarkly-users/" rel="noopener noreferrer"&gt;FlagShark best practices guide&lt;/a&gt; informed much of our internal naming and lifecycle discipline. And if you want to understand why stale flags genuinely keep me up at night, read about &lt;a href="https://flagshark.com/blog/460-million-dollar-feature-flag-knight-capital/" rel="noopener noreferrer"&gt;the $460M Knight Capital incident&lt;/a&gt; — a stark reminder that unreachable code paths aren't harmless.&lt;/p&gt;

&lt;p&gt;The original version of this article, along with a companion project demonstrating every pattern discussed here, lives on this blog. I'll be expanding it based on your questions and feedback before it goes to LeadDev and DZone — so if something here sparks a thought or a disagreement, I'd genuinely like to hear it in the comments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Separate deployment from release.&lt;/strong&gt; A deployed change that isn't live yet is a safety net. A deployed change that's fully live with no way to turn it off is a liability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Treat flag cleanup as a first-class engineering practice.&lt;/strong&gt; Naming conventions, expiration dates, and automated removal aren't overhead — they're what keep your codebase comprehensible six months from now.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Default to safety.&lt;/strong&gt; Every flag evaluation should fall back to the known-good path. The time to verify your kill switch works isn't during an incident at 2:47 AM.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start small, automate early, and build the habits before you build the flag count.&lt;/strong&gt; The teams I've watched succeed with feature flags aren't the ones with the most sophisticated tooling — they're the ones with the most disciplined lifecycle management.&lt;/p&gt;

</description>
      <category>launchdarkly</category>
      <category>devcyclechallenge</category>
    </item>
    <item>
      <title>How to Prevent IDOR Vulnerabilities in Django REST APIs</title>
      <dc:creator>Stefan</dc:creator>
      <pubDate>Sun, 03 May 2026 22:21:49 +0000</pubDate>
      <link>https://devbrasil.forem.com/securitystefan/how-to-prevent-idor-vulnerabilities-in-django-rest-apis-5763</link>
      <guid>https://devbrasil.forem.com/securitystefan/how-to-prevent-idor-vulnerabilities-in-django-rest-apis-5763</guid>
      <description>&lt;h1&gt;
  
  
  How to Prevent IDOR Vulnerabilities in Django REST APIs
&lt;/h1&gt;

&lt;p&gt;An authenticated user changes &lt;code&gt;/api/orders/42/&lt;/code&gt; to &lt;code&gt;/api/orders/43/&lt;/code&gt; and reads someone else's order. No privilege escalation needed — the endpoint just returns it. This is IDOR in its simplest form, and it's endemic in Django REST Framework code because DRF makes it trivially easy to wire up a &lt;code&gt;ModelViewSet&lt;/code&gt; that exposes every object in a table. The authentication layer does its job; the authorization layer was never written.&lt;/p&gt;

&lt;h2&gt;
  
  
  How IDOR Attacks Work Against Django REST APIs
&lt;/h2&gt;

&lt;p&gt;IDOR (Insecure Direct Object Reference) happens when an API accepts a user-controlled identifier — a URL path segment, query param, or request body field — and retrieves the corresponding object without verifying that the requesting user has any right to it. Authentication proves who you are. Authorization proves what you can touch. Most IDOR bugs exist because the first check was implemented and the second was skipped.&lt;/p&gt;

&lt;p&gt;A typical attack against a vulnerable DRF app:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Attacker authenticates as &lt;code&gt;alice@example.com&lt;/code&gt; and creates an order. The response contains &lt;code&gt;{"id": 101, ...}&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Attacker sends &lt;code&gt;GET /api/orders/100/&lt;/code&gt;. The API returns Bob's order because nothing checks ownership.&lt;/li&gt;
&lt;li&gt;Attacker scripts a loop from ID 1 to 10000, dumps every order in the database. Sequential integer PKs make enumeration take seconds.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is the vulnerable ViewSet pattern we see most often in real codebases:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# views.py — VULNERABLE
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;rest_framework&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;viewsets&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;rest_framework.permissions&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;IsAuthenticated&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.models&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Order&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.serializers&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OrderSerializer&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;OrderViewSet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;viewsets&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ModelViewSet&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;serializer_class&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;OrderSerializer&lt;/span&gt;
    &lt;span class="n"&gt;permission_classes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;IsAuthenticated&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;  &lt;span class="c1"&gt;# proves identity, not ownership
&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_queryset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="c1"&gt;# Returns every order in the database — any authenticated user
&lt;/span&gt;        &lt;span class="c1"&gt;# can retrieve, update, or delete any order by guessing its PK.
&lt;/span&gt;        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;IsAuthenticated&lt;/code&gt; blocks anonymous requests, which makes it look like the endpoint is secured. But any valid session token — including one the attacker registered themselves — bypasses it. The &lt;code&gt;retrieve()&lt;/code&gt;, &lt;code&gt;update()&lt;/code&gt;, and &lt;code&gt;destroy()&lt;/code&gt; actions in &lt;code&gt;ModelViewSet&lt;/code&gt; all call &lt;code&gt;get_object()&lt;/code&gt;, which calls &lt;code&gt;get_queryset()&lt;/code&gt; and then filters by the URL &lt;code&gt;pk&lt;/code&gt;. Since &lt;code&gt;get_queryset()&lt;/code&gt; returns everything, &lt;code&gt;get_object()&lt;/code&gt; happily resolves any ID.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fixing IDOR by Scoping Querysets to the Authenticated User
&lt;/h2&gt;

&lt;p&gt;The correct fix is to scope &lt;code&gt;get_queryset()&lt;/code&gt; to the authenticated user so that the object simply doesn't exist from the API's perspective if it doesn't belong to the requester. This gives you a 404 instead of a 403, which is almost always the right behavior — a 403 confirms the resource exists and leaks information about the ID space.&lt;/p&gt;

&lt;p&gt;Add a second layer with a custom &lt;code&gt;BasePermission&lt;/code&gt; that implements &lt;code&gt;has_object_permission&lt;/code&gt;. The queryset filter handles list and retrieve; the object permission handles mutating actions where DRF calls &lt;code&gt;check_object_permissions&lt;/code&gt; explicitly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# permissions.py
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;rest_framework.permissions&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;BasePermission&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;IsOwner&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BasePermission&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;has_object_permission&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="c1"&gt;# Explicit ownership check — queryset scoping is the first line,
&lt;/span&gt;        &lt;span class="c1"&gt;# but we defend in depth for any path that bypasses get_queryset.
&lt;/span&gt;        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;owner&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# views.py — FIXED
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;rest_framework&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;viewsets&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;rest_framework.permissions&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;IsAuthenticated&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.models&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Order&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.serializers&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OrderSerializer&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.permissions&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;IsOwner&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;OrderViewSet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;viewsets&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ModelViewSet&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;serializer_class&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;OrderSerializer&lt;/span&gt;
    &lt;span class="n"&gt;permission_classes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;IsAuthenticated&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;IsOwner&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_queryset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="c1"&gt;# Scope to the requesting user at the ORM layer — objects that don't
&lt;/span&gt;        &lt;span class="c1"&gt;# belong to this user never enter the retrieval pipeline at all.
&lt;/span&gt;        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;owner&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;select_related&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;owner&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;perform_create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;serializer&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="c1"&gt;# Bind the new object to the authenticated user so the POST path
&lt;/span&gt;        &lt;span class="c1"&gt;# can't accept a user-controlled owner field.
&lt;/span&gt;        &lt;span class="n"&gt;serializer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;owner&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Filtering at the queryset layer beats checking IDs inside the view body for two reasons. First, it's impossible to forget: every action — list, retrieve, update, partial update, destroy — goes through &lt;code&gt;get_queryset()&lt;/code&gt;. Second, it eliminates a whole class of time-of-check / time-of-use bugs where you check ownership in &lt;code&gt;get&lt;/code&gt; but forget to re-check in &lt;code&gt;patch&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The same defense-in-depth principle applies to &lt;a href="https://www.codereviewlab.com/learning/grpc-security" rel="noopener noreferrer"&gt;object-level auth in gRPC services&lt;/a&gt; and any RPC-style API where the framework doesn't give you a queryset abstraction: filter first, check permissions on the resolved object second.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use Unguessable Identifiers Instead of Sequential IDs
&lt;/h2&gt;

&lt;p&gt;Sequential integer PKs are an enumeration gift. Once an attacker has one valid ID, they have a roadmap to every other record. Replacing exposed identifiers with UUIDs or opaque slugs doesn't fix the authorization hole — that requires the fixes above — but it raises the cost of bulk enumeration from "write a loop" to "brute-force a 128-bit space."&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# models.py
&lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;uuid&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.db&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Order&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Model&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# Use UUIDField as the primary key to prevent sequential enumeration.
&lt;/span&gt;    &lt;span class="c1"&gt;# This is defense in depth — queryset scoping is still mandatory.
&lt;/span&gt;    &lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;UUIDField&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;primary_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;default&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;uuid&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;uuid4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;editable&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;owner&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ForeignKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;auth.User&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;on_delete&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CASCADE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;related_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;orders&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;DecimalField&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max_digits&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;decimal_places&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;created_at&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;DateTimeField&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;auto_now_add&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# urls.py — router uses the UUID field as the lookup
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;rest_framework.routers&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;DefaultRouter&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.views&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OrderViewSet&lt;/span&gt;

&lt;span class="n"&gt;router&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;DefaultRouter&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;router&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;orders&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;OrderViewSet&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;basename&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;order&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Override lookup_field on the ViewSet to match the UUID primary key
# so DRF resolves /api/orders/&amp;lt;uuid&amp;gt;/ instead of /api/orders/&amp;lt;int&amp;gt;/
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# views.py addition
&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;OrderViewSet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;viewsets&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ModelViewSet&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;lookup_field&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;  &lt;span class="c1"&gt;# matches the UUIDField name on the model
&lt;/span&gt;    &lt;span class="c1"&gt;# ... rest of ViewSet unchanged from the fix above
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One tradeoff: UUIDs inflate index size and can slow joins on large tables. If that matters, use a separately-stored &lt;code&gt;public_id = models.UUIDField(default=uuid.uuid4, editable=False, unique=True)&lt;/code&gt; alongside an integer PK, and expose only &lt;code&gt;public_id&lt;/code&gt; in serializers and URLs. The internal integer PK never appears in any HTTP response.&lt;/p&gt;

&lt;p&gt;Never treat opaque IDs as a substitute for proper authorization. We've reviewed APIs that switched to UUIDs, removed the queryset scoping because "users can't guess them now," and then leaked UUIDs in webhook payloads, browser history, or third-party analytics — instantly making every ID known to an attacker.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enforce Authorization at the Serializer and Nested Resource Level
&lt;/h2&gt;

&lt;p&gt;Queryset scoping protects URL-path-based access. IDOR also hides in writable foreign key fields where a user submits a payload referencing another tenant's object. A user who owns projects 10 and 11 might try &lt;code&gt;{"project": 99}&lt;/code&gt; on a task creation endpoint to attach their task to someone else's project.&lt;/p&gt;

&lt;p&gt;This is especially common in multi-tenant SaaS applications where related resources belong to different organizational boundaries.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# serializers.py
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;rest_framework&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;serializers&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.models&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Project&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;TaskSerializer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;serializers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ModelSerializer&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Meta&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt;
        &lt;span class="n"&gt;fields&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;title&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;project&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;due_date&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;validate_project&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;request&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;request&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="n"&gt;serializers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ValidationError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;No request context available.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="c1"&gt;# Reject foreign keys that don't belong to the authenticated user —
&lt;/span&gt;        &lt;span class="c1"&gt;# without this check, any user can write into any project by ID.
&lt;/span&gt;        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;Project&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;owner&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
            &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="n"&gt;serializers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ValidationError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Project not found.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;  &lt;span class="c1"&gt;# Deliberately vague — don't confirm existence
&lt;/span&gt;            &lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Always pass &lt;code&gt;request&lt;/code&gt; in serializer context. DRF does this automatically when you use &lt;code&gt;get_serializer()&lt;/code&gt; inside a view, but if you instantiate serializers directly (in management commands, signals, or background tasks), you must pass &lt;code&gt;context={"request": request}&lt;/code&gt; manually. When there's no request context at all — background jobs, for example — you need a different mechanism to establish the authorization boundary, typically passing the owner explicitly.&lt;/p&gt;

&lt;p&gt;The same class of bug appears in writable nested serializers. If a &lt;code&gt;LineItem&lt;/code&gt; serializer accepts a nested &lt;code&gt;order&lt;/code&gt; object with an &lt;code&gt;id&lt;/code&gt; field, a user can point that &lt;code&gt;id&lt;/code&gt; at any order. Validate every inbound relation. For more on how this nesting problem scales, the same concepts appear in &lt;a href="https://www.codereviewlab.com/learning/graphql-security" rel="noopener noreferrer"&gt;authorization patterns in GraphQL APIs&lt;/a&gt;, where every resolver is effectively a relation that needs its own ownership check.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test for IDOR with Automated Authorization Checks
&lt;/h2&gt;

&lt;p&gt;The only reliable way to prevent IDOR regressions is to write tests that explicitly attempt cross-user access and assert they fail. Code reviews miss it. Manual QA misses it. Tests that authenticate as user B and try to touch user A's resources catch it every time — if you write them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# tests/test_order_idor.py
&lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pytest&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.contrib.auth&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;get_user_model&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;rest_framework.test&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;APIClient&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;orders.models&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Order&lt;/span&gt;

&lt;span class="n"&gt;User&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;get_user_model&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="nd"&gt;@pytest.fixture&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;alice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;User&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create_user&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;alice&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;testpass123&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# noqa: S106
&lt;/span&gt;
&lt;span class="nd"&gt;@pytest.fixture&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;bob&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;User&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create_user&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;bob&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;testpass123&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# noqa: S106
&lt;/span&gt;
&lt;span class="nd"&gt;@pytest.fixture&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;alice_order&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;alice&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;owner&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;alice&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;99.99&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nd"&gt;@pytest.mark.django_db&lt;/span&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;TestOrderIDOR&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_client_for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;APIClient&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;force_authenticate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;test_bob_cannot_retrieve_alice_order&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;alice_order&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bob&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="c1"&gt;# 404, not 403 — we don't confirm the resource exists to unauthorized users.
&lt;/span&gt;        &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_client_for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bob&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/api/orders/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;alice_order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status_code&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;404&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;test_bob_cannot_update_alice_order&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;alice_order&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bob&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_client_for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bob&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;patch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/api/orders/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;alice_order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;total&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;0.01&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="nb"&gt;format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status_code&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;404&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;test_bob_cannot_delete_alice_order&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;alice_order&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bob&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_client_for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bob&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/api/orders/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;alice_order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status_code&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;404&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;test_bob_list_does_not_include_alice_order&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;alice_order&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bob&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="c1"&gt;# List endpoint must not leak cross-user data even if IDs are unknown.
&lt;/span&gt;        &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_client_for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bob&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/api/orders/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status_code&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;
        &lt;span class="n"&gt;ids&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;results&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]]&lt;/span&gt;
        &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;alice_order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;ids&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The list-endpoint test is easy to forget and catches a different bug: &lt;code&gt;get_queryset()&lt;/code&gt; returning everything on &lt;code&gt;list()&lt;/code&gt; but correctly filtering on &lt;code&gt;retrieve()&lt;/code&gt;. Write both.&lt;/p&gt;

&lt;p&gt;Wire these into CI as required checks. A failing IDOR test should block a merge the same way a failing unit test does. This is not optional — the whole point is that a developer adding a new &lt;code&gt;ModelViewSet&lt;/code&gt; in a Friday pull request doesn't ship a data leak to production by Monday.&lt;/p&gt;

&lt;h2&gt;
  
  
  Catch IDOR in Code Review and CI
&lt;/h2&gt;

&lt;p&gt;Human review of pull requests should pattern-match on a short list of high-risk constructs. Any &lt;code&gt;Model.objects.get(pk=...)&lt;/code&gt; or &lt;code&gt;Model.objects.filter(id=...)&lt;/code&gt; call that doesn't chain a user-scoping filter is a candidate IDOR. Any ViewSet missing &lt;code&gt;permission_classes&lt;/code&gt; is an unauthenticated endpoint or is inheriting from a base class that may not have adequate defaults. Any serializer field of type &lt;code&gt;PrimaryKeyRelatedField&lt;/code&gt; with a broad queryset is a potential cross-tenant write.&lt;/p&gt;

&lt;p&gt;Automate this with Semgrep. Here is a rule that flags the most common pattern: a DRF view calling &lt;code&gt;.objects.get()&lt;/code&gt; without an &lt;code&gt;owner&lt;/code&gt; filter anywhere in the same expression:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# semgrep/rules/drf-idor.yml&lt;/span&gt;
&lt;span class="na"&gt;rules&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;drf-unscoped-objects-get&lt;/span&gt;
    &lt;span class="na"&gt;patterns&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;pattern&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;$MODEL.objects.get(pk=...)&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;pattern-not&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;$MODEL.objects.get(pk=..., owner=...)&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;pattern-not&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;$MODEL.objects.get(pk=..., owner__in=...)&lt;/span&gt;
    &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="s"&gt;Unscoped .objects.get(pk=...) in a view — add an owner filter or replace with&lt;/span&gt;
      &lt;span class="s"&gt;a queryset scoped in get_queryset(). Risk: IDOR.&lt;/span&gt;
    &lt;span class="na"&gt;languages&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;python&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
    &lt;span class="na"&gt;severity&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ERROR&lt;/span&gt;
    &lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;cwe&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;CWE-639&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run this rule in your CI pipeline on every pull request. To &lt;a href="https://www.codereviewlab.com/learning/ci-cd-pipeline-security" rel="noopener noreferrer"&gt;shift IDOR checks left in your CI/CD pipeline&lt;/a&gt;, add it as a required status check alongside your test suite — not a separate "security scan" that developers learn to ignore.&lt;/p&gt;

&lt;p&gt;Code review checklist for IDOR-prone patterns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ModelViewSet&lt;/code&gt; or &lt;code&gt;GenericAPIView&lt;/code&gt; subclass with no explicit &lt;code&gt;get_queryset&lt;/code&gt; override — check what the default queryset returns.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;permission_classes = []&lt;/code&gt; or a ViewSet that inherits &lt;code&gt;permission_classes&lt;/code&gt; from a base class you don't control.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;PrimaryKeyRelatedField(queryset=Model.objects.all())&lt;/code&gt; in any writable serializer — this gives any user access to the full table.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;perform_create&lt;/code&gt; or &lt;code&gt;perform_update&lt;/code&gt; that doesn't pin the &lt;code&gt;owner&lt;/code&gt; field, leaving it open to user-supplied values.&lt;/li&gt;
&lt;li&gt;Tests that only assert &lt;code&gt;status_code == 200&lt;/code&gt; for the happy path, with no cross-user negative test.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;SAST tools like Semgrep will catch structural patterns; they won't catch logic bugs where the filter is present but uses the wrong field. Code review has to cover that gap. The combination — automated rules catching the obvious omissions, human review focused on logic — is more effective than either alone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hardening Checklist and Next Steps
&lt;/h2&gt;

&lt;p&gt;The layered controls, in priority order:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Queryset scoping (required):&lt;/strong&gt; &lt;code&gt;get_queryset()&lt;/code&gt; filters by &lt;code&gt;request.user&lt;/code&gt;. No exceptions for convenience. If an admin view needs to return all objects, it lives in a separate ViewSet with explicit admin permission checks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Object-level permissions (required):&lt;/strong&gt; &lt;code&gt;IsOwner&lt;/code&gt; or equivalent &lt;code&gt;BasePermission&lt;/code&gt; with &lt;code&gt;has_object_permission&lt;/code&gt; as a second line of defense. Attach it to every mutating ViewSet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Serializer-level FK validation (required for relational writes):&lt;/strong&gt; Every &lt;code&gt;PrimaryKeyRelatedField&lt;/code&gt; or nested writable serializer validates that the referenced object belongs to &lt;code&gt;request.user&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;perform_create&lt;/code&gt; owner binding (required):&lt;/strong&gt; Never accept &lt;code&gt;owner&lt;/code&gt; from request data. Always call &lt;code&gt;serializer.save(owner=self.request.user)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Opaque identifiers (defense in depth):&lt;/strong&gt; UUIDs or opaque public IDs in all URLs and serializer output. Still mandatory to have the above controls in place.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automated cross-user tests (required for CI gates):&lt;/strong&gt; One test class per resource that authenticates as User B and asserts 404 on User A's list, retrieve, update, and delete endpoints.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SAST rules in CI (defense in depth):&lt;/strong&gt; Semgrep rules flagging unscoped &lt;code&gt;.objects.get()&lt;/code&gt; and missing &lt;code&gt;permission_classes&lt;/code&gt;, run as required checks on pull requests.&lt;/p&gt;

&lt;p&gt;These controls address the majority of IDOR patterns in DRF, but authorization bugs extend well beyond the patterns covered here. If you want to build systematic habits around authorization review — across frameworks, auth protocols, and API types — the &lt;a href="https://www.codereviewlab.com/learning/application-security-engineer" rel="noopener noreferrer"&gt;Application Security Engineer learning path&lt;/a&gt; on Code Review Lab covers the full scope, including scenarios more complex than single-tenant ownership checks.&lt;/p&gt;




&lt;p&gt;The part most teams skip is the test suite. You can write perfect queryset scoping today and watch a future contributor add a &lt;code&gt;get_object_or_404(Order, pk=pk)&lt;/code&gt; shortcut that bypasses it entirely. Tests that authenticate as the wrong user and assert 404 are the only automated check that catches that regression. Write them now, gate CI on them, and review them alongside any new ViewSet. If you want a reference for how IDOR shows up in security interviews and assessments, &lt;a href="https://www.codereviewlab.com/learning/cyber-security-analyst-interview-questions" rel="noopener noreferrer"&gt;common IDOR interview questions&lt;/a&gt; are a useful signal for the gaps engineers typically leave in production systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Further Reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://cheatsheetseries.owasp.org/cheatsheets/Insecure_Direct_Object_Reference_Prevention_Cheat_Sheet.html" rel="noopener noreferrer"&gt;OWASP IDOR Prevention Cheat Sheet&lt;/a&gt; — authoritative guidance on access control patterns across frameworks.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://cwe.mitre.org/data/definitions/639.html" rel="noopener noreferrer"&gt;CWE-639: Authorization Bypass Through User-Controlled Key&lt;/a&gt; — the formal taxonomy entry with real-world consequences and detection guidance.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.django-rest-framework.org/api-guide/permissions/" rel="noopener noreferrer"&gt;Django REST Framework: Permissions&lt;/a&gt; — official DRF docs on &lt;code&gt;has_permission&lt;/code&gt; and &lt;code&gt;has_object_permission&lt;/code&gt;, including &lt;code&gt;check_object_permissions&lt;/code&gt; call semantics.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.codereviewlab.com/learning/application-security-engineer" rel="noopener noreferrer"&gt;Application Security Engineer learning path on Code Review Lab&lt;/a&gt; — structured curriculum for building authorization review skills across multiple API paradigms.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://portswigger.net/web-security/access-control/idor" rel="noopener noreferrer"&gt;PortSwigger Web Security Academy: IDOR&lt;/a&gt; — interactive labs that demonstrate enumeration, parameter tampering, and horizontal privilege escalation in concrete exercises.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>django</category>
      <category>security</category>
      <category>api</category>
      <category>python</category>
    </item>
    <item>
      <title>How I stopped my README.md and README.zh.md from drifting apart</title>
      <dc:creator>Alexander A.</dc:creator>
      <pubDate>Sun, 03 May 2026 22:18:03 +0000</pubDate>
      <link>https://devbrasil.forem.com/_alexander_a_/how-i-stopped-my-readmemd-and-readmezhmd-from-drifting-apart-44lm</link>
      <guid>https://devbrasil.forem.com/_alexander_a_/how-i-stopped-my-readmemd-and-readmezhmd-from-drifting-apart-44lm</guid>
      <description>&lt;h2&gt;
  
  
  The drift problem
&lt;/h2&gt;

&lt;p&gt;Every project that ships a translated README has the same lifecycle:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Someone writes &lt;code&gt;README.md&lt;/code&gt; in English.&lt;/li&gt;
&lt;li&gt;A contributor opens a PR with &lt;code&gt;README.zh.md&lt;/code&gt;. Great.&lt;/li&gt;
&lt;li&gt;Three months later, English has six new sections. Chinese has the original.&lt;/li&gt;
&lt;li&gt;A second translator opens &lt;code&gt;README.es.md&lt;/code&gt;. Spanish gets translated from… which version? The current &lt;code&gt;README.md&lt;/code&gt;? Or &lt;code&gt;README.zh.md&lt;/code&gt;, by accident, because the structure looks tidier?&lt;/li&gt;
&lt;li&gt;By month nine, you have three READMEs that disagree on what the project actually is.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can't tell at a glance which file is stale. Reviewers don't read all three. Translations rot, and there's nothing forcing them to stay in sync.&lt;/p&gt;

&lt;p&gt;I got tired of this and built a small Java tool — &lt;a href="https://github.com/nanolaba/readme-generator" rel="noopener noreferrer"&gt;NRG&lt;/a&gt; — to fix it. Looking for honest feedback while it's still small enough to change direction.&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea: one source, N outputs
&lt;/h2&gt;

&lt;p&gt;Write one &lt;code&gt;README.src.md&lt;/code&gt;. Get back &lt;code&gt;README.md&lt;/code&gt;, &lt;code&gt;README.zh.md&lt;/code&gt;, &lt;code&gt;README.ja.md&lt;/code&gt;, and as many language variants as you list.&lt;/p&gt;

&lt;p&gt;Lines in the template fall into three categories:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Shared across all languages&lt;/strong&gt; (badges, code blocks, file paths, anything language-agnostic) — no markup needed, the line just appears in every output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;![&lt;/span&gt;&lt;span class="nv"&gt;CI&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://img.shields.io/github/actions/workflow/status/owner/repo/ci.yml&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Language-tagged&lt;/strong&gt; — appears only in that language's output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;This library is small but hard to use.&lt;span class="c"&gt;&amp;lt;!--en--&amp;gt;&lt;/span&gt;
Эта библиотека маленькая, но сложная в использовании.&lt;span class="c"&gt;&amp;lt;!--ru--&amp;gt;&lt;/span&gt;
本库虽小，但难以使用。&lt;span class="c"&gt;&amp;lt;!--zh--&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Inline per-language phrases&lt;/strong&gt; — useful for short strings like anchor names or button labels where one full line per language would be overkill:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## ${en:'Table of contents', ru:'Содержание', zh:'目录'}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run &lt;code&gt;nrg -f README.src.md&lt;/code&gt;. Out come &lt;code&gt;README.md&lt;/code&gt;, &lt;code&gt;README.ru.md&lt;/code&gt;, &lt;code&gt;README.zh.md&lt;/code&gt;, all stamped with a header comment so a reader knows the file is generated.&lt;/p&gt;

&lt;h2&gt;
  
  
  The killer feature: CI drift-check
&lt;/h2&gt;

&lt;p&gt;This is the part I actually care about, and the reason "regenerate the file periodically" wasn't enough.&lt;/p&gt;

&lt;p&gt;NRG ships a GitHub Action (&lt;a href="https://github.com/nanolaba/nrg-action" rel="noopener noreferrer"&gt;&lt;code&gt;nanolaba/nrg-action@v1&lt;/code&gt;&lt;/a&gt;) with a &lt;code&gt;check&lt;/code&gt; mode. On every PR, it regenerates the READMEs into a temp dir and diffs them against what's committed. If they don't match, the build fails with a unified diff:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gd"&gt;--- README.md (on disk)
&lt;/span&gt;&lt;span class="gi"&gt;+++ README.md (generated)
&lt;/span&gt;&lt;span class="p"&gt;@@ line 27 @@&lt;/span&gt;
&lt;span class="gd"&gt;-## Quick start
&lt;/span&gt;&lt;span class="gi"&gt;+## Getting started
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That means a contributor can't land a hand-edit to &lt;code&gt;README.zh.md&lt;/code&gt; that bypasses the template. Either they edit &lt;code&gt;README.src.md&lt;/code&gt; and regenerate, or CI rejects the PR. No more silent drift.&lt;/p&gt;

&lt;p&gt;The CLI has the same flag: &lt;code&gt;nrg -f README.src.md --check&lt;/code&gt;. Useful in pre-commit hooks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Built-in widgets
&lt;/h2&gt;

&lt;p&gt;Anything the template syntax can't express directly is a widget. The shipped set:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;${widget:tableOfContents(ordered='true')}&lt;/code&gt; — auto-builds a TOC from heading levels.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;${widget:import(path='docs/intro.src.md')}&lt;/code&gt; — composes templates so a giant README isn't one 800-line file.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;${widget:exec(cmd='git rev-parse --short HEAD')}&lt;/code&gt; — embeds shell output (handy for "last built from commit X").&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;${widget:fileTree(path='src/main/java', depth='2')}&lt;/code&gt; — auto-generates a directory tree.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;${widget:math(expr='\\pi r^2')}&lt;/code&gt; — renders LaTeX, with an SVG fallback for the cases where GitHub's native MathJax silently fails.&lt;/li&gt;
&lt;li&gt;Plus &lt;code&gt;alert&lt;/code&gt;, &lt;code&gt;badge&lt;/code&gt;, &lt;code&gt;if/endIf&lt;/code&gt;, &lt;code&gt;date&lt;/code&gt;, &lt;code&gt;todo&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Custom widgets are a one-class implementation of an &lt;code&gt;NRGWidget&lt;/code&gt; interface — useful if you have a recurring pattern specific to your project (e.g. a "feature matrix" widget that renders a row per supported runtime).&lt;/p&gt;

&lt;h2&gt;
  
  
  Three integration modes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;CLI&lt;/strong&gt; — &lt;code&gt;nrg -f README.src.md&lt;/code&gt;. Zero config beyond declaring &lt;code&gt;&amp;lt;!--@nrg.languages=en,ru,zh--&amp;gt;&lt;/code&gt; in the template.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Maven plugin&lt;/strong&gt; — for Java projects, hangs off the &lt;code&gt;compile&lt;/code&gt; phase, regenerates on every build:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;plugin&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;com.nanolaba&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;nrg-maven-plugin&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;1.2&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;configuration&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;file&amp;gt;&amp;lt;item&amp;gt;&lt;/span&gt;README.src.md&lt;span class="nt"&gt;&amp;lt;/item&amp;gt;&amp;lt;/file&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/configuration&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;executions&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;execution&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;phase&amp;gt;&lt;/span&gt;compile&lt;span class="nt"&gt;&amp;lt;/phase&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;goals&amp;gt;&amp;lt;goal&amp;gt;&lt;/span&gt;create-files&lt;span class="nt"&gt;&amp;lt;/goal&amp;gt;&amp;lt;/goals&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/execution&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/executions&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/plugin&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;GitHub Action&lt;/strong&gt; — for Python, JS, Rust, or any non-Java project. The action provisions Java itself, so you don't need a Java toolchain in your repo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nanolaba/nrg-action@v1&lt;/span&gt;
  &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;file&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;README.src.md&lt;/span&gt;
    &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;check&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's the whole setup. There's also a Java library mode if you want to embed it in some other generator pipeline.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Java 8 minimum&lt;/strong&gt; — the binary's portable, but if you despise installing JDKs, the GitHub Action route is the only zero-touch option.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not a translation tool.&lt;/strong&gt; NRG keeps structure synchronized. Actual prose translation is still a human job (or your favourite LLM).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No Markdown AST.&lt;/strong&gt; Substitution and widgets operate on raw text. This is fine 99% of the time but means a clever author can produce broken Markdown that NRG won't catch — that's why there's a separate &lt;code&gt;validate&lt;/code&gt; mode.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Early days.&lt;/strong&gt; Currently at v1.2, used by a handful of open-source repos. The widget API may still change.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I'd love feedback on
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Drift-check workflow&lt;/strong&gt; — useful safety net, or annoying friction when a translator just wants to fix a typo? Curious how this lands for people who maintain translated docs at scale.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Widget syntax&lt;/strong&gt; — &lt;code&gt;${widget:tableOfContents(title='...', ordered='true')}&lt;/code&gt; — readable, or have I reinvented a worse Mustache?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What would actually make you adopt this&lt;/strong&gt; over your current setup (hand-syncing, custom script, doing nothing)? "I'd never use this because…" answers are the most useful.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Repo, full docs, and the GIF demo: &lt;a href="https://github.com/nanolaba/readme-generator" rel="noopener noreferrer"&gt;github.com/nanolaba/readme-generator&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading — happy to answer questions in the comments.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>java</category>
      <category>markdown</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Building Privacy-First Browser Extensions: What I Learned</title>
      <dc:creator>Weather Clock Dash</dc:creator>
      <pubDate>Sun, 03 May 2026 22:17:18 +0000</pubDate>
      <link>https://devbrasil.forem.com/weatherclockdash/building-privacy-first-browser-extensions-what-i-learned-1lf9</link>
      <guid>https://devbrasil.forem.com/weatherclockdash/building-privacy-first-browser-extensions-what-i-learned-1lf9</guid>
      <description>&lt;p&gt;When I built Weather &amp;amp; Clock Dashboard for Firefox, I made a decision early on: &lt;strong&gt;no analytics, no accounts, no external calls except weather data&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here's what I learned about building browser extensions with privacy as a design principle — and why I think more extension developers should take this approach.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Default is Data Collection
&lt;/h2&gt;

&lt;p&gt;Most web development assumes you want to know who your users are. Analytics platforms are one npm install away. A/B testing, session recording, funnel analysis — the infrastructure for surveillance capitalism is baked into the default developer tooling.&lt;/p&gt;

&lt;p&gt;Browser extensions are in a privileged position. They run inside the browser, they can see your tabs (with permission), they load on page visits. An extension with analytics has more access to your behavior than a typical website.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Privacy-First Actually Means
&lt;/h2&gt;

&lt;p&gt;For my extension, I set these constraints:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. No analytics scripts
2. No external requests except weather API (user-configured, optional)
3. No user accounts
4. No localStorage of personally identifiable information
5. MIT licensed — code is auditable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The localStorage Rule
&lt;/h3&gt;

&lt;p&gt;The extension stores settings: your preferred city, timezone list, theme preference. But these settings live only in your browser, via &lt;code&gt;browser.storage.local&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Storing user preference — this stays on-device&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;storage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;local&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;city&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;userInput&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dark&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;clocks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;zone&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;America/New_York&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;NYC&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This data never leaves the browser. It can't. There's no server to send it to.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Weather API Problem
&lt;/h3&gt;

&lt;p&gt;Weather is a hard case. To show current weather, you need to call an external API — there's no way around it. That external API will see your IP address.&lt;/p&gt;

&lt;p&gt;My solution: &lt;strong&gt;require users to bring their own API key&lt;/strong&gt;. Weather &amp;amp; Clock Dashboard uses OpenWeatherMap's free API tier. Users create their own account and enter their own API key.&lt;/p&gt;

&lt;p&gt;This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I have zero knowledge of what city any user is in&lt;/li&gt;
&lt;li&gt;OpenWeatherMap has a direct relationship with the user (their own account)&lt;/li&gt;
&lt;li&gt;I have no API key to revoke if I need to shut down a server&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The tradeoff: higher setup friction. Some users bounce when they see "enter API key." That's a cost I'm willing to pay.&lt;/p&gt;

&lt;h2&gt;
  
  
  The AMO Review Benefit
&lt;/h2&gt;

&lt;p&gt;Mozilla's Add-ons review process (for Firefox) actually rewards privacy-respecting extensions. Reviewers check:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What permissions the extension requests&lt;/li&gt;
&lt;li&gt;What external requests it makes&lt;/li&gt;
&lt;li&gt;Whether the permissions are necessary for the stated functionality&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An extension that requests &lt;code&gt;&amp;lt;all_urls&amp;gt;&lt;/code&gt; permission but only needs to show weather will get questions. An extension with no permissions beyond &lt;code&gt;storage&lt;/code&gt; sails through.&lt;/p&gt;

&lt;h2&gt;
  
  
  The User Trust Payoff
&lt;/h2&gt;

&lt;p&gt;Privacy-first design communicates trust before users read a single word of your privacy policy. When I see an extension that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Requires no account&lt;/li&gt;
&lt;li&gt;Requests minimal permissions&lt;/li&gt;
&lt;li&gt;Is open source&lt;/li&gt;
&lt;li&gt;Has been reviewed by Mozilla&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;...I trust it immediately. That trust is the product.&lt;/p&gt;

&lt;p&gt;For extensions specifically, trust is the moat. Users install things that run inside their browser. The bar for trust should be high.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Technical Implementation
&lt;/h2&gt;

&lt;p&gt;Here's the manifest for Weather &amp;amp; Clock Dashboard — notice what permissions are and aren't requested:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"manifest_version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"permissions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"storage"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"chrome_url_overrides"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"newtab"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"dashboard.html"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No &lt;code&gt;tabs&lt;/code&gt;, no &lt;code&gt;history&lt;/code&gt;, no &lt;code&gt;&amp;lt;all_urls&amp;gt;&lt;/code&gt;. Just &lt;code&gt;storage&lt;/code&gt; to save preferences. That's the entire permission surface.&lt;/p&gt;

&lt;h2&gt;
  
  
  Analytics Without Surveillance
&lt;/h2&gt;

&lt;p&gt;I do want to know how many people are using the extension. AMO's install count is my only metric, and it's coarse. I can see total installs and a weekly active user count — nothing more granular.&lt;/p&gt;

&lt;p&gt;For a lot of developers, this is unacceptable. How do you optimize UX without knowing which features are used? How do you prioritize roadmap?&lt;/p&gt;

&lt;p&gt;My answer: user feedback channels (GitHub issues, AMO reviews) and intuition. It's less data-driven. I'm okay with that.&lt;/p&gt;

&lt;h2&gt;
  
  
  Open Sourcing as a Privacy Signal
&lt;/h2&gt;

&lt;p&gt;MIT licensing and public source code is a form of privacy documentation that no privacy policy can match. Users can verify that the code does what it claims. Researchers can audit it. Security professionals can check for vulnerabilities.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/oren-sys/weather-clock-dashboard" rel="noopener noreferrer"&gt;The source code is on GitHub&lt;/a&gt;. I'm comfortable with anyone reading it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Building privacy-first isn't a technical constraint — it's a design decision made before you write the first line of code. The constraint is deciding what you won't collect, not figuring out how to anonymize what you do.&lt;/p&gt;

&lt;p&gt;For browser extensions especially, privacy-first design is also good product design. Users are rightfully suspicious of extensions. Being genuinely privacy-respecting — not just claiming to be — is a real differentiator.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://addons.mozilla.org/en-US/firefox/addon/weather-clock-dashboard/" rel="noopener noreferrer"&gt;Install Weather &amp;amp; Clock Dashboard&lt;/a&gt; if you want to see this in practice.&lt;/p&gt;

</description>
      <category>privacy</category>
      <category>browserextensions</category>
      <category>firefox</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Cursor Session Management: How to Find, Search, and Organize Your AI Coding Conversations</title>
      <dc:creator>decker</dc:creator>
      <pubDate>Sun, 03 May 2026 22:16:54 +0000</pubDate>
      <link>https://devbrasil.forem.com/gonewx/cursor-session-management-how-to-find-search-and-organize-your-ai-coding-conversations-37la</link>
      <guid>https://devbrasil.forem.com/gonewx/cursor-session-management-how-to-find-search-and-organize-your-ai-coding-conversations-37la</guid>
      <description>&lt;p&gt;&lt;strong&gt;Have you ever spent 20 minutes looking for a conversation you had with Cursor last week?&lt;/strong&gt; The one where it helped you fix a tricky async bug—and now you're facing the same issue in a different project, but can't find that thread anywhere?&lt;/p&gt;

&lt;p&gt;This isn't a user error. It's a structural limitation in how Cursor handles session history.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Current State of Cursor Session Management
&lt;/h2&gt;

&lt;p&gt;Cursor includes a built-in conversation history panel. You can browse sessions for the current project and click into any conversation to review the context.&lt;/p&gt;

&lt;p&gt;This works fine when you have a handful of sessions. But as usage scales, problems emerge.&lt;/p&gt;

&lt;h3&gt;
  
  
  Problem 1: Sessions Are Siloed by Project
&lt;/h3&gt;

&lt;p&gt;Cursor ties sessions to the project level. A conversation in &lt;code&gt;project-a&lt;/code&gt; doesn't appear when you open &lt;code&gt;project-b&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This makes sense architecturally—each project has its own context. But in practice, many problems are cross-cutting: authentication patterns, deployment scripts, CI configurations. When you need to reference a solution you worked out weeks ago in a different project, you're out of luck.&lt;/p&gt;

&lt;h3&gt;
  
  
  Problem 2: No Cross-Project Search
&lt;/h3&gt;

&lt;p&gt;Even within a project, Cursor's history panel lacks full-text search. You can scroll, but you can't search.&lt;/p&gt;

&lt;p&gt;When you have dozens of sessions in a project, finding a specific conversation about "that WebSocket reconnection issue" means scanning through every entry manually.&lt;/p&gt;

&lt;h3&gt;
  
  
  Problem 3: No Export or Backup
&lt;/h3&gt;

&lt;p&gt;Your Cursor conversations are stored locally, but there's no built-in way to export them. If you switch machines or need to share a particularly insightful debugging session with a colleague, you're left manually copying and pasting.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Session Management Matters for Cursor Users
&lt;/h2&gt;

&lt;p&gt;Cursor excels at in-editor AI assistance. For many developers, it's the primary way they interact with AI for coding. This means the volume of conversations accumulates fast.&lt;/p&gt;

&lt;p&gt;Without proper management, you lose:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Institutional knowledge&lt;/strong&gt; about why certain decisions were made&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reusable solutions&lt;/strong&gt; to problems you've already solved&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learning progress&lt;/strong&gt; across projects and time&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Making the Most of Cursor Sessions Today
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Strategy 1: Create Project-Specific Notes
&lt;/h3&gt;

&lt;p&gt;After a significant Cursor session, take 2 minutes to jot down key findings in a project note. This creates a searchable index you can refer to later.&lt;/p&gt;

&lt;h3&gt;
  
  
  Strategy 2: Use Descriptive Commit Messages
&lt;/h3&gt;

&lt;p&gt;When you apply code from a Cursor session, include a reference in your commit message. This ties the code change back to the AI-assisted context.&lt;/p&gt;

&lt;h3&gt;
  
  
  Strategy 3: Cross-Tool Session Management
&lt;/h3&gt;

&lt;p&gt;For developers using multiple AI tools (Cursor + Claude Code + Gemini CLI), consider a unified session viewer. Mantra can index conversations across these tools, giving you a single search interface.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Mantra is a local session viewer supporting Claude Code, Cursor, Gemini CLI, and Codex. Local features are free forever. Learn more at &lt;a href="https://mantra.gonewx.com" rel="noopener noreferrer"&gt;mantra.gonewx.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cursor</category>
      <category>ai</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>5 Firefox New Tab Extensions Compared: Which One Actually Improves Your Workflow?</title>
      <dc:creator>Weather Clock Dash</dc:creator>
      <pubDate>Sun, 03 May 2026 22:16:44 +0000</pubDate>
      <link>https://devbrasil.forem.com/weatherclockdash/5-firefox-new-tab-extensions-compared-which-one-actually-improves-your-workflow-2eod</link>
      <guid>https://devbrasil.forem.com/weatherclockdash/5-firefox-new-tab-extensions-compared-which-one-actually-improves-your-workflow-2eod</guid>
      <description>&lt;p&gt;Your browser opens dozens of times per day. Each time, you see the new tab page for a split second — maybe less. That's hundreds of micro-moments that currently show you... nothing useful.&lt;/p&gt;

&lt;p&gt;Here's a comparison of the top Firefox new tab extensions, from a developer who builds them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Makes a New Tab Extension Good?
&lt;/h2&gt;

&lt;p&gt;Before comparing, let's define the criteria:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Information density&lt;/strong&gt; — does it show me something useful?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Load time&lt;/strong&gt; — does it slow down new tab opens?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy&lt;/strong&gt; — does it track me?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Customization&lt;/strong&gt; — can I make it mine?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free tier&lt;/strong&gt; — is the useful version free?&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Contenders
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Momentum Dash
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Verdict: Beautiful but limited (free tier)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Momentum shows a beautiful photo, the time, and a daily focus prompt. Premium unlocks weather, todos, and more widgets. The free tier is minimal — just time and a pretty background.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Load time: Fast&lt;/li&gt;
&lt;li&gt;Privacy: Account required (tracks usage)&lt;/li&gt;
&lt;li&gt;Free tier: Very limited&lt;/li&gt;
&lt;li&gt;Customization: Moderate (premium)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. New Tab Override
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Verdict: Developer-focused, total control&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;New Tab Override lets you set any URL as your new tab page. It's pure configuration — no widgets, no weather, just "open this URL when I press Ctrl+T."&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Load time: Depends on the target URL&lt;/li&gt;
&lt;li&gt;Privacy: Excellent (no data collection)&lt;/li&gt;
&lt;li&gt;Free tier: Full feature (open source)&lt;/li&gt;
&lt;li&gt;Customization: Unlimited (you control the URL)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Tabliss
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Verdict: Most customizable&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Tabliss is a widget-based new tab with backgrounds, weather, clock, to-do lists, and more. Each widget is modular and configurable.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Load time: Moderate (many active widgets can slow it)&lt;/li&gt;
&lt;li&gt;Privacy: Good (self-contained)&lt;/li&gt;
&lt;li&gt;Free tier: Full feature&lt;/li&gt;
&lt;li&gt;Customization: Excellent&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. iTab New Tab
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Verdict: Feature-rich but heavy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;iTab packs in a lot: bookmarks, apps, wallpapers, weather, search. It's essentially a mini dashboard.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Load time: Slower (many features)&lt;/li&gt;
&lt;li&gt;Privacy: Mixed (some features call external servers)&lt;/li&gt;
&lt;li&gt;Free tier: Full feature&lt;/li&gt;
&lt;li&gt;Customization: High&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. Weather &amp;amp; Clock Dashboard
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Verdict: Focused on the essentials&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the extension I built (&lt;a href="https://addons.mozilla.org/en-US/firefox/addon/weather-clock-dashboard/" rel="noopener noreferrer"&gt;install here&lt;/a&gt;). I built it because I wanted exactly three things on my new tab: weather, clocks, search. Nothing else.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Load time: Instant (pure HTML/CSS/JS, no frameworks)&lt;/li&gt;
&lt;li&gt;Privacy: No data collection, no account, no external analytics&lt;/li&gt;
&lt;li&gt;Free tier: 100% free, MIT open source&lt;/li&gt;
&lt;li&gt;Customization: Weather city, multiple timezone clocks, theme toggle&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Performance Test
&lt;/h2&gt;

&lt;p&gt;I benchmarked new tab load times on the same machine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;New Tab Override (blank):     ~10ms
Weather &amp;amp; Clock Dashboard:    ~150ms  
Tableau (3 widgets):          ~400ms  
iTab (default config):        ~800ms  
Momentum (premium):           ~250ms  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Note: External API calls (weather data) are loaded asynchronously and don't block the visual render.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Which One Should You Use?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Choose Momentum if:&lt;/strong&gt; You want beautiful backgrounds and don't mind a paid subscription for full features.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Choose New Tab Override if:&lt;/strong&gt; You have a specific webpage you want to open (your company dashboard, Notion, etc.).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Choose Tabliss if:&lt;/strong&gt; You want maximum widget customization and are willing to configure each one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Choose iTab if:&lt;/strong&gt; You want a full browser home page with bookmarks and apps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Choose Weather &amp;amp; Clock Dashboard if:&lt;/strong&gt; You want live weather + world clocks without any account, subscription, or data collection. Just install and use.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Open Source Angle
&lt;/h2&gt;

&lt;p&gt;One thing worth noting: Weather &amp;amp; Clock Dashboard and New Tab Override are both MIT-licensed open source projects. You can inspect the code, fork it, or contribute. For a piece of software that loads on literally every new browser tab, knowing exactly what it does matters.&lt;/p&gt;

&lt;p&gt;For closed-source new tab extensions, you're trusting that they aren't injecting ads, tracking your browsing habits, or monetizing your data in ways not disclosed in privacy policies that nobody reads.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The "best" new tab extension depends entirely on what you want your new tab to do. If the answer is "show me weather + current time in multiple cities + let me search quickly," then I'm biased but I'd recommend &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/weather-clock-dashboard/" rel="noopener noreferrer"&gt;Weather &amp;amp; Clock Dashboard&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you want complete flexibility, New Tab Override combined with a locally-hosted page is unbeatable. If you want maximum widgets, Tabliss has the most.&lt;/p&gt;

&lt;p&gt;The one I'd avoid: any extension with a required account on the free tier. Your new tab page shouldn't phone home every time you open a tab.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I build Weather &amp;amp; Clock Dashboard. All benchmarks were performed on my own machine; YMMV.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>firefox</category>
      <category>productivity</category>
      <category>browserextensions</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Why I built Clever Deploy</title>
      <dc:creator>Clever Deploy,</dc:creator>
      <pubDate>Sun, 03 May 2026 22:16:39 +0000</pubDate>
      <link>https://devbrasil.forem.com/cleverdeploy/why-i-built-clever-deploy-1j46</link>
      <guid>https://devbrasil.forem.com/cleverdeploy/why-i-built-clever-deploy-1j46</guid>
      <description>&lt;p&gt;I built &lt;strong&gt;Clever Deploy&lt;/strong&gt; because every time I wanted to ship a small side project, the deploy story turned into a project of its own.&lt;/p&gt;

&lt;h2&gt;
  
  
  The two problems I kept hitting
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Surprise bills.&lt;/strong&gt; I'd push a side project to a "free tier"&lt;br&gt;
platform, forget about it, and three months later get a $40 invoice&lt;br&gt;
because something I didn't fully understand auto-scaled, or a build&lt;br&gt;
ran 200 times, or bandwidth crossed a line I didn't know existed.&lt;br&gt;
The pricing pages all looked simple. The actual bills never were.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Complexity.&lt;/strong&gt; I've setup Jenkins in Kubernetes for clients - believe me, you don't want that kind of complexity.&lt;/p&gt;

&lt;p&gt;What I wanted was simplicity and no unexpected bills.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Clever Deploy is
&lt;/h2&gt;

&lt;p&gt;A deploy platform with two rules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Click Deploy, pick a repo, get a live HTTPS URL.&lt;/strong&gt; The
defaults are right for 95% of projects, and you can override them
later if you're in the 5%.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pricing you can predict before you click.&lt;/strong&gt; A flat number. No
metered surprises hiding behind "fair use" footnotes. If a project is going to cost you money, you know exactly how much, before it's running.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's the entire pitch. Everything else — the build pipeline, the&lt;br&gt;
TLS automation, the subdomain routing, the GitHub App integration —&lt;br&gt;
is plumbing in service of those two promises.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why now
&lt;/h2&gt;

&lt;p&gt;Hosting has gotten better and cheaper every year for a decade. The&lt;br&gt;
&lt;em&gt;ergonomics&lt;/em&gt; of hosting have not. The big platforms keep adding&lt;br&gt;
features for the top 1% of users (edge functions, regional&lt;br&gt;
replication, AI gateways) and quietly making the on-ramp harder for&lt;br&gt;
everyone else.&lt;/p&gt;

&lt;p&gt;I wanted the deploy experience I had in 2018 with Heroku free dynos, without the 2022 ending where the free dynos got turned off and nobody had a good answer for the small-project niche.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where I'm at
&lt;/h2&gt;

&lt;p&gt;Clever Deploy works end-to-end live: GitHub auth, build pipeline, live deploys, build logs, an admin dashboard. However, it's not open to the public yet - I'm letting people in from the waitlist as I shake out edge cases.&lt;/p&gt;

&lt;p&gt;If predictable costs and one-click deploys sound like your kind of&lt;br&gt;
boring, I'd love to get your feedback on it. Sign up at the waitlist at &lt;a href="https://cleverdeploy.com/" rel="noopener noreferrer"&gt;https://cleverdeploy.com/&lt;/a&gt; and I'll make sure you get 50% off your first year if you decide to use us for real.&lt;/p&gt;

&lt;p&gt;— Wasim&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>devops</category>
      <category>startup</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Giving an AI agent permission to spawn sub-agents (without losing control)</title>
      <dc:creator>GDS K S</dc:creator>
      <pubDate>Sun, 03 May 2026 22:14:05 +0000</pubDate>
      <link>https://devbrasil.forem.com/thegdsks/giving-an-ai-agent-permission-to-spawn-sub-agents-without-losing-control-5901</link>
      <guid>https://devbrasil.forem.com/thegdsks/giving-an-ai-agent-permission-to-spawn-sub-agents-without-losing-control-5901</guid>
      <description>&lt;h1&gt;
  
  
  Giving an AI agent permission to spawn sub-agents (without losing control)
&lt;/h1&gt;

&lt;p&gt;A reader asked me last week: "If my main agent spawns a sub-agent, what permissions does the sub-agent get? How do I make sure it cannot do more than the parent?"&lt;/p&gt;

&lt;p&gt;This is the agent delegation problem. It comes up the moment you have agents that work in tandem. A planner that hands off to a coder. An orchestrator that fans out to specialists. An MCP server that calls another MCP server on a user's behalf.&lt;/p&gt;

&lt;p&gt;The naive answer is: give the sub-agent the same API key as the parent. This is wrong. Once you do that, the sub-agent can do everything the parent can. If it goes off the rails, you cannot kill it without killing the parent. There is no audit trail per agent. You cannot apply different rate limits.&lt;/p&gt;

&lt;p&gt;The right answer is scoped delegation with revocation. Here is what that looks like.&lt;/p&gt;

&lt;h2&gt;
  
  
  What scoped delegation means
&lt;/h2&gt;

&lt;p&gt;When the parent agent spawns a sub-agent, it issues the sub-agent a token that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Is its own credential, not a copy of the parent's&lt;/li&gt;
&lt;li&gt;Inherits a &lt;em&gt;subset&lt;/em&gt; of the parent's permissions, never more&lt;/li&gt;
&lt;li&gt;Has a parent reference, so revoking the parent revokes everything downstream&lt;/li&gt;
&lt;li&gt;Has its own expiry, separate from the parent&lt;/li&gt;
&lt;li&gt;Has a depth limit, so a sub-agent of a sub-agent of a sub-agent eventually hits a wall&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;KavachOS calls this a delegation chain. The data model is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;parent_agent (token A)
  └── sub_agent_1 (token B, parent=A, scopes ⊆ A)
        └── sub_agent_2 (token C, parent=B, scopes ⊆ B)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Revoking A revokes B and C. Revoking B revokes only C. Each token has its own audit trail.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createKavach&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;kavachos&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;delegate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;revoke&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;kavachos/agent&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;kavach&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;createKavach&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;database&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;provider&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sqlite&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;kavach.db&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// parent agent has a token with these scopes&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;parentToken&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;kavach&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;issue&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;agentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;planner-001&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;scopes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;github:read&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;github:write&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;deploy:staging&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;ttl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;1h&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// parent spawns a coder sub-agent&lt;/span&gt;
&lt;span class="c1"&gt;// it can read and write GitHub, but not deploy&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;coderToken&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;delegate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;parentToken&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;agentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;coder-001&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;scopes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;github:read&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;github:write&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;  &lt;span class="c1"&gt;// dropped deploy:staging&lt;/span&gt;
  &lt;span class="na"&gt;ttl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;30m&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                                &lt;span class="c1"&gt;// shorter than parent&lt;/span&gt;
  &lt;span class="na"&gt;maxDepth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                               &lt;span class="c1"&gt;// coder cannot spawn its own&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;delegate&lt;/code&gt; call:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verifies the requested scopes are a subset of the parent's&lt;/li&gt;
&lt;li&gt;Throws &lt;code&gt;ScopeEscalationError&lt;/code&gt; if the sub-agent asks for a scope the parent does not have&lt;/li&gt;
&lt;li&gt;Sets &lt;code&gt;parent_token_id&lt;/code&gt; so revocation cascades&lt;/li&gt;
&lt;li&gt;Issues a fresh token with its own JTI
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// this throws: ScopeEscalationError&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;badToken&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;delegate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;parentToken&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;agentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;rogue-001&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;scopes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;github:read&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;deploy:production&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;  &lt;span class="c1"&gt;// parent does not have it&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="c1"&gt;// kavach.error.code === "SCOPE_ESCALATION"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The library refuses to issue a token with scopes the parent does not have. This is enforced at issue time, not at validation time, so a misbehaving caller cannot sneak it through.&lt;/p&gt;

&lt;h2&gt;
  
  
  Revocation
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;revoke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;parentToken&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// every descendant token is also revoked&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Behind the scenes, KavachOS marks the parent token id as revoked. Any token with &lt;code&gt;parent_token_id&lt;/code&gt; matching it (recursively) is rejected on next validation. The agent table has an index on &lt;code&gt;parent_token_id&lt;/code&gt; so this stays fast.&lt;/p&gt;

&lt;p&gt;You can also revoke a single sub-agent without touching the parent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;revoke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;coderToken&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// parent and other siblings keep working&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Audit
&lt;/h2&gt;

&lt;p&gt;Every action an agent takes through KavachOS goes into the audit log:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;event&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;tool.call&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;agent_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;coder-001&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;parent_agent_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;planner-001&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;scope&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;github:write&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;resource&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;repos/kavachos/kavachos/contents/README.md&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2026-04-29T11:42:13Z&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;request_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;req_abc123&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;outcome&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;allowed&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When something goes wrong at 3am, you can trace exactly which sub-agent of which parent of which root user did what. This is the answer to "the agent merged a bad PR" type incidents. Without it, you have a Slack message with no fingerprint.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why depth limits matter
&lt;/h2&gt;

&lt;p&gt;A planner spawns a coder. The coder spawns a tester. The tester spawns a fixer. The fixer spawns a re-tester. At some point, the chain has to stop. Otherwise an agent stuck in a loop can consume all your tokens and rate limits.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;parentToken&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;kavach&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;issue&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;agentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;planner-001&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;scopes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;github:read&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;github:write&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;deploy:staging&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;maxDepth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;ttl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;1h&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The fourth-level descendant fails to issue. You catch this in your orchestrator and decide how to handle it: escalate to a human, fail the task, or split the work differently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this matters most
&lt;/h2&gt;

&lt;p&gt;This pattern is what enterprise will demand once agents are doing real work. Right now most teams ship with shared API keys and a hope. That works until it does not. When it does not, you are trying to reconstruct what happened from log fragments.&lt;/p&gt;

&lt;p&gt;Building this from scratch is doable but boring. Token issuance is straightforward. Cascading revocation is not. Depth tracking takes care to get right. The audit log is its own project.&lt;/p&gt;

&lt;p&gt;If you do not want to build it yourself, KavachOS handles all of it as a primitive in the same library that does human auth.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;kavachos
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Source: &lt;a href="https://github.com/kavachos/kavachos" rel="noopener noreferrer"&gt;github.com/kavachos/kavachos&lt;/a&gt;. MIT.&lt;/p&gt;




&lt;p&gt;If you run multi-agent systems in production today, how do you scope sub-agent permissions? Shared API keys? Per-agent tokens? Something stricter? Curious where the pain is for you.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>typescript</category>
      <category>security</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Dual-Booting Windows 11 &amp; Rocky Linux — A Beginner's Complete Guide</title>
      <dc:creator>William Kwabena Akoto</dc:creator>
      <pubDate>Sun, 03 May 2026 22:12:17 +0000</pubDate>
      <link>https://devbrasil.forem.com/kobbyprincee/dual-booting-windows-11-rocky-linux-a-beginners-complete-guide-533c</link>
      <guid>https://devbrasil.forem.com/kobbyprincee/dual-booting-windows-11-rocky-linux-a-beginners-complete-guide-533c</guid>
      <description>&lt;p&gt;A step-by-step guide for beginners who want a gaming PC &lt;em&gt;and&lt;/em&gt; a real enterprise Linux environment on the same machine — with every decision explained in plain English.&lt;/p&gt;




&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;What Is Dual-Booting and Why Rocky Linux?&lt;/li&gt;
&lt;li&gt;
Key Concepts You Must Understand First

&lt;ul&gt;
&lt;li&gt;UEFI, BIOS, and Secure Boot&lt;/li&gt;
&lt;li&gt;Partitions, File Systems, and GPT&lt;/li&gt;
&lt;li&gt;The GRUB Bootloader&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Before You Begin — Checklist&lt;/li&gt;
&lt;li&gt;Phase 1 — Shrink Your Windows Partition&lt;/li&gt;
&lt;li&gt;Phase 2 — Download &amp;amp; Flash Rocky Linux&lt;/li&gt;
&lt;li&gt;Phase 3 — Configure the HP BIOS&lt;/li&gt;
&lt;li&gt;Phase 4 — Boot the Rocky Linux Installer&lt;/li&gt;
&lt;li&gt;Phase 5 — Anaconda Installer Walkthrough&lt;/li&gt;
&lt;li&gt;Phase 6 — First Boot &amp;amp; the GRUB Menu&lt;/li&gt;
&lt;li&gt;Phase 7 — Post-Install DevOps Setup&lt;/li&gt;
&lt;li&gt;Troubleshooting Common Problems&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  1. What Is Dual-Booting and Why Rocky Linux?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Dual-booting&lt;/strong&gt; means installing two separate operating systems on the same physical computer, each living in its own isolated section of the hard drive called a &lt;em&gt;partition&lt;/em&gt;. When you power on your laptop, a small program called a &lt;strong&gt;bootloader&lt;/strong&gt; wakes up and shows you a menu: pick Windows or pick Rocky Linux. The two systems never interfere with each other.&lt;/p&gt;

&lt;p&gt;This is different from a &lt;strong&gt;virtual machine&lt;/strong&gt;, where you'd run Linux inside a window on top of Windows. Dual-booting gives each OS full, direct access to your hardware — better performance, real GPU access for your DevOps tools, and a genuine feel for what it's like to administer a server.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Why Rocky Linux specifically?&lt;/strong&gt; Rocky Linux is a free, community-maintained and designed for 1:1, bug-for-bug downstream binary compatibility with Red Hat Enterprise Linux (RHEL) — the operating system that runs a huge chunk of the world's servers, cloud infrastructure, and enterprise data centres. When companies say they want "Linux experience", they usually mean RHEL-family experience.Rocky Linux is fullRocky Linux 10.1 is fully supported until &lt;strong&gt;May 2035&lt;/strong&gt;, giving you a stable, long-term learning platform.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Rocky Linux will push you further: its default security model (SELinux), firewall tool (firewalld), and package manager (DNF) are all standard in enterprise environments that other linux distributions rarely appear in.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Key Concepts You Must Understand First
&lt;/h2&gt;

&lt;p&gt;Before touching a single setting, you need to understand &lt;em&gt;why&lt;/em&gt; you're making each decision. Skipping this section is how people accidentally wipe their Windows installation. Take ten minutes to read it.&lt;/p&gt;

&lt;h3&gt;
  
  
  UEFI, BIOS, and Secure Boot
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is UEFI / BIOS?&lt;/strong&gt;&lt;br&gt;
UEFI (or its older predecessor, BIOS) is firmware — a tiny program burned into a chip on your motherboard. It's the very first thing that runs when you press the power button, before any operating system loads. Its job is to inventory your hardware (CPU, RAM, drives) and then hand control to a bootloader on one of your storage devices.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Your computer mostly likely uses &lt;strong&gt;UEFI&lt;/strong&gt;, the modern standard. UEFI uses a special partition called the &lt;strong&gt;EFI System Partition (ESP)&lt;/strong&gt; — a small FAT32 partition that stores bootloader files for every OS installed. Windows already placed its bootloader there. Rocky Linux will add its own file alongside it without deleting Windows.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is Secure Boot?&lt;/strong&gt;&lt;br&gt;
Secure Boot is a UEFI feature that checks a digital signature on every bootloader before running it. It prevents malware from hijacking the boot process. However, it can also block Linux installers that aren't signed with a trusted key.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Rocky Linux does have Secure Boot support, but to avoid any complications on first install, we will &lt;strong&gt;disable Secure Boot&lt;/strong&gt; in the BIOS before installing. You can re-enable it afterwards once everything is working.&lt;/p&gt;

&lt;h3&gt;
  
  
  Partitions, File Systems, and GPT
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is a partition?&lt;/strong&gt;&lt;br&gt;
Imagine your hard drive as a single large plot of land. A partition is like drawing property lines to divide it into separate sections. Each section is completely independent — one can have Windows on it, another can have Linux, and they don't mix.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is a file system?&lt;/strong&gt;&lt;br&gt;
A file system is the internal structure that a partition uses to organise files. Windows uses &lt;strong&gt;NTFS&lt;/strong&gt;. Rocky Linux defaults to &lt;strong&gt;XFS&lt;/strong&gt; — the same file system used on most RHEL enterprise servers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is GPT?&lt;/strong&gt;&lt;br&gt;
GPT (GUID Partition Table) is the modern standard for how partition information is stored on a disk. Your computer mostly already uses GPT since it might have come with Windows 10/11 already on it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here is what your disk will look like after the installation is complete:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ EFI ][ Windows (C:) — ~400 GB ][ /boot ][ swap ][ /  root ][ /home ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mount Point&lt;/th&gt;
&lt;th&gt;Size&lt;/th&gt;
&lt;th&gt;File System&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/boot/efi&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reuse existing&lt;/td&gt;
&lt;td&gt;FAT32&lt;/td&gt;
&lt;td&gt;Already exists. Stores bootloaders for all OSes. &lt;strong&gt;Never format.&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/boot&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1 GB&lt;/td&gt;
&lt;td&gt;ext4&lt;/td&gt;
&lt;td&gt;Stores the Linux kernel. Kept separate for boot-process compatibility.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;swap&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;= your RAM size&lt;/td&gt;
&lt;td&gt;swap&lt;/td&gt;
&lt;td&gt;Overflow RAM storage. Required for hibernation.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;/&lt;/code&gt; (root)&lt;/td&gt;
&lt;td&gt;40–60 GB&lt;/td&gt;
&lt;td&gt;xfs&lt;/td&gt;
&lt;td&gt;The OS, all installed software, and system configs.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/home&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Remaining space&lt;/td&gt;
&lt;td&gt;xfs&lt;/td&gt;
&lt;td&gt;Your personal files and projects. Survives an OS reinstall intact.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  The GRUB Bootloader
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is GRUB?&lt;/strong&gt;&lt;br&gt;
GRUB (Grand Unified Bootloader) is the program that Rocky Linux installs to manage booting. After installation, GRUB detects all installed operating systems and shows you a menu. When you select Windows, GRUB hands control to the Windows Boot Manager. When you select Rocky Linux, GRUB loads the Linux kernel directly.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;GRUB installs itself into the EFI System Partition alongside the Windows bootloader. This is why we never format the EFI partition — doing so would delete the Windows bootloader and make Windows unbootable.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Before You Begin — Checklist
&lt;/h2&gt;

&lt;p&gt;Work through this checklist completely before proceeding. Every item matters.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Back up your Windows data first.&lt;/strong&gt; Partitioning operations carry inherent risk. If something goes wrong mid-operation, data loss is possible. Copy your important files to an external drive, a cloud service, or both. This is non-negotiable.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Check 1 — CPU Compatibility
&lt;/h3&gt;

&lt;p&gt;Rocky Linux 10 requires a CPU supporting the &lt;strong&gt;x86-64-v3&lt;/strong&gt; instruction set. Any &lt;strong&gt;AMD Ryzen 2000+&lt;/strong&gt; or &lt;strong&gt;Intel 8th Gen (Coffee Lake)+&lt;/strong&gt; processor qualifies.&lt;/p&gt;

&lt;p&gt;To confirm, open PowerShell on Windows and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;wmic&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;cpu&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;get&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Check 2 — Disable Windows Fast Startup
&lt;/h3&gt;

&lt;p&gt;Windows Fast Startup leaves the Windows file system in a "partially mounted" state on shutdown. If Linux then tries to read the Windows partition, it can corrupt the file system. Disable it permanently:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Press &lt;code&gt;Win + S&lt;/code&gt;, search for &lt;strong&gt;Control Panel&lt;/strong&gt;, open it&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;Hardware and Sound → Power Options&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;"Choose what the power buttons do"&lt;/strong&gt; in the left sidebar&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;"Change settings that are currently unavailable"&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Under "Shutdown settings", &lt;strong&gt;uncheck "Turn on fast startup"&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save changes&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Check 3 — Free Disk Space
&lt;/h3&gt;

&lt;p&gt;Open Disk Management (&lt;code&gt;Win + X&lt;/code&gt; → Disk Management). You need at least &lt;strong&gt;60–80 GB of free space&lt;/strong&gt; on your C: drive to shrink comfortably. You'll be carving that space out as unallocated room for Rocky Linux.&lt;/p&gt;

&lt;h3&gt;
  
  
  Check 4 — A 16 GB+ USB Drive
&lt;/h3&gt;

&lt;p&gt;You'll flash the Rocky Linux ISO onto this drive. It will be &lt;strong&gt;completely erased&lt;/strong&gt;. Don't use one with files you need.&lt;/p&gt;

&lt;h3&gt;
  
  
  Check 5 — Stable Power
&lt;/h3&gt;

&lt;p&gt;Plug your laptop in during the entire process. A laptop dying mid-partition or mid-install can corrupt both operating systems.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 1 — Shrink Your Windows Partition
&lt;/h2&gt;

&lt;p&gt;Right now, Windows occupies the entire drive. Before we can install Rocky Linux, we need to shrink the Windows partition and leave behind &lt;strong&gt;unallocated space&lt;/strong&gt; that the Rocky Linux installer will carve into its own partitions.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We use Windows' own built-in tool for this — not a third-party app, not the Linux installer. This ensures Windows is aware of the change and updates its own boot records accordingly.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  How Much Space to Allocate?
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Use Case&lt;/th&gt;
&lt;th&gt;Minimum&lt;/th&gt;
&lt;th&gt;Recommended&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Occasional learning / labs&lt;/td&gt;
&lt;td&gt;50 GB&lt;/td&gt;
&lt;td&gt;70 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Active DevOps work, Docker, VMs&lt;/td&gt;
&lt;td&gt;80 GB&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;120 GB&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Heavy Kubernetes / container dev&lt;/td&gt;
&lt;td&gt;120 GB&lt;/td&gt;
&lt;td&gt;150+ GB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For a DevOps workstation, &lt;strong&gt;80–100 GB&lt;/strong&gt; is the sweet spot. Docker images alone can consume 20–30 GB over time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1 — Open Disk Management&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Press &lt;code&gt;Win + X&lt;/code&gt; on your keyboard. In the menu that appears, click &lt;strong&gt;Disk Management&lt;/strong&gt;. You'll see a graphical view of your disk with all current partitions shown as coloured bars.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2 — Identify Your C: Drive Partition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the graphical area at the bottom, look for the large partition labelled &lt;strong&gt;(C:)&lt;/strong&gt;. This is your Windows installation. Right-click it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3 — Click "Shrink Volume..."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A dialog box appears. Enter your desired amount in the field "Enter the amount of space to shrink in MB". Convert GB to MB by multiplying by 1024:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;80 GB → enter &lt;strong&gt;81920&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;100 GB → enter &lt;strong&gt;102400&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;120 GB → enter &lt;strong&gt;122880&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 4 — Click Shrink and Wait&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Windows will resize the partition (typically 30 seconds to 2 minutes). When done, you'll see a new block of &lt;strong&gt;black/dark unallocated space&lt;/strong&gt; in the disk map. &lt;strong&gt;Do not create a new volume in that space&lt;/strong&gt; — leave it as "Unallocated". The Rocky Linux installer will handle it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;If Windows won't let you shrink enough:&lt;/strong&gt; This happens when Windows has "immovable" system files near the end of the partition. Fix: disable hibernation by opening an Administrator Command Prompt and running &lt;code&gt;powercfg /h off&lt;/code&gt;, then try shrinking again.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Phase 2 — Download &amp;amp; Flash Rocky Linux
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 2.1 — Download the ISO
&lt;/h3&gt;

&lt;p&gt;An &lt;strong&gt;ISO file&lt;/strong&gt; is a complete, exact copy of the entire Rocky Linux installer. Go to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://rockylinux.org/download
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Under &lt;strong&gt;Rocky Linux 10&lt;/strong&gt;, select the &lt;strong&gt;x86_64&lt;/strong&gt; architecture and download the &lt;strong&gt;DVD ISO&lt;/strong&gt; (~10 GB). Also download the accompanying &lt;strong&gt;CHECKSUM&lt;/strong&gt; file from the same page.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2.2 — Verify the ISO (Don't Skip This)
&lt;/h3&gt;

&lt;p&gt;Verifying the checksum confirms the file downloaded completely and without corruption. A partially downloaded or tampered ISO can cause strange installer errors that are very hard to diagnose.&lt;/p&gt;

&lt;p&gt;Open PowerShell and run (adjust the filename to yours):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Get-FileHash&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;USERPROFILE&lt;/span&gt;&lt;span class="s2"&gt;\Downloads\Rocky-10.1-x86_64-dvd1.iso"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Algorithm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SHA256&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The 64-character hash must exactly match the SHA256 value in the CHECKSUM file. If they differ — even by one character — delete the ISO and re-download it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2.3 — Flash the USB Drive with Rufus
&lt;/h3&gt;

&lt;p&gt;Download Rufus from &lt;strong&gt;&lt;a href="https://rufus.ie" rel="noopener noreferrer"&gt;https://rufus.ie&lt;/a&gt;&lt;/strong&gt;. Plug in your 16 GB+ USB drive and open Rufus. Configure it as follows:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Rufus Setting&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Device&lt;/td&gt;
&lt;td&gt;Your USB drive&lt;/td&gt;
&lt;td&gt;Double-check it's the USB, not your internal drive&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Boot selection&lt;/td&gt;
&lt;td&gt;Click SELECT → choose the ISO&lt;/td&gt;
&lt;td&gt;Rufus will auto-detect most settings&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Partition scheme&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;GPT&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Required for UEFI systems&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Target system&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;UEFI (non CSM)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Forces UEFI mode. CSM is a legacy compatibility mode.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;File system&lt;/td&gt;
&lt;td&gt;Leave as Rufus default&lt;/td&gt;
&lt;td&gt;Rufus knows best for bootable drives&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Click &lt;strong&gt;START&lt;/strong&gt;. If a dialog appears, choose &lt;strong&gt;"Write in ISO Image mode"&lt;/strong&gt; and click OK.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The USB drive will be completely wiped.&lt;/strong&gt; All data on the USB will be gone after this step.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The flashing process takes 5–15 minutes. When Rufus shows &lt;strong&gt;READY&lt;/strong&gt; in green, the USB is ready.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 3 — Configure the HP BIOS
&lt;/h2&gt;

&lt;p&gt;The BIOS needs to be told two things: disable Secure Boot and boot from the USB instead of the hard drive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1 — Enter the BIOS Setup&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Fully &lt;strong&gt;shut down&lt;/strong&gt; your laptop (not restart — shut down). Plug in the Rocky Linux USB. Power on and immediately, repeatedly tap &lt;code&gt;F10&lt;/code&gt; until you see the BIOS setup screen.&lt;/p&gt;

&lt;p&gt;Alternative: power on → tap &lt;code&gt;Esc&lt;/code&gt; → HP startup menu → press &lt;code&gt;F10&lt;/code&gt; to enter Setup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2 — Disable Secure Boot&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Navigate to the &lt;strong&gt;Security&lt;/strong&gt; tab. Find &lt;strong&gt;Secure Boot&lt;/strong&gt; and set it to &lt;strong&gt;Disabled&lt;/strong&gt;. You can re-enable it after installation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3 — Confirm UEFI Boot Mode&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Under &lt;strong&gt;Advanced&lt;/strong&gt; or &lt;strong&gt;Boot Options&lt;/strong&gt;, verify &lt;strong&gt;UEFI Boot Mode&lt;/strong&gt; is selected. Ensure CSM / Legacy Boot is &lt;strong&gt;disabled&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4 — Set USB as First Boot Device&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Go to &lt;strong&gt;Boot Order&lt;/strong&gt;. Move the &lt;strong&gt;USB storage device&lt;/strong&gt; to the &lt;strong&gt;top&lt;/strong&gt; of the list using the function keys shown on screen (usually F5/F6 or +/-).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5 — Save and Exit&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Press &lt;code&gt;F10&lt;/code&gt; to save changes and exit. The laptop will reboot and boot from your Rocky Linux USB.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Alternative: One-time boot menu.&lt;/strong&gt; Power on and press &lt;code&gt;F9&lt;/code&gt; immediately to choose a boot device for that startup only, without permanently changing the boot order.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Phase 4 — Boot the Rocky Linux Installer
&lt;/h2&gt;

&lt;p&gt;With the BIOS configured, your laptop will boot into the Rocky Linux installer. You'll see a dark GRUB menu. Use the arrow keys to highlight &lt;strong&gt;"Install Rocky Linux"&lt;/strong&gt; and press Enter.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The screen may go black for 30–60 seconds after you press Enter. The Linux kernel is loading and initializing your hardware. Do not panic and do not press any keys. Wait for the graphical installer (Anaconda) to appear.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Select &lt;strong&gt;English (United States)&lt;/strong&gt; and click &lt;strong&gt;Continue&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 5 — Anaconda Installer Walkthrough
&lt;/h2&gt;

&lt;p&gt;Anaconda uses a &lt;strong&gt;hub-and-spoke model&lt;/strong&gt;: one main summary screen with several sections listed. Complete them in any order. The &lt;strong&gt;"Begin Installation"&lt;/strong&gt; button activates only once every required section has a green checkmark.&lt;/p&gt;

&lt;h3&gt;
  
  
  Time &amp;amp; Date
&lt;/h3&gt;

&lt;p&gt;Click &lt;strong&gt;Time &amp;amp; Date&lt;/strong&gt;. Click your region on the world map. Enable &lt;strong&gt;Network Time&lt;/strong&gt; if connected to Wi-Fi. Click &lt;strong&gt;Done&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Software Selection
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Recommended for a DevOps workstation:&lt;/strong&gt; Choose &lt;strong&gt;"Workstation"&lt;/strong&gt; for the full GNOME desktop. For a leaner, server-like experience, choose &lt;strong&gt;"Server with GUI"&lt;/strong&gt; instead.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Under &lt;strong&gt;Additional Software&lt;/strong&gt;, also check:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Development Tools&lt;/strong&gt; — gcc, make, git, and other build essentials&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;System Tools&lt;/strong&gt; — useful system administration utilities&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Headless Management&lt;/strong&gt; — includes the SSH server for remote access&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Container Management&lt;/strong&gt; — Podman and container tools (RHEL's Docker equivalent)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Click &lt;strong&gt;Done&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Installation Destination — Partitioning (Most Critical Step)
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;This is the most important step in the entire guide.&lt;/strong&gt; Read every instruction carefully before clicking anything. An incorrect choice here can erase your Windows installation. There is no undo button once you accept changes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Click &lt;strong&gt;Installation Destination&lt;/strong&gt;. Select your internal drive. Under Storage Configuration, select &lt;strong&gt;Custom&lt;/strong&gt;. Click &lt;strong&gt;Done&lt;/strong&gt; to enter the manual partitioning screen.&lt;/p&gt;

&lt;h4&gt;
  
  
  Partitioning Scheme: Standard vs LVM
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scheme&lt;/th&gt;
&lt;th&gt;Best For&lt;/th&gt;
&lt;th&gt;Verdict&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Standard Partition&lt;/td&gt;
&lt;td&gt;Simplicity — what you see is what you get&lt;/td&gt;
&lt;td&gt;Fine for beginners who want clarity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LVM&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Flexibility — resize partitions later without data loss&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Recommended for DevOps&lt;/strong&gt; — standard in enterprise RHEL&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is LVM?&lt;/strong&gt; LVM adds an abstraction layer between physical partitions and what the OS sees as drives. Instead of a fixed partition of exactly 40 GB, you have a "logical volume" that can be grown or shrunk while the system is running. In enterprise environments you'll constantly encounter LVM-managed disks. Choose LVM.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Creating the Partitions
&lt;/h4&gt;

&lt;p&gt;Use the &lt;strong&gt;+&lt;/strong&gt; button to add each partition in this order:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Never format the EFI partition.&lt;/strong&gt; It contains the Windows Boot Manager. Formatting it will make Windows unbootable. Set the mount point to &lt;code&gt;/boot/efi&lt;/code&gt; and ensure the &lt;strong&gt;format checkbox is unchecked&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Partition 1 — Reuse the EFI Partition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Click on the existing EFI System Partition in the left panel, then in the right panel:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mount Point: &lt;code&gt;/boot/efi&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;File System: FAT32&lt;/li&gt;
&lt;li&gt;Ensure &lt;strong&gt;"Do not format"&lt;/strong&gt; is selected&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Partition 2 — /boot&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mount point: &lt;code&gt;/boot&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Desired capacity: &lt;code&gt;1 GiB&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;File system: &lt;code&gt;ext4&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why ext4 for /boot?&lt;/em&gt; GRUB reads &lt;code&gt;/boot&lt;/code&gt; at a very early stage when LVM may not yet be available. ext4 is simple, widely supported, and reliable in this context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Partition 3 — swap&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mount point: &lt;code&gt;swap&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Desired capacity: same as your RAM (e.g., &lt;code&gt;16 GiB&lt;/code&gt; for 16 GB of RAM)&lt;/li&gt;
&lt;li&gt;File system: &lt;code&gt;swap&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;What is swap?&lt;/em&gt; When physical RAM fills up, Linux moves less-used data to the swap partition. It's also required for hibernation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Partition 4 — / (Root)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mount point: &lt;code&gt;/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Desired capacity: &lt;code&gt;50 GiB&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;File system: &lt;code&gt;xfs&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why XFS?&lt;/em&gt; XFS is the default file system for RHEL 7+ and Rocky Linux. It excels at large files, high I/O workloads, and parallel access — all common in server environments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Partition 5 — /home&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mount point: &lt;code&gt;/home&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Desired capacity: leave blank (uses all remaining unallocated space)&lt;/li&gt;
&lt;li&gt;File system: &lt;code&gt;xfs&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why a separate /home?&lt;/em&gt; If you ever reinstall Rocky Linux, your user data, configurations, and project files survive untouched. Simply reinstall, mount &lt;code&gt;/home&lt;/code&gt; without formatting it, and pick up where you left off.&lt;/p&gt;

&lt;h4&gt;
  
  
  Review &amp;amp; Accept Changes
&lt;/h4&gt;

&lt;p&gt;Click &lt;strong&gt;Done&lt;/strong&gt;. In the &lt;strong&gt;"Summary of Changes"&lt;/strong&gt; dialog, verify:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The EFI partition is listed as &lt;strong&gt;"mount only"&lt;/strong&gt; (not format)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/boot&lt;/code&gt;, &lt;code&gt;swap&lt;/code&gt;, &lt;code&gt;/&lt;/code&gt;, and &lt;code&gt;/home&lt;/code&gt; are listed as &lt;strong&gt;"format and mount"&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Your Windows C: partition &lt;strong&gt;does not appear in this list at all&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If everything looks correct, click &lt;strong&gt;"Accept Changes"&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Network &amp;amp; Hostname
&lt;/h3&gt;

&lt;p&gt;Connect to Wi-Fi. Set your &lt;strong&gt;hostname&lt;/strong&gt;. Click &lt;strong&gt;Apply&lt;/strong&gt; then &lt;strong&gt;Done&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Root Account &amp;amp; User Creation
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is the root account?&lt;/strong&gt; In Linux, &lt;code&gt;root&lt;/code&gt; is the superuser with unlimited power over the entire system. In Rocky Linux, the root account is &lt;strong&gt;disabled by default&lt;/strong&gt; — a deliberate security choice that mirrors how enterprise RHEL systems are configured. Instead, you create a regular admin user that uses &lt;code&gt;sudo&lt;/code&gt; to gain root-level privileges when needed.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Root Account:&lt;/strong&gt; Leave it &lt;strong&gt;disabled&lt;/strong&gt; (the default).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User Creation:&lt;/strong&gt; Set a full name, a short lowercase username , and a strong password. &lt;strong&gt;Check "Make this user administrator"&lt;/strong&gt; — this adds your user to the &lt;code&gt;wheel&lt;/code&gt; group, granting sudo access.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Begin Installation
&lt;/h3&gt;

&lt;p&gt;Click &lt;strong&gt;"Begin Installation"&lt;/strong&gt;. The installer will format partitions, install the OS and all selected packages, and configure GRUB. This takes &lt;strong&gt;15–45 minutes&lt;/strong&gt;. When finished, click &lt;strong&gt;"Reboot System"&lt;/strong&gt; and remove the USB.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 6 — First Boot &amp;amp; the GRUB Menu
&lt;/h2&gt;

&lt;p&gt;After the reboot, you'll see the &lt;strong&gt;GRUB boot menu&lt;/strong&gt; with two entries:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rocky Linux&lt;/strong&gt; (and older kernel entries)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Windows Boot Manager&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By default, GRUB auto-selects Rocky Linux after a 5-second countdown. Select &lt;strong&gt;Rocky Linux&lt;/strong&gt; and let it boot to the GNOME login screen.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;If GRUB doesn't appear and Windows boots directly:&lt;/strong&gt; The HP BIOS is still prioritising the Windows Boot Manager over GRUB. Enter BIOS (&lt;code&gt;F10&lt;/code&gt; on startup) and move "Rocky Linux" or "GRUB" above "Windows Boot Manager" in the boot order. See the Troubleshooting section for a permanent fix.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Phase 7 — Post-Install DevOps Setup
&lt;/h2&gt;

&lt;p&gt;Open the &lt;strong&gt;Terminal&lt;/strong&gt; application (&lt;code&gt;Ctrl + Alt + T&lt;/code&gt;) and run the following in order.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 7.1 — Full System Update
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;dnf&lt;/code&gt; is Rocky Linux's package manager:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;dnf &lt;span class="nt"&gt;-y&lt;/span&gt; upgrade
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 7.2 — Enable EPEL Repository
&lt;/h3&gt;

&lt;p&gt;EPEL (Extra Packages for Enterprise Linux) provides thousands of additional packages not in the base RHEL repos — like a major PPA trusted across the enterprise Linux world.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;dnf &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; epel-release
&lt;span class="nb"&gt;sudo &lt;/span&gt;dnf upgrade &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 7.3 — Understand SELinux (Don't Disable It)
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Do not disable SELinux.&lt;/strong&gt; The most common beginner advice online is to set SELinux to permissive or disabled. This destroys the entire point of using a RHEL-based system. Every enterprise RHEL deployment runs SELinux in enforcing mode. Learning to work with it — not around it — is a core career skill.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sestatus                        &lt;span class="c"&gt;# view current SELinux status&lt;/span&gt;
getenforce                      &lt;span class="c"&gt;# should say "Enforcing"&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;ausearch &lt;span class="nt"&gt;-m&lt;/span&gt; avc &lt;span class="nt"&gt;-ts&lt;/span&gt; recent &lt;span class="c"&gt;# view recent SELinux denials&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;sealert &lt;span class="nt"&gt;-a&lt;/span&gt; /var/log/audit/audit.log  &lt;span class="c"&gt;# human-readable SELinux explanations&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 7.4 — Understand firewalld
&lt;/h3&gt;

&lt;p&gt;Rocky Linux uses &lt;code&gt;firewalld&lt;/code&gt; instead of Ubuntu's &lt;code&gt;ufw&lt;/code&gt;. Same concept, different syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;firewall-cmd &lt;span class="nt"&gt;--state&lt;/span&gt;                         &lt;span class="c"&gt;# check it's running&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;firewall-cmd &lt;span class="nt"&gt;--list-all&lt;/span&gt;                      &lt;span class="c"&gt;# see current rules&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;firewall-cmd &lt;span class="nt"&gt;--permanent&lt;/span&gt; &lt;span class="nt"&gt;--add-service&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http  &lt;span class="c"&gt;# allow HTTP traffic&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;firewall-cmd &lt;span class="nt"&gt;--reload&lt;/span&gt;                        &lt;span class="c"&gt;# apply changes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Troubleshooting Common Problems
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Problem: Windows Boots Directly (No GRUB Menu)
&lt;/h3&gt;

&lt;p&gt;The HP BIOS is loading the Windows Boot Manager before GRUB. Open &lt;strong&gt;Command Prompt as Administrator&lt;/strong&gt; on Windows and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bcdedit /set {bootmgr} path \EFI\rocky\grubx64.efi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively, boot from the Rocky Linux USB → Troubleshooting → Rescue, then run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grub2-install /dev/nvme0n1          &lt;span class="c"&gt;# for NVMe drives&lt;/span&gt;
grub2-mkconfig &lt;span class="nt"&gt;-o&lt;/span&gt; /boot/grub2/grub.cfg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Problem: Windows Missing from GRUB Menu
&lt;/h3&gt;

&lt;p&gt;GRUB didn't detect Windows. Install &lt;code&gt;os-prober&lt;/code&gt; and regenerate the GRUB config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;dnf &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; os-prober
&lt;span class="nb"&gt;sudo &lt;/span&gt;os-prober                        &lt;span class="c"&gt;# should output a line mentioning Windows&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;grub2-mkconfig &lt;span class="nt"&gt;-o&lt;/span&gt; /boot/grub2/grub.cfg
&lt;span class="nb"&gt;sudo &lt;/span&gt;reboot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Problem: Wi-Fi Doesn't Work After Install
&lt;/h3&gt;

&lt;p&gt;Identify your network card first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;lspci | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; network
lspci | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; wireless
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Realtek cards:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;dnf &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; linux-firmware
&lt;span class="nb"&gt;sudo &lt;/span&gt;reboot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Intel cards, check:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;nmcli device status     &lt;span class="c"&gt;# list all network devices&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;nmcli radio wifi on     &lt;span class="c"&gt;# ensure Wi-Fi radio is enabled&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Problem: Can't Shrink Windows Enough (Phase 1)
&lt;/h3&gt;

&lt;p&gt;Disable hibernation and the pagefile temporarily. Run in Administrator Command Prompt on Windows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;powercfg /h off
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then retry Disk Management → Shrink Volume.&lt;/p&gt;

&lt;h3&gt;
  
  
  Problem: "No Space Left" Errors When Installing Packages
&lt;/h3&gt;

&lt;p&gt;Your root partition (&lt;code&gt;/&lt;/code&gt;) is full. Check usage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt;          &lt;span class="c"&gt;# shows partition sizes and usage&lt;/span&gt;
&lt;span class="nb"&gt;du&lt;/span&gt; &lt;span class="nt"&gt;-sh&lt;/span&gt; /&lt;span class="k"&gt;*&lt;/span&gt;      &lt;span class="c"&gt;# shows what's consuming space in root&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you used LVM, you can extend the root logical volume using space from another volume — one of the main advantages of LVM over standard partitioning.&lt;/p&gt;

&lt;h3&gt;
  
  
  Problem: SELinux Blocking an Application
&lt;/h3&gt;

&lt;p&gt;Don't disable SELinux — diagnose it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;ausearch &lt;span class="nt"&gt;-m&lt;/span&gt; avc &lt;span class="nt"&gt;-ts&lt;/span&gt; recent | audit2why          &lt;span class="c"&gt;# explains the denial in plain English&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;ausearch &lt;span class="nt"&gt;-m&lt;/span&gt; avc &lt;span class="nt"&gt;-ts&lt;/span&gt; recent | audit2allow &lt;span class="nt"&gt;-M&lt;/span&gt; myfix  &lt;span class="c"&gt;# generates a policy fix&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;semodule &lt;span class="nt"&gt;-i&lt;/span&gt; myfix.pp                               &lt;span class="c"&gt;# applies the fix&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Congratulations, you have now completely dual-booted Windows 11 &amp;amp; Rocky Linux on the same physical hardware!&lt;/p&gt;

</description>
      <category>linux</category>
      <category>microsoft</category>
      <category>rockylinux</category>
      <category>dualboot</category>
    </item>
  </channel>
</rss>
