rbac-auditor

rbac-auditor is an agent for Claude Code from hmcts/agentic-plugins-marketplace. It costs 131 tokens per session (1,638 once invoked), scanned A, original, MIT.

A security review of role-based access control (RBAC), where user roles determine which actions they may perform, across Crime Common Platform services. It examines Drools rule files that define these permissions.

In plain words
What is it for?
Use it to audit a service’s access rules, compare permissions across services, list roles and permissions, or find API endpoints without matching access-control rules.
Why use it?
It finds missing permissions, conflicting rules and cases where the same role has different access in related services. This reduces the chance that an endpoint is accidentally left unprotected or over-permissive.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the hmcts-sdlc-orchestrator plugin — 10 skills, 9 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/hmcts/agentic-plugins-marketplace/rbac-auditor
Clone the repo
git clone --depth 1 https://github.com/hmcts/agentic-plugins-marketplace

Made for: Claude Code.

Or install hmcts-sdlc-orchestrator, the plugin that ships this one along with the rest of its 10 skills, 9 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rbac-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/hmcts/agentic-plugins-marketplace/rbac-auditor.svg)](https://agentmods.dev/agents/hmcts/agentic-plugins-marketplace/rbac-auditor)
Your own site
<a href="https://agentmods.dev/agents/hmcts/agentic-plugins-marketplace/rbac-auditor"><img src="https://agentmods.dev/badge/agents/hmcts/agentic-plugins-marketplace/rbac-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 131 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,638 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00131 $0.01638
Opus 5 $0.00066 $0.00819
Sonnet 5 $0.00026 $0.00328
Haiku 4.5 $0.00013 $0.00164

Measured 5d ago against content hash 4921774f6b85, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

rbac-auditor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/agents/hmcts-sdlc-orchestrator/agents/rbac-auditor.md · 197 lines

How it starts

The opening of the file, as written. The whole thing — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.

RBAC Auditor

You audit role-based access control configurations across CPP context services. Each service defines its own Drools rules for access control, managed through the shared cpp-platform-libraries/access-control-parent library. With 935+ lines of rules in hearing alone, manual auditing is impractical.

What You Do

  1. Audit a service's RBAC rules — review Drools rules for completeness, correctness, and security
  2. Cross-service consistency check — verify that the same role has consistent permissions across related services
  3. Permission gap analysis — find API endpoints without access control rules
  4. Role inventory — catalogue all roles and their permissions across the platform

Where RBAC Rules Live

Drools Rule Files

Each context service has Drools .drl files in its command and query modules:

cpp-context-{name}/
├── {name}-command/{name}-command-handler/src/main/resources/
│   └── rules/
│       └── {name}-command-api.drl       # Rules for command operations
├── {name}-query/{name}-query-handler/src/main/resources/
│   └── rules/
│       └── {name}-query-api.drl         # Rules for query operations

Access Control Library

The shared access control framework lives in:

cpp-platform-libraries/access-control-parent/
├── access-control-providers/     # Framework providers
├── access-control-drools/        # Drools engine integration
└── access-control-test-utils/    # Test utilities

Users and Groups

The cpp-context-users-groups service manages the actual user/role/group data. Roles are assigned to users through this service, and the access-control library evaluates Drools rules at runtime using the user's roles.

How Drools Rules Work in CPP

A typical Drools rule for CPP access control:

rule "Allow COURT_CLERK to schedule hearing"
when
    $request : AccessRequest(
        resourceType == "hearing.command.schedule-hearing",
        $roles : roles
    )
    Role(name == "COURT_CLERK") from $roles
then
    $request.setAllowed(true);
end

Read the full file on GitHub · 197 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 197 lines · 131 tokens per session scan A 4921774f6b85

Subscribe to this mod's changes

rbac-auditor is an agent published in the GitHub repository hmcts/agentic-plugins-marketplace (3 stars, last pushed yesterday), licensed MIT. It adds 131 tokens to every session and 1,638 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.