/estack:estack-securityfrom estack
Hardens Phoenix apps against common security issues: authentication, authorization, injection, uploads, and session management. Use when implementing access control or reviewing input boundaries.
Ships in estack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Read the installed framework versions and existing authentication/policy code. Preserve established mechanisms and assess the specific trust boundary; generic rules do not replace a threat model or security review.
phx-value-*, API payloads, and job inputs as untrusted.Use explicit allowlists for keys and tool names. Do not create atoms from untrusted strings; String.to_existing_atom alone is not an authorization allowlist and can still raise.
Bind values in Ecto/SQL queries. Allowlist dynamic identifiers, operators, and ordering separately; value binding does not sanitize SQL syntax. Let HEEx escape user content. Sanitize intentionally supported HTML with a maintained allowlist before rendering it as raw.
PostgreSQL text rejects NUL bytes; validate or reject them at the appropriate boundary rather than claiming the database server crashes. Do not silently alter signed webhook bodies or security-sensitive values before verification.
Avoid deserializing Erlang terms from untrusted sources. If a protocol truly requires it, use the installed library's safe decoding API, constrain input size/types, and validate the resulting schema. Safe decoding alone does not prevent resource exhaustion.
Prefer the existing Phoenix/auth-library implementation for session rotation, password checks, magic links, and sudo/re-auth flows. Use the library's timing-safe verification and no-user path where appropriate; do not invent a new token protocol.
Preserve CSRF protection for cookie-authenticated state changes, including APIs that use cookies. Configure secure/HttpOnly cookies, appropriate SameSite behavior, session expiry, and logout/revocation semantics. Bearer-token APIs need their own scope and storage decisions.
Use CSP compatible with the actual asset pipeline and LiveView connections. Treat CORS as a browser policy, not authentication.
Set size/count/type limits. Check file signatures and parse/re-encode supported formats where appropriate; magic bytes and extensions alone do not prove a file is safe. Treat SVG/HTML and other active content specially. Generate storage names server-side and prevent traversal and unsafe extraction.
Serve untrusted uploads with deliberate content type, disposition, and nosniff, preferably from an isolated origin. Use durable object storage or a configured volume in production rather than assuming release directories persist.
Verify the exact raw body, signature, timestamp/replay window, and provider event identity. Configure a Plug body reader or route-specific parsing strategy compatible with the app; do not consume the body twice. Persist/deduplicate important events before acknowledging them.
For outbound user-selected URLs, prefer an allowlist. Validate schemes, hosts, resolved IPv4/IPv6 addresses, redirects, and each destination hop. Block loopback, private, link-local, metadata, and other disallowed networks, including DNS-rebinding paths. Apply timeouts, response-size limits, and egress controls where available.
Filter credentials and sensitive params from logs, exceptions, traces, job args, and inspect output. Identifiers may also be sensitive; log only what operations require. Match TLS peer/hostname verification to the client and deployment's trust roots.
Rate-limit sensitive endpoints with a suitable request-rate limiter or gateway and use multiple dimensions where necessary. A background job queue is not a general login rate limiter.
Run the project's dependency audit and Sobelow configuration. Explain each accepted finding; do not silently widen skips. Classify MCP/API tools by actual read/write/admin capability and enforce access on the server, including unknown-tool denial.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
phoenix-security, authorization, input-validation, csrf, cors
Generated from the plugin's indexed repository (singularityhacker/estack) — no native marketplace selected
npx claudepluginhub p/singularityhacker-estack20 skills in this plugin
/estack-architectureDesign Phoenix context boundaries and application interfaces. Use when adding a feature, deciding where modules belong, introducing API/MCP adapters, or working in an Ash or umbrella application./estack-debugInvestigate and fix Elixir/Phoenix failures from symptoms and code evidence. Use for crashes, failed tests, incorrect queries, LiveView events, Oban retries, or production error reports./estack-deployPrepare Phoenix releases, migrations, health checks, and observable rollouts. Use when editing runtime config, deployment pipelines, Docker builds, production topology, or release diagnostics.Other plugins' skills for the same job