<?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: Dhaval Upadhyay</title>
    <description>The latest articles on DEV Community by Dhaval Upadhyay (@dhaval_upadhyay_30f8292a8).</description>
    <link>https://dev.to/dhaval_upadhyay_30f8292a8</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%2F1895839%2F8b85889b-dcad-4fcb-b5f7-e2066845e74f.jpg</url>
      <title>DEV Community: Dhaval Upadhyay</title>
      <link>https://dev.to/dhaval_upadhyay_30f8292a8</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dhaval_upadhyay_30f8292a8"/>
    <language>en</language>
    <item>
      <title>Anthropic Mythos Just Found a 27-Year-Old Bug in OpenBSD — Cybersecurity Will Never Be the Same Again</title>
      <dc:creator>Dhaval Upadhyay</dc:creator>
      <pubDate>Mon, 18 May 2026 11:39:49 +0000</pubDate>
      <link>https://dev.to/dhaval_upadhyay_30f8292a8/ai-just-found-a-27-year-old-bug-in-openbsd-cybersecurity-will-never-be-the-same-again-101g</link>
      <guid>https://dev.to/dhaval_upadhyay_30f8292a8/ai-just-found-a-27-year-old-bug-in-openbsd-cybersecurity-will-never-be-the-same-again-101g</guid>
      <description>&lt;p&gt;For years, developers treated AI like a smarter autocomplete tool.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write functions.&lt;/li&gt;
&lt;li&gt;Generate APIs.&lt;/li&gt;
&lt;li&gt;Fix syntax errors.&lt;/li&gt;
&lt;li&gt;Explain stack traces.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;But something changed recently.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An AI model Mythos associated with Anthropic reportedly discovered:&lt;/p&gt;

&lt;p&gt;a 27-year-old vulnerability in OpenBSD&lt;br&gt;
and another bug hidden for 16 years inside FFmpeg&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That is not a small milestone.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is a warning sign for the entire software industry.&lt;/p&gt;

&lt;p&gt;The OpenBSD Discovery Shocked Security Researchers&lt;/p&gt;

&lt;p&gt;The most surprising part of this story is not just the age of the bug.&lt;/p&gt;

&lt;p&gt;It is where the bug was found.&lt;/p&gt;

&lt;p&gt;The vulnerability reportedly existed inside:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OpenBSD&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;OpenBSD is not some random abandoned operating system.&lt;/p&gt;

&lt;p&gt;It is globally respected for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;strong security architecture&lt;/li&gt;
&lt;li&gt;aggressive code auditing&lt;/li&gt;
&lt;li&gt;minimal attack surface&lt;/li&gt;
&lt;li&gt;secure-by-default philosophy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For decades, OpenBSD has been considered one of the most security-focused operating systems in existence.&lt;/p&gt;

&lt;p&gt;Yet an AI system reportedly identified:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a hidden integer overflow issue&lt;/li&gt;
&lt;li&gt;inside the TCP SACK implementation&lt;/li&gt;
&lt;li&gt;capable of causing remote denial-of-service behavior&lt;/li&gt;
&lt;li&gt;after surviving for nearly 27 years unnoticed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think about that carefully.&lt;/p&gt;

&lt;p&gt;Thousands of developers.&lt;br&gt;
Millions of users.&lt;br&gt;
Decades of audits.&lt;/p&gt;

&lt;p&gt;And the bug still survived.&lt;/p&gt;

&lt;p&gt;Until AI found it.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Then Came FFmpeg&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
The second discovery was equally disturbing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FFmpeg&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;FFmpeg powers a massive portion of the internet’s media infrastructure.&lt;/p&gt;

&lt;p&gt;It is used in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;streaming platforms&lt;/li&gt;
&lt;li&gt;browsers&lt;/li&gt;
&lt;li&gt;editing software&lt;/li&gt;
&lt;li&gt;mobile applications&lt;/li&gt;
&lt;li&gt;surveillance systems&lt;/li&gt;
&lt;li&gt;smart TVs&lt;/li&gt;
&lt;li&gt;social media apps&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A vulnerability hidden inside software this important for 16 years raises a serious question:&lt;/p&gt;

&lt;p&gt;How many more vulnerabilities are still buried inside software we trust every day?&lt;br&gt;
Why This Changes Cybersecurity Forever&lt;/p&gt;

&lt;p&gt;This is the moment AI stopped being “just a coding assistant.”&lt;/p&gt;

&lt;p&gt;We are now entering the era of:&lt;/p&gt;

&lt;p&gt;AI-Powered Vulnerability Hunting&lt;/p&gt;

&lt;p&gt;Modern AI systems can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;analyze huge codebases&lt;/li&gt;
&lt;li&gt;understand logic flow&lt;/li&gt;
&lt;li&gt;identify unsafe memory operations&lt;/li&gt;
&lt;li&gt;detect hidden edge cases&lt;/li&gt;
&lt;li&gt;reason across old legacy systems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Humans simply cannot manually audit software at this scale anymore.&lt;/p&gt;

