redis-security

redis-security is a skill for Claude Code from redis/agent-skills. It costs 80 tokens per session (883 once invoked), scanned A, original, MIT.

Guidance for securing Redis, an in-memory data store, when it is used in production. It covers passwords, encrypted connections, user permissions, network restrictions, firewall rules, and disabling risky commands.

In plain words
What is it for?
Use it when deploying or reviewing Redis, setting up application users and permissions, enabling TLS encryption, restricting network access, or responding to a security scanner's warning that Redis is internet-exposed.
Why use it?
It helps prevent unauthorized access and exposure of Redis data or operations. It also explains how to give applications only the permissions they need instead of sharing one broad account.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the redis-development plugin — 8 skills shipped together

About the project

Redis Agent Skills is Redis's collection of packaged instructions and resources that teach AI coding agents how to work with Redis data structures, connections, search, caching, clustering, security, observability, and agent memory. It is for developers using coding agents to build or troubleshoot Redis-backed applications. The catalogue entries are the project's own agent skills, instructions, and plugin packaging.

redis/agent-skills · 140 stars · on GitHub · redis.io

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 skills/redis/agent-skills/redis-security
Any agent
npx skills add redis/agent-skills --skill redis-security
Clone the repo
git clone --depth 1 https://github.com/redis/agent-skills

Made for: Claude Code.

Or install redis-development, the plugin that ships this one along with the rest of its 8 skills.

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 redis-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/redis/agent-skills/redis-security.svg)](https://agentmods.dev/skills/redis/agent-skills/redis-security)
Your own site
<a href="https://agentmods.dev/skills/redis/agent-skills/redis-security"><img src="https://agentmods.dev/badge/skills/redis/agent-skills/redis-security.svg" alt="Measured on agentmods" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 883 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.00080 $0.00883
Opus 5 $0.00040 $0.00441
Sonnet 5 $0.00016 $0.00177
Haiku 4.5 $0.00008 $0.00088

Measured 6d ago against content hash a8870d933bb0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

redis-security 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 6d 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/redis-development/skills/redis-security/SKILL.md · 107 lines

How it starts

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

Redis Security

Production hardening for Redis: authentication, ACL-based access control, and network exposure. Cover all three together — any one of them on its own leaves an exploitable gap.

When to apply

  • Deploying or reviewing a Redis instance destined for production.
  • Setting up application credentials beyond a shared password.
  • Auditing a Redis deployment against a security checklist.
  • Receiving "Redis exposed to the internet" findings from a scanner.

1. Always authenticate (and use TLS)

Never run a production Redis without a password. Pair authentication with TLS so credentials and data aren't sent in clear text.

# redis.conf
requirepass your-strong-password
tls-port 6380
tls-cert-file /path/to/redis.crt
tls-key-file  /path/to/redis.key
r = redis.Redis(
    host="localhost",
    port=6380,
    password="your-strong-password",
    ssl=True,
    ssl_cert_reqs="required",
)

If you can use ACL users (next section) instead of the single requirepass, do — requirepass is effectively the legacy "default user" shortcut.

See references/auth.md.

2. ACLs for least-privilege access

The default user with a shared password is fine for development. For production, give each application a dedicated ACL user with only the commands and key patterns it actually needs.

# Cache-only reader
ACL SETUSER app_readonly on >password ~cache:* +get +mget +scan

# Writer that can't run dangerous ops
ACL SETUSER app_writer   on >password ~*        +@all -@dangerous

# Admin (use sparingly, never for application traffic)
ACL SETUSER admin        on >strong-password ~* +@all

Useful command categories:

Category What it covers
@read Read commands (GET, MGET, HGET, ...)
@write Write commands (SET, DEL, XADD, ...)
@dangerous FLUSHALL, DEBUG, KEYS, etc.
@admin Administrative commands

If app credentials leak, a tight ACL bounds the blast radius — the attacker can't FLUSHALL your DB just because they grabbed a cache reader's password.

Read the full file on GitHub · 107 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 6d ago First seen · 107 lines · 80 tokens per session scan A a8870d933bb0

Subscribe to this mod's changes

redis-security is a skill published in the GitHub repository redis/agent-skills (140 stars, last pushed 4d ago), licensed MIT. It adds 80 tokens to every session and 883 once invoked, about $0.0004 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-30.

Related

Other skills, from other repositories

redis-js

Work with the Upstash Redis JavaScript/TypeScript SDK for serverless Redis operations. Use for caching, session storage, rate limiting, leaderboards, full-text search (querying, filtering, aggregating with @upstash/redis search extension), and all Redis data structures. Supports automatic serialization/deserialization…

upstash/redis-js · 93 tokens

redis

Use when using Redis or any Redis-protocol store (Valkey, ElastiCache, Upstash, Dragonfly, Memorystore) as a cache, queue, rate limiter or distributed lock and it has to be CORRECT rather than merely connected — stampede-proof caching, locks that cannot release someone else's hold, race-free rate limits, and jobs that…

ericrisco/rsc-harness · 111 tokens

rqe-iterator-suspend-resume

Implementation & review guide for suspend/resume (revalidation) on query-engine iterators in src/redisearchrs/rqeiterators/. Use this when adding the Box suspend/resume mechanism to an RQE iterator that currently only implements the legacy revalidate, when modifying an existing suspend/resume implementation, or when…

RediSearch/RediSearch · 98 tokens

cis-aws-database-5.11

Ensure ElastiCache has Cluster Mode Enabled.

CyberStrikeus/CyberStrike · 18 tokens

cis-aws-database-5.13

Ensure ElastiCache has automatic backups enabled.

CyberStrikeus/CyberStrike · 18 tokens

redis-expert

Expert-level Redis for caching, pub/sub, data structures, and high-performance applications. Use when the user mentions cache, pub/sub, in-memory stores, key-value stores, or NoSQL, or when the task involves Data Structures, Basic Operations, Advanced Patterns, or Redis Streams.

personamanagmentlayer/pcl · 61 tokens