Skip to main content

Guardian

Per-actor 2FA confirmation layer that intercepts dangerous permission changes before they land.

Overview

Guardian sits on top of antinuke as a second line of defense. Where antinuke punishes a whitelisted admin who nukes, Guardian asks “is that really you?” before the change even takes effect. When a whitelisted admin’s account is hijacked — stolen token, cookie theft, compromised session — the attacker inherits full trust and can bypass antinuke entirely. Guardian closes that gap by requiring the real admin’s personal credential (a password in their head or a TOTP code from their authenticator) before any dangerous role or permission change is re-applied.

How it works

When an admin or attacker grants a dangerous permission to a role or member:

What counts as dangerous

Credential ladder

When resolving a challenge, the input is checked in this order: Three wrong attempts on the same challenge locks it permanently — the change stays reverted.

Setup

1

Server owner: set master password

The command auto-deletes after running. Confirm with ;guardian master status.
2

Each admin: enroll in DM

Or use TOTP (see Enrollment section below). Run these in DM with the bot — they auto-delete.
Optionally lock high-value roles so any grant triggers a challenge regardless of permissions: ;guardian lock @AdminRole (master-pw)Trust legitimate bots (reaction role bots, etc.) to skip challenges: ;guardian trust add @Bot (master-pw)

Master password commands

Server owner only. All credential commands auto-delete after running.
First-time setup. Server owner only.
Rotate the master password without disabling Guardian.
Re-enable or pause Guardian. Disable requires master password confirmation.
Show current config, active triggers, challenge window, enrollment counts, pending approvals, and enrollment policy.
Toggle whether new enrollments need owner approval before they can confirm a challenge. When on, anyone who enrolls is in a pending state until the owner approves them. The server owner is always auto-approved. Aliases: approval, require_approval.
Add or remove which event types open a challenge. Valid trigger names: role_admin_grant, role_dangerous_perm_grant, member_admin_role_grant, locked_role_grant.

Enrollment

Run all enrollment commands in DM with the bot. They auto-delete on success.
If the server has require-approval enabled, your enrollment lands in a pending state after you enroll. The server owner gets a DM and must run ;guardian admin approve @you (master) before your credential can confirm any challenge. The server owner is always auto-approved. If approval is not required, enrollment is active immediately.
Set your personal password for a specific server. DM only.
Start TOTP enrollment. Bot DMs you a QR code — scan with Authy, Aegis, Google Authenticator, or 1Password.
Confirm your TOTP enrollment with a live code. On success, bot shows 8 single-use recovery codes — save them now.
See which credentials you have enrolled for a server.
Drop your own enrollment. credential is password, totp, or all. DM only.

Role locking

Lock a role so that any grant of it triggers a challenge, regardless of the role’s permissions.
Add a role to the locked list. Requires master password.
Remove a role from the locked list.
List all currently locked roles. Paginated, 10 per page.

Trusted bots

Bots in the trust list skip all Guardian challenges — useful for reaction role bots, auto-role bots, or any bot that legitimately grants roles.
Add a bot to the trust list. Server owner only.
Remove a bot from the trust list.
Show all trusted bots. Paginated, 10 per page.

Admin commands

Approve a member’s pending guardian enrollment. Owner only. Once approved, their credential is active and can confirm future challenges. The member gets a DM on approval.
Reject and delete a member’s pending enrollment. Owner only. The member gets a DM. They can re-enroll if it was a mistake. Only works on unapproved enrollments — use ;guardian admin unenroll to revoke an already-approved one.
List all members with unapproved enrollments. Shows user and submission time. Paginated, 10 per page.
Clear all of a user’s enrollments for this server. Owner only. Use when someone loses access to their TOTP and has no recovery codes.
Pause Guardian challenges for 1–60 minutes. Useful during planned maintenance or bulk role changes.
View the last 200 Guardian events for this server. Paginated, 10 per page.

Confirming a challenge

When Guardian intercepts a dangerous action, you receive a DM with a challenge ID. Reply in DM to confirm:
Resolve a pending challenge. credential is your TOTP code, recovery code, personal password, or the server master password. DM only — auto-deletes on success.
If you didn’t initiate the action — just ignore the DM. The change stays reverted automatically after 60 seconds.
Your credential must have been enrolled and approved before the challenge was created. A credential enrolled or approved after the dangerous action fired cannot confirm it — the change stays reverted. This prevents an attacker from enrolling under a compromised account and immediately confirming their own action.

Recovery