Join our Newsletter — 33% off our NHI Course
Home› Guides› Compromised Developer Account Playbook: Source Control, Registry and…
Template Software & AI Supply Chain

Compromised Developer Account Playbook: Source Control, Registry and IDE Token Response

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 18 November 2026 12 min read
On this page

A developer account is not one identity but a bundle of them: a source control login, personal access tokens, SSH keys, OAuth grants, package registry tokens and the IDE and agent sessions that hold copies of all of these. This playbook is a fill-in template for responding when one of those accounts is taken over, whether through a phishing email that imitates a package registry, a stolen session cookie or a token lifted from a laptop. It focuses on the account and its credentials across platforms. For host forensics on the developer's machine, use our Compromised Developer Workstation Playbook; for a pipeline that has been tampered with, use the CI/CD Pipeline Compromise Playbook.

The reason this needs its own playbook is speed. In September 2025 CISA reported that a self-replicating worm known as Shai-Hulud had compromised more than 500 npm packages. According to CISA's alert, the malware harvested GitHub personal access tokens and cloud API keys, and spread by authenticating to npm as the compromised developer and publishing tainted versions of their other packages. Once a maintainer account is compromised, every package and repository that account can publish to is at risk within minutes.

How to use this template

Copy this page into your incident response library and replace the bracketed placeholders with your own names, tools and thresholds. Each numbered section maps to a phase of NIST SP 800-61 Rev. 3 incident response. Run the containment steps in order: the aim is to cut every credential the attacker could hold before you investigate what they did with them.

  • Owner of this playbook: [Application security lead]
  • Last tested: [date of tabletop exercise]
  • Platforms in scope: [GitHub / GitLab / Bitbucket], [npm / PyPI / container registry / internal artefact repository], [IDEs and AI coding agents in use]
  • Related playbooks: workstation compromise, CI/CD pipeline compromise, OAuth token theft

1. Scope and triggers

Use this playbook when any of the following is true for an account belonging to an employee, contractor or open-source maintainer your organisation depends on:

  • A developer reports entering credentials or an MFA code on a page that imitated a source control or registry login.
  • A package version was published that the maintainer did not release, or a release appeared outside your normal pipeline.
  • Source control alerts show a new SSH key, personal access token, OAuth authorisation or two-factor change the developer did not make.
  • Secret scanning or a third party reports one of the developer's tokens in a public place.
  • Commits or pushes appear under the developer's identity that they did not author.
  • A dependency you consume is reported as compromised and the attack spread through maintainer credentials.

Out of scope: malware forensics on the endpoint (workstation playbook) and tampering with build systems that did not involve a human account (pipeline playbook). Run those in parallel when the evidence points there.

2. Roles and contacts

RoleResponsibilityName and contact
Incident leadOwns decisions and timeline[name]
Source control administratorSuspends account, revokes tokens, reviews audit log[name]
Registry ownerRevokes publish tokens, deprecates or unpublishes versions[name]
Identity teamResets SSO password, MFA and sessions[name]
Cloud and secrets ownerRotates cloud keys and vault secrets the developer could reach[name]
Affected developerConfirms legitimate activity, provides device[name]
CommunicationsCustomer, community and registry notifications[name]

Keep out-of-band contacts for registry security teams and your source control vendor's support in this table, because the compromised account may be the one you would normally use to reach them.

3. Detection and triage

Build the credential map

Before you revoke anything, list every credential tied to the account. Revoking one and missing another leaves the attacker inside. Use this table:

CredentialWhere to find itFound (yes / no / count)
SSO or platform password and sessionsIdentity provider, platform session list[ ]
MFA methodsIdentity provider, platform security settings[ ]
Personal access tokens (classic and fine-grained)Platform developer settings[ ]
SSH and signing keysPlatform key settings[ ]
Authorised OAuth apps and installed appsPlatform applications settings[ ]
Package registry tokensRegistry account token page[ ]
IDE, extension and AI coding agent tokensIDE account settings, agent configuration[ ]
Cloud keys and secrets the developer could readCloud IAM, secrets manager access logs[ ]

