<?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>Forem: Hassam Fathe Muhammad</title>
    <description>The latest articles on Forem by Hassam Fathe Muhammad (@hassamdev).</description>
    <link>https://forem.com/hassamdev</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%2F1806185%2Fe33362af-9a2c-4341-9915-76889ff7c1fa.jpg</url>
      <title>Forem: Hassam Fathe Muhammad</title>
      <link>https://forem.com/hassamdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/hassamdev"/>
    <language>en</language>
    <item>
      <title>[Boost]</title>
      <dc:creator>Hassam Fathe Muhammad</dc:creator>
      <pubDate>Sat, 28 Mar 2026 09:27:44 +0000</pubDate>
      <link>https://forem.com/hassamdev/-273h</link>
      <guid>https://forem.com/hassamdev/-273h</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/klement_gunndu/vibe-coding-got-you-started-these-5-skills-keep-you-employed-23pn" class="crayons-story__hidden-navigation-link"&gt;Vibe Coding Got You Started. These 5 Skills Keep You Employed.&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/klement_gunndu" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F3786236%2Fe2629efd-63ba-4d1b-83d8-b55db5d86b58.jpeg" alt="klement_gunndu profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/klement_gunndu" class="crayons-story__secondary fw-medium m:hidden"&gt;
              klement Gunndu
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                klement Gunndu
                
              
              &lt;div id="story-author-preview-content-3402293" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/klement_gunndu" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F3786236%2Fe2629efd-63ba-4d1b-83d8-b55db5d86b58.jpeg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;klement Gunndu&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/klement_gunndu/vibe-coding-got-you-started-these-5-skills-keep-you-employed-23pn" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Mar 25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/klement_gunndu/vibe-coding-got-you-started-these-5-skills-keep-you-employed-23pn" id="article-link-3402293"&gt;
          Vibe Coding Got You Started. These 5 Skills Keep You Employed.
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/beginners"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;beginners&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/career"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;career&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/programming"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;programming&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/klement_gunndu/vibe-coding-got-you-started-these-5-skills-keep-you-employed-23pn" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/raised-hands-74b2099fd66a39f2d7eed9305ee0f4553df0eb7b4f11b01b6b1b499973048fe5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;32&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/klement_gunndu/vibe-coding-got-you-started-these-5-skills-keep-you-employed-23pn#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              16&lt;span class="hidden s:inline"&gt; comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            6 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>ai</category>
      <category>beginners</category>
      <category>career</category>
      <category>programming</category>
    </item>
    <item>
      <title>Just Did Work On OWASP A05</title>
      <dc:creator>Hassam Fathe Muhammad</dc:creator>
      <pubDate>Fri, 27 Mar 2026 15:23:12 +0000</pubDate>
      <link>https://forem.com/hassamdev/-2el5</link>
      <guid>https://forem.com/hassamdev/-2el5</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/hassamdev/owasp-top-10-a05-security-misconfiguration-remediation-perspective-2d30" class="crayons-story__hidden-navigation-link"&gt;OWASP Top 10 – A05: Security Misconfiguration (Remediation Perspective)&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/hassamdev" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F1806185%2Fe33362af-9a2c-4341-9915-76889ff7c1fa.jpg" alt="hassamdev profile" class="crayons-avatar__image" width="800" height="970"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/hassamdev" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Hassam Fathe Muhammad
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Hassam Fathe Muhammad
                
              
              &lt;div id="story-author-preview-content-3415783" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/hassamdev" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F1806185%2Fe33362af-9a2c-4341-9915-76889ff7c1fa.jpg" class="crayons-avatar__image" alt="" width="800" height="970"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Hassam Fathe Muhammad&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/hassamdev/owasp-top-10-a05-security-misconfiguration-remediation-perspective-2d30" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Mar 27&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/hassamdev/owasp-top-10-a05-security-misconfiguration-remediation-perspective-2d30" id="article-link-3415783"&gt;
          OWASP Top 10 – A05: Security Misconfiguration (Remediation Perspective)
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/security"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;security&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/systemdesign"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;systemdesign&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/owasp"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;owasp&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
            &lt;a href="https://dev.to/hassamdev/owasp-top-10-a05-security-misconfiguration-remediation-perspective-2d30#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            3 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>security</category>
      <category>systemdesign</category>
      <category>owasp</category>
    </item>
    <item>
      <title>OWASP Top 10 – A05: Security Misconfiguration (Remediation Perspective)</title>
      <dc:creator>Hassam Fathe Muhammad</dc:creator>
      <pubDate>Fri, 27 Mar 2026 15:22:40 +0000</pubDate>
      <link>https://forem.com/hassamdev/owasp-top-10-a05-security-misconfiguration-remediation-perspective-2d30</link>
      <guid>https://forem.com/hassamdev/owasp-top-10-a05-security-misconfiguration-remediation-perspective-2d30</guid>
      <description>&lt;p&gt;As I have been working with OWASP Top 10, so far I have studied A01 to A04 and performed remediations according to them on my projects, so I can have an idea of security and standard testing of my web apps. In this article, I would like to tell you about my work regarding A05, which is &lt;strong&gt;Security Misconfiguration&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;t is observed by me that many of the aspects addressed in one OWASP category can also be addressed in more than one category. So this is more about discipline while developing a web app.&lt;/p&gt;

&lt;p&gt;In my work on OWASP A05, I performed the following remediations and improvements:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; As some aspects are also addressed in more than one OWASP category, my work is more likely inclined toward one specific category in this article.&lt;/p&gt;




&lt;h2&gt;
  
  
  Environment Configuration
&lt;/h2&gt;

&lt;p&gt;One of the aspects that many beginner developers miss out on—and exhibit work-shyness in—is not preparing separate environments for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Development (Project Making)&lt;/li&gt;
&lt;li&gt;Local (Running on a local closed network)&lt;/li&gt;
&lt;li&gt;Production (Deploying the project as delivered and ready to meet the internet)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This configuration can be done by preparing .env files accordingly and editing them for the type of project start.&lt;/p&gt;

&lt;p&gt;**For example: **It is best and advised to have this variable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight conf"&gt;&lt;code&gt;&lt;span class="n"&gt;NODE_ENV&lt;/span&gt;=&lt;span class="n"&gt;production&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The variable value can be changed according to the project environment like "dev" for development, "local" for local, and "prod" for production.&lt;/p&gt;

&lt;p&gt;This allows necessary condition checks and flag triggering such as:&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;if &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;NODE_ENV&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;production&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="nx"&gt;app&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;trust proxy&lt;/span&gt;&lt;span class="dl"&gt;"&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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows IP address logging and other rate-limiting and security methods to be applied.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Proxy must be trusted with this flag only if you are using NGINX or another trusted reverse proxy like Cloudflare or reputed hosting services.&lt;/p&gt;




&lt;h2&gt;
  
  
  Secure HTTP Headers
&lt;/h2&gt;