&lt;p&gt;AI can.&lt;/p&gt;

&lt;p&gt;And it can do it dramatically faster.&lt;/p&gt;

&lt;p&gt;The Good News&lt;/p&gt;

&lt;p&gt;This technology could become one of humanity’s strongest cybersecurity defenses.&lt;/p&gt;

&lt;p&gt;Imagine a future where AI:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;audits every pull request automatically&lt;/li&gt;
&lt;li&gt;scans every dependency continuously&lt;/li&gt;
&lt;li&gt;discovers vulnerabilities before attackers do&lt;/li&gt;
&lt;li&gt;protects hospitals, banks, airports, and governments in real time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This could reduce:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ransomware attacks&lt;/li&gt;
&lt;li&gt;supply-chain compromises&lt;/li&gt;
&lt;li&gt;critical infrastructure breaches&lt;/li&gt;
&lt;li&gt;zero-day exploitation windows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For defenders, this is revolutionary.&lt;/p&gt;

&lt;p&gt;The Terrifying Part&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Now comes the dangerous question.&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
What happens when attackers use the same AI?&lt;/p&gt;

&lt;p&gt;Because they absolutely will.&lt;/p&gt;

&lt;p&gt;If defensive AI can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;discover hidden vulnerabilities&lt;/li&gt;
&lt;li&gt;analyze operating systems&lt;/li&gt;
&lt;li&gt;find exploit paths&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;then offensive AI can do the same thing.&lt;/p&gt;

&lt;p&gt;At scale.&lt;/p&gt;

&lt;p&gt;Without sleep.&lt;/p&gt;

&lt;p&gt;Without limits.&lt;/p&gt;

&lt;p&gt;This could lead to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;automated zero-day discovery&lt;/li&gt;
&lt;li&gt;AI-generated exploits&lt;/li&gt;
&lt;li&gt;mass infrastructure scanning&lt;/li&gt;
&lt;li&gt;highly targeted cyberattacks&lt;/li&gt;
&lt;li&gt;autonomous offensive malware systems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The cybersecurity battlefield is evolving into:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI vs AI&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And that future may arrive much faster than people expect.&lt;/p&gt;

&lt;p&gt;Why Legacy Code Is Becoming a Global Risk&lt;/p&gt;

&lt;p&gt;Most modern infrastructure still depends on ancient software.&lt;/p&gt;

&lt;p&gt;Many systems running today contain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;code written in the 1990s&lt;/li&gt;
&lt;li&gt;unsafe C/C++ memory handling&lt;/li&gt;
&lt;li&gt;abandoned libraries&lt;/li&gt;
&lt;li&gt;undocumented dependencies&lt;/li&gt;
&lt;li&gt;old networking implementations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For years, developers followed one dangerous assumption:&lt;/p&gt;

&lt;p&gt;“If it has survived this long, it must be stable.”&lt;/p&gt;

&lt;p&gt;AI just destroyed that belief.&lt;/p&gt;

&lt;p&gt;Because now old code can be re-analyzed at a level humans never managed before.&lt;/p&gt;

&lt;p&gt;Every forgotten function is now a potential attack surface.&lt;/p&gt;

&lt;p&gt;Governments Are Already Preparing for This&lt;/p&gt;

&lt;p&gt;Countries are taking AI-driven cybersecurity extremely seriously.&lt;/p&gt;

&lt;p&gt;Organizations like:&lt;/p&gt;

&lt;p&gt;CISA&lt;br&gt;
NIST&lt;br&gt;
ENISA&lt;/p&gt;

&lt;p&gt;are increasingly focused on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AI-assisted security&lt;/li&gt;
&lt;li&gt;software supply-chain protection&lt;/li&gt;
&lt;li&gt;automated vulnerability detection&lt;/li&gt;
&lt;li&gt;critical infrastructure defense&lt;/li&gt;
&lt;li&gt;AI governance and safety&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because future cyberwars may not be fought manually.&lt;/p&gt;

&lt;p&gt;They may be fought between autonomous systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Developers Should Start Doing Right Now&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is not something only security researchers should care about.&lt;/p&gt;

&lt;p&gt;Every developer needs to adapt.&lt;/p&gt;

&lt;p&gt;Developers should start:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;learning secure coding practices&lt;/li&gt;
&lt;li&gt;understanding memory safety&lt;/li&gt;
&lt;li&gt;auditing dependencies regularly&lt;/li&gt;
&lt;li&gt;updating legacy systems&lt;/li&gt;
&lt;li&gt;integrating AI security tools into CI/CD&lt;/li&gt;
&lt;li&gt;reducing unnecessary attack surfaces&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Stop assuming old code is safe.&lt;/p&gt;

