serverless-security

serverless-security is a skill for Claude Code, Codex from ShieldNet-360/secure-vibe. It costs 104 tokens per session (2,028 once invoked), scanned A, original, MIT.

A set of security rules for applications that run functions in response to events, such as requests, messages, or file changes. It focuses on reused execution environments, temporary files, event data, and configuration secrets.

In plain words
What is it for?
Use it when designing or reviewing serverless functions, especially their shared state, /tmp files, event validation, and configuration handling.
Why use it?
It highlights security risks that can expose one request’s data to another or let attacker-controlled event fields influence processing.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when designing or reviewing serverless functions, especially their shared state, /tmp files, event validation, and configuration handling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shieldnet-360/secure-vibe/serverless-security
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.

Any agent
npx skills add ShieldNet-360/secure-vibe --skill serverless-security
Clone the repo
git clone --depth 1 https://github.com/ShieldNet-360/secure-vibe

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/shieldnet-360/secure-vibe/serverless-security/github.svg)](https://agentmods.dev/skills/shieldnet-360/secure-vibe/serverless-security)
Your own site
<a href="https://agentmods.dev/skills/shieldnet-360/secure-vibe/serverless-security"><img src="https://agentmods.dev/badge/skills/shieldnet-360/secure-vibe/serverless-security/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for serverless-security

Your own site · 80×15
<a href="https://agentmods.dev/skills/shieldnet-360/secure-vibe/serverless-security"><img src="https://agentmods.dev/badge/skills/shieldnet-360/secure-vibe/serverless-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,028 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00104 $0.02028
Opus 5.5 $0.00042 $0.00811
Sonnet 5.5 $0.00021 $0.00406
Haiku 4.5 $0.00010 $0.00203

Measured 1mo ago against content hash 305ca34d1818, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

serverless-security scanned grade A with 1 finding 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 1mo 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Pass event-derived strings to a shell — `os.system`, `subprocess` with `shell=True`,
skills/serverless-security/SKILL.md · 144 lines

How it starts

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

Serverless Security

Rules (for AI agents)

ALWAYS

  • Treat the execution environment as reused. The platform freezes it when the handler returns and thaws it for the next invocation, which may serve a different tenant. So a module-level global holding per-request state — a decrypted payload, an authorization decision, a tenant id, a connection bound to one caller's credentials — is visible to the next request. Cache only what is safe to share, and reset or scope everything else inside the handler.
  • Treat /tmp as shared, persistent, and finite. It is the only writable path, it survives across invocations in the same environment, and a fixed filename written for one user is readable by the next. Use a per-invocation subdirectory, delete it before returning, and never read back a path without having written it in the same invocation.
  • Validate the whole event, envelope included. The trigger's identity is not authentication: an S3 object key is chosen by whoever can PUT to the bucket, SQS message attributes and EventBridge detail are producer-supplied, and an API Gateway authorizer context is only as trustworthy as the authorizer. Validate against an explicit schema before any code touches the payload, and where a function has more than one trigger, check the source discriminant and route by allowlist.
  • Give each function its own execution role with only the permissions its stated job needs. iam-best-practices owns policy scope and the escalation paths; what is serverless-specific is one role per function, never shared, because a shared role gives every function the union of what any of them needs.
  • Set concurrency deliberately, and know which control you are reaching for. Reserved concurrency caps a function's parallel executions and is the denial-of-wallet control; provisioned concurrency pre-initialises environments to remove cold starts and bills for them whether or not they are used. Reserved capacity is also drawn from a shared account pool, so setting it per function is a decision about the account, not just that function.
  • Bound the retry and failure path. Asynchronous invocations are retried by the platform, so one poison event becomes repeated executions, repeated spend, and repeated side effects if the handler is not idempotent. Configure the retry count, the maximum event age, and a dead-letter queue or failure destination — and for a batch source, report partial batch failures rather than failing the whole batch.
  • Decide what the handler returns on a message it could not process. Returning success deletes the message and loses the data; raising on every message creates an infinite retry loop feeding a queue nobody drains. Both are silent.
  • Set a timeout that reflects the work, and know it holds a concurrency slot for its whole duration — which is what makes a long timeout an amplifier during an attack rather than merely a slow response.

Read the full file on GitHub · 144 lines

Files

What ships with it

5 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. 1mo ago First seen · 144 lines · 104 tokens per session scan A 305ca34d1818

Subscribe to this mod's changes

serverless-security is a skill published in the GitHub repository ShieldNet-360/secure-vibe (22 stars, last pushed 2mo ago), licensed MIT. It adds 104 tokens to every session and 2,028 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.