Entrepreneurship, Security Engineer, Innovation
Cybersecurity threats are constantly evolving, targeting both human and non-human identities (NHIs). A recent incident involving the popular tj-actions/changed-files GitHub Action serves as a stark reminder of the importance of securing these often-overlooked machine identities. Detected by StepSecurity Harden-Runner, this compromise highlights the risks NHIs pose in the software development lifecycle and underscores the need for robust security and incident response practices.
In March 2025, StepSecurity detected a critical security incident affecting the widely used tj-actions/changed-files GitHub Action, which is used in over 23,000 repositories. Attackers modified the action’s code and retroactively updated multiple version tags to point to a compromised commit. This malicious code was designed to dump CI/CD secrets from GitHub Actions build logs. If these workflow logs were publicly accessible, as is the case with public repositories, these secrets could be exposed to anyone.
The attack began around 9:00 AM PST on March 14, 2025. StepSecurity’s Harden-Runner identified the issue through anomaly detection when an unexpected network endpoint appeared in the workflow traffic. Further analysis revealed a malicious Python script downloading and executing to extract secrets from the GitHub Actions Runner’s memory.
GitHub Actions and the secrets they utilize are prime examples of NHIs. These automated workflows, along with API keys, tokens, and service accounts, function autonomously but hold permissions to access and modify critical resources.
The tj-actions/changed-files incident illustrates the inherent risks associated with NHIs:
• Credential Exposure: The attack aimed to expose sensitive CI/CD secrets, which could be used for unauthorized access to connected systems. This aligns with NHI2:2025 - Secret Leakage in the OWASP Non-Human Identities Top 10.
• Vulnerable Third-Party NHI: The action is a third-party component integrated into numerous development workflows. Its compromise exemplifies NHI3:2025 - Vulnerable Third-Party NHI, where a seemingly trusted external element becomes a vector for attack. Organizations integrate such tools for efficiency but often overlook the security risks of their NHIs.
• Lack of Visibility and Monitoring: Without proactive security measures like Harden-Runner’s anomaly detection, the malicious activity could have gone unnoticed, potentially leading to widespread credential theft. This highlights the challenge of maintaining centralized visibility over NHIs.
Lessons Learned and the Critical Role of Incident Response
The tj-actions/changed-files incident reinforces key principles for strengthening NHI security, particularly in incident response:
• Assume Compromise: This incident reinforces an “Assume Leak” mindset. Organizations should assume NHIs may already be compromised and implement continuous monitoring.
• Early Detection Enables Swift Response: StepSecurity Harden-Runner detected the compromise early by identifying an unexpected network endpoint. Early detection is crucial for swift incident response and damage mitigation.
• Immediate Remediation Is Key: After detecting the compromise, StepSecurity quickly released a free, secure drop-in replacement (step-security/changed-files) to aid recovery. GitHub also removed and then restored the repository with the malicious code removed. This demonstrates the importance of predefined incident response playbooks.
• Communication and Transparency: StepSecurity promptly alerted users through a blog post and continuous updates, even hosting an Office Hour to answer questions. Clear and timely communication is critical during a security incident.
• Comprehensive Remediation Beyond Immediate Fixes: Replacing the compromised action is necessary, but so is identifying and revoking potentially exposed secrets. Organizations using the affected action were advised to review recovery steps immediately, underscoring the need for robust remediation workflows.
• Third-Party Vetting and Incident Preparedness: Organizations must thoroughly vet third-party tools used in their pipelines and understand the permissions granted to NHIs. This includes evaluating the vendor’s own incident response capabilities.
• The Need for Specialized NHI Incident Response: The tj-actions/changed-files incident highlights the need for tailored incident response processes for NHIs. These should account for NHIs’ unique characteristics, including their diverse types and the potential impact of disrupting automated workflows.
To mitigate risks and effectively respond to future incidents, organizations should implement the following:
• Comprehensive NHI Inventory: Maintain full visibility into all NHIs, including third-party integrations. Solutions like Cremit provide unified visibility and map the Identity Traceability of each NHI to assess potential compromise.
• Zero Trust for NHIs: Extend Zero Trust principles to all NHIs, ensuring continuous access validation.
• Least Privilege: Adhere to the principle of least privilege, granting NHIs only the necessary permissions.
• Continuous Monitoring and Threat Detection: Implement real-time monitoring and behavioral analytics for NHIs. StepSecurity Harden-Runner exemplifies this for GitHub Actions.
• Automated Remediation: Use tools that enable automated responses, such as revoking compromised identities, rotating secrets, or quarantining affected systems. Cremit, Astrix, Entro, SlashID, and Oasis offer such capabilities. Cremit provides real-time threat detection and integrated response to isolate suspicious NHI activity before damage occurs.
• Secrets Management: Employ secure secrets vaulting and enforce secret rotation policies. Cremit replaces traditional rotation with ephemeral credentials—short-lived, auto-expiring certificates that limit exposure risks and reduce management overhead.
• Defined NHI Incident Response Plan: Develop and maintain a dedicated NHI incident response plan, including detection, containment, eradication, and recovery procedures. Cremit’s Identity Traceability feature helps assess breaches and plan containment by quickly identifying each NHI’s origin, owners, usage, and access permissions.
• Regular Security Assessments and Audits: Conduct security assessments of third-party integrations and review NHI permissions.
The compromise of the tj-actions/changed-files action serves as a potent reminder that NHIs are attractive targets for attackers. As organizations increasingly rely on automation and interconnected systems, securing these machine identities—paired with a strong incident response framework—must be a priority.
By understanding risks, implementing proactive security measures, and leveraging specialized NHI management solutions, organizations can reduce their attack surface and strengthen their software development lifecycle security. Ignoring NHI security and incident response planning is no longer an option in today’s evolving threat landscape. Cremit’s integrated approach provides full-spectrum NHI security, helping organizations stay ahead of these threats.