Audit script builder

Ready-made, read-only scripts and queries for SQL, Active Directory, AWS CLI and Azure CLI access reviews. Pick checks, copy the combined script.

Runs in your browser ยท nothing is sentThreat modelingNew

Pick the checks you need, then copy the combined script. Everything here is read-only: nothing creates, changes or deletes anything on the system you run it against.

Read-only: every script here only reads data (SELECT / Get- / list / describe). None of them create, modify or delete anything.
Platform
0 selected
Users & roles
  • In PostgreSQL, "roles" cover both login users and group roles; rolcanlogin distinguishes the two. In Oracle, dba_users lists every schema/account, including built-in ones (SYS, SYSTEM) that should normally stay disabled or tightly restricted.
  • Oracle account_status values worth recognizing: LOCKED (manually or by failed-login policy), EXPIRED (password rotation overdue), and combinations like EXPIRED & LOCKED.
  • PostgreSQL does not track role-creation time out of the box, which is itself worth flagging in an audit: consider enabling pgAudit or equivalent logging if "who created this account and when" needs to be answered reliably.
Permissions
  • Replace <table>/<TABLE> with the object under review. For a full schema-wide picture, drop the table_name filter and review by table_schema/owner instead.
Password policy
Activity

Combined script

Select one or more checks above to build the combined script.

The scripts themselves are in English, since the commands and syntax are identical regardless of interface language.

How to use

  1. Pick the platform you want to audit: SQL, Active Directory, AWS CLI or Azure CLI.
  2. Click "Select recommended" for a quick baseline, or check individual items per group.
  3. Review any warnings shown under an item before running it (for example, sensitive output or required permissions).
  4. Copy the combined script and run it with a read-only/audit account against the system under review.

Common scenarios

Quarterly access review

Select the recommended checks for inactive accounts, elevated privileges and credential age across your identity platforms, and keep the output as evidence for the review.

Preparing for a compliance audit

Pull a complete picture of users, group/role memberships and privileged access before an auditor asks for it, using only read-only commands.

About this tool

Pick a platform (SQL, Active Directory, AWS CLI or Azure CLI) and check the audit items you need: inactive accounts, accounts with elevated privileges, password/credential age, group or role membership, and more. Each item is a ready-made, read-only query or command verified against official documentation, not a configurable generator you have to shape yourself. Select the recommended set for a quick baseline review, or pick exactly what you need, then copy the combined script with one click. Nothing here creates, modifies or deletes anything; everything only reads data.

๐Ÿ”’ Your input stays in your browser and is never sent anywhere.

Frequently asked questions

Are these scripts safe to run in production?

Every script only reads data (SELECT, Get-, list, describe). None of them create, change or delete anything. That said, always review a script before running it in your own environment and run it with an account that has read-only/audit permissions where possible.

Why are the scripts only in English?

Commands, query syntax and cmdlet names are identical regardless of interface language, the same convention used for the cheat sheets. Only the labels and buttons around them are translated.

Do I need special permissions to run these?

Yes. SQL queries need read access to the relevant system catalogs (pg_roles, dba_users, ...), Active Directory checks need at least read access via RSAT or a domain-joined session, and the AWS/Azure CLI commands need an identity with IAM/Entra read permissions (for example SecurityAudit or Reader).

Can I combine checks from different platforms into one script?

No, the combined script only includes items from the platform you currently have selected, since mixing SQL, PowerShell and CLI syntax into a single runnable script would not make sense. Switch platforms and build a separate script for each one.

What to do next

Also useful

Found a problem or have a suggestion? Tell us