TL;DR: Malicious RubyGems versions of git_credential_manager, Dendreo, and a fastlane plugin used CI evasion, second-stage payload delivery, and persistence on developer machines, according to StepSecurity's SleeperGem analysis. The pattern shows how supply chain compromise can turn a package install into credential exposure, backdoor persistence, and fleet-wide secret risk.
At a glance
What this is: StepSecurity’s SleeperGem analysis shows malicious RubyGems packages that skip CI, fetch a second-stage payload, and install persistence on developer machines.
Why it matters: It matters because developer workstations often hold reusable credentials and local trust paths that attackers can abuse long after a compromised package is installed.
Context
SleeperGem is a supply chain compromise pattern, not just a single bad package. The core governance gap is that package trust is often treated as a publishing problem, while the real risk emerges later when a developer machine executes the code and inherits the user’s local access, secrets, and sessions. In this case, the malicious gems were designed to avoid CI and instead wait for a more valuable target.
For IAM and NHI practitioners, the relevant boundary is where developer tooling meets credential exposure. A package install on a workstation can become a secret-reachability event if the environment contains cloud tokens, SSH keys, browser-stored sessions, or NHI credentials used by build and release workflows. That makes developer endpoint control part of identity security, not just endpoint hygiene.
Key questions
Q: What fails when a package is designed to skip CI and run only on developer machines?
A: Pipeline-only testing fails because the malicious path is intentionally hidden in CI and activated in the endpoint context where interactive credentials, cached sessions, and local tooling are available. That shifts the risk from build hygiene to workstation compromise. Security teams need endpoint telemetry and package provenance checks, not just CI scans.
Q: Why do developer workstations increase supply-chain risk so quickly?
A: Developer workstations concentrate source code, cloud credentials, CI/CD secrets, SSH keys, and repository permissions in one place. When an attacker compromises that endpoint, the impact is not limited to the laptop itself. The stolen identity material can be reused to modify code, access services, and push compromise downstream into customers and production pipelines.
Q: What are the signs that a malicious gem is trying to hide in normal workflows?
A: Look for releases that appear without matching source tags, packages that sit dormant for years and then suddenly publish, and code that checks CI environment variables before doing anything. Those are strong indicators of environment-aware malware. Outbound traffic to unexpected hosting infrastructure is another signal worth correlating with package execution.
Q: How should teams respond after a compromised package has run on a developer laptop?
A: Treat the laptop as compromised, remove any persistence, inspect for root-level tampering, and rotate every secret that machine could reach. Then review whether the same package version or similar provenance pattern exists elsewhere in the fleet. Response should focus on identity exposure first, because secrets are usually the real downstream risk.
Technical breakdown
How the malicious gem turns a require call into execution
The malicious RubyGems releases are loaders, not standalone payloads. In the compromised versions, code runs when the library is required, which means normal application dependency resolution can trigger the malicious path before a user notices anything unusual. The loader then spawns a child Ruby process, which runs an install script that downloads a second-stage script and binary from attacker infrastructure. That design separates initial delivery from later execution, making static review harder because the malicious logic is split across stages. The use of a registry release also gives the attack a trusted distribution path, even though the release has no matching commit or tag.
Practical implication: Treat dependency load-time execution as a control boundary and inspect gems that run code before installation completes.
Why CI evasion and developer-targeting matter in supply chains
The malware checks for CI environment variables and exits when it finds them, including signals used by GitHub Actions, GitLab CI, and CircleCI. That is a deliberate environment test, not a bug. The attackers want developer laptops because those systems are interactive, persistent, and more likely to hold reusable credentials than ephemeral build runners. This also means pipeline testing alone can miss the malicious behavior entirely if the payload is written to stay dormant in CI. The result is a supply chain threat that looks clean in automated jobs while activating only in the more privileged workstation context.
Practical implication: Assume CI pass results are insufficient and test suspicious packages on developer-like endpoints with controls that preserve process and network telemetry.
How persistence and privilege escalation extend the blast radius
Once the second stage lands, the script copies a binary into a hidden user directory, launches it as a daemon, and installs persistence through both systemd user services and cron. It then probes for sudo or wheel access and can re-run itself as root if passwordless elevation is available. That matters because the initial infection is no longer just a single process on a laptop. It becomes a durable foothold that can survive logoff, restart, and partial cleanup, while any secrets accessible to that user session become reachable to the attacker. In NHI terms, the workstation becomes a credential collection point, not merely an endpoint compromise.
Practical implication: Hunt for persistence artifacts and privilege pathways together, because removing one foothold does not eliminate the credential exposure window.
Threat narrative
Attacker objective: The attacker aims to establish durable access on developer machines and reach the credentials and trusted workflows available from those endpoints.
- Entry occurs through malicious RubyGems versions of git_credential_manager, Dendreo, and a fastlane plugin published to the registry without matching source tags.
- Credential access begins when the loader fetches a second stage from attacker infrastructure on a developer machine and prepares to run outside CI.
- Escalation and persistence follow as the script drops a daemon, installs systemd and cron persistence, and probes for sudo-based root execution.
- Impact is workstation compromise with reachable secrets, including cloud credentials, SSH keys, tokens, and other local materials the developer session can access.
Breaches seen in the wild
- tj-actions/changed-files compromise 2025: A stolen bot token let attackers poison tj-actions/changed-files so pipelines printed their CI/CD secrets to public logs (CVE-2025-30066).
- Mastra npm Supply Chain Attack — Sapphire Sleet: North Korean Sapphire Sleet backdoors 144 AI npm packages in 88 minutes via supply chain attack on Mastra ecosystem.
Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
Developer machines are now part of supply chain trust, not just the endpoint estate. SleeperGem shows why package risk cannot be confined to build integrity checks alone. The malicious gems were designed to bypass CI and activate on developer laptops, where local credentials and authenticated sessions are more valuable. The governance lesson is that software supply chain policy must include workstation-level identity exposure as part of the trust boundary.
CI evasion is a control signal, not an implementation detail. When malware exits in build environments but executes on interactive endpoints, the attacker is telling defenders where the real prize sits. That pattern indicates a trust asymmetry between ephemeral runners and persistent developer systems, and it weakens the assumption that pipeline scanning is enough. Practitioners should treat environment-aware malicious code as a reason to extend detection into developer fleets.
Persistent loader plus local secrets creates a credential-reachability problem, not a simple malware event. The dropped daemon, systemd entry, cron persistence, and root escalation path all increase the number of secrets an attacker can touch after first execution. In IAM terms, the compromised endpoint becomes an ungoverned identity relay for cloud access, SSH, and tooling credentials. The practical conclusion is that endpoint persistence and secret governance need to be analysed together.
Secret exposure on developer endpoints is the named failure mode SleeperGem illustrates. The article’s core assumption break is that a package install is harmless unless it runs in CI. In reality, a developer machine often contains standing access, cached tokens, and reusable authentication material that turn a local compromise into a broader identity incident. Teams should treat workstations as high-value identity infrastructure whenever they host build, release, or cloud administration workflows.
Workstation identity governance is becoming a supply-chain requirement. The combination of malicious package delivery, environment-aware execution, and persistence shows that identity security now extends beyond IAM systems into developer tooling and endpoint controls. That does not replace package provenance or code review, but it does mean endpoint telemetry, secret hygiene, and least-privilege workstation access are part of the same control plane. The practitioner conclusion is to govern developer endpoints as privileged identity assets.
What this signals
Supply chain malware now has a workstation identity dimension. SleeperGem shows that malicious packages can target the place where human and machine access overlap, which is why developer endpoints need the same scrutiny as privileged admin workstations. If the endpoint can reach cloud consoles, source control, or signing systems, it is part of the identity attack surface.
Secret reachability is the real control question. The issue is not whether a package installs successfully, but which credentials become exposed if it runs on a developer laptop. That makes endpoint inventory, local secret hygiene, and least-privilege workstation design the practical governance layer for identity teams.
Developer machine compromise should be treated as an identity incident. Once persistence is established, attackers can wait for useful sessions, harvest tokens from local storage, and move into the broader trust fabric of the engineering environment. That is why incident response has to include credential rotation and endpoint containment together.
For practitioners
- Inspect developer endpoints for SleeperGem artifacts Search for the dropped daemon under ~/.local/share/gcm/, the matching systemd user service, the cron entry, and any setuid shell at /usr/local/sbin/ping6.
- Rotate every secret reachable from affected machines Assume any SSH key, cloud token, browser-stored secret, or environment-file credential present on an infected laptop may be exposed and replace it immediately.
- Block environment-aware dependency execution paths Review packages that run code on require or install, especially where they suppress execution in CI but activate on developer machines.
- Baseline outbound traffic from build and developer environments Flag unexpected connections to attacker-controlled hosts and compare them with your normal registry and package-fetch patterns.
- Pin and verify package provenance before rollout Compare published versions against upstream tags and reject releases that appear on the registry without matching source history.
Key takeaways
- SleeperGem demonstrates that a supply chain compromise can turn a routine gem install into a developer workstation identity event.
- The attack pattern combined CI evasion, second-stage delivery, and persistence, which increases the chance that local secrets and trusted sessions are exposed.
- The strongest prevention is to govern provenance, monitor developer endpoints, and rotate credentials immediately when suspicious package execution is confirmed.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST CSF 2.0 sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-02 — Secret Leakage | The attack turns compromised packages into a path for exposing developer-held secrets. |
| NHI-03 — Vulnerable Third-Party NHI | The malicious gems act as third-party software identities that were trusted by downstream systems. | |
| NHI-07 — Long-Lived Secrets | The article warns that any credential reachable from the infected workstation must be treated as exposed. | |
| Recommendation — Scan developer machines for leaked secrets and revoke any credentials exposed after malicious package execution. Verify third-party package provenance and remove dependencies that lack matching source history or tags. Shorten the lifetime of workstation-reachable secrets and rotate them immediately after suspicious execution. | ||
| MITRE ATT&CK | TA0006;TA0003;TA0004;TA0040 — Credential Access; Persistence; Privilege Escalation; Impact | The campaign combines credential exposure, persistence, escalation, and workstation impact. |
| Recommendation — Map the loader chain to TA0006, TA0003, TA0004, and TA0040 to prioritise detection and containment. | ||
| NIST CSF 2.0 | PR.AA-05 — Access Permissions, Entitlements and Authorizations | Developer endpoints here become access-bearing assets that can expose more than code. |
| Recommendation — Review endpoint entitlements so developer workstations cannot overexpose cloud and release credentials. | ||
Key terms
- Supply Chain Loader: A supply chain loader is the first-stage code delivered through a trusted package or dependency that pulls down or starts the real malicious payload. It often looks harmless on its own, but it creates the execution bridge between a legitimate distribution channel and attacker-controlled behaviour.
- CI Evasion: CI evasion is the practice of detecting build or test environments and suppressing malicious behavior there. Attackers use it to make automated analysis look clean while reserving execution for developer machines or other higher-value endpoints where credentials and sessions are more likely to be present.
- Developer Machine Identity Exposure: Developer machine identity exposure is the risk that a workstation contains reusable credentials, authenticated sessions, or local secrets that can be harvested after compromise. It turns endpoint infection into an identity incident because the attacker can inherit trust that was meant for the human operator and their tooling.
- Persistence artifact: A persistence artifact is any file, hook, service, or configuration that lets malware survive after the initial execution window ends. In build and developer environments, these artifacts often hide in editor settings, system services, or startup hooks and can reactivate the compromise later.
Deepen your knowledge
NHI Mgmt Group covers identity security, NHI governance, and agentic AI through independent research, practitioner guides, and the NHI Foundation Level course. It is designed for security teams that need to connect identity governance to secrets, privilege, and lifecycle control across modern environments.
Published by the NHIMG editorial team on August 18, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org