&lt;p&gt;Another security misconfiguration that must be handled is the use of &lt;strong&gt;Helmet&lt;/strong&gt; for securing HTTP headers.&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;helmet&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;helmet&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&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;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;helmet&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;ul&gt;
&lt;li&gt;Content-Security-Policy&lt;/li&gt;
&lt;li&gt;XSS Protection&lt;/li&gt;
&lt;li&gt;Frameguard&lt;/li&gt;
&lt;li&gt;HSTS&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  CORS Configuration
&lt;/h2&gt;

&lt;p&gt;Another important configuration is CORS:&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="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;cors&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;origin&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;https://yourfrontend.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;credentials&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="p"&gt;}));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One should regularly identify their domains and use the correct URLs in their CORS configuration.&lt;/p&gt;




&lt;h2&gt;
  
  
  Hide Sensitive Errors
&lt;/h2&gt;

&lt;p&gt;Many developers forward backend errors to the frontend for quick debugging, like:&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="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;500&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="nx"&gt;err&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is not advised, as it may expose backend structure, repositories, or system limitations.&lt;/p&gt;

&lt;p&gt;Instead, use standard messages such as:&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="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;500&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;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Internal Server Error&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;For debugging, use server logs:&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;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Logic&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;error&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;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;Error While Processing In (Endpoint)&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&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;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;500&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;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Internal Server Error&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;h2&gt;
  
  
  Disable Stack Traces &amp;amp; Info Leaks
&lt;/h2&gt;

&lt;p&gt;Information about backend resources matters a lot. It allows attackers to guess weaknesses and evaluate your servers.&lt;/p&gt;

&lt;p&gt;We can use:&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="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;disable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;x-powered-by&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;This hides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;X-Powered-By: Express&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Enforce HTTPS
&lt;/h2&gt;

&lt;p&gt;When using hosting services, they often handle HTTPS automatically.&lt;/p&gt;

&lt;p&gt;But when deploying manually using a reverse proxy like &lt;strong&gt;NGINX&lt;/strong&gt;, ensure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;NGINX + Certbot setup&lt;/li&gt;
&lt;li&gt;Redirect HTTP → HTTPS&lt;/li&gt;
&lt;li&gt;Install SSL certificate&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Usually, this is part of NGINX deployment.&lt;/p&gt;




&lt;h2&gt;
  
  
  Secure Cookies
&lt;/h2&gt;

&lt;p&gt;While setting cookies from the backend, ensure the following:&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="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cookie&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;token&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;token&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;httpOnly&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;secure&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;sameSite&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;strict&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;h2&gt;
  
  
  Remove Default Credentials
&lt;/h2&gt;

&lt;p&gt;During development, many developers use default credentials for quick testing.&lt;/p&gt;

&lt;p&gt;Removing these from the database is very important.&lt;/p&gt;

&lt;p&gt;If missed, attackers might try:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Username: admin&lt;/li&gt;
&lt;li&gt;Password: admin&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and gain admin access.&lt;/p&gt;




&lt;h2&gt;
  
  
  Advanced Insight
&lt;/h2&gt;

&lt;p&gt;Security Misconfiguration is &lt;strong&gt;NOT a bug&lt;/strong&gt;. It’s a &lt;strong&gt;discipline problem.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Most developers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Focus on features&lt;/li&gt;
&lt;li&gt;Ignore deployment &amp;amp; configurations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Real engineers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Secure systems at both infrastructure and application levels&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>security</category>
      <category>systemdesign</category>
      <category>owasp</category>
    </item>
    <item>
      <title>Redux vs React Context: A Practical Perspective from a Real Project</title>
      <dc:creator>Hassam Fathe Muhammad</dc:creator>
      <pubDate>Wed, 28 Jan 2026 16:39:55 +0000</pubDate>
      <link>https://forem.com/hassamdev/redux-vs-react-context-a-practical-perspective-from-a-real-project-1o0a</link>
      <guid>https://forem.com/hassamdev/redux-vs-react-context-a-practical-perspective-from-a-real-project-1o0a</guid>
      <description>&lt;p&gt;Back then, I started using &lt;strong&gt;React Context&lt;/strong&gt; in my web apps mainly for &lt;strong&gt;auth&lt;/strong&gt; and &lt;strong&gt;session-related info/status.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The idea of Context is simple: it is created for the app (its components) so that &lt;strong&gt;prop drilling can be avoided&lt;/strong&gt;, and the state can be easily accessed by the components that actually need it—while ensuring proper updates and usage of state data.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;React Context API&lt;/strong&gt; (createContext, useContext, useState, etc.) worked well for me, and I’ve used it in many of my web apps &lt;strong&gt;(React + Next.js).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What I liked the most—and what I think many developers will find helpful—is how it &lt;strong&gt;eliminates prop drilling&lt;/strong&gt; and helps in understanding the layout structure when using a Context Provider. I became quite comfortable with React Context.&lt;/p&gt;

&lt;p&gt;But there is also another library designed for managing shared state and complexity: &lt;strong&gt;Redux.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Enter Redux
&lt;/h2&gt;

&lt;p&gt;Using Redux requires understanding a few core concepts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Store&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Slices&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reducers&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Actions&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;strong&gt;Store&lt;/strong&gt;, which is the global state container, is &lt;strong&gt;singular&lt;/strong&gt;—there is only one store in an app. Inside it, you have multiple &lt;strong&gt;slices&lt;/strong&gt;, where each slice represents a specific feature or concern and contains its &lt;strong&gt;state, reducers, and actions.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’m not writing this article to teach Redux or deeply explore its internal structure. Instead, I’ll explain my thinking using an example from one of my projects.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Real Project Example
&lt;/h2&gt;

&lt;p&gt;I have an &lt;strong&gt;e-commerce-based Next.js web app&lt;/strong&gt; called &lt;strong&gt;Nur Fashions.&lt;/strong&gt; It’s a template-nature, client-based project.&lt;/p&gt;

&lt;p&gt;In this project, I’m &lt;strong&gt;using React Context&lt;/strong&gt; for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Authentication&lt;/li&gt;
&lt;li&gt;Cart management&lt;/li&gt;
&lt;li&gt;Location (for currency, etc.)
From my experience, &lt;strong&gt;Context API is completely fine for these use cases.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No complex backend involvement&lt;/li&gt;
&lt;li&gt;No heavy backend syncing&lt;/li&gt;
&lt;li&gt;No asynchronous workflows&lt;/li&gt;
&lt;li&gt;Fewer uncertain or branching operations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So for these parts of the app, &lt;strong&gt;React Context is more than enough&lt;/strong&gt;—there is simply &lt;strong&gt;no need for Redux&lt;/strong&gt; here.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where Redux Makes Sense
&lt;/h2&gt;