Pull the audit trail

  • Source control. On GitHub, the personal security log covers actions from the last 90 days and includes categories such as oauth_authorization, oauth_access, personal_access_token, public_key, two_factor_authentication and passkey. Export it as JSON or CSV before making changes, and pull the organisation audit log for the same actor.
  • Registry. List publish events for every package the account maintains, with timestamps, versions and the token or method used.
  • Identity provider. Sign-ins for the developer with location, device and MFA method, looking for new devices or session reuse from unfamiliar addresses.
  • Cloud and secrets. Access to secrets and use of keys the developer could reach, from the earliest suspicious event onwards.

Triage questions

  • When was the earliest event the developer does not recognise? Treat that as the start of exposure.
  • Were any new credentials created (tokens, keys, OAuth grants)? These are persistence.
  • Were any packages published or repositories pushed? These are impact.
  • Did the account have admin or maintainer rights on organisations, packages or repositories? This sets the blast radius.

Set the severity

SeverityConditionResponse target
CriticalMalicious package version published, or malicious push to a default or release branchContainment started within [30 minutes], registry contacted within [1 hour]
HighAttacker created tokens, keys or OAuth grants, or the account holds maintainer or admin rightsContainment within [2 hours]
MediumCredentials entered on a phishing page, no attacker activity yet seenContainment within [4 hours], full review within [1 day]
LowExpired or read-only token exposed with no evidence of useRevoke and review within [1 working day]

Evidence to preserve

Revocation destroys some evidence, because deleted tokens and keys often disappear from settings pages. Before containment, or in parallel with it if severity is critical, capture:

  • Screenshots or exports of the account's token, key and authorised application lists, including creation dates and last-used dates where shown.
  • The exported security log and organisation audit log entries for the actor.
  • Registry publish history and copies of any suspicious package versions, stored in an isolated location for analysis.
  • The phishing email or message, with full headers, if the trigger was a phishing report.
  • Identity provider sign-in records for the exposure window.

Store these in the incident record with hashes and the name of the person who collected them.

Relevant ATT&CK techniques for tagging: T1528 Steal Application Access Token, T1550.001 Application Access Token and T1195.002 Compromise Software Supply Chain.

4. Containment

Run these steps in order. Record the time of each in the incident log.

  1. Suspend or lock the account at the identity provider and revoke all active sessions, so new tokens cannot be minted through SSO.
  2. Revoke source control tokens and keys. Delete every personal access token, SSH key and signing key on the account, and revoke all OAuth app authorisations. Re-issue only after recovery.
  3. Revoke registry tokens. On npm, list tokens with npm token list and delete them by ID with npm token delete <id>, or delete them on the Access Tokens page. npm's token revocation documentation notes you must use the token ID rather than the truncated token, and that revocation may take up to an hour to take effect. Plan for that window: use other controls, such as package ownership changes, to stop publishing in the meantime.
  4. Remove publishing rights temporarily. Remove the account from package maintainer lists and organisation owner roles until recovery is complete. Where your registry supports trusted publishing from CI, confirm the trust configuration was not altered.
  5. Revoke IDE and agent credentials. Sign the developer out of IDE accounts, extension marketplaces and AI coding agents, and revoke any tokens those tools hold.
  6. Rotate reachable secrets. CISA's guidance for the Shai-Hulud campaign was to immediately rotate all developer credentials. Rotate cloud keys, CI secrets and vault secrets the developer could read, starting with production.
  7. Contain malicious releases. Deprecate or unpublish affected versions according to the registry's policy, and block them in your internal artefact repository so builds cannot pull them.

If the developer is an external open-source maintainer rather than an employee, you cannot suspend their account yourself. In that case, contain on your side: block the affected versions in your artefact repository, pin to known-good releases, rotate any secrets your builds exposed to the package at install time, and contact the maintainer and the registry through their published security channels.

