security
Skill0 starsChanged 2 months agoMITView on GitHub
Provides expert knowledge for implementing and reviewing application security following OWASP Top 10 (2021), with stack-specific patterns for Spring Boot, Django, Next.js, and Astro.
- Reads credentials
- Installs packages
78 other projects use a version of this.
Adopted by
Most recently taken up by
- AllThingsSmitty/proven-skillstheir own version, first seen Oct 6, 2026
- MarvelCollin/agent-skillstheir own version, first seen Oct 5, 2026
- muon-m2/magento2-toolstheir own version, first seen Oct 4, 2026
- flavien-ia/hypervibe-harnesstheir own version, first seen Oct 4, 2026
- AIBiz-Automatyzacje/claude-code-startertheir own version, first seen Oct 4, 2026
- AsiaOstrich/universal-dev-standardstheir own version, first seen Sep 30, 2026
Used with
Projects with it also use cost-reducer, trigger-dev and 10 more.
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.
daianepepes-labSkillcost-reducer
Analyze and reduce costs across cloud infrastructure, code, and services. Use when asked to cut costs, optimize spending, reduce bills, or improve cost efficiency.
Also in 5 projects that use this
xfstudioSkilltrigger-dev
Trigger.dev expert for background jobs, AI workflows, and reliable async execution with excellent developer experience and TypeScript-first design. Use when: trigger.dev, trigger dev, background task, ai background job, long running task.
Also in 4 projects that use this
ffsshhttiikkSkillscalability
Core foundational concepts and principles for Scalability
Also in 4 projects that use this
daianepepes-labSkillself-healing
Detect, diagnose, and automatically fix recurring errors, memory issues, and system degradation. Use when a system has recurring failures, memory leaks, performance degradation, or needs automatic recovery mechanisms.
Also in 5 projects that use this
xfstudioSkillcustomer-support
Elite AI-powered customer support specialist mastering
Also in 4 projects that use this
ffsshhttiikkSkillcicd
Continuous integration and delivery pipelines
Also in 4 projects that use this
- +1 more from daianepepes-lab
Other versions78 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 78
- parcadei/Continuous-Claude-v3★ 3.9ksame name
- BankrBot/skills★ 1.2ksame name
- rshankras/claude-code-apple-skills★ 777same name
- alinaqi/maggy★ 707same name
- boshu2/agentops★ 447same name
- notque/vexjoy-agent★ 424same name
- nth5693/gemini-kit★ 373same name
- telagod/code-abyss★ 242same name
- garagon/nanostack★ 207same name
- TheBeardedBearSAS/claude-craft★ 106same name
68 more not listed
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 repository193 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/behavioral-discipline.mdcCursor rule
- .cursor/rules/context-budget.mdcCursor rule
- .cursor/rules/orchestration.mdcCursor rule
- .cursor/rules/yagni-stdlib.mdcCursor rule
- androidSkill
- android-ui-designSkill
- api-versioningSkill
- astroSkill
- auth-token-inspectorSkill
- backlogSkill
- cc-api-contractSkill
- cc-db-migrationSkill
- cc-featureSkill
- cc-fixSkill
- cc-pagespeedSkill
- cc-refactorSkill
- cc-reviewSkill
- cc-spec-mutationSkill
- cc-tdd-cycleSkill
- cc-test-planSkill
- code-reviewSkill
- commitSkill
- conductor-setupSkill
- councilSkill
- django-ormSkill
- django-testingSkill
- django-uvSkill
- drizzle-schema-architectSkill
- evaluationSkill
- fastapi-pydantic-strictSkill
- find-skillsSkill
- jpa-nplusone-detectorSkill
- jpa-postgresSkill
- laravel-specialistSkill
- livewire-alpine-bridgeSkill
- multi-agent-orchestrationSkill
- nextjs-typescriptSkill
- openspecSkill
- pagespeed-insightsSkill
- pagespeed-perfSkill
- php-proSkill
- python-django-stackSkill
- python-fastapi-stackSkill
- pythonSkill
- security-ai-llmSkill
- security-blue-teamSkill
- security-cloudSkill
- security-cryptoSkill
- security-exploit-devSkill
- security-grcSkill
- security-incident-responseSkill
- security-log-analysisSkill
- security-malware-analysisSkill
- security-mobileSkill
- security-networkSkill
- security-ot-icsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 8 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 56 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 65
Use allowlists (accept known-good), not blocklists (reject known-bad)
- Distinctive: line 115
Use JWTs for stateless API authentication.
- Very specific: line 124
Never store access tokens in localStorage — XSS can read them.
- Distinctive: line 181
Never store plaintext passwords.
- Distinctive: line 206
Principle of least privilege: every endpoint must explicitly declare who can access it.
- Distinctive: line 226
Always check authorization at the object level, not just the endpoint level.
- Distinctive: line 293
Never commit secrets to source control: No exceptions.
- Distinctive: line 305
Use separate credentials per environment (dev, staging, prod)
- Very specific: line 306
Add .env to .gitignore and never commit it
- Distinctive: line 346
Never concatenate user input into SQL strings.
“Common” is measured: kept by at least 6 in 10 of the 56 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
OWASP Top 10 (2021) — Quick Reference
| # | Category | What to check |
| A01 | Broken Access Control | Is authorization enforced on every endpoint? |
| A02 | Cryptographic Failures | Are secrets encrypted at rest and in transit? |
| A03 | Injection | Is all input sanitized or parameterized? |
| A04 | Insecure Design | Is the threat model documented? |
| A05 | Security Misconfiguration | Are defaults changed? Debug off in prod? |
| A06 | Vulnerable Components | Are dependencies up to date? |
| A07 | Auth & Session Failures | Are sessions invalidated on logout? Token expiry set? |
| A08 | Software Integrity Failures | Are supply-chain dependencies verified? |
| A09 | Logging & Monitoring Failures | Are security events logged without leaking PII? |
| A10 | SSRF | Are outbound URLs allowlisted? |
Input Validation
Validate all input at system boundaries. Never trust data from: HTTP request body, query parameters, headers, cookies, or environment variables passed by external systems.
Rules:
- Validate type, format, length, and range
- Reject unknown fields — do not silently ignore them
- Use allowlists (accept known-good), not blocklists (reject known-bad)
- Validate at the API layer before it reaches the service layer
// Spring Boot — Bean Validation
data class CreateUserRequest(
@field:NotBlank @field:Email val email: String,
@field:Size(min = 8, max = 72) val password: String,
@field:Size(max = 100) val name: String
)
@PostMapping
fun createUser(@Valid @RequestBody request: CreateUserRequest): ResponseEntity<UserResponse> {
// request is guaranteed valid here
}# Django REST Framework — serializer validation
class CreateUserSerializer(serializers.Serializer):
email = serializers.EmailField(max_length=254)
password = serializers.CharField(min_length=8, max_length=72, write_only=True)
name = serializers.CharField(max_length=100)
def validate_email(self, value):
if User.objects.filter(email=value).exists():
raise serializers.ValidationError("Email already registered.")
return value.lower()// Next.js / Astro — Zod
import { z } from 'zod';
const CreateUserSchema = z.object({
email: z.string().email().max(254),
password: z.string().min(8).max(72),
name: z.string().max(100),
});
const result = CreateUserSchema.safeParse(body);
if (!result.success) {
return Response.json({ error: result.error.flatten() }, { status: 400 });
}Authentication
JWT (Stateless)
Use JWTs for stateless API authentication. Keep access tokens short-lived.
Token lifetimes:
| Token | Lifetime | Storage |
| Access token | 15 minutes | Memory (never localStorage) |
| Refresh token | 7–30 days | HttpOnly cookie |
Never store access tokens in localStorage — XSS can read them. Store in
memory (React state, module variable) and refresh via the HttpOnly cookie.
// Spring Security 6 + JWT
@Configuration
@EnableWebSecurity
class SecurityConfig(private val jwtFilter: JwtAuthenticationFilter) {
@Bean
fun filterChain(http: HttpSecurity): SecurityFilterChain = http
.csrf { it.disable() } // stateless API — CSRF not needed
.sessionManagement { it.sessionCreationPolicy(SessionCreationPolicy.STATELESS) }
.authorizeHttpRequests { auth ->
auth
.requestMatchers("/api/auth/**").permitAll()
.requestMatchers("/api/admin/**").hasRole("ADMIN")
.anyRequest().authenticated()
}
.addFilterBefore(jwtFilter, UsernamePasswordAuthenticationFilter::class.java)
.build()
}# Django — djangorestframework-simplejwt
# settings.py
SIMPLE_JWT = {
"ACCESS_TOKEN_LIFETIME": timedelta(minutes=15),
"REFRESH_TOKEN_LIFETIME": timedelta(days=7),
"ROTATE_REFRESH_TOKENS": True,
"BLACKLIST_AFTER_ROTATION": True,
"ALGORITHM": "HS256",
"AUTH_HEADER_TYPES": ("Bearer",),
}// Next.js — Auth.js (NextAuth v5)
// auth.ts
import NextAuth from 'next-auth';
import Credentials from 'next-auth/providers/credentials';
export const { auth, signIn, signOut } = NextAuth({
providers: [
Credentials({
authorize: async (credentials) => {
// validate and return user or null
},
}),
],
session: { strategy: 'jwt', maxAge: 7 * 24 * 60 * 60 },
});Password Hashing
Never store plaintext passwords. Never use MD5 or SHA-1 for password hashing.
| Algorithm | Use | Work factor |
| bcrypt | default | cost=12 |
| Argon2id | preferred when available | m=65536, t=3 |
| PBKDF2 | FIPS environments | iterations=600000 |
// Spring Security uses bcrypt by default
@Bean
fun passwordEncoder(): PasswordEncoder = BCryptPasswordEncoder(12)# Django uses PBKDF2 by default; switch to Argon2 for stronger hashing
# pip install django[argon2]
PASSWORD_HASHERS = [
"django.contrib.auth.hashers.Argon2PasswordHasher",
"django.contrib.auth.hashers.PBKDF2PasswordHasher", # fallback for existing hashes
]Authorization
Principle of least privilege: every endpoint must explicitly declare who can access it. Deny by default.
// Spring — method-level security
@PreAuthorize("hasRole('ADMIN') or #userId == authentication.name")
fun getUser(userId: String): UserResponse { ... }# Django REST Framework
class UserDetailView(RetrieveUpdateAPIView):
permission_classes = [IsAuthenticated, IsOwnerOrAdmin]
queryset = User.objects.all()
class IsOwnerOrAdmin(BasePermission):
def has_object_permission(self, request, view, obj):
return request.user.is_staff or obj == request.userAlways check authorization at the object level, not just the endpoint level. An authenticated user should not be able to access another user's data by changing an ID in the URL.
CORS
// Spring Boot — explicit allowlist; never use "*" in production
@Bean
fun corsConfigurationSource(): CorsConfigurationSource {
val config = CorsConfiguration().apply {
allowedOrigins = listOf("https://app.example.com")
allowedMethods = listOf("GET", "POST", "PUT", "DELETE")
allowedHeaders = listOf("Authorization", "Content-Type")
allowCredentials = true
maxAge = 3600L
}
return UrlBasedCorsConfigurationSource().apply {
registerCorsConfiguration("/api/**", config)
}
}# Django — django-cors-headers
CORS_ALLOWED_ORIGINS = [
"https://app.example.com",
]
CORS_ALLOW_CREDENTIALS = True
CORS_ALLOW_ALL_ORIGINS = False # never True in productionSecurity Headers
Set these headers on every response. They defend against XSS, clickjacking, and MIME sniffing.
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
Content-Security-Policy: default-src 'self'; script-src 'self'; object-src 'none'
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=()// Next.js — next.config.ts
const securityHeaders = [
{ key: 'X-Frame-Options', value: 'DENY' },
{ key: 'X-Content-Type-Options', value: 'nosniff' },
{ key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' },
{
key: 'Strict-Transport-Security',
value: 'max-age=63072000; includeSubDomains; preload',
},
];
export default {
headers: async () => [
{ source: '/(.*)', headers: securityHeaders },
],
};Secrets Management
Never commit secrets to source control. No exceptions.
✗ DATABASE_URL = "postgres://user:password@prod.example.com/db" # in source
✓ DATABASE_URL = env("DATABASE_URL") # from environmentRules:
- Load secrets from environment variables or a secrets manager (AWS Secrets Manager, Vault, GCP Secret Manager)
- Rotate credentials on any suspected exposure
- Use separate credentials per environment (dev, staging, prod)
- Add
.envto.gitignoreand never commit it
# Django — django-environ
import environ
env = environ.Env()
environ.Env.read_env() # reads .env in development only
SECRET_KEY = env("SECRET_KEY")
DATABASE_URL = env.db("DATABASE_URL")Rate Limiting
Protect authentication endpoints. Brute-force without rate limiting can compromise any account with a weak password.
// Spring Boot — Bucket4j
@Component
class RateLimitFilter(private val rateLimiter: RateLimiter) : OncePerRequestFilter() {
override fun doFilterInternal(request: HttpServletRequest, response: HttpServletResponse, chain: FilterChain) {
if (request.requestURI.startsWith("/api/auth/")) {
val probe = rateLimiter.tryConsumeAndReturnRemaining(1)
if (!probe.isConsumed) {
response.status = HttpStatus.TOO_MANY_REQUESTS.value()
return
}
}
chain.doFilter(request, response)
}
}Minimum rate limits for auth endpoints: 5 requests per minute per IP. Stricter limits (e.g., 3 per 15 minutes) are better for login endpoints.
SQL Injection Prevention
Never concatenate user input into SQL strings. Always use parameterized queries or an ORM.
// bad — SQL injection risk
val user = jdbcTemplate.queryForObject("SELECT * FROM users WHERE email = '$email'")
// good — parameterized
val user = jdbcTemplate.queryForObject(
"SELECT * FROM users WHERE email = ?",
UserRowMapper(),
email
)# bad
User.objects.raw(f"SELECT * FROM users WHERE email = '{email}'")
# good — Django ORM handles parameterization automatically
User.objects.filter(email=email)Logging Security Events
Log authentication events without including sensitive data.
Log: login success/failure, permission denied, password reset, token refresh
Never: passwords, tokens, PII (full email in prod logs), credit card numbers// Log security events at INFO level; failures at WARN
log.info("Authentication successful for user={}", userId)
log.warn("Authentication failed: invalid credentials for user={}", maskedEmail)
log.warn("Authorization denied: user={} attempted access to resource={}", userId, resourceId)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.

