Skip to content

feat(auth0): fold tenant audit (CheckMate) into the unified skill#141

Open
frederikprijck wants to merge 3 commits into
mainfrom
fold-audit-into-router
Open

feat(auth0): fold tenant audit (CheckMate) into the unified skill#141
frederikprijck wants to merge 3 commits into
mainfrom
fold-audit-into-router

Conversation

@frederikprijck

@frederikprijck frederikprijck commented Jul 15, 2026

Copy link
Copy Markdown
Member

What this does

Folds the standalone auth0-checkmate skill (from #127) into the unified auth0
router skill as a new audit intent, matching the v2.0 one-skill / flat-reference-pool
architecture on main. No behavior is dropped — the CheckMate tenant audit becomes a set
of on-demand reference files the router loads when a developer asks to audit a tenant.

Stacked PR. #142 (the plan-aware health check) builds on this branch and reuses the
pricing + remediation references introduced here. Review/merge this first; #142 then
retargets to main.

The audit intent

Added to SKILL.md's intent table and Step 4 loader. When routed, it loads:

feature-audit.md            # the full CheckMate workflow (Phases 0–6)
feature-audit-pricing.md    # feature→plan matrix — source of truth for finding triage
feature-audit-remediation.md# gated apply flow (Phase 7): command mapping, safety gates
tooling-{tooling}.md         # CLI / MCP / Terraform, per project context

with the standing rule: apply findings only with per-command confirmation; verify each
change by re-fetch.

How the standalone skill maps onto the fold

Old (auth0-checkmate) New Notes
SKILL.md Phases 0–6 references/feature-audit.md CLI bootstrap → dedicated M2M app (26 read scopes) → inline company context (Phase 3) → CheckMate run + tenant-fact gathering → personalized report (md + styled PDF)
SKILL.md Phase 7 + closing references/feature-audit-remediation.md Command-shape mapping, Guided/Express flows, plan-upgrade gate, never-without-confirmation list
references/auth0-pricing.md references/feature-audit-pricing.md Reused verbatim
references/checkmate-readme.md + auth0-cli-readme.md folded into feature-audit.md CLI install/login + CheckMate run detail inlined
references/report-template.{md,html} assets/audit/report-template.{md,html} Relocated; only skill-reference comments updated
scripts/render_pdf.sh scripts/render_pdf.sh Reused verbatim
tests/evals.json + tests/graders.json evals/behavioral/cases/audit.json Ported into the repo-root consolidated behavioral harness (expectations-only, like the other interactive-flow cases)

Everything material is preserved: all seven workflow phases, the exact 26 Management API
read scopes, the data.report.summary[] parsing, the full finding→plan triage table
(including the "Custom Domains is Free, not an upgrade" caveat), the mandatory fusion
checklist + grep lint, and the two-loop (Immediate / After-Upgrading) gated remediation.

Restored coverage & fixes in this PR

  • Behavioral evals — the standalone skill's tests/evals.json + graders.json are
    ported to evals/behavioral/cases/audit.json, matching the consolidated harness at
    repo-root evals/ (the per-skill tests/ layout was retired in the v2.0 migration).
  • Remediation fallback guidance — restored the operational guardrail in
    feature-audit-remediation.md: pick the auth0 api method from the path column
    (patch for most resources, put for MFA/prompt toggles, post for creates — patch
    is not universal), and note that auth0 api defaults to GET without --data / POST
    with --data, so the method must always be stated explicitly.

Gates (all green)

  • check_router_reachability.py — all references routable, no second-hop links
  • check_routing_evals.py — routing cases resolve, incl. the new audit case
  • uvx skillsaw --strict — 0 errors / 0 warnings, Grade A

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added Auth0 tenant security and configuration audits using CheckMate, with an audit-tenant routing case.
    • Generates a branded, templated report in Markdown/HTML and exports to PDF.
    • Supports both full setup and “skip bootstrap” flows using cached credentials/state.
    • Introduces remediation workflows with confirmation, guided/apply-all options, and post-change re-verification.
  • Documentation
    • Updated the Auth0 skill to include the new audit intent and expanded audit/run guidance, including pricing and remediation playbooks.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 48986cfd-4bec-4ea2-9eed-a343f82fe57d

📥 Commits

Reviewing files that changed from the base of the PR and between 2c570bd and 701cd52.

📒 Files selected for processing (1)
  • plugins/auth0/skills/auth0/scripts/render_pdf.sh

📝 Walkthrough

Walkthrough

Adds an Auth0 tenant audit capability using CheckMate, including CLI bootstrap and remediation guidance, Markdown/HTML/PDF report generation, pricing references, PDF renderer fallbacks, and routing and behavioral evaluation cases.

Changes

Auth0 tenant audit

Layer / File(s) Summary
Audit intent and workflow wiring
plugins/auth0/README.md, plugins/auth0/skills/auth0/SKILL.md, evals/routing-cases.json
Registers the audit intent, loads audit references, and documents confirmation and re-fetch verification requirements.
CheckMate audit execution and remediation
plugins/auth0/skills/auth0/references/feature-audit.md, plugins/auth0/skills/auth0/references/feature-audit-remediation.md
Defines bootstrap, credential reuse, CheckMate execution, enrichment, report generation, mode branching, and remediation flows.
Audit report templates and pricing data
plugins/auth0/skills/auth0/assets/audit/*, plugins/auth0/skills/auth0/references/feature-audit-pricing.md
Adds Markdown and HTML report templates plus pricing and feature comparison references for recommendation triage.
Cross-platform PDF rendering
plugins/auth0/skills/auth0/scripts/render_pdf.sh
Adds Chrome discovery, PDF rendering, fallback renderers, input validation, and failure guidance.
Audit routing and behavioral evaluations
evals/behavioral/cases/audit.json
Adds behavioral cases for full bootstrap and cached-state CheckMate audit flows.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Operator
  participant Auth0Skill
  participant Auth0CLI
  participant CheckMate
  participant ReportGenerator
  Operator->>Auth0Skill: Request tenant audit
  Auth0Skill->>Auth0CLI: Bootstrap or reuse credentials
  Auth0CLI-->>CheckMate: Provide tenant and M2M credentials
  CheckMate-->>ReportGenerator: Return audit JSON and tenant facts
  ReportGenerator-->>Operator: Produce Markdown, HTML, and PDF reports
Loading

Suggested reviewers: tanya732

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: integrating the Auth0 tenant audit/CheckMate flow into the unified skill.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fold-audit-into-router

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Add an 'audit' intent to the unified auth0 router that runs an Auth0
CheckMate tenant configuration/security audit, produces a markdown + PDF
report, and applies approved fixes via the Auth0 CLI with per-command
confirmation.

- SKILL.md: Step 1 intent row + Step 4 load block; extend the description.
- references/feature-audit.md: full workflow (CLI bootstrap, M2M app,
  company context, CheckMate run, report fusion, gated apply loops).
- references/feature-audit-pricing.md: feature to plan matrix (shared).
- references/feature-audit-remediation.md: command-shape map + safety rules.
- scripts/render_pdf.sh + assets/audit/report-template.{md,html}.
- Routing eval (audit-tenant) + README coverage.
@frederikprijck
frederikprijck force-pushed the fold-audit-into-router branch from ba6ea1a to 15a8e83 Compare July 20, 2026 20:16
@frederikprijck
frederikprijck marked this pull request as ready for review July 20, 2026 20:19

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@evals/behavioral/cases/audit.json`:
- Around line 1-25: Update the audit evaluation metadata so both origin_skill
and skill_name use the unified auth0 skill. In the plan recommendation
assertion, replace the exact-cost requirement with the behavior specified by
feature-audit.md: report the plan name only and do not quote or estimate
pricing, including Enterprise pricing.

In `@plugins/auth0/skills/auth0/scripts/render_pdf.sh`:
- Around line 22-24: Validate the output parent directory before the OUTPUT_DIR
assignment changes into it. In render_pdf.sh, check that the directory derived
from OUTPUT is an existing directory; if not, print an actionable error message
identifying the invalid output path and exit non-zero, then preserve the
existing OUTPUT_DIR and OUTPUT_ABS construction for valid paths.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 680f7b88-5bc2-4a3a-82d2-651697431164

📥 Commits

Reviewing files that changed from the base of the PR and between de92946 and 15a8e83.

📒 Files selected for processing (10)
  • evals/behavioral/cases/audit.json
  • evals/routing-cases.json
  • plugins/auth0/README.md
  • plugins/auth0/skills/auth0/SKILL.md
  • plugins/auth0/skills/auth0/assets/audit/report-template.html
  • plugins/auth0/skills/auth0/assets/audit/report-template.md
  • plugins/auth0/skills/auth0/references/feature-audit-pricing.md
  • plugins/auth0/skills/auth0/references/feature-audit-remediation.md
  • plugins/auth0/skills/auth0/references/feature-audit.md
  • plugins/auth0/skills/auth0/scripts/render_pdf.sh

Comment thread evals/behavioral/cases/audit.json
Comment thread plugins/auth0/skills/auth0/scripts/render_pdf.sh
…y assertion

- origin_skill/skill_name → auth0 (auth0-checkmate folded into unified skill)
- plan recommendation assertion now matches feature-audit.md (plan name only,
  no price; never quote/estimate Enterprise pricing)
Guard against a non-existent output parent dir before cd — fail with an
actionable message and non-zero exit instead of letting cd crash under
set -e. Mirrors the existing input-file check.
@github-actions

Copy link
Copy Markdown

✅ skillsaw — All checks passed

Full report
skillsaw 0.16.0
Linting: /home/runner/work/agent-skills/agent-skills


Scanned:
  Repo type: agentskills, coderabbit, marketplace
  Plugins:   1
  Skills:    1
  Rules run: 51
  Took:      2.4s

Summary:
  Errors:   0
  Warnings: 0
  Grade:    A (1.38 weighted violations per 10k tokens)
  340 info-level violation(s) count toward the grade — run with -v to see them

✓ All checks passed!

skillsaw 0.16.0 · config · custom rules · run

@frederikprijck

Copy link
Copy Markdown
Member Author

@coderabbitai rereview

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

@frederikprijck I’ll re-review the latest changes.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@@ -0,0 +1,588 @@
# Auth0 Pricing

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do we keep this updated with the pricing changes on auth0.com/pricing? should we add an instruction for the agent to explicitly check the auth0.com/pricing page? we also support an agent-friendly https://auth0.com/pricing.md page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants