

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
12345678910# Security Audit & Threat Modeling Protocol1112## Objective1314Guide Cline to perform thorough, structured security assessments of codebases. This goes beyond the surface-level checks in code review — it provides a repeatable methodology for identifying vulnerabilities, assessing risk, and producing actionable remediation plans.1516---1718## When to Activate1920This protocol activates when the user requests:21- A security audit or review22- Threat modeling for a feature or system23- Dependency vulnerability analysis24- Pre-deployment security checks25- Compliance-related code assessment2627---2829## 1. Security Audit Process3031### Phase 1: Reconnaissance3233Before analyzing code, gather context:34351. **Identify the attack surface** — What is exposed? (APIs, user inputs, file uploads, auth endpoints, admin panels)362. **Identify trust boundaries** — Where does data cross from untrusted to trusted zones?373. **Identify sensitive data** — PII, credentials, tokens, financial data, health records384. **Identify dependencies** — Third-party libraries, external services, infrastructure3940### Phase 2: Systematic Analysis4142Analyze the codebase against these categories, ordered by typical severity:4344#### A. Injection Flaws (OWASP A03)45- SQL injection via string concatenation or unsanitized ORM inputs46- Command injection via `exec`, `system`, `child_process`, or `subprocess`47- LDAP, XPath, NoSQL injection vectors48- Template injection in server-side rendering4950**What to check:**51```52- [ ] All database queries use parameterized statements or prepared queries53- [ ] No user input is passed directly to shell commands54- [ ] Template engines have auto-escaping enabled55- [ ] ORM queries do not interpolate raw user input56```5758#### B. Authentication & Session Management (OWASP A07)59- Password storage (must use bcrypt, scrypt, or argon2 — never MD5/SHA1 alone)60- Session token generation (must be cryptographically random)61- Token expiration and rotation policies62- Multi-factor authentication implementation63- Account lockout and brute-force protection6465**What to check:**66```67- [ ] Passwords hashed with a modern, salted algorithm68- [ ] Session tokens are not predictable69- [ ] JWT secrets are not hardcoded and tokens have expiration70- [ ] Failed login attempts are rate-limited71- [ ] Password reset flows do not leak user existence72```7374#### C. Authorization & Access Control (OWASP A01)75- Broken access control (IDOR — insecure direct object references)76- Missing function-level access checks77- Privilege escalation paths78- CORS misconfiguration7980**What to check:**81```82- [ ] Every endpoint enforces authorization, not just authentication83- [ ] Object-level access checks prevent users from accessing other users' data84- [ ] Admin functions are not accessible by manipulating client-side state85- [ ] CORS allows only expected origins86```8788#### D. Sensitive Data Exposure (OWASP A02)89- Secrets in source code (API keys, passwords, tokens)90- Sensitive data in logs91- Missing encryption for data at rest or in transit92- Overly verbose error messages leaking internals9394**What to check:**95```96- [ ] No secrets or credentials in source files or config committed to git97- [ ] Sensitive fields are excluded from logs and error responses98- [ ] HTTPS is enforced; no mixed content99- [ ] Database connections use TLS100- [ ] Error responses do not expose stack traces or internal paths101```102103#### E. Cross-Site Scripting — XSS (OWASP A03)104- Reflected XSS via URL parameters rendered without escaping105- Stored XSS via database content rendered in HTML106- DOM-based XSS via client-side JavaScript107108**What to check:**109```110- [ ] All user-generated content is escaped before rendering111- [ ] Content-Security-Policy headers are configured112- [ ] innerHTML is not used with untrusted data113- [ ] Rich text inputs use a sanitization library (e.g., DOMPurify)114```115116#### F. Dependency Vulnerabilities (OWASP A06)117- Known CVEs in direct and transitive dependencies118- Outdated packages with security patches available119- Typosquatting or supply chain risks120121**What to check:**122```123- [ ] `npm audit` / `pip audit` / `dotnet list package --vulnerable` has been run124- [ ] No dependencies with known critical/high CVEs125- [ ] Lock files are committed and reviewed126- [ ] Dependency update process exists127```128129### Phase 3: Secrets Detection130131Scan for accidentally committed secrets:132133**Patterns to search for:**134- API keys: `(api[_-]?key|apikey)\s*[:=]\s*['"][A-Za-z0-9]`135- AWS keys: `AKIA[0-9A-Z]{16}`136- Generic secrets: `(password|secret|token)\s*[:=]\s*['"][^'"]+`137- Private keys: `-----BEGIN (RSA |EC |)PRIVATE KEY-----`138- Connection strings: `(mongodb|postgres|mysql|redis):\/\/[^\s]+`139140**MUST** use `search_files` to scan the codebase for these patterns when performing a security audit.141142---143144## 2. Threat Modeling (STRIDE)145146When asked to threat-model a feature or system, apply the STRIDE framework:147148| Threat | Question | Example |149|--------|----------|---------|150| **S**poofing | Can someone pretend to be another user or system? | Forged JWT, session hijacking |151| **T**ampering | Can someone modify data they should not? | URL parameter manipulation, unsigned API payloads |152| **R**epudiation | Can someone deny an action they took? | Missing audit logs for admin actions |153| **I**nformation Disclosure | Can someone access data they should not see? | IDOR, verbose errors, exposed .env files |154| **D**enial of Service | Can someone make the system unavailable? | Unbounded queries, missing rate limits, regex DoS |155| **E**levation of Privilege | Can someone gain higher access than intended? | Missing role checks, JWT claim manipulation |156157**Output format:** Present findings as a table mapping each threat to specific code locations and recommended mitigations.158159---160161## 3. Output Format162163Present audit findings grouped by severity:164165**CRITICAL** — Exploitable now, data loss or breach risk166- Must be fixed before deployment167168**HIGH** — Likely exploitable with moderate effort169- Should be fixed in the current sprint170171**MEDIUM** — Exploitable under specific conditions172- Should be tracked and scheduled173174**LOW** — Defense-in-depth improvements175- Nice to have, fix opportunistically176177For each finding:1781. **Location** — File and line/section1792. **Vulnerability** — What the issue is1803. **Risk** — What could happen if exploited1814. **Remediation** — Specific fix with code example when possible1825. **Reference** — OWASP or CWE identifier if applicable183184End with an executive summary: total findings by severity, top 3 priorities, and overall security posture assessment.185186---187188## 4. Pre-Completion Security Checklist189190Before `attempt_completion` on any security-related task:191192- [ ] All OWASP Top 10 categories have been evaluated193- [ ] Secrets scan has been performed194- [ ] Findings are categorized by severity195- [ ] Each finding has a concrete remediation196- [ ] Executive summary is included197198<!--199Enterprise Considerations:200- Organizational security policy templates aligned to SOC2, HIPAA, PCI-DSS201- Centralized vulnerability tracking and trend analysis across repositories202- Automated audit trail generation for compliance evidence packages203- Admin-configurable severity thresholds that block deployments204- Integration with enterprise SIEM and vulnerability management platforms205-->206
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| cline/prompts.clinerules/ai-dlc-adaptive-workflow.md · 1.2k | Cline rules | agent-behaviour | 54/100 | today | |
| cline/prompts.clinerules/audio-plugin-developer.md · 1.2k | Cline rules | styleperformancedo-notagent-behaviour | 57/100 | today | |
| cline/prompts.clinerules/ba.md · 1.2k | Cline rules | archgitagent-behaviour | 50/100 | today | |
| cline/prompts.clinerules/baby-steps.md · 1.2k | Cline rules | do-notagent-behaviour | 50/100 | today | |
| cline/prompts.clinerules/c#-guide.md · 1.2k | Cline rules | style | 27/100 | today | |
| cline/prompts.clinerules/claude-code-subagents.md · 1.2k | Cline rules | testarchdo-notagent-behaviour | 77/100 | today | |
| cline/prompts.clinerules/cline-architecture.md · 1.2k | Cline rules | archtypesapi | 54/100 | today | |
| cline/prompts.clinerules/cline-continuous-improvement-protocol.md · 1.2k | Cline rules | testgitperformance | 58/100 | today | |
| cline/prompts.clinerules/cline-for-research.md · 1.2k | Cline rules | agent-behaviour | 34/100 | today | |
| cline/prompts.clinerules/cline-for-slides.md · 1.2k | Cline rules | setupbuildstylearch+1 | 86/100 | today | |
| cline/prompts.clinerules/cline-for-webdev-ui.md · 1.2k | Cline rules | archagent-behaviour | 58/100 | today | |
| cline/prompts.clinerules/code-review.md · 1.2k | Cline rules | lint-formatgitsecurityperformance | 48/100 | today | |
| cline/prompts.clinerules/codebase-onboarding.md · 1.2k | Cline rules | lint-formatstylearchdependencies | 56/100 | today | |
| cline/prompts.clinerules/comprehensive-slide-dev-guide.md · 1.2k | Cline rules | buildarchtypesui | 62/100 | today | |
| cline/prompts.clinerules/create-documentation.md · 1.2k | Cline rules | apidocs | 44/100 | today | |
| cline/prompts.clinerules/gemini-comprehensive-software-engineering-guide.md · 1.2k | Cline rules | buildstyletesting-strategysecurity+4 | 36/100 | today | |
| cline/prompts.clinerules/general-development-rules.md · 1.2k | Cline rules | stylegitdeploymentdo-not | 73/100 | today | |
| cline/prompts.clinerules/google-apps-script-developer.md · 1.2k | Cline rules | setupstylegitsecurity+3 | 66/100 | today | |
| cline/prompts.clinerules/helm-chart-developer.md · 1.2k | Cline rules | setuplint-formatstylearch+6 | 81/100 | today | |
| cline/prompts.clinerules/mcp-development-protocol.md · 1.2k | Cline rules | setupteststyle | 73/100 | today |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/cline-prompts-clinerules-security-audit)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.