&lt;p&gt;However, one important process in this app is the &lt;strong&gt;ordering flow after cart checkout.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This process needs to be handled very carefully:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It involves &lt;strong&gt;asynchronous operations&lt;/strong&gt; with the backend&lt;/li&gt;
&lt;li&gt;It requires &lt;strong&gt;clearly defined and strongly typed states&lt;/strong&gt; (loading, success, failure, etc.)&lt;/li&gt;
&lt;li&gt;It has the potential to &lt;strong&gt;grow in complexity and scalability&lt;/strong&gt;, with more backend syncing and business logic added over time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For this reason, using &lt;strong&gt;Redux&lt;/strong&gt; here felt both &lt;strong&gt;reasonable and professional.&lt;/strong&gt; So I set up Redux (store + slice) and wrapped it with a provider in the layout.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Key Realization
&lt;/h2&gt;

&lt;p&gt;While working on this, I came across a very important professional insight:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Redux is NOT about lifetime. Redux is about complexity.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Before understanding this, I was more convinced of the idea that Redux should only be used for long-living context or global state. But now my perspective has changed.&lt;/p&gt;

&lt;p&gt;What truly matters is &lt;strong&gt;how complex and scalable the state logic is&lt;/strong&gt;, not how long the data lives.&lt;/p&gt;

&lt;p&gt;And that, for me, is the real distinction between &lt;strong&gt;React Context&lt;/strong&gt; and &lt;strong&gt;Redux&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>react</category>
      <category>redux</category>
      <category>contextapi</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>OWASP Top 10 – A04: Insecure Design (Remediation Perspective)</title>
      <dc:creator>Hassam Fathe Muhammad</dc:creator>
      <pubDate>Wed, 28 Jan 2026 15:54:00 +0000</pubDate>
      <link>https://forem.com/hassamdev/owasp-top-10-a04-insecure-design-remediation-perspective-12pp</link>
      <guid>https://forem.com/hassamdev/owasp-top-10-a04-insecure-design-remediation-perspective-12pp</guid>
      <description>&lt;p&gt;As I have been trying to cover the &lt;strong&gt;OWASP Top 10&lt;/strong&gt; to make my &lt;strong&gt;full-stack development skills&lt;/strong&gt; more valuable, standardized, and aligned with the &lt;strong&gt;cybersecurity domain&lt;/strong&gt;, the topics I have already covered include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A01 – Broken Access Control&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A02 – Cryptographic Failures&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A03 – Injection&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this article, I will talk about &lt;strong&gt;A04 (Insecure Design)&lt;/strong&gt;, its remediation, and how it differs from &lt;strong&gt;A01&lt;/strong&gt; in some important ways.&lt;/p&gt;




&lt;h2&gt;
  
  
  What A04 (Insecure Design) Focuses On
&lt;/h2&gt;

&lt;p&gt;A04 focuses on the &lt;strong&gt;absence of proper logic and security mechanisms at the design and implementation level&lt;/strong&gt; of a web application or website, which ultimately makes it insecure.&lt;/p&gt;

&lt;p&gt;Some practices that commonly lead to &lt;strong&gt;Insecure Design&lt;/strong&gt; include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Trusting the &lt;strong&gt;client-side&lt;/strong&gt; too much&lt;/li&gt;
&lt;li&gt;Not designing &lt;strong&gt;APIs and gateways&lt;/strong&gt; according to &lt;strong&gt;server-issued protocols and rules&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Performing &lt;strong&gt;sensitive processing on the client side&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Fetching &lt;strong&gt;sensitive data on the frontend when it is not required&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Practical Handling of A04 in My Project
&lt;/h2&gt;

&lt;p&gt;In this article, I’ll explain some of the practices I eliminated to avoid &lt;strong&gt;A04 (Insecure Design)&lt;/strong&gt; issues in one of my projects, &lt;strong&gt;Alpha Connect Hub (now IoT Nerve).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Handling A04 across the &lt;strong&gt;entire project and all modules&lt;/strong&gt; is my responsibility as a skilled full-stack developer to ensure that no cybersecurity issues are introduced due to weak design decisions.&lt;/p&gt;

&lt;p&gt;To keep this article focused and practical, I will explain A04 using a &lt;strong&gt;specific module example.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Example Module: MQTT Broker Server Credentials
&lt;/h2&gt;

&lt;p&gt;This module is responsible for &lt;strong&gt;setting up credentials (username and password)&lt;/strong&gt; for the &lt;strong&gt;MQTT Authentication Service&lt;/strong&gt;, which is required to connect to the MQTT Broker.&lt;/p&gt;

&lt;h2&gt;
  
  
  Insecure Practices Eliminated
&lt;/h2&gt;

&lt;p&gt;One of the main vulnerabilities that must be rooted out in this module is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fetching the password on the frontend&lt;/strong&gt; (even in hashed form)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The involvement of &lt;strong&gt;passwords or authentication keys on the frontend&lt;/strong&gt; directly contributes to &lt;strong&gt;Insecure Design.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another insecure practice that must not be allowed is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allowing the &lt;strong&gt;password-changing mechanism&lt;/strong&gt; to proceed &lt;strong&gt;without verifying the original (old) password&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Requiring the previous password ensures &lt;strong&gt;ownership verification&lt;/strong&gt; and keeps access control intact.&lt;/p&gt;




&lt;h2&gt;
  
  
  Route Protection &amp;amp; OWASP Categorization
&lt;/h2&gt;

&lt;p&gt;All routes used in this module are &lt;strong&gt;protected&lt;/strong&gt; and require a &lt;strong&gt;server-issued token&lt;/strong&gt;, enforced through middleware, before any real operation is performed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Negligence in protecting such routes&lt;/strong&gt; falls under &lt;strong&gt;A01 – Broken Access Control&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The absence of proper route design&lt;/strong&gt;, reasonable parameters, and a &lt;strong&gt;secure &amp;amp; safe output/result schema&lt;/strong&gt; falls under &lt;strong&gt;A04 – Insecure Design&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>security</category>
      <category>systemdesign</category>
      <category>owasp</category>
    </item>
    <item>
      <title>From Internship to Enterprise Development: My Journey into MDM, EMM &amp; API Publishing</title>
      <dc:creator>Hassam Fathe Muhammad</dc:creator>
      <pubDate>Sat, 01 Nov 2025 16:08:30 +0000</pubDate>
      <link>https://forem.com/hassamdev/from-internship-to-enterprise-development-my-journey-into-mdm-emm-api-publishing-3327</link>
      <guid>https://forem.com/hassamdev/from-internship-to-enterprise-development-my-journey-into-mdm-emm-api-publishing-3327</guid>
      <description>&lt;h2&gt;
  
  
  🔒 Disclaimer / Notice
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;This article is purely based on learning, exploration, and research into &lt;strong&gt;MDM&lt;/strong&gt;, &lt;strong&gt;EMM&lt;/strong&gt;, and &lt;strong&gt;API publishing technologies&lt;/strong&gt; during my internship and personal projects.  &lt;/p&gt;

