security-patterns
Skill0 starsChanged 7 months agoApache-2.0View on GitHub
Security patterns and best practices for Kailash SDK including input validation, secret management, injection prevention, authentication, authorization, and OWASP compliance. Use when asking about 'security', 'secrets', 'authentication', 'authorization', 'injection prevention', 'input validation', 'OWASP', 'credentials', 'API keys', 'secure coding', or 'security review'.
- Reads credentials
9 other projects use a version of this.
Adopted by
Most recently taken up by
- capture0x/YeepForgetheir own version, first seen Nov 8, 2026
- ku5ic/claude-kittheir own version, first seen Nov 4, 2026
- CrowdStrike/foundry-skillstheir own version, first seen Oct 30, 2026
- edjchapman/claude-code-configtheir own version, first seen Oct 23, 2026
- mikulgohil/claude-skillstheir own version, first seen Oct 13, 2026
- Eyadkelleh/awesome-claude-skills-securitytheir own version, first seen Oct 8, 2026
Used with
Projects with it also use security-fuzzing and security-payloads.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
EyadkellehSkillsecurity-fuzzing
Essential fuzzing payloads: SQL injection, command injection, special characters. Curated essentials for vulnerability testing.
Also in 3 projects that use this
EyadkellehSkillsecurity-payloads
Essential exploitation payloads: anti-virus test files, file name exploits, malicious files. Curated for testing.
Also in 3 projects that use this
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- CloudAI-X/claude-workflow★ 1.4ksame name
- CloudAI-X/claude-workflow-v2★ 1.4ksame name
- Eyadkelleh/awesome-claude-skills-security★ 388same name
- Eyadkelleh/awesome-skills-security★ 384same name
- CrowdStrike/foundry-skills★ 37same name
- capture0x/YeepForge★ 8same name
- edjchapman/claude-code-config★ 8same name
- ku5ic/claude-kit★ 2same name
- mikulgohil/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository37 other files it gives its agents.
- .claude/rules/agents.mdAGENTS.md
- .claude/guides/claude-code/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- core-sdkSkill
- dataflowSkill
- nexusSkill
- kaizenSkill
- kailash-mcpSkill
- cheatsheetsSkill
- development-guidesSkill
- nodes-referenceSkill
- workflow-patternsSkill
- deployment-gitSkill
- frontend-integrationSkill
- testing-strategiesSkill
- architecture-decisionsSkill
- code-templatesSkill
- enterprise-infrastructureSkill
- validation-patternsSkill
- gold-standardsSkill
- flutter-patternsSkill
- interactive-widgetsSkill
- enterprise-ai-uxSkill
- conversation-uxSkill
- uiux-design-principlesSkill
- value-auditSkill
- ai-interaction-patternsSkill
- eatp-referenceSkill
- coc-referenceSkill
- 29-pactSkill
- claude-code-patternsSkill
- error-troubleshootingSkill
- kailash-mlSkill
- kailash-alignSkill
- co-referenceSkill
- managementSkill
- projectSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
3
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
- Distinctive: line 104
When making outbound HTTP requests to user-supplied URLs:
- Distinctive: line 116
Never return raw exception messages to clients — they leak file paths, class names, database URLs.
- Distinctive: line 149
Use this skill when:
“Common” is measured: kept by at least 6 in 10 of the 8 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.
Files
Security Patterns - Kailash SDK
Mandatory security patterns for all Kailash SDK development. These patterns prevent common vulnerabilities and ensure secure application development.
Overview
Security patterns cover:
- Secret management (no hardcoded credentials)
- Input validation (prevent injection attacks)
- Authentication and authorization
- OWASP Top 10 prevention
- Secure API design
- Environment variable handling
Critical Rules
1. NEVER Hardcode Secrets
# ❌ WRONG - Hardcoded credentials
api_key = "sk-1234567890abcdef"
db_password = "mypassword123"
# ✅ CORRECT - Environment variables
import os
api_key = os.environ["API_KEY"]
db_password = os.environ["DATABASE_PASSWORD"]2. Validate All User Inputs
# ❌ WRONG - No validation
def process_user_input(user_data):
return db.execute(f"SELECT * FROM users WHERE id = {user_data}")
# ✅ CORRECT - Parameterized queries (via DataFlow)
workflow.add_node("User_Read", "read_user", {
"id": validated_user_id # DataFlow handles parameterization
})3. Use HTTPS for API Calls
# ❌ WRONG - HTTP in production
workflow.add_node("HTTPRequestNode", "api", {
"url": "http://api.example.com/data" # Insecure!
})
# ✅ CORRECT - HTTPS always
workflow.add_node("HTTPRequestNode", "api", {
"url": "https://api.example.com/data"
})Reference Documentation
Core Security
- security-secrets - Secret management patterns
- security-input-validation - Input validation
- security-injection-prevention - SQL/code injection prevention
Authentication & Authorization
- security-auth-patterns - Auth best practices
- security-api-keys - API key management
- security-tokens - Token handling
OWASP Compliance
- security-owasp-top10 - OWASP Top 10 prevention
- security-audit-checklist - Security audit checklist
Security Checklist
Before Every Commit
- No hardcoded secrets (API keys, passwords, tokens)
- All user inputs validated
- SQL/code injection prevented
- HTTPS used for all API calls
- Sensitive data not logged
- Error messages don't expose internals
Before Every Deployment
- Environment variables configured
- Secrets stored in secure vault
- Authentication enabled
- Authorization rules defined
- OWASP Top 10 checked
- Security review completed
SSRF Prevention (Webhook/Outbound HTTP)
When making outbound HTTP requests to user-supplied URLs:
- Validate URL scheme — only
http://andhttps:// - Resolve DNS and check IP — block RFC 1918, loopback, link-local, cloud metadata
- Check IPv4-mapped IPv6 —
::ffff:127.0.0.1bypasses IPv4-only blocklists. Extract the mapped IPv4 address and re-validate - Pin resolved IP — replace hostname with resolved IP in the URL to prevent DNS rebinding. Set
Hostheader to original hostname - Block
0.0.0.0/8— routes to localhost on some systems
Reference implementation: See the Nexus webhook transport source for a working _validate_target_url() pattern.
Error Message Security
Never return raw exception messages to clients — they leak file paths, class names, database URLs.
# ❌ WRONG — leaks internals
return {"error": str(exception)}
# ✅ CORRECT — log internally, return generic message
log_exception("Operation failed")
return {"error": "Internal server error"}Common Vulnerabilities Prevented
| Vulnerability | Prevention Pattern |
| SQL Injection | Use DataFlow parameterized nodes |
| Code Injection | Avoid eval(), use PythonCodeNode safely |
| Credential Exposure | Environment variables, secret managers |
| XSS | Output encoding, CSP headers |
| SSRF | DNS-pinned delivery, blocked IP ranges |
| CSRF | Token validation, SameSite cookies |
| Insecure Deserialization | Validate serialized data |
Integration with Rules
Security patterns are enforced by:
.claude/rules/security.md- Security rulesscripts/hooks/validate-bash-command.js- Command validationgold-standards-validatoragent - Compliance checking
When to Use This Skill
Use this skill when:
- Handling user input or external data
- Storing or transmitting credentials
- Making API calls to external services
- Implementing authentication/authorization
- Conducting security reviews
- Preparing for deployment
Related Skills
- 17-gold-standards - Mandatory best practices
- 16-validation-patterns - Validation patterns
- 01-core-sdk - Core workflow patterns
Support
For security-related questions, invoke:
security-reviewer- OWASP-based security analysisgold-standards-validator- Compliance checkingtesting-specialist- Security testing patterns
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
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.