&lt;p&gt;Because AI will eventually inspect everything.&lt;/p&gt;

&lt;p&gt;The Industry Is Entering a New Era&lt;/p&gt;

&lt;p&gt;For decades, cybersecurity relied heavily on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;manual reviews&lt;/li&gt;
&lt;li&gt;penetration testing&lt;/li&gt;
&lt;li&gt;human intuition&lt;/li&gt;
&lt;li&gt;traditional scanners&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But software complexity has become too massive.&lt;/p&gt;

&lt;p&gt;AI changes the equation completely.&lt;/p&gt;

&lt;p&gt;The future may soon include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AI security agents reviewing code 24/7&lt;/li&gt;
&lt;li&gt;autonomous vulnerability discovery&lt;/li&gt;
&lt;li&gt;real-time exploit prevention&lt;/li&gt;
&lt;li&gt;self-healing infrastructure&lt;/li&gt;
&lt;li&gt;AI-driven defensive architectures&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At the same time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;attackers will weaponize these systems&lt;/li&gt;
&lt;li&gt;exploit generation will accelerate&lt;/li&gt;
&lt;li&gt;cyberattacks could become autonomous&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is no longer science fiction.&lt;/p&gt;

&lt;p&gt;It is already starting.&lt;/p&gt;

&lt;p&gt;Final Thoughts&lt;/p&gt;

&lt;p&gt;The discovery of a 27-year-old OpenBSD vulnerability and a 16-year-old FFmpeg bug is bigger than a technical headline.&lt;/p&gt;

&lt;p&gt;It proves something much deeper:&lt;/p&gt;

&lt;p&gt;Software complexity has exceeded human auditing capability.&lt;/p&gt;

&lt;p&gt;AI is becoming the only system capable of understanding modern software ecosystems at scale.&lt;/p&gt;

&lt;p&gt;That can save the internet.&lt;/p&gt;

&lt;p&gt;Or make cyber warfare far more dangerous than anything we have seen before.&lt;/p&gt;

&lt;p&gt;The next generation of developers will not just write software.&lt;/p&gt;

&lt;p&gt;They will work alongside AI systems that constantly inspect, defend, and challenge the code we depend on every single day.&lt;/p&gt;

&lt;p&gt;And honestly?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is probably only the beginning.&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  anthropic #mythos #cybersecurity
&lt;/h1&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>programming</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>Windows Secretly Ate 83GB of My Disk Space — The Hidden .db-wal File Nobody Talks About</title>
      <dc:creator>Dhaval Upadhyay</dc:creator>
      <pubDate>Mon, 18 May 2026 11:27:15 +0000</pubDate>
      <link>https://dev.to/dhaval_upadhyay_30f8292a8/windows-secretly-ate-83gb-of-my-disk-space-the-hidden-db-wal-file-nobody-talks-about-1blb</link>
      <guid>https://dev.to/dhaval_upadhyay_30f8292a8/windows-secretly-ate-83gb-of-my-disk-space-the-hidden-db-wal-file-nobody-talks-about-1blb</guid>
      <description>&lt;p&gt;A few days ago my Windows PC had around 57GB free space.&lt;/p&gt;

&lt;p&gt;Suddenly it dropped to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;4GB free&lt;/li&gt;
&lt;li&gt;then 2GB free&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The weird part:
&lt;/h2&gt;

&lt;p&gt;I had not installed any new software&lt;br&gt;
no large downloads&lt;br&gt;
temp files cleanup barely recovered MBs&lt;/p&gt;

&lt;p&gt;At first I thought:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Windows Update issue&lt;/li&gt;
&lt;li&gt;Docker issue&lt;/li&gt;
&lt;li&gt;browser cache&lt;/li&gt;
&lt;li&gt;restore points&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But the real culprit was something I had never seen before.&lt;/p&gt;
&lt;h2&gt;
  
  
  How I Found the Problem
&lt;/h2&gt;

&lt;p&gt;I installed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;WinDirStat&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After scanning the C: drive, I noticed:&lt;/p&gt;

&lt;p&gt;ProgramData = 100GB+&lt;/p&gt;

&lt;p&gt;Digging deeper revealed this monster:&lt;/p&gt;

&lt;p&gt;C:\ProgramData\Microsoft\Windows\CapabilityAccessManager\CapabilityAccessManager.db-wal&lt;/p&gt;

&lt;p&gt;File size: 83 GB&lt;/p&gt;

&lt;p&gt;Yes. A single hidden Windows WAL file had silently consumed my disk.&lt;/p&gt;
&lt;h2&gt;
  
  
  What Is CapabilityAccessManager.db-wal?
&lt;/h2&gt;

&lt;p&gt;It’s a SQLite WAL (Write-Ahead Logging) file used by Windows.&lt;/p&gt;

