Skip to content
Post Mortem

Playbook ยท Act in the first 30 minutes

A package or extension I installed looks malicious

Remove it, then replace every secret it could have read.

HIGHTake a breath. Do these in order.

How you might know

  • A security advisory names a package or version you use.
  • Your app sends data to a place you do not recognize.
  • An update appeared that you did not expect.
  • A tool or AI assistant suggested a package you cannot find real information about.

Do this now

  1. Pause deployments

    Stop releasing new versions until you know the scope.

  2. Find out where it runs

    List which projects, servers and laptops use the package or extension and which version.

  3. Remove it and install a known-good version

    Roll back to a version before the problem, or remove it. Use your lockfile to confirm what is installed.

  4. Rotate every secret it could read

    Assume the keys and logins on those machines are stolen. Replace the secret keys, hosting keys and passwords.

  5. Check for strange outgoing traffic

    Look at network logs for connections to unknown destinations.

  6. Report it

    Report malicious packages to the registry. Tell your customers if their data could be affected.

Do not do this

  • Do not just delete the package and move on.
  • Do not assume your secrets are safe.
  • Do not rebuild from the same compromised environment.

Who to tell

  • Whoever is in charge
  • The registry or package security team
  • Customers if their data could be affected

What to save before you clean up

  • Lockfile history
  • Build and network logs
  • A copy of the suspicious version

In the next 24 hours

  • Add dependency scanning to your builds.
  • Pin versions and review changes before updating.
  • Check the GitHub security log for suspicious new repositories if the advisory mentions it.

Official help for the platforms involved

Links open each provider's own documentation, so you do not have to search for it.

What to write in the post mortem afterwards

  • How the package was chosen
  • Why scanning did not catch it
  • Controls to add: lockfile, scanning, approvals

Finished this one?

Add it to What I learned and earn 30 Trust. You can open your list from the badge at the bottom of the page.