<?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: Mark Benjamin</title>
    <description>The latest articles on DEV Community by Mark Benjamin (@thecodeinfluencer).</description>
    <link>https://dev.to/thecodeinfluencer</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%2F750560%2F597f5779-8e91-4199-979d-f09f1afec8ce.jpg</url>
      <title>DEV Community: Mark Benjamin</title>
      <link>https://dev.to/thecodeinfluencer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thecodeinfluencer"/>
    <language>en</language>
    <item>
      <title>Founders, what are you building this week?

I'm working on a platform for makers like us. Launch your startup for $0 and build in public with us.

Submit your startup today: https://pavelaunch.com

#solopreneur #buildinpublic #saas</title>
      <dc:creator>Mark Benjamin</dc:creator>
      <pubDate>Fri, 12 Dec 2025 20:32:13 +0000</pubDate>
      <link>https://dev.to/thecodeinfluencer/founders-what-are-you-building-this-week-im-working-on-a-platform-for-makers-like-us-launch-39le</link>
      <guid>https://dev.to/thecodeinfluencer/founders-what-are-you-building-this-week-im-working-on-a-platform-for-makers-like-us-launch-39le</guid>
      <description>&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://www.pavelaunch.com/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fpavelaunch.com%2Fopengraph-image%3F796e5872d515b576" height="630" class="m-0" width="1200"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://www.pavelaunch.com/" rel="noopener noreferrer" class="c-link"&gt;
            PaveLaunch - Launch and Discover Products
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            PaveLaunch is the premier destination for creators to showcase their latest inventions and for tech enthusiasts to explore cutting-edge innovations.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.pavelaunch.com%2Ffavicon.ico" width="48" height="48"&gt;
          pavelaunch.com
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>[Possible Fix] Inflight reported as a vulnerability in react project (Veracode SCA)</title>
      <dc:creator>Mark Benjamin</dc:creator>
      <pubDate>Fri, 10 Nov 2023 07:26:41 +0000</pubDate>
      <link>https://dev.to/thecodeinfluencer/possible-fix-inflight-reported-as-a-vulnerability-in-react-project-veracode-sca-2b1h</link>
      <guid>https://dev.to/thecodeinfluencer/possible-fix-inflight-reported-as-a-vulnerability-in-react-project-veracode-sca-2b1h</guid>
      <description>&lt;p&gt;If you're facing an &lt;code&gt;inflight&lt;/code&gt; vulnerability from a &lt;code&gt;veracode&lt;/code&gt; (or any other &lt;strong&gt;SCA&lt;/strong&gt; tool) scan, then it probably comes from &lt;code&gt;eslint&lt;/code&gt; package. This might not be the case for all scenarios but the &lt;strong&gt;SCA&lt;/strong&gt; tool typically shows you a &lt;strong&gt;dependancy graph&lt;/strong&gt; where you can drill down on the involved packages. In the case that it is &lt;code&gt;eslint&lt;/code&gt; for you then here's the fix that clears the &lt;strong&gt;SCA&lt;/strong&gt; scan error:&lt;/p&gt;

&lt;p&gt;You probably have &lt;code&gt;eslint&lt;/code&gt; under the dependancies section in the &lt;code&gt;package.json&lt;/code&gt; (of course, duuh). Just move the &lt;code&gt;eslint&lt;/code&gt; package into the &lt;code&gt;devDependancies&lt;/code&gt; because that is where it belongs in the first place. The &lt;strong&gt;SCA&lt;/strong&gt; tool knows that as a &lt;strong&gt;dev dependancy&lt;/strong&gt;, it is only used for the development phase and will not affect the production code.&lt;/p&gt;

&lt;p&gt;As always, I hope this helps someone 😌.&lt;/p&gt;

</description>
      <category>react</category>
      <category>veracode</category>
      <category>security</category>
      <category>vulnerabilities</category>
    </item>
    <item>
      <title>Next JS might be exposing your backend environment variables</title>
      <dc:creator>Mark Benjamin</dc:creator>
      <pubDate>Wed, 08 Nov 2023 19:37:17 +0000</pubDate>
      <link>https://dev.to/thecodeinfluencer/next-js-might-be-exposing-your-backend-environment-variables-4bmd</link>
      <guid>https://dev.to/thecodeinfluencer/next-js-might-be-exposing-your-backend-environment-variables-4bmd</guid>
      <description>&lt;p&gt;I recently got embarrassed by next.js at work when some API keys were found on the client-side browser cache. Even though these variables were used on the backend side, they were being exposed and it was quite confusing to me. I later did extensive research and discovered a rule of thumb to use in future to avoid such a scenario in future. I wrote this post to help you avoid such a scenario and to share the rule I came up with. &lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;Apparently, it is not a good idea to share variables between the client and server. This was the root problem for me. Here's an example of what I did.&lt;/p&gt;

&lt;p&gt;I had a backend file called say &lt;code&gt;utils.ts&lt;/code&gt; which was getting values from the &lt;code&gt;.env&lt;/code&gt; as below:&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;environment&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;someApiURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;SOME_API_URL&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;someClientKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;someClientValue&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then on the client, we use the &lt;code&gt;someClientValue&lt;/code&gt; as below:&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="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;environment&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;@/utils.ts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;App&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;someClientKey&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the examples above, the client build will also include the &lt;code&gt;someApiURL&lt;/code&gt; and even expose its value from the &lt;code&gt;.env&lt;/code&gt; to the client. To confirm this, we can open the browser dev tools, go to sources tab and into &lt;code&gt;_next/static/pages/chunks/thepageyourcurrentlyin&lt;/code&gt; and try to search the &lt;code&gt;someApiURL&lt;/code&gt;. You will find the &lt;code&gt;.env&lt;/code&gt; value exposed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fix
&lt;/h2&gt;

&lt;p&gt;The fix is as simple as to not mix server variables with client variables. Except that more often than not, you will not be keen enough. For me, I came up with a rule of thumb to separate frontend and backend utility and config functions to different folders so I'm always sure.&lt;/p&gt;

&lt;p&gt;This might not seem as a common or significant issue until you expose your company's credentials to potential hackers.&lt;/p&gt;

&lt;p&gt;Hope this helps someone.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>nextjs</category>
      <category>javascript</category>
      <category>env</category>
    </item>
  </channel>
</rss>
