Skip to content

Incident Playbooks

m4bwav edited this page Nov 21, 2026 · 1 revision

sw.py incident NAME prints one of these checklists. The skill gives step 1 at once, then walks the rest in order, asking what is already done. Text below is printed by v0.1.0 and unchanged in 0.1.1.

token-in-commit

A key, token or password went into a git commit.

sw.py incident token-in-commit
1. Revoke or rotate the secret at its issuer NOW (this is the fix; scrubbing is cleanup)
2. Check the issuer's logs for use since the commit date
3. sw.py repo PATH to find every copy and commit
4. Close open PRs that carry the commit
5. Owner runs: git filter-repo --sensitive-data-removal --replace-text expr.txt, count changed PRs, then git push --force --mirror origin
6. Forks and clones cannot be cleaned; contact GitHub Support only if rotation is impossible
7. Add a pre-commit gitleaks hook and the file to .gitignore

clicked-link

Someone clicked a phishing link, maybe typed a password or ran a file.

sw.py incident clicked-link
1. Note the time, the URL and anything typed or downloaded
2. If a password was typed: change it from a different, known-clean device, then sign out all sessions
3. If a file ran: sw.py device, then a Defender full scan and an offline scan
4. Check the account's recent sign-ins, forwarding rules and recovery email and phone
5. Turn on 2FA (passkey or app) where it is off

account-taken-over

Someone else is signed in to an account, or it was locked.

sw.py incident account-taken-over
1. Use the provider's recovery flow from a clean device
2. Change the password, sign out all sessions, remove unknown devices, app passwords and OAuth apps
3. Reset recovery email and phone; check mail forwarding and filters
4. Turn on a passkey or app-based 2FA; save new recovery codes offline
5. Change the same password anywhere it was reused (sw.py pwned checks it)
6. Warn contacts if it sent messages; report it to the platform

lost-phone

A phone was lost or stolen.

sw.py incident lost-phone
1. Locate, lock or erase it from Find My Device or Find My
2. Ask the carrier to suspend the SIM and set a SIM PIN and port-out lock
3. Sign the phone out of email, bank and password manager from another device
4. Move 2FA to the new phone with recovery codes; remove the old device from each account

ransom-note

Files are encrypted and a note asks for payment.

sw.py incident ransom-note
1. Disconnect the machine from the network (unplug or Wi-Fi off); do not power it off
2. Do not pay; photograph the note
3. From another device: change email and bank passwords, check backups are untouched
4. Report it (US: ic3.gov; UK: Action Fraud); check nomoreransom.org for a decryptor
5. Restore from an offline backup after a clean reinstall

sextortion-email

An email claims to have compromising images and quotes an old password.

sw.py incident sextortion-email
1. It is almost always a bluff reusing an old breached password; do not pay or reply
2. If the quoted password is still used anywhere, change it there (sw.py pwned)
3. Mark it as spam; if a child or real images are involved, report to the police (US: NCMEC Take It Down)

The skill never runs the destructive steps (filter-repo, force-push, revoking, wiping) itself; you run them. See How the skill works.

Clone this wiki locally