&lt;p&gt;Related service:&lt;/p&gt;

&lt;p&gt;Capability Access Manager Service (camsvc)&lt;/p&gt;

&lt;p&gt;Windows uses it for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;microphone access logs&lt;/li&gt;
&lt;li&gt;camera permissions&lt;/li&gt;
&lt;li&gt;location/app capability tracking&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Normally this file should only be a few MB.&lt;/p&gt;

&lt;p&gt;In my case it became corrupted or stuck and kept growing endlessly.&lt;/p&gt;

&lt;p&gt;Symptoms&lt;/p&gt;

&lt;p&gt;If this happens on your PC, you may notice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;rapidly decreasing free disk space&lt;/li&gt;
&lt;li&gt;system becoming slow&lt;/li&gt;
&lt;li&gt;applications crashing&lt;/li&gt;
&lt;li&gt;Windows warnings about low storage&lt;/li&gt;
&lt;li&gt;no obvious large downloads&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  How I Fixed It
&lt;/h2&gt;
&lt;h2&gt;
  
  
  Step 1 — Open CMD as Administrator
&lt;/h2&gt;

&lt;p&gt;Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="nb"&gt;net&lt;/span&gt; &lt;span class="kd"&gt;stop&lt;/span&gt; &lt;span class="kd"&gt;camsvc&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2 — Delete the Huge WAL File
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:\ProgramData\Microsoft\Windows\CapabilityAccessManager\CapabilityAccessManager.db-wal
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Do NOT delete:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CapabilityAccessManager.db
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3 — Start Service Again
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="nb"&gt;net&lt;/span&gt; &lt;span class="nb"&gt;start&lt;/span&gt; &lt;span class="kd"&gt;camsvc&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Important Notes
&lt;/h2&gt;

&lt;p&gt;This file is:&lt;/p&gt;

&lt;p&gt;temporary log data&lt;br&gt;
automatically recreated by Windows if needed&lt;/p&gt;

&lt;p&gt;Deleting the &lt;strong&gt;.db-wal&lt;/strong&gt; file does NOT damage Windows.&lt;/p&gt;

&lt;p&gt;But avoid deleting the main .db file unless rebuilding the database intentionally.&lt;/p&gt;

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

&lt;p&gt;This was one of the strangest Windows storage bugs I’ve encountered.&lt;/p&gt;

&lt;p&gt;The scary part is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Windows hides the folder&lt;/li&gt;
&lt;li&gt;normal cleanup tools don’t show the issue&lt;/li&gt;
&lt;li&gt;the file can silently grow to tens of GB&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So if your disk space suddenly disappears for “no reason”, check for hidden WAL files before reinstalling Windows.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>learning</category>
      <category>microsoft</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Dhaval Upadhyay</dc:creator>
      <pubDate>Fri, 07 Mar 2025 11:53:43 +0000</pubDate>
      <link>https://dev.to/dhaval_upadhyay_30f8292a8/-1did</link>
      <guid>https://dev.to/dhaval_upadhyay_30f8292a8/-1did</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/dhaval_upadhyay_30f8292a8" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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%2F1895839%2F8b85889b-dcad-4fcb-b5f7-e2066845e74f.jpg" alt="dhaval_upadhyay_30f8292a8"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/dhaval_upadhyay_30f8292a8/install-docker-using-command-line-and-pull-code-from-github-2l6c" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Install Docker using command line and pull code from github&lt;/h2&gt;
      &lt;h3&gt;Dhaval Upadhyay ・ Mar 5&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#docker&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#devops&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#aws&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>docker</category>
      <category>webdev</category>
      <category>devops</category>
      <category>aws</category>
    </item>
    <item>
      <title>Upload docker code using CI/CD pipeline of github action</title>
      <dc:creator>Dhaval Upadhyay</dc:creator>
      <pubDate>Fri, 07 Mar 2025 11:19:11 +0000</pubDate>
      <link>https://dev.to/dhaval_upadhyay_30f8292a8/upload-docker-code-using-cicd-pipeline-of-github-action-549g</link>
      <guid>https://dev.to/dhaval_upadhyay_30f8292a8/upload-docker-code-using-cicd-pipeline-of-github-action-549g</guid>
      <description>&lt;h2&gt;
  
  
  1. Install Docker on your server
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://dev.to/dhaval_upadhyay_30f8292a8/install-docker-using-command-line-and-pull-code-from-github-2l6c"&gt;Click Here to get detailed description on how to upload your code on server using docker&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Run " docker ps " command to get the image and container name
&lt;/h2&gt;

&lt;h2&gt;
  
  
  3. Store Secrets in GitHub
&lt;/h2&gt;