&lt;p&gt;No production-level deployments, enterprise bypassing, or unauthorized development for business gains were performed.  &lt;/p&gt;

&lt;p&gt;All experiments were done in local/demo environments and with educational intent.  &lt;/p&gt;

&lt;p&gt;The purpose of this write-up is to &lt;strong&gt;share knowledge&lt;/strong&gt; and &lt;strong&gt;document my journey&lt;/strong&gt;, not to promote or replicate enterprise deployments without proper authorization.  &lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🏁 Starting Point: My Internship at Mercurial Minds
&lt;/h2&gt;

&lt;p&gt;During my internship at &lt;strong&gt;Mercurial Minds (M.M)&lt;/strong&gt;, I was placed in the &lt;strong&gt;Enterprise Mobility Management (EMM) / Mobile Device Management (MDM)&lt;/strong&gt; department.&lt;br&gt;&lt;br&gt;
At first, I wasn’t fully clear on what these systems were about — tools like &lt;em&gt;Samsung Knox&lt;/em&gt; and other enterprise EMM platforms felt overwhelming.  &lt;/p&gt;

&lt;p&gt;But gradually, I discovered that &lt;strong&gt;EMM/MDM isn’t just about managing devices — it’s a core product area that many leading software companies invest in.&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;This was my first real exposure to &lt;strong&gt;enterprise-level technology&lt;/strong&gt;, beyond the world of small-scale software projects.  &lt;/p&gt;




&lt;h2&gt;
  
  
  🔍 Diving Deeper: From Confusion to Curiosity
&lt;/h2&gt;

&lt;p&gt;As I got hands-on experience with an &lt;strong&gt;EMM/MDM portal&lt;/strong&gt; on a demo server, my curiosity grew. With some research, I found that the portal was powered by the &lt;strong&gt;Entgra IoT Server&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;Instead of stopping there, I pushed myself to self-learn:  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Studied how the portal behaves behind the UI.
&lt;/li&gt;
&lt;li&gt;Explored the REST APIs that power MDM workflows.
&lt;/li&gt;
&lt;li&gt;Looked into open-source repositories on GitHub.
&lt;/li&gt;
&lt;li&gt;Broke down how &lt;strong&gt;Java&lt;/strong&gt;, &lt;strong&gt;JDKs&lt;/strong&gt;, and &lt;strong&gt;Maven&lt;/strong&gt; tie together in &lt;strong&gt;Carbon Kernel–based projects&lt;/strong&gt;.
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;At first, things like &lt;em&gt;API gateways&lt;/em&gt;, &lt;em&gt;publishing flows&lt;/em&gt;, and &lt;em&gt;claim-based authentication&lt;/em&gt; seemed abstract. But slowly, the architecture started making sense — I realized these weren’t just “APIs,” they were &lt;strong&gt;enterprise connectors between identity, security, and data&lt;/strong&gt;.  &lt;/p&gt;




&lt;h2&gt;
  
  
  🧩 Connecting the Dots: From Internship to My Own Projects
&lt;/h2&gt;

&lt;p&gt;While experimenting, I even evaluated &lt;strong&gt;Entgra UEM 6&lt;/strong&gt; (using my &lt;em&gt;Alpha Tech&lt;/em&gt; business email). That opened doors to &lt;strong&gt;WSO2 API publishing features&lt;/strong&gt;, which taught me that:  &lt;/p&gt;

&lt;p&gt;✅ APIs aren’t just direct DB calls — they’re published assets, controlled, secured, and monitored.&lt;br&gt;&lt;br&gt;
✅ A single published API serves all users/tenants, while tokens and claims decide whose data flows through.&lt;br&gt;&lt;br&gt;
✅ Enterprise systems solve the question:  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“How do I ensure each user only sees their devices, even though everyone is calling the same endpoint?”&lt;/em&gt;  &lt;/p&gt;
&lt;/blockquote&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%2Ff8nylhcrw67g5lvqygng.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%2Ff8nylhcrw67g5lvqygng.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Applying It: Building My Own System
&lt;/h2&gt;

&lt;p&gt;This was a big shift. I wasn’t just thinking like an intern anymore — I was thinking like:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;developer&lt;/strong&gt; building scalable solutions.
&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;founder&lt;/strong&gt; shaping my own product direction.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I applied these lessons in my own project — &lt;strong&gt;Alpha Connect Hub (under Alpha Tech)&lt;/strong&gt;:  &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%2F1r3u8tx03ik3sn3oc95w.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%2F1r3u8tx03ik3sn3oc95w.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Built a &lt;strong&gt;Node.js backend&lt;/strong&gt; for device management.
&lt;/li&gt;
&lt;li&gt;Used &lt;strong&gt;WSO2 API publishing&lt;/strong&gt; to expose those APIs securely.
&lt;/li&gt;
&lt;li&gt;Integrated &lt;strong&gt;OAuth2 / JWT-based access tokens&lt;/strong&gt; to ensure each request is linked to a unique user identity.
&lt;/li&gt;
&lt;li&gt;Experimented with building a &lt;strong&gt;Java backend&lt;/strong&gt; to simulate MDM/EMM workflows on a &lt;strong&gt;Carbon Kernel stack&lt;/strong&gt;.
&lt;/li&gt;
&lt;/ul&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%2Far1ww8wk411vr99ogeyl.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%2Far1ww8wk411vr99ogeyl.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ Lessons From the Struggle
&lt;/h2&gt;

&lt;p&gt;This journey wasn’t smooth:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Running large Carbon Kernel projects on macOS was painful.
&lt;/li&gt;
&lt;li&gt;Debugging JDK versions, Maven builds, and UEM server issues tested my patience.
&lt;/li&gt;
&lt;li&gt;Figuring out why &lt;code&gt;GET /devices&lt;/code&gt; worked only via the API Gateway (and not as a direct DB call) forced me to learn about &lt;strong&gt;invoker endpoints&lt;/strong&gt;, &lt;strong&gt;token claims&lt;/strong&gt;, and &lt;strong&gt;mediation policies&lt;/strong&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I learned that &lt;strong&gt;one API is published for everyone&lt;/strong&gt;, but the &lt;strong&gt;token’s claims (like user_id)&lt;/strong&gt; make it unique per user.  &lt;/p&gt;

&lt;p&gt;Every error — from a &lt;em&gt;401 auth failure&lt;/em&gt; to a &lt;em&gt;class-not-found exception&lt;/em&gt; — taught me something new.  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Through this struggle, I learned the real difference between project-level coding vs. enterprise-level development:&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Projects require coding skill.&lt;/em&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;Enterprise systems require architecture, patience, and persistence.&lt;/em&gt;  &lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🌐 What’s Next
&lt;/h2&gt;

