<?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: herbertmoroni</title>
    <description>The latest articles on DEV Community by herbertmoroni (@herbertmoroni).</description>
    <link>https://dev.to/herbertmoroni</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%2F2952266%2F6af9063c-02b3-433b-9792-2efc83c63f33.png</url>
      <title>DEV Community: herbertmoroni</title>
      <link>https://dev.to/herbertmoroni</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/herbertmoroni"/>
    <language>en</language>
    <item>
      <title>GitHub hacked. Action Supply Chain Attack: What Developers Need to Know</title>
      <dc:creator>herbertmoroni</dc:creator>
      <pubDate>Tue, 18 Mar 2025 01:29:40 +0000</pubDate>
      <link>https://dev.to/herbertmoroni/github-action-supply-chain-attack-what-developers-need-to-know-540f</link>
      <guid>https://dev.to/herbertmoroni/github-action-supply-chain-attack-what-developers-need-to-know-540f</guid>
      <description>&lt;p&gt;A tool called &lt;code&gt;tj-actions/changed-files&lt;/code&gt; that many developers use in GitHub to track file changes was hacked. Someone took control of this tool and modified it to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Secretly scan for passwords and secret keys in your project&lt;/li&gt;
&lt;li&gt;Hide these secrets in your project's logs&lt;/li&gt;
&lt;li&gt;Make these secrets visible to anyone who looks at public project logs&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is called a "supply chain attack" because hackers didn't attack you directly - they attacked a tool you rely on in your development supply chain. The CVE number (CVE-2025-30066) is just an official tracking ID for this security issue.&lt;/p&gt;

&lt;p&gt;If you use this tool in your GitHub projects, you need to check if your passwords or secret keys were exposed and change them immediately.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do I know if I'm affected?
&lt;/h2&gt;

&lt;p&gt;You may be affected if:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You use the &lt;code&gt;tj-actions/changed-files&lt;/code&gt; action in any of your workflows&lt;/li&gt;
&lt;li&gt;You ran workflows with this action between March 1-15, 2025&lt;/li&gt;
&lt;li&gt;You store secrets or credentials in GitHub that your workflows can access&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To check:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Look in your &lt;code&gt;.github/workflows&lt;/code&gt; folder for any YAML files (.yml or .yaml)&lt;/li&gt;
&lt;li&gt;Search these files for &lt;code&gt;tj-actions/changed-files&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Check your workflow logs for suspicious base64-encoded strings (they look like random characters, often ending with &lt;code&gt;==&lt;/code&gt;)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What should I do if I'm affected?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Change all your secrets immediately&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub personal access tokens&lt;/li&gt;
&lt;li&gt;API keys for any services&lt;/li&gt;
&lt;li&gt;Database passwords&lt;/li&gt;
&lt;li&gt;Cloud provider credentials (AWS, GCP, Azure)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Check for unauthorized activity&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Look for unexpected commits or changes to your repository&lt;/li&gt;
&lt;li&gt;Review access logs for your cloud resources&lt;/li&gt;
&lt;li&gt;Check for unusual API calls or account activity&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Fix your workflows&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Remove the compromised action&lt;/li&gt;
&lt;li&gt;If you need this functionality, replace with a verified alternative&lt;/li&gt;
&lt;li&gt;Pin all actions to specific commit hashes instead of version tags&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How can I protect myself from future supply chain attacks?
&lt;/h2&gt;

&lt;p&gt;Even if you weren't affected, follow these practices:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Never use version tags in GitHub Actions&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;   &lt;span class="c1"&gt;# UNSAFE - can be hijacked&lt;/span&gt;
   &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;some-action/example@v2&lt;/span&gt;

   &lt;span class="c1"&gt;# SAFE - points to specific immutable commit&lt;/span&gt;
   &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;some-action/example@abc123def456...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Limit access to secrets&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Only provide secrets to jobs that absolutely need them&lt;/li&gt;
&lt;li&gt;Use separate, limited-scope tokens for CI/CD&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Regularly rotate credentials&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Change tokens and passwords on a schedule&lt;/li&gt;
&lt;li&gt;Immediately rotate credentials when team members leave&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Audit your dependencies&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Periodically review which actions your workflows use&lt;/li&gt;
&lt;li&gt;Check for security advisories before updating&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why do supply chain attacks matter?
&lt;/h2&gt;

&lt;p&gt;Supply chain attacks are particularly dangerous because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They exploit trust in established tools&lt;/li&gt;
&lt;li&gt;They can affect thousands of developers at once&lt;/li&gt;
&lt;li&gt;They're often hard to detect until damage is done&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By being vigilant about which tools you use and how you configure them, you can significantly reduce your exposure to these attacks.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article addresses the March 2025 compromise of &lt;code&gt;tj-actions/changed-files&lt;/code&gt; (CVE-2025-30066).&lt;/em&gt;&lt;/p&gt;

</description>
      <category>githubactions</category>
      <category>github</category>
      <category>cybersecurity</category>
      <category>vulnerabilities</category>
    </item>
  </channel>
</rss>
