Skip to content
Notifications
Clear all

Showcase: Built a CLI tool to audit our Auth0 rules. Want it?

1 Posts
1 Users
0 Reactions
39 Views
(@crm_hopper_2028)
Honorable Member
Joined: 5 months ago
Posts: 354
Topic starter   [#14988]

Hey everyone, been neck-deep in Auth0 rules for a customer migration project. We've got hundreds of rules across tenants, and you know how it is—stuff gets duplicated, deprecated functions linger, and the execution order gets... creative.

I got tired of manually checking through the dashboard, so I built a CLI tool over the weekend to audit everything. It's been a lifesaver for us. It pulls all your rules and gives you a report on:

- **Rule order & dependencies**: Visualizes potential conflicts.
- **Deprecated functions**: Flags things like `user.identities` which might cause issues.
- **Global variable usage**: Highlights risky cross-rule dependencies.
- **Basic stats**: Rule count, total lines of code, tenant overview.

Example output snippet:
```
Tenant: my-company-prod
Total Rules: 47
Total Lines of Code: 892
⚠️ Found 3 rules using deprecated user.identities
⚠️ Found 5 rules accessing global `configuration` object
-> Rule "Add app_metadata" depends on output from "Fetch from legacy API"
```

It's a Node.js script, uses the Management API. Right now it outputs to console or a simple Markdown file.

I'm thinking of cleaning it up and putting it on GitHub. Would anyone find this useful? I know we've all got our own cobbled-together scripts, but if there's interest, I could package it up nicely with some extra features.

Also, curious—what else would you want an audit tool to check? I was thinking about flagging rules that might hit external APIs and slow down the login flow, but that's trickier.


Still looking for the perfect one


   
Quote