agentleFS
sivaprasadreddysivaprasadreddy/sivalabs-agent-skills/skills/application-security/SKILL.md

application-security

Skill198 starsChanged 4 days agoMITView on GitHub

Apply secure-by-design principles and threat-model application features across technology stacks. Use when designing features, reviewing code or architecture, handling input, or exposing application functionality.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 9 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use for new features, trust-boundary changes, file handling, user-generated content, administrative functions, integrations, and security …

    line 12
  2. Distinctive:

    Validate at boundaries: Treat all external input as untrusted, including headers, files, URLs, webhooks, messages, and data from other …

    line 18
  3. Distinctive:

    Prefer allowlists and safe APIs: Avoid constructing executable queries, commands, paths, or markup from untrusted strings.

    line 19
  4. Distinctive:

    Use parameterized database operations and context-appropriate output encoding.

    line 39
  5. Distinctive:

    Use secure session/token handling, transport security, and appropriate cookie protections.

    line 43
  6. Distinctive:

    Use safe file storage, generated filenames, content validation, and non-executable storage locations.

    line 46
  7. Distinctive:

    Keep secrets out of source control, client bundles, logs, and error responses.

    line 47
  8. Distinctive:

    Use generic external error messages while retaining safe diagnostic detail internally.

    line 48
  9. Distinctive:

    Use applicable current standards (such as OWASP guidance) as references, but adapt controls to the application's actual threat model.

    line 60

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Application Security

Purpose

Establish practical, risk-based security expectations throughout application design and implementation.

When to use

Use for new features, trust-boundary changes, file handling, user-generated content, administrative functions, integrations, and security reviews.

Core principles

  1. Threat-model meaningful changes. Identify assets, actors, trust boundaries, entry points, abuse cases, and likely impact.
  2. Use least privilege. Give users, services, processes, and credentials only the permissions they need.
  3. Deny by default. Access must be explicitly granted; missing or invalid authorization context must not result in access.
  4. Validate at boundaries. Treat all external input as untrusted, including headers, files, URLs, webhooks, messages, and data from other services.
  5. Prefer allowlists and safe APIs. Avoid constructing executable queries, commands, paths, or markup from untrusted strings.
  6. Separate authentication from authorization. Establish identity and independently verify permission for each protected operation and resource.
  7. Protect data throughout its lifecycle. Minimize collection, restrict access, encrypt sensitive data in transit and at rest where appropriate, and define retention/deletion behavior.
  8. Fail securely. Errors must not reveal secrets, internal topology, stack traces, or sensitive records.
  9. Keep dependencies and runtime components maintained. Track vulnerabilities, update deliberately, and remove unused components.
  10. Make security observable. Record security-relevant events without logging credentials, tokens, or unnecessary personal data.

Threat-model prompts

For a meaningful feature, consider:

  • What assets are valuable (accounts, personal data, business data, credentials, money, service availability)?
  • Who can interact with it (anonymous users, authenticated users, tenants, administrators, service identities)?
  • What are the trust boundaries?
  • Can a user access another user's or tenant's resources by changing an identifier?
  • Can input cause injection, path traversal, SSRF, unsafe deserialization, or resource exhaustion?
  • Can workflows be replayed, raced, automated, or abused?
  • What happens when a dependency or identity provider is compromised?

Implementation expectations

  • Enforce authorization on the server or trusted backend, not only in the user interface.
  • Validate type, length, format, range, and business constraints.
  • Use parameterized database operations and context-appropriate output encoding.
  • Apply request size, upload size, rate, and resource limits.
  • Restrict outbound network destinations when user input can influence requests.
  • Store passwords using a modern password-hashing scheme; never reversible encryption or plain hashing.
  • Use secure session/token handling, transport security, and appropriate cookie protections.
  • Protect state-changing browser requests against CSRF where applicable.
  • Set appropriate security headers and content policies for browser-facing applications.
  • Use safe file storage, generated filenames, content validation, and non-executable storage locations.
  • Keep secrets out of source control, client bundles, logs, and error responses.
  • Use generic external error messages while retaining safe diagnostic detail internally.

Review checklist

  • Are all entry points identified and validated?
  • Is authorization checked for the specific action and resource?
  • Are tenant and ownership boundaries enforced?
  • Are injection and unsafe output risks addressed?
  • Are secrets and sensitive data protected?
  • Are abuse limits and resource limits appropriate?
  • Are security events logged safely?
  • Are dependencies, configuration, and deployment defaults secure?

Use applicable current standards (such as OWASP guidance) as references, but adapt controls to the application's actual threat model. Do not claim a system is secure merely because a checklist passed.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.