&lt;p&gt;Go to GitHub Repo → Settings → Secrets and variables → Actions → New Repository Secret, and add:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- DOCKER_USERNAME → Your Docker Hub username
- DOCKER_PASSWORD → Your Docker Hub password/token
- SERVER_HOST → AWS Server IP
- SERVER_USER → ubuntu
- SSH_PRIVATE_KEY → Paste your AWS SSH Private Key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Create GitHub Actions Workflow
&lt;/h2&gt;

&lt;p&gt;Create .github/workflows/deploy.yml in your repo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name: Deploy to QA

on:
  push:
    branches:
      - master  # Runs on direct push to 'qa'

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Code
        uses: actions/checkout@v3

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2

      - name: Log in to Docker Hub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_PASSWORD }}

      - name: Build and Push Docker Image
        run: |
          docker build -t dockerusername/myapp:${{ github.sha }} .
          docker push dockerusername/myapp:${{ github.sha }}

      - name: Deploy to Server
        uses: appleboy/ssh-action@v0.1.10
        with:
          host: ${{ secrets.SERVER_HOST }}
          username: ubuntu
          key: ${{ secrets.SSH_PRIVATE_KEY }}
          port: 22
          script: |
            docker pull dockerusername/myapp:${{ github.sha }}
            docker ps -a  # Debugging step to check existing containers
            docker stop myapp || true
            docker rm -f myapp || true
            docker run -d -p 3000:3000 --restart unless-stopped --name myapp dockerusername/myapp:${{ github.sha }}
            docker image prune -f

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

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;myapp - docker image name&lt;/li&gt;
&lt;li&gt;create account on dockerhub&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;this process will login to docker hub , build your image and pull that image to your server&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;comment if you are facing any problem or need any help &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>docker</category>
      <category>devops</category>
      <category>aws</category>
      <category>programming</category>
    </item>
    <item>
      <title>Install Docker using command line and pull code from github</title>
      <dc:creator>Dhaval Upadhyay</dc:creator>
      <pubDate>Wed, 05 Mar 2025 10:15:09 +0000</pubDate>
      <link>https://dev.to/dhaval_upadhyay_30f8292a8/install-docker-using-command-line-and-pull-code-from-github-2l6c</link>
      <guid>https://dev.to/dhaval_upadhyay_30f8292a8/install-docker-using-command-line-and-pull-code-from-github-2l6c</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Briefly introduce the importance of CI/CD in modern application development.&lt;/li&gt;
&lt;li&gt;Highlight the benefits of deploying Node.js Docker applications using aws command line and GitHub Actions.&lt;/li&gt;
&lt;li&gt;Outline the steps that will be covered in the blog.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;aws account.&lt;/li&gt;
&lt;li&gt;GitHub repository with your Node.js application.&lt;/li&gt;
&lt;li&gt;Basic knowledge of Docker and GitHub Actions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Follow Below steps to install docker first
&lt;/h2&gt;

&lt;h2&gt;
  
  
  1. update the package list
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update
sudo apt upgrade -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Install prerequisite packages
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install -y apt-transport-https ca-certificates curl software-properties-common

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Add Docker's official GPG key
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Set up the Docker stable repository
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list &amp;gt; /dev/null

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Install Docker
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  6. Verify Docker installation
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker --version

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  7. Verify Docker installation
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker --version

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Install Docker Compose
&lt;/h2&gt;

&lt;h2&gt;
  
  
  1. Download and install Docker Compose
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Set executable permissions
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo chmod +x /usr/local/bin/docker-compose
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Verify installation
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker-compose --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Clone Your Node.js Project from GitHub
&lt;/h2&gt;

&lt;h2&gt;
  
  
  1. Install Git
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install -y git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Clone the repository
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone "git_url"
cd "repo_name"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Create Dockerfile for Node.js Application
&lt;/h2&gt;

&lt;h2&gt;
  
  
  1. Inside the project directory, create a Dockerfile
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Use Node.js base image
FROM node:16-alpine

# Set working directory
WORKDIR /app

# Copy package.json and package-lock.json
COPY package*.json ./

# Install dependencies
RUN npm install

# Copy application code
COPY . .

# Expose the application port (e.g., 3000)
EXPOSE 3000

# Start the application
CMD ["npm", "start"]

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Build and Run Docker Container
&lt;/h2&gt;

&lt;h2&gt;
  
  
  1. Build the Docker image
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker-compose build (if you have docker-compose.yml)

