<?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>DEV Community: Darius Hermes</title>
    <description>The latest articles on DEV Community by Darius Hermes (@dardar_hermes).</description>
    <link>https://dev.to/dardar_hermes</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3946676%2F775dd298-3784-4ed1-93fe-e5884367221f.png</url>
      <title>DEV Community: Darius Hermes</title>
      <link>https://dev.to/dardar_hermes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dardar_hermes"/>
    <language>en</language>
    <item>
      <title>Two tiny deployment drift bugs: env vars added, templates forgotten</title>
      <dc:creator>Darius Hermes</dc:creator>
      <pubDate>Sat, 23 May 2026 02:49:42 +0000</pubDate>
      <link>https://dev.to/dardar_hermes/two-tiny-deployment-drift-bugs-env-vars-added-templates-forgotten-jam</link>
      <guid>https://dev.to/dardar_hermes/two-tiny-deployment-drift-bugs-env-vars-added-templates-forgotten-jam</guid>
      <description>&lt;p&gt;A small deployment failure pattern I keep seeing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A config file starts using a new environment variable or secret.&lt;/li&gt;
&lt;li&gt;The repo's &lt;code&gt;.env.example&lt;/code&gt; or &lt;code&gt;.env.dist&lt;/code&gt; is not updated.&lt;/li&gt;
&lt;li&gt;The mismatch is discovered later, usually during a deploy job, local preview, worker boot, or production config check.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The bug is rarely dramatic in code review. It can be as small as one extra variable in CI/CD or Docker config.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example 1: GitHub Actions secret drift
&lt;/h3&gt;

&lt;p&gt;A workflow starts using a new secret:&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="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;DATABASE_URL&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.DATABASE_URL }}&lt;/span&gt;
  &lt;span class="na"&gt;STRIPE_SECRET_KEY&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.STRIPE_SECRET_KEY }}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But the env template only documents this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NEXT_PUBLIC_APP_URL=https://example.com
DATABASE_URL=
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now &lt;code&gt;STRIPE_SECRET_KEY&lt;/code&gt; has become an undocumented deployment requirement.&lt;/p&gt;

&lt;p&gt;Run the demo fixture with Secret Coverage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpm dlx @leviro-ai/secret-coverage scan &lt;span class="nt"&gt;--path&lt;/span&gt; examples/demos/github-actions-missing-secret &lt;span class="nt"&gt;--ci&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the repo itself, the equivalent dev command is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpm scan &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;--path&lt;/span&gt; examples/demos/github-actions-missing-secret &lt;span class="nt"&gt;--ci&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected 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="gh"&gt;# Secret Coverage Report&lt;/span&gt;

Readiness score: &lt;span class="gs"&gt;**73/100**&lt;/span&gt;

Critical: 1 · Warning: 0 · Info: 1

&lt;span class="gu"&gt;## Critical&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; &lt;span class="gs"&gt;**STRIPE_SECRET_KEY**&lt;/span&gt; — STRIPE_SECRET_KEY is used in .github/workflows/deploy.yml but missing from an env template.
&lt;span class="p"&gt;  -&lt;/span&gt; Context: &lt;span class="sb"&gt;`.github/workflows/deploy.yml`&lt;/span&gt; · &lt;span class="sb"&gt;`missing-from-template`&lt;/span&gt;
&lt;span class="p"&gt;  -&lt;/span&gt; Fix: Add STRIPE_SECRET_KEY= to an env template and configure the value in your deployment environment.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Example 2: Docker Compose runtime drift
&lt;/h3&gt;

&lt;p&gt;The same thing can happen outside CI. A Compose file starts expecting Redis:&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="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;web&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;APP_ENV&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${APP_ENV}&lt;/span&gt;
      &lt;span class="na"&gt;DATABASE_URL&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${DATABASE_URL}&lt;/span&gt;
      &lt;span class="na"&gt;REDIS_URL&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${REDIS_URL}&lt;/span&gt;

  &lt;span class="na"&gt;worker&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;REDIS_URL&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${REDIS_URL}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But &lt;code&gt;.env.example&lt;/code&gt; only documents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;APP_ENV=production
DATABASE_URL=
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now both the web service and worker depend on &lt;code&gt;REDIS_URL&lt;/code&gt;, but the repository contract does not say so.&lt;/p&gt;

&lt;p&gt;Run the demo fixture:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpm dlx @leviro-ai/secret-coverage scan &lt;span class="nt"&gt;--path&lt;/span&gt; examples/demos/docker-compose-missing-redis-url &lt;span class="nt"&gt;--ci&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected 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="gh"&gt;# Secret Coverage Report&lt;/span&gt;

Readiness score: &lt;span class="gs"&gt;**71/100**&lt;/span&gt;

Critical: 1 · Warning: 0 · Info: 2

&lt;span class="gu"&gt;## Critical&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; &lt;span class="gs"&gt;**REDIS_URL**&lt;/span&gt; — REDIS_URL is used in docker-compose.yml but missing from an env template.
&lt;span class="p"&gt;  -&lt;/span&gt; Context: &lt;span class="sb"&gt;`docker-compose.yml`&lt;/span&gt; · &lt;span class="sb"&gt;`missing-from-template`&lt;/span&gt;
&lt;span class="p"&gt;  -&lt;/span&gt; Fix: Add REDIS_URL= to an env template and configure the value in your deployment environment.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is deployment drift: deployment/runtime config expects something the repository's declared env contract does not describe.&lt;/p&gt;

&lt;p&gt;The point is not to read or expose secret values. The check only compares metadata:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;variables documented by env templates;&lt;/li&gt;
&lt;li&gt;variables referenced by CI/CD, Docker, and config files;&lt;/li&gt;
&lt;li&gt;mismatches that should be fixed before deployment.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A minimal fix is to update the env template:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# GitHub Actions example
NEXT_PUBLIC_APP_URL=https://example.com
DATABASE_URL=
STRIPE_SECRET_KEY=

# Docker Compose example
APP_ENV=production
DATABASE_URL=
REDIS_URL=
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then configure the real values in GitHub Actions secrets, Docker/Compose runtime environment, or the deployment platform.&lt;/p&gt;

&lt;p&gt;This is especially useful when AI-assisted PRs update application code and config quickly, because env contracts are easy to forget during review.&lt;/p&gt;

&lt;p&gt;Secret Coverage is local-first and deterministic. It is not a vault and it does not need a cloud account for this check.&lt;/p&gt;

&lt;p&gt;Links:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;npm: &lt;a href="https://www.npmjs.com/package/@leviro-ai/secret-coverage" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/@leviro-ai/secret-coverage&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/leviro-ai/secret-coverage" rel="noopener noreferrer"&gt;https://github.com/leviro-ai/secret-coverage&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GitHub Actions demo: &lt;a href="https://github.com/leviro-ai/secret-coverage/tree/main/examples/demos/github-actions-missing-secret" rel="noopener noreferrer"&gt;https://github.com/leviro-ai/secret-coverage/tree/main/examples/demos/github-actions-missing-secret&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docker Compose demo: &lt;a href="https://github.com/leviro-ai/secret-coverage/tree/main/examples/demos/docker-compose-missing-redis-url" rel="noopener noreferrer"&gt;https://github.com/leviro-ai/secret-coverage/tree/main/examples/demos/docker-compose-missing-redis-url&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devops</category>
      <category>githubactions</category>
      <category>docker</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
