security-secrets
Skill1 starsChanged 3 months agoMITView on GitHub
Zero-secret leakage standards, environment variable security, secret scanning, CORS protection, and secure coding practices.
- Reads credentials
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Manu-del-source/ai-security-audittheir own version, first seen Nov 1, 2026
- GA14-hub/claude-code-kit-jatheir own version, first seen Feb 13, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- GA14-hub/claude-code-kit-ja★ 1same name
- Manu-del-source/ai-security-audit★ 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 repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adr-managementSkill
- agentic-developmentSkill
- ci-cdSkill
- code-architectureSkill
- database-postgresqlSkill
- data-engineeringSkill
- debuggingSkill
- deep-learningSkill
- dependency-managementSkill
- deploymentSkill
- dockerSkill
- documentation-orchestratorSkill
- documentationSkill
- environment-guardrailsSkill
- frontend-react-typescriptSkill
- git-githubSkill
- machine-learningSkill
- observabilitySkill
- performance-optimizationSkill
- portfolio-readinessSkill
- project-bootstrapSkill
- project-knowledgeSkill
- python-apiSkill
- python-environmentSkill
- rag-ocr-llmSkill
- release-engineeringSkill
- reusable-componentsSkill
- supply-chain-securitySkill
- testing-qualitySkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
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 10
Use this skill when:
- Very specific: line 20
Git Tracking & Ignore Files: Verify .env, .env.local, *.pem, *.key, id_rsa are in .gitignore.
- Very specific: line 22
Frontend Source Bundles: Check frontend code to ensure no secret API keys (e.g.
- Very specific: line 111
NEVER commit a real
.envfile to version control: Keep .env strictly git-ignored. - Distinctive: line 114
NEVER bypass security checks to pass tests: Do not disable authentication middleware or CSRF tokens in production configurations.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Security & Secrets Skill
1. When Should I Use This?
Use this skill when:
- Handling authentication, API tokens, database connection strings, passwords, or encryption keys.
- Creating or updating
.env,.env.example, or configuration loaders. - Auditing codebases and git history for accidentally leaked credentials.
- Hardening API endpoints against OWASP Top 10 vulnerabilities (Injection, broken auth, CORS, sensitive data exposure).
2. What Should I Inspect First?
- Git Tracking & Ignore Files: Verify
.env,.env.local,*.pem,*.key,id_rsaare in.gitignore. - Environment Variable Loaders: Inspect
app/core/config.pyto ensure credentials are parsed via strongly-typed settings (e.g. PydanticBaseSettings) without fallback to default hardcoded plaintext passwords. - Frontend Source Bundles: Check frontend code to ensure no secret API keys (e.g. database admin keys, payment secret keys) are prefixed with
VITE_or embedded in client JS bundles.
3. What Workflow Should I Follow?
Audit Secrets in Environment (.env vs .env.example)
↓
Ensure Clean Pydantic Settings Validation
↓
Audit Git Staged Changes (git diff --cached)
↓
Run Secret Scanning (Detect-secrets / Gitleaks patterns)
↓
Verify CORS, Rate Limiting & Auth Header Handling
↓
Verify Secure Password Hashing (Argon2 / Bcrypt)Secure Configuration Pattern (app/core/config.py)
from pydantic_settings import BaseSettings, SettingsConfigDict
from pydantic import SecretStr, field_validator
class Settings(BaseSettings):
ENVIRONMENT: str = "development"
DATABASE_URL: SecretStr
JWT_SECRET_KEY: SecretStr
JWT_ALGORITHM: str = "HS256"
ACCESS_TOKEN_EXPIRE_MINUTES: int = 60
CORS_ORIGINS: list[str] = ["http://localhost:3000", "http://localhost:5173"]
model_config = SettingsConfigDict(
env_file=".env",
env_file_encoding="utf-8",
extra="ignore"
)
@field_validator("DATABASE_URL", mode="after")
@classmethod
def validate_db_url(cls, v: SecretStr) -> SecretStr:
url_str = v.get_secret_value()
if not url_str.startswith(("postgresql://", "postgresql+asyncpg://", "sqlite://")):
raise ValueError("DATABASE_URL must be a valid PostgreSQL or SQLite connection string.")
return v
settings = Settings()Standard Sanitized .env.example
# Environment Configuration Template
ENVIRONMENT=development
PORT=8000
# Database Credentials (replace with real credentials in .env)
DATABASE_URL=postgresql://postgres:your_secure_password@localhost:5432/app_db
# Security & Authentication
JWT_SECRET_KEY=generate_with_openssl_rand_hex_32
JWT_ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=60
# External AI / LLM APIs
OPENAI_API_KEY=sk-placeholder-do-not-commit-real-key
OLLAMA_BASE_URL=http://localhost:11434
# CORS Allowed Origins (Comma-separated)
CORS_ORIGINS=http://localhost:3000,http://localhost:51734. What Decisions Should I Make?
| Security Area | Mandatory Rule |
| Password Storage | Use bcrypt or argon2-cffi. Never use MD5, SHA-1, or plain SHA-256 for password hashing. |
| Secrets in Memory | Use Pydantic SecretStr to prevent secrets from leaking in string representations, error logs, or JSON dumps. |
| CORS Origins | Never use allow_origins=["*"] when allow_credentials=True in production. Always specify exact domains. |
| SQL Injection | Always use parameterized queries (ORM models or prepared statements). Never concatenate raw strings into SQL queries. |
5. What Should I Avoid?
- NEVER commit a real
.envfile to version control: Keep.envstrictly git-ignored. - NEVER output secret values in error messages or logs: Redact tokens from exception handlers.
- NEVER expose private API keys in client-side code: Any key inside a React/Vite frontend is public and readable by users.
- NEVER bypass security checks to pass tests: Do not disable authentication middleware or CSRF tokens in production configurations.
6. How Should I Verify Success?
# 1. Check for tracked .env files in git (Cross-Platform)
python -c "import subprocess; files = subprocess.check_output(['git', 'ls-files'], text=True).splitlines(); tracked = [f for f in files if f.endswith('.env')]; assert not tracked, f'CRITICAL: .env files tracked in git: {tracked}'; print('Git ignore check passed: No .env tracked.')"
# 2. Search codebase for accidental hardcoded secret patterns
python -c "
import os, re
pattern = re.compile(r'(sk-[a-zA-Z0-9]{20,}|AIza[0-9A-Za-z-_]{35}|ghp_[a-zA-Z0-9]{36})')
found = False
for root, _, files in os.walk('.'):
if any(p in root for p in ['.git', '.venv', 'node_modules']): continue
for f in files:
if f.endswith(('.py', '.js', '.ts', '.tsx', '.json', '.yaml', '.yml', '.env.example')):
content = open(os.path.join(root, f), errors='ignore').read()
if pattern.search(content):
print(f'ALERT: Potential secret found in {os.path.join(root, f)}')
found = True
if not found: print('Secret scan clean!')
"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.