docker run -d -p 3000:3000 --name node_structure node:20 tail -f /dev/null  
(if you do not have docker-compose.yml)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Run the container
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker-compose up -d
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Verify running container
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker ps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>docker</category>
      <category>webdev</category>
      <category>devops</category>
      <category>aws</category>
    </item>
    <item>
      <title>How to Secure PHP Applications from SQL Injection Attacks</title>
      <dc:creator>Dhaval Upadhyay</dc:creator>
      <pubDate>Sun, 06 Oct 2024 07:51:56 +0000</pubDate>
      <link>https://dev.to/dhaval_upadhyay_30f8292a8/how-to-secure-php-applications-from-sql-injection-attacks-20b3</link>
      <guid>https://dev.to/dhaval_upadhyay_30f8292a8/how-to-secure-php-applications-from-sql-injection-attacks-20b3</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;SQL Injection (SQLi) is one of the most dangerous vulnerabilities that can affect web applications, especially those built using PHP. It occurs when an attacker manipulates a query by injecting malicious SQL code, potentially gaining access to sensitive data or even compromising the entire database. Despite being an old vulnerability, SQL injection is still prevalent due to poor coding practices. This blog will guide you through understanding SQL injection and implementing the best practices to secure your PHP applications from this threat.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is SQL Injection?
&lt;/h2&gt;

&lt;p&gt;SQL injection happens when an application allows user input to be passed directly into an SQL query without proper validation or escaping. This enables attackers to execute arbitrary SQL code on the database.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example of SQL Injection Vulnerability:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$username = $_POST['username'];
$password = $_POST['password'];
$query = "SELECT * FROM users WHERE username = '$username' AND password = '$password'";
$result = mysqli_query($conn, $query);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, if a malicious user enters admin' -- as the username and leaves the password blank, the query becomes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT * FROM users WHERE username = 'admin' -- ' AND password = '';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The -- comments out the rest of the SQL statement, allowing the attacker to bypass authentication and potentially gain admin access.&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of SQL Injection Attacks
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;In-band SQLi:&lt;/strong&gt; The attacker uses the same communication channel (e.g., HTTP) to launch and receive the results of the attack.&lt;br&gt;
&lt;strong&gt;Blind SQLi:&lt;/strong&gt; The attacker cannot see the result of the attack directly, but can infer information based on the web application's behavior.&lt;br&gt;
&lt;strong&gt;Out-of-band SQLi:&lt;/strong&gt; This type relies on a separate communication channel to receive the attack results.&lt;/p&gt;
&lt;h2&gt;
  
  
  How to Prevent SQL Injection in PHP
&lt;/h2&gt;

&lt;p&gt;To prevent SQL injection, you must ensure that user inputs are never directly embedded into SQL queries. Below are several methods to mitigate SQL injection vulnerabilities.&lt;/p&gt;
&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use prepared statements (parameterized queries) to prevent SQL injection.&lt;/li&gt;
&lt;li&gt;Validate and escape all user inputs, especially in scenarios where prepared statements aren't feasible.&lt;/li&gt;
&lt;li&gt;Limit database user privileges to minimize potential damage.&lt;/li&gt;
&lt;li&gt;Keep your application and database software up-to-date with security patches.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  1. Use Prepared Statements (Parameterized Queries)
&lt;/h2&gt;

&lt;p&gt;Prepared statements ensure that SQL code and user input are strictly separated. This method is the most effective and recommended practice for preventing SQL injection.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Secure code using prepared statements
$stmt = $conn-&amp;gt;prepare("SELECT * FROM users WHERE username = ? AND password = ?");
$stmt-&amp;gt;bind_param("ss", $username, $password);  // "ss" represents the data types (string, string)
$stmt-&amp;gt;execute();
$result = $stmt-&amp;gt;get_result();

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

&lt;/div&gt;



&lt;p&gt;In this case, ? placeholders are used for user inputs, and the bind_param() function ensures the user inputs are treated as data rather than executable code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example with PDO:&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;// Secure code using PDO
$stmt = $conn-&amp;gt;prepare("SELECT * FROM users WHERE username = :username AND password = :password");
$stmt-&amp;gt;bindParam(':username', $username);
$stmt-&amp;gt;bindParam(':password', $password);
$stmt-&amp;gt;execute();
$result = $stmt-&amp;gt;fetchAll();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Use Proper Data Validation and Escaping
&lt;/h2&gt;

