More screenshots
Works with the AI Agents you already use
Keycloak Realm Check
A client with "*" in Valid Redirect URIs lets Keycloak send authorization codes to any site an attacker picks.
$5
Keycloak Realm Check
Example session with this skill installed
Check this project with keycloak-realm-check.
- Read your context and instructions
- Compiled the keycloak realm check
$ python3 scripts/check_keycloak.py examples/risky
BLOCK conf/keycloak.conf:4 K05 PASSWORD_IN_SERVER_CONFIG
db-password=<redacted>
Why: A Keycloak server password is written as a literal: the bootstrap admin password (KC_BOOTSTRAP_ADMIN_PASSWORD, --bootstrap-admin-password, the deprecated KEYCLOAK_ADMIN_PASSWORD), the database password (db-password, KC_DB_PASSWORD, a password in KC_DB_URL), or a key store, trust store or client secret option. Anyone with the repository, the manifest or the image (ENV lines stay in its layers) can log in to the master realm or the database.
Safer: Pass these from a secret store: ${VAR} from the environment, a Kubernetes secretKeyRef or the operator's db passwordSecret and bootstrapAdmin secret, Docker secrets, or Keycloak's KeyStore config source. Change every password that was committed, and delete the temporary bootstrap admin once a permanent admin exists.
BLOCK deploy/k8s/keycloak.yaml:19 K06 DEV_MODE_IN_DEPLOYMENT
BLOCK deploy/k8s/keycloak.yaml:27 K05 PASSWORD_IN_SERVER_CONFIG
BLOCK realm/shop-realm.json:5 K01 SSL_REQUIRED_NONE
BLOCK realm/shop-realm.json:32 K03 SECRET_IN_REALM_FILE
BLOCK realm/shop-realm.json:33 K02 ANY_REDIRECT_URI
BLOCK realm/shop-realm.json:44 K04 REALM_KEYS_IN_FILE
BLOCK realm/shop-realm.json:56 K03 SECRET_IN_REALM_FILE
REVIEW conf/keycloak.conf:9 K19 HOSTNAME_STRICT_OFF
REVIEW docker-compose.yml:4 K20 DEV_MODE_NOT_LOCAL_ONLY
REVIEW keycloak.env:4 K22 PASSWORD_IN_UNIGNORED_ENV_FILE
REVIEW realm/shop-realm.json:6 K18 OPEN_REGISTRATION
REVIEW realm/shop-realm.json:8 K13 BRUTE_FORCE_PROTECTION_OFF
REVIEW realm/shop-realm.json:9 K14 WEAK_PASSWORD_POLICY
REVIEW realm/shop-realm.json:10 K17 LONG_ACCESS_TOKEN_LIFESPAN
REVIEW realm/shop-realm.json:14 K16 PKCE_NOT_ENFORCED
REVIEW realm/shop-realm.json:18 K11 IMPLICIT_FLOW_ENABLED
REVIEW realm/shop-realm.json:19 K12 PASSWORD_GRANT_ON_PUBLIC_CLIENT
REVIEW realm/shop-realm.json:21 K21 PATH_WILDCARD_REDIRECT_URI
REVIEW realm/shop-realm.json:22 K15 WILDCARD_WEB_ORIGINS
(Each finding also has Why and Safer lines, as in the first one.)
Verdict: BLOCK. Checked 5 files, 5 with Keycloak content.
This is a static check of file text. NOT FLAGGED is not a guarantee.
Connects securely to your tools. The creator never sees your data.
About this skill
A client with "*" in Valid Redirect URIs lets Keycloak send authorization codes to any site an attacker picks. A realm file written by kc.sh export holds every client secret and the realm's private signing keys in clear text, so committing it lets anyone sign their own tokens. A Kubernetes manifest that runs start-dev with KC_BOOTSTRAP_ADMIN_PASSWORD: admin serves the master realm over plain HTTP with a known password. This skill finds those and the other Keycloak mistakes below, and tells you how to fix each one.
Your agent runs a scanner on your project: realm exports and imports (realm JSON, the users files of kc.sh export, KeycloakRealmImport resources, keycloak-config-cli YAML and realm JSON kept in a ConfigMap), keycloak.json adapter files, keycloak.conf, and Keycloak settings wherever they are written: KC_ variables and kc.sh arguments in Compose files, Kubernetes manifests and Secrets, Helm values, the Keycloak operator resource, Dockerfiles, systemd units and .env files. It knows Keycloak's defaults and its built-in clients, treats vault and environment placeholders and masked export values as kept outside the file, and tells a local start-dev setup apart from a deployment. Realm files and settings under test, fixture, dev or local paths (src/test/resources, integration-tests, e2e, kind clusters) are reported as REVIEW instead of BLOCK. It never contacts Keycloak and never uses the network. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. Secrets are never printed.
What it checks
BLOCK
- K01: a realm with sslRequired set to none
- K02: redirect URIs that accept other hosts: "", "https://" or a wildcard right after the host (also post-logout redirect URIs); loopback port wildcards for native apps are not reported
- K03: credentials in realm and adapter files: client secrets, identity provider client secrets, SMTP and LDAP bind passwords, user passwords, OTP seeds, keycloak.json client secrets
- K04: realm key material in a file: key provider private keys and secrets, key store passwords, SAML client private keys
- K05: literal server passwords: bootstrap admin password (also the deprecated KEYCLOAK_ADMIN_PASSWORD), database password (also inside KC_DB_URL), key store, trust store and other Keycloak password or secret options, as KC_ variables, kc.sh arguments, keycloak.conf lines or operator options
- K06: start-dev in a Kubernetes manifest, Helm values, a systemd unit, or a Compose file or Dockerfile named for production or staging (kind, minikube and k3d setups get K20 instead)
REVIEW
- K11: clients with the implicit flow turned on
- K12: public clients with Direct Access Grants (the password grant)
- K13: brute force detection turned off
- K14: no password policy, no minimum length, or a minimum length below 8
- K15: "*" in a client's Web Origins
- K16: public clients that do not require PKCE with S256 and no enabled client policy for public clients that enforces it
- K17: access token lifespans longer than one hour
- K18: self-registration in the master realm or without email verification
- K19: hostname-strict turned off with no hostname set in the same file
- K20: start-dev in a Compose service that publishes its port beyond 127.0.0.1, or in a Dockerfile not named for local use
- K21: redirect URIs with a path wildcard on a host that is not local (Keycloak before 26.6.2 also has CVE-2026-7504 for wildcard redirect URIs)
- K22: literal Keycloak passwords in .env files that no .gitignore covers
What's included
- The scanner (Python 3.9+, standard library only)
- A rules guide with the reason, safer approach and documentation link for each rule (Keycloak docs and RFC 9700)
- A risky and a safe example (a shop realm export, a Compose file, a Kubernetes Deployment, keycloak.conf and an env file), and the real report the scanner produces on the risky one
Limits It reads each file on its own and as written. A hostname set in another file, values in .env files used by a Compose file, Helm chart templates, chart-specific Helm keys, Terraform, and changes made later in the Admin Console or Admin REST API are not seen. Literal passwords in .env files are reported only when no .gitignore covers the file, and passwords in local start-dev setups and CI workflows are not reported. Development, test and production are decided from file names, folders, start-dev and published ports, so check K06, K20 and the REVIEW findings in test paths against how the files are used. Keycloak's own quickstart realms and Kubernetes quickstart manifest are reported where they are unsafe outside a laptop, and a complete export with Keycloak's defaults gets K13 and K14, because the Keycloak docs advise changing both. NOT FLAGGED is not a guarantee.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.
Static check of file text. Each file is read on its own; Helm templates, Terraform and settings changed later in the Admin Console are not seen, and development, test and production are inferred from file names, folders, start-dev and published ports. NOT FLAGGED is not a guarantee.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 4 days ago
Permissions
Runs one local Python script in the terminal. It reads your project's files, writes nothing, and makes no network calls. The example project includes clearly fake, inert passwords, a fake client secret and a fake key value (NOTREAL ... example) for the scanner to find. Nothing in it is imported, started or run.