

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
12345# Baseline Security Rules67## Overview8These security rules are MANDATORY cross-cutting constraints that apply across all AI-DLC phases. They are not optional guidance — they are hard constraints that stages MUST enforce when generating questions, producing design artifacts, generating code, and presenting completion messages.910**Enforcement**: At each applicable stage, the model MUST verify compliance with these rules before presenting the stage completion message to the user.1112### Blocking Security Finding Behavior13A **blocking security finding** means:141. The finding MUST be listed in the stage completion message under a "Security Findings" section with the SECURITY rule ID and description152. The stage MUST NOT present the "Continue to Next Stage" option until all blocking findings are resolved163. The model MUST present only the "Request Changes" option with a clear explanation of what needs to change174. The finding MUST be logged in `aidlc-docs/audit.md` with the SECURITY rule ID, description, and stage context1819If a SECURITY rule is not applicable to the current project (e.g., SECURITY-01 when no data stores exist), mark it as **N/A** in the compliance summary — this is not a blocking finding.2021### Default Enforcement22All rules in this document are **blocking** by default. If any rule's verification criteria are not met, it is a blocking security finding — follow the blocking finding behavior defined above.2324### Verification Criteria Format25Verification items in this document are plain bullet points describing compliance checks. They are distinct from the `- [ ]` / `- [x]` progress-tracking checkboxes used in stage plan files. Each item should be evaluated as compliant or non-compliant during review.2627---2829## Rule SECURITY-01: Encryption at Rest and in Transit3031**Rule**: Every data persistence store (databases, object storage, file systems, caches, or any equivalent) MUST have:32- Encryption at rest enabled using a managed key service or customer-managed keys33- Encryption in transit enforced (TLS 1.2+ for all data movement in and out of the store)3435**Verification**:36- No storage resource is defined without an encryption configuration block37- No database connection string uses an unencrypted protocol38- Object storage enforces encryption at rest and rejects non-TLS requests via policy39- Database instances have storage encryption enabled and enforce TLS connections4041---4243## Rule SECURITY-02: Access Logging on Network Intermediaries4445**Rule**: Every network-facing intermediary that handles external traffic MUST have access logging enabled. This includes:46- Load balancers → access logs to a persistent store47- API gateways → execution logging and access logging to a centralized log service48- CDN distributions → standard logging or real-time logs4950**Verification**:51- No load balancer resource is defined without access logging enabled52- No API gateway stage is defined without access logging configured53- No CDN distribution is defined without logging configuration5455---5657## Rule SECURITY-03: Application-Level Logging5859**Rule**: Every deployed application component MUST include structured logging infrastructure:60- A logging framework MUST be configured61- Log output MUST be directed to a centralized log service62- Logs MUST include: timestamp, correlation/request ID, log level, and message63- Sensitive data (passwords, tokens, PII) MUST NOT appear in log output6465**Verification**:66- Every service/function entry point includes a configured logger67- No ad-hoc logging statements used as the primary logging mechanism in production code68- Log configuration routes output to a centralized log service69- No secrets, tokens, or PII are logged7071---7273## Rule SECURITY-04: HTTP Security Headers for Web Applications7475**Rule**: The following HTTP response headers MUST be set on all HTML-serving endpoints:7677| Header | Required Value |78|---|---|79| `Content-Security-Policy` | Define a restrictive policy (at minimum: `default-src 'self'`) |80| `Strict-Transport-Security` | `max-age=31536000; includeSubDomains` |81| `X-Content-Type-Options` | `nosniff` |82| `X-Frame-Options` | `DENY` (or `SAMEORIGIN` if framing is required) |83| `Referrer-Policy` | `strict-origin-when-cross-origin` |8485**Note**: `X-XSS-Protection` is deprecated in modern browsers. Use `Content-Security-Policy` instead.8687**Verification**:88- Middleware or response interceptor sets all required headers89- CSP policy does not use `unsafe-inline` or `unsafe-eval` without documented justification90- HSTS max-age is at least 31536000 (1 year)9192---9394## Rule SECURITY-05: Input Validation on All API Parameters9596**Rule**: Every API endpoint (REST, GraphQL, gRPC, WebSocket) MUST validate all input parameters before processing. Validation MUST include:97- **Type checking**: Reject unexpected types98- **Length/size bounds**: Enforce maximum lengths on strings, maximum sizes on arrays and payloads99- **Format validation**: Use allowlists (regex or schema) for structured inputs (emails, dates, IDs)100- **Sanitization**: Escape or reject HTML/script content in user-supplied strings to prevent XSS101- **Injection prevention**: Use parameterized queries for all database operations (never string concatenation)102103**Verification**:104- Every API handler uses a validation library or schema105- No raw user input is concatenated into SQL, NoSQL, or OS commands106- String inputs have explicit max-length constraints107- Request body size limits are configured at the framework or gateway level108109---110111## Rule SECURITY-06: Least-Privilege Access Policies112113**Rule**: Every identity and access management policy, role, or permission boundary MUST follow least privilege:114- Use specific resource identifiers — NEVER use wildcard resources unless the API does not support resource-level permissions (document the exception)115- Use specific actions — NEVER use wildcard actions116- Scope conditions where possible117- Separate read and write permissions into distinct policy statements118119**Verification**:120- No policy contains wildcard actions or wildcard resources without a documented exception121- No service role has broader permissions than what the service actually calls122- Inline policies are avoided in favor of managed policies where possible123- Every role has a trust policy scoped to the specific service or account124125---126127## Rule SECURITY-07: Restrictive Network Configuration128129**Rule**: All network configurations (security groups, network ACLs, route tables) MUST follow deny-by-default:130- Firewall rules: Only open specific ports required by the application131- No inbound rule with source `0.0.0.0/0` except for public-facing load balancers on ports 80/443132- No outbound rule with `0.0.0.0/0` on all ports unless explicitly justified133- Private subnets MUST NOT have direct internet gateway routes134- Use private endpoints for cloud service access where available135136**Verification**:137- No firewall rule allows inbound `0.0.0.0/0` on any port other than 80/443 on a public load balancer138- Database and application firewall rules restrict source to specific CIDR blocks or security group references139- Private subnets route through a NAT gateway (not an internet gateway)140- Private endpoints are used for high-traffic cloud service calls141142---143144## Rule SECURITY-08: Application-Level Access Control145146**Rule**: Every application endpoint that accesses or mutates a resource MUST enforce authorization checks at the application layer:147- **Deny by default**: All routes/endpoints MUST require authentication unless explicitly marked as public148- **Object-level authorization**: Every request that references a resource by ID MUST verify the requesting user/principal owns or has permission to access that resource (prevent IDOR)149- **Function-level authorization**: Administrative or privileged operations MUST check the caller's role/permissions server-side — never rely on client-side hiding150- **CORS policy**: Cross-origin resource sharing MUST be restricted to explicitly allowed origins — never use `Access-Control-Allow-Origin: *` on authenticated endpoints151- **Token validation**: JWTs or session tokens MUST be validated server-side on every request (signature, expiration, audience, issuer)152153**Verification**:154- Every controller/handler has an authorization middleware or guard applied155- No endpoint returns data for a resource ID without verifying the caller's ownership or permission156- Admin/privileged routes have explicit role checks enforced server-side157- CORS configuration does not use wildcard origins on authenticated endpoints158- Token validation occurs server-side on every request (not just at login)159160---161162## Rule SECURITY-09: Security Hardening and Misconfiguration Prevention163164**Rule**: All deployed components MUST follow a hardening baseline:165- **No default credentials**: Default usernames/passwords MUST be changed or disabled before deployment166- **Minimal installation**: Remove or disable unused features, frameworks, sample applications, and documentation endpoints167- **Error handling**: Production error responses MUST NOT expose stack traces, internal paths, framework versions, or database details to end users168- **Directory listing**: Web servers MUST disable directory listing169- **Cloud storage**: Cloud object storage MUST block public access unless explicitly required and documented170- **Patch management**: Runtime environments, frameworks, and OS images MUST use current, supported versions171172**Verification**:173- No default credentials exist in configuration files, environment variables, or IaC templates174- Error responses in production return generic messages (no stack traces or internal details)175- Cloud object storage has public access blocked unless a documented exception exists176- No sample/demo applications or default pages are deployed177- Framework and runtime versions are current and supported178179180---181182## Rule SECURITY-10: Software Supply Chain Security183184**Rule**: Every project MUST manage its software supply chain:185- **Dependency pinning**: All dependencies MUST use exact versions or lock files186- **Vulnerability scanning**: A dependency vulnerability scanner MUST be configured187- **No unused dependencies**: Remove packages that are not actively used188- **Trusted sources only**: Dependencies MUST be pulled from official registries or verified private registries — no unvetted third-party sources189- **SBOM**: Projects MUST generate a Software Bill of Materials for production deployments190- **CI/CD integrity**: Build pipelines MUST use pinned tool versions and verified base images — no `latest` tags in production Dockerfiles or CI configurations191192**Verification**:193- A lock file exists and is committed to version control194- A dependency vulnerability scanning step is included in CI/CD or documented in build instructions195- No unused or abandoned dependencies are included196- Dockerfiles and CI configs do not use `latest` or unpinned image tags for production197- Dependencies are sourced from official or verified registries198199---200201## Rule SECURITY-11: Secure Design Principles202203**Rule**: Application design MUST incorporate security from the start:204- **Separation of concerns**: Security-critical logic (authentication, authorization, payment processing) MUST be isolated in dedicated modules — not scattered across the codebase205- **Defense in depth**: No single control should be the sole line of defense — layer controls (validation + authorization + encryption)206- **Rate limiting**: Public-facing endpoints MUST implement rate limiting or throttling to prevent abuse207- **Business logic abuse**: Design MUST consider misuse cases — not just happy-path scenarios208209**Verification**:210- Security-critical logic is encapsulated in dedicated modules or services211- Rate limiting is configured on public-facing APIs212- Design documentation addresses at least one misuse/abuse scenario213214---215216## Rule SECURITY-12: Authentication and Credential Management217218**Rule**: Every application with user authentication MUST implement:219- **Password policy**: Minimum 8 characters, check against breached password lists220- **Credential storage**: Passwords MUST be hashed using adaptive algorithms — never weak or non-adaptive hashing221- **Multi-factor authentication**: MFA MUST be supported for administrative accounts and SHOULD be available for all users222- **Session management**: Sessions MUST have server-side expiration, be invalidated on logout, and use secure/httpOnly/sameSite cookie attributes223- **Brute-force protection**: Login endpoints MUST implement account lockout, progressive delays, or CAPTCHA after repeated failures224- **No hardcoded credentials**: No passwords, API keys, or secrets in source code or IaC templates — use a secrets manager225226**Verification**:227- Password hashing uses adaptive algorithms (not weak or non-adaptive hashing)228- Session cookies set `Secure`, `HttpOnly`, and `SameSite` attributes229- Login endpoints have brute-force protection (lockout, delay, or CAPTCHA)230- No hardcoded credentials in source code or configuration files231- MFA is supported for admin accounts232- Sessions are invalidated on logout and have a defined expiration233234---235236## Rule SECURITY-13: Software and Data Integrity Verification237238**Rule**: Systems MUST verify the integrity of software and data:239- **Deserialization safety**: Untrusted data MUST NOT be deserialized without validation — use safe deserialization libraries or allowlists of permitted types240- **Artifact integrity**: Downloaded dependencies, plugins, and updates MUST be verified via checksums or digital signatures241- **CI/CD pipeline security**: Build pipelines MUST restrict who can modify pipeline definitions — separate duties between code authors and deployment approvers242- **CDN and external resources**: Scripts or resources loaded from external CDNs MUST use Subresource Integrity (SRI) hashes243- **Data integrity**: Critical data modifications MUST be auditable (who changed what, when)244245**Verification**:246- No unsafe deserialization of untrusted input247- External scripts include SRI integrity attributes when loaded from CDNs248- CI/CD pipeline definitions are access-controlled and changes are auditable249- Critical data changes are logged with actor, timestamp, and before/after values250251---252253## Rule SECURITY-14: Alerting and Monitoring254255**Rule**: In addition to logging (SECURITY-02, SECURITY-03), systems MUST include:256- **Security event alerting**: Alerts MUST be configured for high-value security events: repeated authentication failures, privilege escalation attempts, access from unusual locations, and authorization failures257- **Log integrity**: Logs MUST be stored in append-only or tamper-evident storage — application code MUST NOT be able to delete or modify its own audit logs258- **Log retention**: Logs MUST be retained for a minimum period appropriate to the application's compliance requirements (default: 90 days minimum)259- **Monitoring dashboards**: A monitoring dashboard or alarm configuration MUST be defined for key operational and security metrics260261**Verification**:262- Alerting is configured for authentication failures and authorization violations263- Application log groups have retention policies set (minimum 90 days)264- Application roles do not have permission to delete their own log groups/streams265- Security-relevant events (login failures, access denied, privilege changes) generate alerts266267---268269## Rule SECURITY-15: Exception Handling and Fail-Safe Defaults270271**Rule**: Every application MUST handle exceptional conditions safely:272- **Catch and handle**: All external calls (database, API, file I/O) MUST have explicit error handling — no unhandled promise rejections or uncaught exceptions in production273- **Fail closed**: On error, the system MUST deny access or halt the operation — never fail open274- **Resource cleanup**: Error paths MUST release resources (connections, file handles, locks) — use try/finally, using statements, or equivalent patterns275- **User-facing errors**: Error messages shown to users MUST be generic — no internal details or system information276- **Global error handler**: Applications MUST have a global/top-level error handler that catches unhandled exceptions, logs them (per SECURITY-03), and returns a safe response277278**Verification**:279- All external calls (DB, HTTP, file I/O) have explicit error handling (try/catch, .catch(), error callbacks)280- A global error handler is configured at the application entry point281- Error paths do not bypass authorization or validation checks (fail closed)282- Resources are cleaned up in error paths (connections closed, transactions rolled back)283- No unhandled promise rejections or uncaught exception warnings in application code284285---286287## Enforcement Integration288289These rules are cross-cutting constraints that apply to every AI-DLC stage. At each stage:290- Evaluate all SECURITY rule verification criteria against the artifacts produced291- Include a "Security Compliance" section in the stage completion summary listing each rule as compliant, non-compliant, or N/A292- If any rule is non-compliant, this is a blocking security finding — follow the blocking finding behavior defined in the Overview293- Include security rule references in design documentation and test instructions294295---296297## Appendix: OWASP Reference Mapping298299<!-- TODO: CRITICAL - This entire OWASP mapping table needs verification. The "2025" edition may not exist; the latest published OWASP Top 10 is 2021. Category IDs (A01-A10), numbering, and names must be validated against the actual published standard before relying on this mapping. -->300For human reviewers, the following maps SECURITY rules to OWASP Top 10 (2025) categories:301302| SECURITY Rule | OWASP Category |303|---|---|304| SECURITY-08 | A01:2025 – Broken Access Control |305| SECURITY-09 | A02:2025 – Security Misconfiguration |306| SECURITY-10 | A03:2025 – Software Supply Chain Failures |307| SECURITY-11 | A06:2025 – Insecure Design |308| SECURITY-12 | A07:2025 – Authentication Failures |309| SECURITY-13 | A08:2025 – Software or Data Integrity Failures |310| SECURITY-14 | A09:2025 – Logging & Alerting Failures |311| SECURITY-15 | A10:2025 – Mishandling of Exceptional Conditions |312
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 |
|---|---|---|---|---|---|
| nota-america/forgecat-agent-profilesprofiles/addyosmani/agent-skills/for-cursor/.cursor/rules/cmd-build.mdc · 51 | Cursor rules | no sections | 16/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/addyosmani/agent-skills/for-cursor/.cursor/rules/cmd-code-simplify.mdc · 51 | Cursor rules | testing-strategy | 30/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/addyosmani/agent-skills/for-cursor/.cursor/rules/cmd-plan.mdc · 51 | Cursor rules | no sections | 16/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/addyosmani/agent-skills/for-cursor/.cursor/rules/cmd-review.mdc · 51 | Cursor rules | no sections | 16/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/addyosmani/agent-skills/for-cursor/.cursor/rules/cmd-ship.mdc · 51 | Cursor rules | testing-strategygitdeploymentdo-not | 61/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/addyosmani/agent-skills/for-cursor/.cursor/rules/cmd-spec.mdc · 51 | Cursor rules | no sections | 16/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/addyosmani/agent-skills/for-cursor/.cursor/rules/cmd-test.mdc · 51 | Cursor rules | no sections | 16/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/addyosmani/agent-skills/for-forgecat/AGENTS.md · 51 | AGENTS.md | lint-formatstylearchdo-not | 73/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/addyosmani/agent-skills/for-forgecat/CLAUDE.md · 51 | CLAUDE.md | teststylearchagent-behaviour | 70/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-code/anthropics_claude-code_ralph-wiggum/for-cursor/.cursor/rules/cmd-cancel-ralph.mdc · 51 | Cursor rules | no sections | 16/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-code/anthropics_claude-code_ralph-wiggum/for-cursor/.cursor/rules/cmd-help.mdc · 51 | Cursor rules | no sections | 54/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-code/anthropics_claude-code_ralph-wiggum/for-cursor/.cursor/rules/cmd-ralph-loop.mdc · 51 | Cursor rules | no sections | 22/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_agent-sdk-dev/for-cursor/.cursor/rules/cmd-new-sdk-app.mdc · 51 | Cursor rules | setupstylearchdocs | 76/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_claude-md-management/for-cursor/.cursor/rules/cmd-revise-claude-md.mdc · 51 | Cursor rules | agent-behaviour | 50/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_code-review/for-cursor/.cursor/rules/cmd-code-review.mdc · 51 | Cursor rules | testing-strategygit | 35/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_commit-commands/for-cursor/.cursor/rules/cmd-clean_gone.mdc · 51 | Cursor rules | no sections | 60/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_commit-commands/for-cursor/.cursor/rules/cmd-commit-push-pr.mdc · 51 | Cursor rules | stylegit | 44/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_commit-commands/for-cursor/.cursor/rules/cmd-commit.mdc · 51 | Cursor rules | style | 44/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_example-plugin/for-cursor/.cursor/rules/cmd-example-command.mdc · 51 | Cursor rules | lint-formatstyleagent-behaviour | 58/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_feature-dev/for-cursor/.cursor/rules/cmd-feature-dev.mdc · 51 | Cursor rules | stylearchgit | 56/100 | today |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 46 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 14 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| bybren-llc/safe-agentic-workflow.cursor/rules/10-backend-python.mdc · 399 | Cursor rules | testlint-formatstylegit+4 | 97/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/nota-america-forgecat-agent-profiles-profiles-awslabs-aidlc-workflows-for-cursor-cursor-rules-rule-security-baseline)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.