SC-DEPENDABOT-IMPERSONATION-2023
CI/CD · GitHub · GitHub repositories (Dependabot impersonation)
Résumé
Between July 8 and July 11, 2023, in a campaign documented by Checkmarx, attackers pushed malicious commits to hundreds of public and private GitHub repositories while disguising them as automated contributions from the legitimate Dependabot bot. The attackers obtained victims' GitHub Personal Access Tokens, likely exfiltrated from developer machines via a malicious open-source package, and used those tokens to push commits whose author and commit message ('fix') were falsified to appear as the dependabot[bot] account, since Git and the GitHub API let a token holder set arbitrary commit metadata and PAT activity does not surface in the account audit log. Each malicious commit added a GitHub Actions workflow file (hook.yml) that triggered on every push and exfiltrated the project's defined secrets and environment variables to an attacker-controlled command-and-control server. The same commits modified existing JavaScript files in the repository, injecting obfuscated web-form password-stealer code that captured credentials submitted by end users and forwarded them to the same server. Most affected accounts belonged to Indonesian developers.
Comment l’éviter dans votre code
- Replace long-lived PATs with short-lived, fine-grained, least-privilege tokens.
- Require signed commits and verify the 'Verified' badge rather than trusting author names.
- Monitor for unexpected workflow files and commits attributed to bots.
- Rotate any exposed PATs immediately and audit repository secrets.
- Scan dependencies and developer machines for credential-stealing packages.
Références
Vulnérabilités liées
Tout Supply chain →- HIGHGHSA-CW4Q-GQG5-G38H
OpenClaw: Discord allowFrom could bind to mutable display names
- HIGHGHSA-8C59-HR4W-QG69
OpenClaw: Zalo allowFrom could bind to mutable display names
- CRITICALGHSA-GFJ5-979R-92PW
@acastellon/auth: Authentication bypass via spoofable headers in validateToken()
- MEDIUMGHSA-2F86-9CP8-6HCF
Grav: Admin Backup Zip File Exposes Account Credentials and Configuration Secrets
- HIGHGHSA-38X9-25WX-7FG2
Heimdall: IP Spoofing via Unvalidated Forwarding Headers
- CRITICALGHSA-4XPC-PV4P-PM3W
LiteLLM: Authentication Bypass via Host Header Injection