&lt;p&gt;Input validation ensures that user inputs conform to the expected format. For instance, if the input should be an integer, make sure it's validated as such.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Input validation example
if (!filter_var($user_id, FILTER_VALIDATE_INT)) {
    die('Invalid user ID');
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In cases where prepared statements cannot be used, escaping input with functions like mysqli_real_escape_string() or htmlspecialchars() helps mitigate risks by neutralizing harmful characters.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Escaping example
$username = mysqli_real_escape_string($conn, $_POST['username']);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Limit User Privileges in the Database
&lt;/h2&gt;

&lt;p&gt;Minimize the privileges of the database user account used by the PHP application. For example, an application account should not have DROP or DELETE privileges if they are not needed. This limits the damage an attacker can cause even if they manage to exploit an SQL injection vulnerability.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Avoid Displaying SQL Errors to Users
&lt;/h2&gt;

&lt;p&gt;Do not expose database error messages to users, as they may provide useful information to attackers. Instead, log errors securely and show generic error messages to users.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Example of handling errors
if (!$result) {
    error_log("Database query failed: " . mysqli_error($conn));
    echo "An error occurred. Please try again later.";
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Use Web Application Firewalls (WAF)
&lt;/h2&gt;

&lt;p&gt;A Web Application Firewall (WAF) can provide an additional layer of security by filtering out malicious SQL queries before they reach your application. While WAFs are not a substitute for proper coding practices, they can be a valuable tool in detecting and blocking SQL injection attempts.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Keep Software Updated
&lt;/h2&gt;

&lt;p&gt;Regularly update your PHP version and database systems to patch known vulnerabilities. Outdated versions of PHP or database systems can have security flaws that may be exploited.&lt;/p&gt;

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

&lt;p&gt;SQL injection remains a prevalent threat to PHP applications, but it can be easily avoided by following the best practices outlined above. Prepared statements are the most effective defense against SQL injection, but data validation, escaping, and secure error handling also play vital roles in protecting your application. By adopting these strategies, you can safeguard your web applications and maintain a secure development environment.&lt;/p&gt;

</description>
      <category>websecurity</category>
      <category>sql</category>
      <category>programming</category>
      <category>security</category>
    </item>
    <item>
      <title>Upload Node.Js Code to azure using CI/CD pipeline using github actions</title>
      <dc:creator>Dhaval Upadhyay</dc:creator>
      <pubDate>Sat, 24 Aug 2024 18:26:58 +0000</pubDate>
      <link>https://dev.to/dhaval_upadhyay_30f8292a8/upload-nodejs-code-to-azure-using-cicd-pipeline-using-github-actions-38mo</link>
      <guid>https://dev.to/dhaval_upadhyay_30f8292a8/upload-nodejs-code-to-azure-using-cicd-pipeline-using-github-actions-38mo</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In today’s agile development environment, continuous integration and continuous deployment (CI/CD) pipelines are essential for streamlining the software delivery process. In this blog, I’ll guide you through setting up a CI/CD pipeline using GitHub Actions to deploy your Node.js application to Azure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before we start, ensure you have the following:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Azure Account:&lt;/strong&gt; If you don’t have one, sign up for a free Azure account.&lt;br&gt;
&lt;strong&gt;Azure Web App:&lt;/strong&gt; Create a Web App in the Azure portal to host your Node.js application.&lt;br&gt;
&lt;strong&gt;GitHub Repository:&lt;/strong&gt; Store your Node.js application code in a GitHub repository.&lt;br&gt;
&lt;strong&gt;Node.js Application:&lt;/strong&gt; A basic Node.js application to deploy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Create an Azure Web App
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Login to Azure Portal:&lt;/strong&gt; Go to the Azure Portal.&lt;/p&gt;

&lt;p&gt;Here’s a draft blog post on deploying Node.js code to Azure using a CI/CD pipeline with GitHub Actions. Feel free to modify it to match your style and preferences.&lt;/p&gt;

&lt;p&gt;Title: Node.js Deployment Using Azure CI/CD Pipeline&lt;/p&gt;

&lt;p&gt;Introduction&lt;br&gt;
In today’s agile development environment, continuous integration and continuous deployment (CI/CD) pipelines are essential for streamlining the software delivery process. In this blog, I’ll guide you through setting up a CI/CD pipeline using GitHub Actions to deploy your Node.js application to Azure.&lt;/p&gt;

&lt;p&gt;Prerequisites&lt;br&gt;
Before we start, ensure you have the following:&lt;/p&gt;

&lt;p&gt;Azure Account: If you don’t have one, sign up for a free Azure account.&lt;br&gt;
Azure Web App: Create a Web App in the Azure portal to host your Node.js application.&lt;br&gt;
GitHub Repository: Store your Node.js application code in a GitHub repository.&lt;br&gt;
Node.js Application: A basic Node.js application to deploy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Create an Azure Web App&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Login to Azure Portal:&lt;/strong&gt; Go to the Azure Portal.&lt;/p&gt;

&lt;p&gt;Click on “Create a resource” and choose “Web App.”&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%2F7uc0xiu6lf9cm80ai2nm.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%2F7uc0xiu6lf9cm80ai2nm.png" alt="Image description" width="800" height="342"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fill in the required details, including the resource group, app name, and runtime stack (choose Node.js).&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%2F2zstd9rq9769821j3p0m.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%2F2zstd9rq9769821j3p0m.png" alt="Image description" width="800" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Set Up GitHub Actions for CI/CD
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Create a .github/workflows Directory:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Go To Deployment center&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%2Fylc1l5323uelombjqzli.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%2Fylc1l5323uelombjqzli.png" alt="Image description" width="800" height="324"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Select Code Resource and select github&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%2Fvsmxnhqsm7h6iq7g5l1k.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%2Fvsmxnhqsm7h6iq7g5l1k.png" alt="Image description" width="800" height="394"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now Select github accout , repo and branch you want to deploy &lt;/p&gt;

&lt;p&gt;Now click on preview you can see .yaml file structre here &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%2F02w2d3ug1rlflxskyg25.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%2F02w2d3ug1rlflxskyg25.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In your github directory, you can see .github/workflows directory.&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%2Fgfy3tq70ix85nkazv4km.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%2Fgfy3tq70ix85nkazv4km.png" alt="Image description" width="381" height="131"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Commit and Push Changes
&lt;/h2&gt;

&lt;p&gt;Once your workflow file is set up, commit and push it to the main branch of your repository.&lt;/p&gt;

&lt;p&gt;The pipeline will trigger automatically on every push to the main branch.&lt;/p&gt;

&lt;p&gt;GitHub Actions will build your Node.js application, run tests, and deploy it to Azure.&lt;/p&gt;

&lt;p&gt;You can also check the deployment logs in the GitHub Actions tab of your repository.&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%2Fhy6xy6y23riweemhtc94.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%2Fhy6xy6y23riweemhtc94.png" alt="Image description" width="800" height="318"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;In this blog, we walked through the process of setting up a CI/CD pipeline using GitHub Actions to deploy a Node.js application to Azure. This setup not only automates the deployment process but also ensures that your application is always up-to-date with the latest code changes.&lt;/p&gt;

&lt;p&gt;By leveraging Azure’s scalability and GitHub’s seamless integration, you can easily maintain and deploy your Node.js applications, allowing you to focus more on building features and less on managing deployments.&lt;/p&gt;

&lt;p&gt;You can check Simple deployment without pipeline here  &lt;a href="https://dev.tourl"&gt;https://dev.to/dhaval_upadhyay_30f8292a8/uploading-your-first-nodejs-code-to-azure-a-step-by-step-guide-43k5&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>azure</category>
      <category>githubactions</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Uploading Your First Node.js Code to Azure: A Step-by-Step Guide</title>
      <dc:creator>Dhaval Upadhyay</dc:creator>
      <pubDate>Sun, 11 Aug 2024 09:19:06 +0000</pubDate>
      <link>https://dev.to/dhaval_upadhyay_30f8292a8/uploading-your-first-nodejs-code-to-azure-a-step-by-step-guide-43k5</link>
      <guid>https://dev.to/dhaval_upadhyay_30f8292a8/uploading-your-first-nodejs-code-to-azure-a-step-by-step-guide-43k5</guid>
      <description>&lt;p&gt;Hello everyone! In this post, we'll walk through the process of uploading your first Node.js code to Azure. Whether you're new to Azure or just need a refresher, this guide will help you deploy your Node.js application with ease.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before we begin, ensure you have the following:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Node.js Installed&lt;/strong&gt;: Make sure you have Node.js installed on your machine. You can download it from Node.js official website.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Azure Account&lt;/strong&gt;: If you haven't already, sign up for an Azure account at azure.com.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git Installed&lt;/strong&gt;: You'll need Git to manage your code and push it to Azure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Create a Simple Node.js Application
&lt;/h2&gt;

&lt;p&gt;Create one simple Node.js application and upload to github&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Prepare for Deployment
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Login to azure&lt;/li&gt;
&lt;li&gt;Click on App Services and click Create
&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%2Ff26k32pri0pb9me1gj0u.png" alt="Image description" width="800" height="365"&gt;
&lt;/li&gt;
&lt;li&gt;click on create button and go to web app or click as per your requirement
&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%2Fkxepnccky44omkh2xmtu.png" alt="Image description" width="800" height="411"&gt;
&lt;/li&gt;
&lt;li&gt;create new resource group 
&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%2Fdov55008nwbbgs9ik1uu.png" alt="Image description" width="800" height="411"&gt;
&lt;/li&gt;
&lt;li&gt;Fill all necessary details and select pricing plans as per your requirement&lt;/li&gt;
&lt;li&gt;go next and finally click Review &amp;amp; Create button &lt;/li&gt;
&lt;li&gt;After creating you will see the overview of your app
&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%2Fd14j0wqe1sdjqtco7vbu.png" alt="Image description" width="800" height="408"&gt;
&lt;/li&gt;
&lt;li&gt;click on deployment center
&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%2Fsi0iuuzy926udoak9wba.png" alt="Image description" width="255" height="477"&gt;
&lt;/li&gt;
&lt;li&gt;Here you will get FTP Creds to upload code. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In next step we will see how we can upload using github repo actions&lt;/p&gt;

&lt;h1&gt;
  
  
  azure #Node.js #devops #azureintegration #server #uploadNodecode
&lt;/h1&gt;

</description>
      <category>node</category>
      <category>azure</category>
      <category>devops</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