&lt;p&gt;I’m now preparing to set up a &lt;strong&gt;Linux server environment&lt;/strong&gt;, since Carbon Kernel–based systems run more stably there compared to macOS.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My roadmap is clear:&lt;/strong&gt;  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Build enterprise-ready backend systems.
&lt;/li&gt;
&lt;li&gt;Combine MDM, EMM, and API publishing into scalable, secure products.
&lt;/li&gt;
&lt;li&gt;Use this foundation to grow &lt;strong&gt;Alpha Tech&lt;/strong&gt; into a company that builds &lt;strong&gt;solutions&lt;/strong&gt;, not just apps.
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  💡 Final Reflection
&lt;/h2&gt;

&lt;p&gt;Looking back, this wasn’t just an internship. It was the spark that helped me:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Transition from &lt;strong&gt;learning projects → building products&lt;/strong&gt;.
&lt;/li&gt;
&lt;li&gt;Move from &lt;strong&gt;coding → thinking enterprise&lt;/strong&gt;.
&lt;/li&gt;
&lt;li&gt;See technology not just as tools, but as part of a &lt;strong&gt;bigger ecosystem&lt;/strong&gt; of identity, security, and scale.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;My journey into enterprise development has only just begun. 🚀&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>internship</category>
      <category>mdm</category>
      <category>mercurialminds</category>
      <category>emm</category>
    </item>
    <item>
      <title>Vulnerability Remediation (Cybersecurity Patch) by Strengthening Cryptography &amp; Data Protection (OWASP A02)</title>
      <dc:creator>Hassam Fathe Muhammad</dc:creator>
      <pubDate>Fri, 17 Oct 2025 19:37:05 +0000</pubDate>
      <link>https://forem.com/hassamdev/vulnerability-remediation-cybersecurity-patch-by-strengthening-cryptography-data-protection-17fd</link>
      <guid>https://forem.com/hassamdev/vulnerability-remediation-cybersecurity-patch-by-strengthening-cryptography-data-protection-17fd</guid>
      <description>&lt;h2&gt;
  
  
  A02: Cryptographic Failures
&lt;/h2&gt;

&lt;p&gt;Being a full stack developer, I try my best to make my web apps scalable and secure. The security of a web app not only shows its ability to defend and survive hacking attacks, but it also enables one to learn the connection and intersection of different domains of knowledge and skills that actually happen at many stages in the development journey.&lt;/p&gt;




&lt;h2&gt;
  
  
  Enforcing HTTPS
&lt;/h2&gt;

&lt;p&gt;In OWASP A02 (Cryptographic Failures), I explored how to perform vulnerability remediation and apply fixes. The enforcement of HTTPS, proper TLS usage, encryption of data, and secure hashing methods are all part of this A02 practice.&lt;/p&gt;

&lt;p&gt;I started exploring and found out about the express-sslify module, which helps enforce HTTPS so that requests sent by clients are only accepted over HTTPS, responding with a &lt;strong&gt;301 redirect&lt;/strong&gt; if not.&lt;/p&gt;