5. Eradication

  • Remove every credential created during the exposure window, including tokens and keys on other accounts the attacker may have reached through organisation admin rights.
  • Remove unrecognised GitHub Apps, OAuth applications, webhooks and deploy keys on repositories the account administered. CISA recommends auditing repository webhooks and secrets and removing unneeded apps.
  • Review commits pushed during the window and revert any the developer did not author. Pay special attention to workflow files, dependency manifests, install scripts and AI agent instruction files.
  • Check branch protection and ruleset settings on administered repositories for changes, and restore them from your known-good configuration.
  • Search your dependency lock files and artefact caches for the affected package versions, including nested dependencies, as CISA advised.
  • Hand the developer's device to the workstation playbook if any evidence suggests token theft from disk or browser.

6. Recovery

  • Re-enrol MFA with phishing-resistant methods. CISA's alert recommended mandating phishing-resistant MFA on all developer accounts, especially GitHub and npm. Replace one-time passcodes with security keys or passkeys before restoring access.
  • Re-issue credentials minimally. Issue fine-grained tokens with short expiries and only the repositories and packages needed. Prefer trusted publishing from CI over long-lived registry tokens.
  • Restore rights in stages. Return read access first, then write, then maintainer or admin roles after a review period.
  • Publish clean releases. Release fixed versions from your pipeline, not from a developer machine, with provenance where the registry supports it.
  • Watch for return. Keep heightened alerting on the account and its packages for at least [30] days: new tokens, new keys, publish events outside CI and logins from new devices.

7. Communication and notification

  • Notify the registry's security team of malicious versions so they can be removed for everyone, using the out-of-band contact in section 2.
  • Publish an advisory for affected packages with versions, time window and safe versions, so downstream users can pin and rotate.
  • Tell internal teams which builds may have pulled affected versions and what they must rotate.
  • Assess legal and contractual notification duties with [legal contact] if customer data or customer environments could have been reached through stolen secrets.
  • Keep the affected developer informed and supported. Account takeover through convincing phishing is not a performance issue, and blame slows down reporting next time.

8. Post-incident review

Within [10] working days, answer these questions and record actions with owners:

  • How did the attacker get the first credential, and which control should have stopped it?
  • How long between first malicious event and detection, and what alert would have shortened it?
  • Which credentials were missing from the credential map, and how will you inventory them next time?
  • Did revocation work as expected on every platform, including delays such as npm's up to one hour?
  • Did any long-lived token survive because it belonged to a tool rather than the person?
  • Which packages or repositories can still be published by a single human account without CI?

Implementation guidance

Most of the pain in this playbook comes from credentials nobody knew existed. Reduce it before the next incident:

  • Inventory developer non-human credentials. Treat personal access tokens, registry tokens and agent tokens as non-human identities with owners and expiry dates. Our npm Tokens Security Guide covers the registry side.
  • Move publishing into CI. Trusted publishing with short-lived, workload identity based credentials removes long-lived publish tokens from laptops entirely.
  • Require phishing-resistant MFA for source control and registries, and enforce it at organisation level so no maintainer can opt out.
  • Enable protective platform features. CISA's recommendations included branch protection rules, secret scanning alerts and Dependabot security updates.
  • Rehearse. Run a tabletop at least yearly in which a maintainer account is phished and an unauthorised version is published. Time how long revocation across all platforms actually takes.

Common gaps found in exercises

  • Tokens owned by tools, not people. An IDE extension or AI coding agent holds its own token that is not listed under the developer's personal access tokens, so it survives the first round of revocation.
  • Registry accounts outside SSO. Maintainers sign in to public registries with personal email and password, so suspending the corporate identity does nothing.
  • Shared maintainer rights. A package has a single human maintainer and no organisation owner, so nobody else can remove the compromised account or publish a fix.
  • Revocation delays ignored. Teams assume a deleted token stops working instantly and stop watching for publish events too early.
  • No out-of-band contact. The only route to the registry's security team runs through the compromised email account.

For the wider campaign context, see our Shai-Hulud npm Worm Guide.

Standards and references

Related NHI Mgmt Group resources: Compromised Developer Workstation Playbook · CI/CD Pipeline Compromise Playbook · npm Tokens Security Guide · Shai-Hulud npm Worm Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.