&lt;p&gt;I used the module in my server file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.set('trust proxy', 1);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows the app to apply settings for trusting the proxy headers.We need this because deployment services (CaaS platforms) like &lt;strong&gt;Render&lt;/strong&gt;, which I used, rely on reverse proxies such as &lt;strong&gt;Nginx&lt;/strong&gt; or &lt;strong&gt;Cloudflare&lt;/strong&gt;. Locally, the backend (Node.js) starts the server via HTTP, and the reverse proxy provides HTTPS to the client, forwarding it back to the HTTP routes internally.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (process.env.NODE_ENV === 'production') {
    app.use(enforce.HTTPS({ trustProtoHeader: true }));
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this code, HTTPS is enforced. It checks the request protocol, and if the initial client request is not HTTPS, it issues a 301 redirect to the correct HTTPS URL.&lt;/p&gt;




&lt;h2&gt;
  
  
  Checking With curl -I
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -I http://alphaconnecthub.onrender.com/profile/getProfiles
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Response&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTTP/1.1 301 Moved Permanently
Date: Thu, 04 Sep 2025 21:47:14 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Location: https://alphaconnecthub.onrender.com/profile/getProfiles
cf-cache-status: DYNAMIC
Server: cloudflare
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Using Argon2 Over BcryptJS for Better Hashing
&lt;/h2&gt;

&lt;p&gt;For password hashing, I used &lt;strong&gt;Argon2&lt;/strong&gt; instead of &lt;strong&gt;BcryptJS&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const hashedPassword = await argon2.hash(password, {
    type: argon2.argon2id,
    memoryCost: 2 ** 16,
    timeCost: 3,
    parallelism: 1,
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why Argon2?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OWASP recommends Argon2 as one of the strongest password-hashing algorithms.&lt;/li&gt;
&lt;li&gt;It is memory-hard (resistant to GPU/ASIC brute-force attacks).&lt;/li&gt;
&lt;li&gt;It provides stronger defense against modern cracking attempts compared to Bcrypt.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Not Scrypt?
&lt;/h2&gt;

&lt;p&gt;During my exploration of hashing methods, i also came across &lt;strong&gt;scrypt&lt;/strong&gt;. It is a memory-hard algorithm and is even used in some cryptocurrencies like Litecoin and Dogecoin because of its ability to make large scale hardware attacks expensive. Scrypt is definitely stronger than older methods like Bcrypt in many cases.&lt;/p&gt;

&lt;p&gt;But When i compared it with &lt;strong&gt;argon2&lt;/strong&gt;, i found that argon2 is the more modern and recommended option. Argon2 was the winner of the Password Hashing Competition and is recommended by &lt;strong&gt;OWAPS&lt;/strong&gt; and &lt;strong&gt;NIST&lt;/strong&gt;. It gives better protection against side-channel attacks and has more flexible settings like memory usage, time cost, and parallelism.&lt;/p&gt;

&lt;p&gt;So while scrypt is still secure, i decided to use &lt;strong&gt;argon2&lt;/strong&gt; in my project because it is the latest best practice for password hashing and aligns with security standards.&lt;/p&gt;




&lt;h2&gt;
  
  
  Hiding Auth Token Names (Cookies) in Environment Variables
&lt;/h2&gt;

&lt;p&gt;I wrote the token names in the .env file. These are used when storing and issuing auth tokens, making it more difficult for attackers to inspect an active logged-in session and guess cookies/tokens.&lt;/p&gt;




&lt;h2&gt;
  
  
  Enabling HTTP-Only Flag in Cookies
&lt;/h2&gt;

&lt;p&gt;Finally, I enabled the HTTPOnly flag when setting cookies. This disables JavaScript access, which prevents cookie theft or manipulation by malicious scripts.&lt;/p&gt;

</description>
      <category>backend</category>
      <category>security</category>
      <category>cryptography</category>
      <category>data</category>
    </item>
    <item>
      <title>💡Idea: Using VPN-Type Virtual Links for Secure IoT Data Flow</title>
      <dc:creator>Hassam Fathe Muhammad</dc:creator>
      <pubDate>Tue, 14 Oct 2025 19:13:53 +0000</pubDate>
      <link>https://forem.com/hassamdev/idea-using-vpn-type-virtual-links-for-secure-iot-data-flow-4f29</link>
      <guid>https://forem.com/hassamdev/idea-using-vpn-type-virtual-links-for-secure-iot-data-flow-4f29</guid>
      <description>&lt;p&gt;&lt;strong&gt;🔸🔸🔸🔸🔸🔸 RESEARCH REFLECTION 🔸🔸🔸🔸🔸🔸&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While experimenting on Hack The Box, I realized something interesting — the same VPN tunnels we use in cybersecurity labs could potentially revolutionize how IoT devices communicate securely.&lt;/p&gt;

&lt;p&gt;🕚 Recently, while learning how to get data from a Linux machine on Hack The Box, I started by scanning the host IP through a virtual network using OpenVPN.&lt;br&gt;
But I couldn’t even ping the host — it was isolated in a separate network. I had to use the .ovpn file to connect via utun.&lt;/p&gt;

&lt;p&gt;That got me thinking: since my machine couldn’t access the box directly over the internet, what if IoT networks used a similar secure, virtual link model?&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;🔹 Case 1: Near the Device Setup&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If the installation is large (e.g., a CPU or GPU-based edge node in a house, factory, or shop), LAN makes sense.&lt;br&gt;
Most algorithms can run locally, processing around 70% of the data before sending it — encrypted — to the cloud or main node.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔹 Case 2: Away from Device Setup&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If that 70% processing node is far away, LAN becomes impractical due to cable management, maintenance, and cost.&lt;/p&gt;

&lt;p&gt;So, what if we provide each IoT device (like ESP32 or Raspberry Pi) with its own OpenVPN configuration file — letting it connect to a private network before publishing data via MQTT?&lt;br&gt;
Only devices inside that VPN could reach the broker, shielding the system from external access.&lt;/p&gt;

&lt;p&gt;We could even rotate the VPN configs periodically for extra security.&lt;/p&gt;

&lt;p&gt;And since utun or tun0 interfaces can be controlled with iptables, we can define exactly what traffic passes through.&lt;/p&gt;

&lt;p&gt;For developers, SSH access to the edge node could happen through the same VPN — ensuring secure, controlled maintenance.&lt;/p&gt;




&lt;p&gt;🔚 Just an idea — but combining VPN-type isolation with MQTT and edge computing could make IoT communication far more secure.&lt;br&gt;
What do you think — could this approach scale in real-world IoT environments?&lt;/p&gt;

</description>
      <category>iot</category>
      <category>cloudsecurity</category>
      <category>edgecomputing</category>
      <category>researchreflection</category>
    </item>
    <item>
      <title>🔒 Vulnerability Remediation (Cybersecurity Patch) 🛠️ by Avoiding Broken Access Control 🚫</title>
      <dc:creator>Hassam Fathe Muhammad</dc:creator>
      <pubDate>Sat, 11 Oct 2025 18:13:21 +0000</pubDate>
      <link>https://forem.com/hassamdev/vulnerability-remediation-cybersecurity-patch-by-avoiding-broken-access-control-3lc8</link>
      <guid>https://forem.com/hassamdev/vulnerability-remediation-cybersecurity-patch-by-avoiding-broken-access-control-3lc8</guid>
      <description>&lt;p&gt;This was my second attempt at finding areas I needed to practice in, specifically related to cybersecurity skills — particularly &lt;strong&gt;Vulnerability Remediation.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before I get into how I strengthened the access control, I want to first explain the method I used to exploit a vulnerability in one of my &lt;strong&gt;own&lt;/strong&gt; web apps.&lt;/p&gt;




&lt;h2&gt;
  
  
  My Experiment (Ethical Practice)
&lt;/h2&gt;

&lt;p&gt;I acted exactly as a hacker would to try and gain access to certain services of my web app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Before proceeding further and sharing my experimental experience — please &lt;strong&gt;never&lt;/strong&gt; apply such knowledge to someone else’s projects, web apps, or services without &lt;strong&gt;proper consent&lt;/strong&gt;. Always do this only for learning and exploring vulnerabilities in &lt;strong&gt;your own&lt;/strong&gt; environment.&lt;/p&gt;




&lt;h2&gt;
  
  
  How I Exploited My Own App
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Targeting Admin Routes&lt;/strong&gt; I went to the admin routes (pages) of the targeted web app and opened the &lt;strong&gt;Network tab&lt;/strong&gt; in Chrome DevTools. From there, I examined the requests — pages, scripts, and other files — and was able to understand the JavaScript logic used to call APIs like updateData and savePortfolioData.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Identifying Admin-Level APIs&lt;/strong&gt; You can usually guess admin-level API functions by inspecting the client side:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Payload Analysis&lt;/strong&gt; I captured the payloads received from client-side APIs to see what data was coming in. After slightly modifying this data, I tested it in &lt;strong&gt;Postman.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Executing the Exploit&lt;/strong&gt; By changing the payload structure, I was able to get a 200 OK response after updating the data. ✅ &lt;strong&gt;Result:&lt;/strong&gt; I had gained access to admin-level functions/panel on my &lt;strong&gt;own&lt;/strong&gt; app.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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%2Fx3v7f69si2srdjcxcbb4.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%2Fx3v7f69si2srdjcxcbb4.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;A Surprising Finding: CORS Didn’t Interfere&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I was a little surprised that CORS didn’t block me at all. After researching, I found that CORS is enforced in browsers, whereas tools like Postman or local requests bypass browser restrictions — making such API calls less likely to be blocked for attackers.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Root Cause
&lt;/h2&gt;

&lt;p&gt;If you haven’t implemented middlewares like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Token verification&lt;/strong&gt; (checkToken)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Role verification&lt;/strong&gt; (checkRoles)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;…then your API routes can be abused by any regular user, customer, or even a random visitor.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Fix (My Cybersecurity Patch)
&lt;/h2&gt;

&lt;p&gt;In my remediation process, I ensured that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;All &lt;strong&gt;role-specific routes&lt;/strong&gt; require both &lt;strong&gt;token validation&lt;/strong&gt; and &lt;strong&gt;role validation.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Only authorized roles can access admin functions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By doing this, I prevented normal/non-admin users from exploiting those API routes.&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%2Fjsjbxxcrc8o1u118vo33.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%2Fjsjbxxcrc8o1u118vo33.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Takeaway
&lt;/h2&gt;

&lt;p&gt;Broken Access Control is one of the most critical vulnerabilities in web apps. Even if your front-end hides admin options, your APIs must be secured with &lt;strong&gt;proper authentication and authorization&lt;/strong&gt; — otherwise, it’s just a matter of time before someone finds and abuses them.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This was a valuable learning experience for me — not only did I strengthen my app’s security, but I also sharpened my vulnerability remediation skills by patching a flaw I had personally exploited in a safe environment.&lt;/p&gt;




&lt;h2&gt;
  
  
  🛡 My Tip for Developers:
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Always secure your APIs as if your front-end doesn’t exist. If your backend can’t trust the request source, it shouldn’t execute sensitive actions.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>backend</category>
      <category>security</category>
      <category>brokenaccess</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>Strengthening 🛡️ Brute Force Defense + Fallback Logs to Cover Data Loss in Case of Database Transaction Failures</title>
      <dc:creator>Hassam Fathe Muhammad</dc:creator>
      <pubDate>Mon, 06 Oct 2025 18:03:33 +0000</pubDate>
      <link>https://forem.com/hassamdev/strengthening-brute-force-defense-fallback-logs-to-cover-data-loss-in-case-of-database-48kg</link>
      <guid>https://forem.com/hassamdev/strengthening-brute-force-defense-fallback-logs-to-cover-data-loss-in-case-of-database-48kg</guid>
      <description>&lt;p&gt;We all use databases — whether it’s &lt;strong&gt;PostgreSQL, Firebase, or NoSQL like MongoDB.&lt;/strong&gt; They’re the backbone for storing and accessing data in a structured way.&lt;/p&gt;

&lt;p&gt;But here’s the thing: your database lives on a separate server. And when your &lt;strong&gt;web server&lt;/strong&gt; (maybe running on Render or some cloud platform) tries to talk to it, things can go wrong — &lt;strong&gt;connectivity issues, timeouts,&lt;/strong&gt; or even temporary downtime.&lt;/p&gt;

&lt;p&gt;So what if a critical operation fails? Like logging a suspicious login attempt?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔁 That’s where fallback logs come in.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I was working on strengthening &lt;strong&gt;login security&lt;/strong&gt; to prevent &lt;strong&gt;brute force attacks.&lt;/strong&gt; You’d think brute force isn’t easy to pull off — but once you understand how attackers operate, you realize it's a real threat.&lt;/p&gt;

&lt;p&gt;To stop it, I used the express-rate-limit middleware in Node.js — setting request limits per IP on the login route. Pretty standard.&lt;/p&gt;

&lt;p&gt;Now, I was logging each login attempt's &lt;strong&gt;IP address&lt;/strong&gt; and &lt;strong&gt;userID&lt;/strong&gt; into &lt;strong&gt;MongoDB.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;But then a few problems came up:&lt;/p&gt;

&lt;h2&gt;
  
  
  🔸 Problem 1: MongoDB Fails? Data Loss.
&lt;/h2&gt;

&lt;p&gt;So I added a &lt;strong&gt;fallback using Node’s&lt;/strong&gt; fs module. If MongoDB logging fails, the data (IP + userID) goes into a local file. Simple but effective — no loss of important info.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔸 Problem 2: IP Address was always ::1 or 127.0.0.1 on Render
&lt;/h2&gt;

&lt;p&gt;Because Render (like many cloud platforms) uses a &lt;strong&gt;reverse proxy,&lt;/strong&gt; the actual client IP wasn’t being captured — instead, Express was logging everything as localhost.&lt;/p&gt;

&lt;p&gt;This weakens the brute force protection — because every attacker seems to come from the same IP.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;✅ Fix&lt;/strong&gt;: I told the Express app to &lt;strong&gt;trust the proxy&lt;/strong&gt; by adding:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.set('trust proxy', true);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After this, the correct IPs started showing up via req.ip. Now the rate limiter and logging actually work as intended.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;🧠 Takeaway:&lt;/strong&gt; You can’t fully rely on external systems — whether it’s a DB or the platform’s default behavior. 👉 Always have &lt;strong&gt;fallbacks,&lt;/strong&gt; 👉 Always verify what data you’re actually capturing, 👉 And from a &lt;strong&gt;cybersecurity&lt;/strong&gt; point of view — don’t just rate-limit blindly. Make sure it’s working &lt;strong&gt;accurately&lt;/strong&gt; and &lt;strong&gt;intelligently.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>backend</category>
      <category>security</category>
      <category>bruteforceprotection</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>🔐Security-Proofing My Full Stack App Against XSS Attacks (Cross-Site Scripting)</title>
      <dc:creator>Hassam Fathe Muhammad</dc:creator>
      <pubDate>Wed, 24 Sep 2025 17:12:56 +0000</pubDate>
      <link>https://forem.com/hassamdev/security-proofing-my-full-stack-app-against-xss-attacks-cross-site-scripting-581m</link>
      <guid>https://forem.com/hassamdev/security-proofing-my-full-stack-app-against-xss-attacks-cross-site-scripting-581m</guid>
      <description>&lt;p&gt;As my &lt;strong&gt;skills and enthusiasm&lt;/strong&gt; keep getting forged in Full Stack Development, the &lt;strong&gt;prevention of hacking&lt;/strong&gt; and &lt;strong&gt;securing my web apps&lt;/strong&gt; is something I seriously gave time to — especially after discovering the weak points and vulnerabilities many modern apps still carry.&lt;/p&gt;

&lt;p&gt;After digging into these flaws, I began exploring their &lt;strong&gt;real-world consequences&lt;/strong&gt; and how to &lt;strong&gt;fix them practically.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🎯 First Target: XSS (Cross-Site Scripting)
&lt;/h2&gt;

&lt;p&gt;One of the vulnerabilities I tackled first was &lt;strong&gt;XSS (Cross-Site Scripting)&lt;/strong&gt; — the injection of &lt;strong&gt;malicious scripts via input forms&lt;/strong&gt;, comment boxes, search queries, etc.&lt;/p&gt;

&lt;p&gt;These malicious scripts, due to their foreign nature, are executed in the browser, often leading to cookie theft, session hijacking, or UI manipulation.&lt;/p&gt;




&lt;h2&gt;
  
  
  🛡️ Understanding Browser Defenses
&lt;/h2&gt;

&lt;p&gt;To stop these behaviors, browsers can block such scripts if you define a &lt;strong&gt;Content Security Policy (CSP)&lt;/strong&gt;. These policies are sent using headers — specifically via the helmet module (a middleware for Express apps in Node.js).&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ My Real-World Test on InspireSphere
&lt;/h2&gt;

&lt;p&gt;To practically test it, I picked &lt;strong&gt;InspireSphere&lt;/strong&gt; — my own web app — as the &lt;strong&gt;test environment&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I injected some basic &lt;strong&gt;script tags&lt;/strong&gt; inside the &lt;strong&gt;User Content Submission Page&lt;/strong&gt;, specifically in the &lt;strong&gt;narrative section&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧪 Result:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The script wasn't triggered in the browser, but *&lt;em&gt;was saved to the database.
*&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;✅ This is called &lt;strong&gt;Stored XSS&lt;/strong&gt; — where a malicious script is stored in the database and runs whenever it's rendered.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then I tested something more &lt;strong&gt;subtle and sneaky&lt;/strong&gt;: I injected a script using an &lt;a href="" class="article-body-image-wrapper"&gt;&lt;img&gt;&lt;/a&gt; tag with an onerror handler (like onerror="alert('XSS Success')"), and that &lt;strong&gt;was executed&lt;/strong&gt; every time the content was rendered from the backend.&lt;/p&gt;

&lt;h2&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%2Fd5pq6i42ttya20ts9bjp.png" alt=" " width="800" height="450"&gt;
&lt;/h2&gt;

&lt;h2&gt;
  
  
  💡 Eye-Opening Moment: Cookie Theft Simulation
&lt;/h2&gt;

&lt;p&gt;Here’s where it got more real.&lt;/p&gt;

&lt;p&gt;I tried to &lt;strong&gt;simulate cookie/token theft&lt;/strong&gt; by injecting a script using a hyperlink tag. When clicked, it executed JavaScript that &lt;strong&gt;sent document cookies to my own test API endpoint.&lt;/strong&gt;&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%2F5ecaaqsf90dmox4taoeb.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%2F5ecaaqsf90dmox4taoeb.png" alt=" " width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;😮 This was the moment that really exposed to me how dangerous even a small XSS can be.&lt;/p&gt;

&lt;p&gt;_&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&amp;gt; This entire experience became a powerful cybersecurity lesson. Many developers never test their apps from the attacker’s perspective — and if I hadn’t tried this, I wouldn’t have found it either.&lt;/em&gt;&lt;br&gt;
_&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ The Fix: CSP + Safe Scripting Practices
&lt;/h2&gt;

&lt;p&gt;To fix all of this:&lt;/p&gt;

&lt;p&gt;I added &lt;strong&gt;CSP Headers&lt;/strong&gt; using helmet in Node.js.&lt;br&gt;
I enforced that &lt;strong&gt;only scripts served from my&lt;/strong&gt; /public/js/... path (trusted backend) are allowed to run.&lt;br&gt;
I &lt;strong&gt;disabled inline scripts and styles&lt;/strong&gt;, which are a huge vulnerability and prevent proper CSP enforcement.&lt;/p&gt;




&lt;h2&gt;
  
  
  📌 Final Notes: What Devs Should Watch Out For
&lt;/h2&gt;

&lt;p&gt;Many developers — especially beginners — &lt;strong&gt;use inline scripts and inline CSS&lt;/strong&gt; without realizing that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You &lt;strong&gt;can't enforce CSP&lt;/strong&gt; properly with them.&lt;/li&gt;
&lt;li&gt;They open the door to &lt;strong&gt;malicious injections&lt;/strong&gt; and XSS attacks.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ✅ Final Result
&lt;/h2&gt;

&lt;p&gt;After complete testing and securing every layer, ➡️ My app &lt;strong&gt;InspireSphere is now fully protected against XSS attacks&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;✅ Scripts and styles are &lt;strong&gt;served only from trusted backend sources&lt;/strong&gt;. ✅ A strong &lt;strong&gt;Content Security Policy is in place and enforced&lt;/strong&gt;. ✅ Malicious injections are &lt;strong&gt;sanitized and blocked.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;💬 If you’re a dev building your own app — &lt;strong&gt;test like a hacker&lt;/strong&gt;, fix like a pro.&lt;/p&gt;

</description>
      <category>security</category>
      <category>xss</category>
      <category>webdev</category>
      <category>project</category>
    </item>
    <item>
      <title>🚀 Upgrading &amp; Utilising My Model (ML/AI Integration Series)</title>
      <dc:creator>Hassam Fathe Muhammad</dc:creator>
      <pubDate>Sat, 13 Sep 2025 21:33:23 +0000</pubDate>
      <link>https://forem.com/hassamdev/upgrading-utilising-my-model-mlai-integration-series-3hj9</link>
      <guid>https://forem.com/hassamdev/upgrading-utilising-my-model-mlai-integration-series-3hj9</guid>
      <description>&lt;h2&gt;
  
  
  Continuing from: “🚀 My First Step Towards AI/ML Model Integration | Inspire Sphere”
&lt;/h2&gt;

&lt;p&gt;Back then, the ML/AI model I deployed to get categories of the quotes written by users was trained on data using the MultinomialNB algorithm from naive_bayes. The accuracy of my model was not more than &lt;strong&gt;17%&lt;/strong&gt;, mainly due to several incompatibilities and the absence of supportive parameters in the &lt;strong&gt;TFIDF Vectorizer&lt;/strong&gt;, as well as an inappropriate use of MultinomialNB.&lt;/p&gt;

&lt;p&gt;This algorithm works well &lt;strong&gt;only when the features (words)&lt;/strong&gt; in the document are &lt;strong&gt;independent&lt;/strong&gt; of each other, as it calculates probabilities by taking the &lt;strong&gt;product of individual probabilities&lt;/strong&gt;. It's a good fit where text can be classified based on &lt;strong&gt;specific independent flagged words&lt;/strong&gt;, like in detecting spam or fraud in an email.&lt;/p&gt;

&lt;p&gt;However, my previous model/system lacked important TfidfVectorizer parameters like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;stop_words&lt;/li&gt;
&lt;li&gt;ngram_range&lt;/li&gt;
&lt;li&gt;max_df&lt;/li&gt;
&lt;li&gt;min_df&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These parameters help in converting the text into a &lt;strong&gt;cleaner and more structured numeric form&lt;/strong&gt;, making it more ready for classification.&lt;/p&gt;




&lt;h2&gt;
  
  
  What’s New Now?
&lt;/h2&gt;

&lt;p&gt;So, the next algorithm to take the place of MultinomialNB is &lt;strong&gt;Logistic Regression&lt;/strong&gt; from linear_model. Unlike the former, this doesn’t assume that features are independent — it &lt;strong&gt;considers relationships between word appearances&lt;/strong&gt; in the document.&lt;/p&gt;

&lt;p&gt;The results were notably better. When my &lt;strong&gt;first model&lt;/strong&gt; categorized this quote on Inspire Sphere as:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Category: Love “A wolf saw me when I was alone… I was that wolf”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Then the &lt;strong&gt;improved model&lt;/strong&gt; categorized it as:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Category: Humour&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That was quite a significant and meaningful difference.&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%2Fx2h05pxu3stghh00k3kp.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%2Fx2h05pxu3stghh00k3kp.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Upgrade Mattered
&lt;/h2&gt;

&lt;p&gt;After upgrading my model, I realized that &lt;strong&gt;the real value of an AI model also depends on the data processing and how it interacts with real users.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I made the model predict the &lt;strong&gt;category of quotes written by users on Inspire Sphere to auto-fill the title input field.&lt;/strong&gt; This made the platform look more professional and supportive — helping users feel guided and saving time.&lt;/p&gt;

</description>
      <category>networking</category>
      <category>vlan</category>
      <category>ccn</category>
      <category>project</category>
    </item>
  </channel>
</rss>
