heimdall-agent 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +398 -2
- package/agents/code-sentinel.md +46 -0
- package/agents/database-architect.md +32 -0
- package/agents/frontend-designer.md +42 -0
- package/agents/mobile-designer.md +32 -0
- package/agents/orchestrator.md +93 -0
- package/agents/reviewer.md +82 -0
- package/agents/security-auditor.md +38 -0
- package/agents/tester.md +100 -0
- package/commands/grill-me.md +10 -0
- package/commands/orchestrate.md +21 -0
- package/commands/orchestrator.md +21 -0
- package/commands/plan.md +14 -0
- package/config/agents.json +165 -0
- package/config/models.json +105 -0
- package/config/profiles.json +88 -0
- package/config/skills.json +573 -0
- package/docs/SKILLS.md +282 -0
- package/doctrine/AGENTS.md +92 -0
- package/hooks/git/pre-push +26 -0
- package/hooks/heimdall-hook.cjs +152 -0
- package/hooks/hooks.json +47 -0
- package/package.json +54 -4
- package/playbooks/01-interactive-grilling-gate.md +41 -0
- package/playbooks/02-fast-code-deep-verification.md +31 -0
- package/playbooks/03-adversarial-code-review.md +56 -0
- package/playbooks/04-design-system-and-taste.md +27 -0
- package/playbooks/05-canonical-plan-template.md +90 -0
- package/playbooks/06-model-registry-matrix.md +72 -0
- package/setup.mjs +1764 -0
- package/skills/antislop/SKILL.md +680 -0
- package/skills/antislop-code/SKILL.md +128 -0
- package/skills/antislop-copywriting/SKILL.md +372 -0
- package/skills/antislop-human/SKILL.md +147 -0
- package/skills/antislop-human/contrast-check.py +165 -0
- package/skills/antislop-human/contrast-mcp.py +118 -0
- package/skills/antislop-layoutmobile/SKILL.md +170 -0
- package/skills/antislop-ui/SKILL.md +304 -0
- package/skills/brainstorming/SKILL.md +285 -0
- package/skills/brainstorming/scripts/frame-template.html +213 -0
- package/skills/brainstorming/scripts/helper.js +167 -0
- package/skills/brainstorming/scripts/server.cjs +723 -0
- package/skills/brainstorming/scripts/start-server.sh +209 -0
- package/skills/brainstorming/scripts/stop-server.sh +120 -0
- package/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/skills/brainstorming/visual-companion.md +299 -0
- package/skills/brandkit/SKILL.md +798 -0
- package/skills/brutalist-skill/SKILL.md +92 -0
- package/skills/caveman/SKILL.md +54 -0
- package/skills/claude-collaborator/SKILL.md +73 -0
- package/skills/cloudflare-security-audit/AI-AND-LLM.md +83 -0
- package/skills/cloudflare-security-audit/ATTACK-CLASSES.md +130 -0
- package/skills/cloudflare-security-audit/CLIENT-SIDE.md +83 -0
- package/skills/cloudflare-security-audit/CLOUD-AND-DEPLOYMENT.md +86 -0
- package/skills/cloudflare-security-audit/DATA-ISOLATION-AND-LIFECYCLE.md +84 -0
- package/skills/cloudflare-security-audit/DESKTOP-MOBILE-AND-LOCAL-IPC.md +89 -0
- package/skills/cloudflare-security-audit/HUNTING.md +251 -0
- package/skills/cloudflare-security-audit/LICENSE +21 -0
- package/skills/cloudflare-security-audit/MEMORY-SAFETY-AND-BINARY.md +101 -0
- package/skills/cloudflare-security-audit/PROTOCOLS-RPC-AND-MESSAGING.md +81 -0
- package/skills/cloudflare-security-audit/README.md +106 -0
- package/skills/cloudflare-security-audit/RECONNAISSANCE.md +156 -0
- package/skills/cloudflare-security-audit/RESOURCE-EXHAUSTION-AND-AVAILABILITY.md +78 -0
- package/skills/cloudflare-security-audit/SKILL.md +192 -0
- package/skills/cloudflare-security-audit/SUPPLY-CHAIN-AND-RELEASE.md +73 -0
- package/skills/cloudflare-security-audit/VALIDATION-AND-REPORTING.md +186 -0
- package/skills/cloudflare-security-audit/WEB-PROTOCOL-AND-AUTH.md +105 -0
- package/skills/cloudflare-security-audit/report-schema.json +461 -0
- package/skills/cloudflare-security-audit/validate-coverage-ledger.cjs +872 -0
- package/skills/cloudflare-security-audit/validate-coverage-ledger.test.cjs +740 -0
- package/skills/cloudflare-security-audit/validate-findings.cjs +773 -0
- package/skills/cloudflare-security-audit/validate-findings.test.cjs +652 -0
- package/skills/codex-collaborator/SKILL.md +86 -0
- package/skills/diagnosing-superpowers/SKILL.md +120 -0
- package/skills/diagnosing-superpowers/prompts/analyst-common.md +38 -0
- package/skills/diagnosing-superpowers/prompts/cost-and-time.md +28 -0
- package/skills/diagnosing-superpowers/prompts/plan-adherence.md +29 -0
- package/skills/diagnosing-superpowers/prompts/quality-evidence.md +26 -0
- package/skills/diagnosing-superpowers/prompts/repeated-work.md +30 -0
- package/skills/diagnosing-superpowers/prompts/request-conflicts.md +20 -0
- package/skills/diagnosing-superpowers/prompts/scrub-audit.md +33 -0
- package/skills/diagnosing-superpowers/prompts/scrub.md +29 -0
- package/skills/diagnosing-superpowers/prompts/similar-session.md +38 -0
- package/skills/diagnosing-superpowers/prompts/skill-timeline.md +30 -0
- package/skills/diagnosing-superpowers/prompts/stumbles.md +28 -0
- package/skills/diagnosing-superpowers/references/context-safety.md +22 -0
- package/skills/diagnosing-superpowers/references/github-issues.md +47 -0
- package/skills/diagnosing-superpowers/references/redaction-policy.md +34 -0
- package/skills/diagnosing-superpowers/references/session-discovery.md +31 -0
- package/skills/diagnosing-superpowers/templates/bundle-README.md +77 -0
- package/skills/diagnosing-superpowers/templates/case.md +64 -0
- package/skills/diagnosing-superpowers/templates/issue.md +51 -0
- package/skills/diagnosing-superpowers/templates/report.md +82 -0
- package/skills/dispatching-parallel-agents/SKILL.md +167 -0
- package/skills/executing-plans/SKILL.md +373 -0
- package/skills/executing-plans/scripts/task-done +52 -0
- package/skills/executing-plans/scripts/task-start +28 -0
- package/skills/finishing-a-development-branch/SKILL.md +225 -0
- package/skills/gemini-collaborator/SKILL.md +85 -0
- package/skills/gpt-tasteskill/SKILL.md +74 -0
- package/skills/image-to-code-skill/SKILL.md +1228 -0
- package/skills/imagegen-frontend-mobile/SKILL.md +1465 -0
- package/skills/imagegen-frontend-web/SKILL.md +987 -0
- package/skills/karpathy-guidelines/SKILL.md +67 -0
- package/skills/minimalist-skill/SKILL.md +85 -0
- package/skills/output-skill/SKILL.md +49 -0
- package/skills/owasp-security/SKILL.md +206 -0
- package/skills/owasp-security/reference/config-and-supply-chain.md +344 -0
- package/skills/owasp-security/reference/languages.md +372 -0
- package/skills/owasp-security/reference/owasp-report.md +1140 -0
- package/skills/owasp-security/reference/review-checklist.md +132 -0
- package/skills/ponytail/SKILL.md +68 -0
- package/skills/postgres-best-practices/SKILL.md +64 -0
- package/skills/postgres-best-practices/references/_contributing.md +170 -0
- package/skills/postgres-best-practices/references/_sections.md +39 -0
- package/skills/postgres-best-practices/references/_template.md +34 -0
- package/skills/postgres-best-practices/references/advanced-full-text-search.md +55 -0
- package/skills/postgres-best-practices/references/advanced-jsonb-indexing.md +49 -0
- package/skills/postgres-best-practices/references/conn-idle-timeout.md +46 -0
- package/skills/postgres-best-practices/references/conn-limits.md +44 -0
- package/skills/postgres-best-practices/references/conn-pooling.md +41 -0
- package/skills/postgres-best-practices/references/conn-prepared-statements.md +46 -0
- package/skills/postgres-best-practices/references/data-batch-inserts.md +54 -0
- package/skills/postgres-best-practices/references/data-n-plus-one.md +53 -0
- package/skills/postgres-best-practices/references/data-pagination.md +50 -0
- package/skills/postgres-best-practices/references/data-upsert.md +50 -0
- package/skills/postgres-best-practices/references/lock-advisory.md +56 -0
- package/skills/postgres-best-practices/references/lock-deadlock-prevention.md +68 -0
- package/skills/postgres-best-practices/references/lock-short-transactions.md +50 -0
- package/skills/postgres-best-practices/references/lock-skip-locked.md +54 -0
- package/skills/postgres-best-practices/references/monitor-explain-analyze.md +45 -0
- package/skills/postgres-best-practices/references/monitor-pg-stat-statements.md +55 -0
- package/skills/postgres-best-practices/references/monitor-vacuum-analyze.md +55 -0
- package/skills/postgres-best-practices/references/query-composite-indexes.md +44 -0
- package/skills/postgres-best-practices/references/query-covering-indexes.md +40 -0
- package/skills/postgres-best-practices/references/query-index-types.md +48 -0
- package/skills/postgres-best-practices/references/query-missing-indexes.md +43 -0
- package/skills/postgres-best-practices/references/query-partial-indexes.md +45 -0
- package/skills/postgres-best-practices/references/schema-constraints.md +80 -0
- package/skills/postgres-best-practices/references/schema-data-types.md +46 -0
- package/skills/postgres-best-practices/references/schema-foreign-key-indexes.md +59 -0
- package/skills/postgres-best-practices/references/schema-lowercase-identifiers.md +55 -0
- package/skills/postgres-best-practices/references/schema-partitioning.md +55 -0
- package/skills/postgres-best-practices/references/schema-primary-keys.md +61 -0
- package/skills/postgres-best-practices/references/security-privileges.md +54 -0
- package/skills/postgres-best-practices/references/security-rls-basics.md +50 -0
- package/skills/postgres-best-practices/references/security-rls-performance.md +63 -0
- package/skills/project-hygiene/SKILL.md +48 -0
- package/skills/receiving-code-review/SKILL.md +226 -0
- package/skills/redesign-skill/SKILL.md +178 -0
- package/skills/requesting-code-review/SKILL.md +124 -0
- package/skills/requesting-code-review/code-reviewer.md +198 -0
- package/skills/security-audit-sweep/SKILL.md +44 -0
- package/skills/snyk-agent-scan/SKILL.md +25 -0
- package/skills/soft-skill/SKILL.md +98 -0
- package/skills/stitch-skill/DESIGN.md +121 -0
- package/skills/stitch-skill/SKILL.md +184 -0
- package/skills/strix-security/SKILL.md +65 -0
- package/skills/subagent-driven-development/SKILL.md +568 -0
- package/skills/subagent-driven-development/adversarial-reviewer-prompt.md +18 -0
- package/skills/subagent-driven-development/designer-prompt.md +15 -0
- package/skills/subagent-driven-development/hygiene-checker-prompt.md +15 -0
- package/skills/subagent-driven-development/implementer-prompt.md +154 -0
- package/skills/subagent-driven-development/re-review-prompt.md +115 -0
- package/skills/subagent-driven-development/scripts/review-package +53 -0
- package/skills/subagent-driven-development/scripts/sdd-workspace +82 -0
- package/skills/subagent-driven-development/scripts/task-brief +43 -0
- package/skills/subagent-driven-development/security-auditor-prompt.md +15 -0
- package/skills/subagent-driven-development/task-reviewer-prompt.md +207 -0
- package/skills/subagent-driven-development/tester-prompt.md +17 -0
- package/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/skills/systematic-debugging/SKILL.md +306 -0
- package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/systematic-debugging/find-polluter.sh +72 -0
- package/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/skills/systematic-debugging/test-academic.md +14 -0
- package/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/skills/taste-skill/SKILL.md +1206 -0
- package/skills/taste-skill-v1/SKILL.md +226 -0
- package/skills/test-driven-development/SKILL.md +337 -0
- package/skills/test-driven-development/writing-good-tests.md +198 -0
- package/skills/trailofbits-audit-context/SKILL.md +72 -0
- package/skills/trailofbits-audit-context/agents/openai.yaml +6 -0
- package/skills/trailofbits-audit-context/assets/trail-of-bits-mark.svg +1 -0
- package/skills/trailofbits-audit-context/resources/ANALYSIS_FORMAT.md +68 -0
- package/skills/trailofbits-audit-context/resources/DOMAIN_NOTES.md +73 -0
- package/skills/trailofbits-audit-context/resources/FUNCTION_MICRO_ANALYSIS_EXAMPLE.md +174 -0
- package/skills/trailofbits-insecure-defaults/README.md +104 -0
- package/skills/trailofbits-insecure-defaults/SKILL.md +21 -0
- package/skills/trailofbits-insecure-defaults/references/debug-features.json +13 -0
- package/skills/trailofbits-insecure-defaults/references/debug-features.md +75 -0
- package/skills/trailofbits-insecure-defaults/references/default-credentials.json +12 -0
- package/skills/trailofbits-insecure-defaults/references/default-credentials.md +76 -0
- package/skills/trailofbits-insecure-defaults/references/fail-open-security.json +11 -0
- package/skills/trailofbits-insecure-defaults/references/fail-open-security.md +70 -0
- package/skills/trailofbits-insecure-defaults/references/fallback-secrets.json +11 -0
- package/skills/trailofbits-insecure-defaults/references/fallback-secrets.md +70 -0
- package/skills/trailofbits-insecure-defaults/references/permissive-access.json +13 -0
- package/skills/trailofbits-insecure-defaults/references/permissive-access.md +62 -0
- package/skills/trailofbits-insecure-defaults/references/weak-crypto.json +13 -0
- package/skills/trailofbits-insecure-defaults/references/weak-crypto.md +71 -0
- package/skills/trailofbits-triage-brocards/SKILL.md +208 -0
- package/skills/trailofbits-triage-brocards/references/brocards-detail.md +220 -0
- package/skills/using-git-worktrees/SKILL.md +167 -0
- package/skills/using-superpowers/SKILL.md +65 -0
- package/skills/using-superpowers/references/antigravity-tools.md +23 -0
- package/skills/using-superpowers/references/claude-code-tools.md +29 -0
- package/skills/using-superpowers/references/codex-tools.md +108 -0
- package/skills/using-superpowers/references/gemini-tools.md +63 -0
- package/skills/using-superpowers/references/hermes-tools.md +56 -0
- package/skills/using-superpowers/references/muse-tools.md +35 -0
- package/skills/using-superpowers/references/pi-tools.md +16 -0
- package/skills/verification-before-completion/SKILL.md +134 -0
- package/skills/writing-plans/SKILL.md +211 -0
- package/skills/writing-skills/SKILL.md +681 -0
- package/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/skills/writing-skills/persuasion-principles.md +187 -0
- package/skills/writing-skills/render-graphs.js +169 -0
- package/skills/writing-skills/testing-skills-with-subagents.md +384 -0
- package/tools/claude-bridge.cmd +2 -0
- package/tools/claude-bridge.ps1 +490 -0
- package/tools/claude-bridge.sh +17 -0
- package/tools/codex-bridge.cmd +2 -0
- package/tools/codex-bridge.ps1 +518 -0
- package/tools/codex-bridge.sh +17 -0
- package/tools/codexcli-bridge.cmd +2 -0
- package/tools/codexcli-bridge.ps1 +5 -0
- package/tools/gemini-bridge.cmd +2 -0
- package/tools/gemini-bridge.ps1 +471 -0
- package/tools/gemini-bridge.sh +17 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: karpathy-guidelines
|
|
3
|
+
description: Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Karpathy Guidelines
|
|
8
|
+
|
|
9
|
+
Behavioral guidelines to reduce common LLM coding mistakes, derived from [Andrej Karpathy's observations](https://x.com/karpathy/status/2015883857489522876) on LLM coding pitfalls.
|
|
10
|
+
|
|
11
|
+
**Tradeoff:** These guidelines bias toward caution over speed. For trivial tasks, use judgment.
|
|
12
|
+
|
|
13
|
+
## 1. Think Before Coding
|
|
14
|
+
|
|
15
|
+
**Don't assume. Don't hide confusion. Surface tradeoffs.**
|
|
16
|
+
|
|
17
|
+
Before implementing:
|
|
18
|
+
- State your assumptions explicitly. If uncertain, ask.
|
|
19
|
+
- If multiple interpretations exist, present them - don't pick silently.
|
|
20
|
+
- If a simpler approach exists, say so. Push back when warranted.
|
|
21
|
+
- If something is unclear, stop. Name what's confusing. Ask.
|
|
22
|
+
|
|
23
|
+
## 2. Simplicity First
|
|
24
|
+
|
|
25
|
+
**Minimum code that solves the problem. Nothing speculative.**
|
|
26
|
+
|
|
27
|
+
- No features beyond what was asked.
|
|
28
|
+
- No abstractions for single-use code.
|
|
29
|
+
- No "flexibility" or "configurability" that wasn't requested.
|
|
30
|
+
- No error handling for impossible scenarios.
|
|
31
|
+
- If you write 200 lines and it could be 50, rewrite it.
|
|
32
|
+
|
|
33
|
+
Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
|
|
34
|
+
|
|
35
|
+
## 3. Surgical Changes
|
|
36
|
+
|
|
37
|
+
**Touch only what you must. Clean up only your own mess.**
|
|
38
|
+
|
|
39
|
+
When editing existing code:
|
|
40
|
+
- Don't "improve" adjacent code, comments, or formatting.
|
|
41
|
+
- Don't refactor things that aren't broken.
|
|
42
|
+
- Match existing style, even if you'd do it differently.
|
|
43
|
+
- If you notice unrelated dead code, mention it - don't delete it.
|
|
44
|
+
|
|
45
|
+
When your changes create orphans:
|
|
46
|
+
- Remove imports/variables/functions that YOUR changes made unused.
|
|
47
|
+
- Don't remove pre-existing dead code unless asked.
|
|
48
|
+
|
|
49
|
+
The test: Every changed line should trace directly to the user's request.
|
|
50
|
+
|
|
51
|
+
## 4. Goal-Driven Execution
|
|
52
|
+
|
|
53
|
+
**Define success criteria. Loop until verified.**
|
|
54
|
+
|
|
55
|
+
Transform tasks into verifiable goals:
|
|
56
|
+
- "Add validation" → "Write tests for invalid inputs, then make them pass"
|
|
57
|
+
- "Fix the bug" → "Write a test that reproduces it, then make it pass"
|
|
58
|
+
- "Refactor X" → "Ensure tests pass before and after"
|
|
59
|
+
|
|
60
|
+
For multi-step tasks, state a brief plan:
|
|
61
|
+
```
|
|
62
|
+
1. [Step] → verify: [check]
|
|
63
|
+
2. [Step] → verify: [check]
|
|
64
|
+
3. [Step] → verify: [check]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: minimalist-ui
|
|
3
|
+
description: Clean editorial-style interfaces. Warm monochrome palette, typographic contrast, flat bento grids, muted pastels. No gradients, no heavy shadows.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Protocol: Premium Utilitarian Minimalism UI Architect
|
|
7
|
+
|
|
8
|
+
## 1. Protocol Overview
|
|
9
|
+
Name: Premium Utilitarian Minimalism & Editorial UI
|
|
10
|
+
Description: An advanced frontend engineering directive for generating highly refined, ultra-minimalist, "document-style" web interfaces analogous to top-tier workspace platforms. This protocol strictly enforces a high-contrast warm monochrome palette, bespoke typographic hierarchies, meticulous structural macro-whitespace, bento-grid layouts, and an ultra-flat component architecture with deliberate muted pastel accents. It actively rejects standard generic SaaS design trends.
|
|
11
|
+
|
|
12
|
+
## 2. Absolute Negative Constraints (Banned Elements)
|
|
13
|
+
The AI must strictly avoid the following generic web development defaults:
|
|
14
|
+
- DO NOT use the "Inter", "Roboto", or "Open Sans" typefaces.
|
|
15
|
+
- DO NOT use generic, thin-line icon libraries like "Lucide", "Feather", or standard "Heroicons".
|
|
16
|
+
- DO NOT use Tailwind's default heavy drop shadows (e.g., `shadow-md`, `shadow-lg`, `shadow-xl`). Shadows must be practically non-existent or heavily customized to be ultra-diffuse and low opacity (< 0.05).
|
|
17
|
+
- DO NOT use primary colored backgrounds for large elements or sections (e.g., no bright blue, green, or red hero sections).
|
|
18
|
+
- DO NOT use gradients, neon colors, or 3D glassmorphism (beyond subtle navbar blurs).
|
|
19
|
+
- DO NOT use `rounded-full` (pill shapes) for large containers, cards, or primary buttons.
|
|
20
|
+
- DO NOT use emojis anywhere in code, markup, text content, headings, or alt text. Replace with proper icons or clean SVG primitives.
|
|
21
|
+
- DO NOT use generic placeholder names like "John Doe", "Acme Corp", or "Lorem Ipsum". Use realistic, contextual content.
|
|
22
|
+
- DO NOT use AI copywriting clichés: "Elevate", "Seamless", "Unleash", "Next-Gen", "Game-changer", "Delve". Write plain, specific language.
|
|
23
|
+
|
|
24
|
+
## 3. Typographic Architecture
|
|
25
|
+
The interface must rely on extreme typographic contrast and premium font selection to establish an editorial feel.
|
|
26
|
+
- Primary Sans-Serif (Body, UI, Buttons): Use clean, geometric, or system-native fonts with character. Target: `font-family: 'SF Pro Display', 'Geist Sans', 'Helvetica Neue', 'Switzer', sans-serif`.
|
|
27
|
+
- Editorial Serif (Hero Headings & Quotes): Target: `font-family: 'Lyon Text', 'Newsreader', 'Playfair Display', 'Instrument Serif', serif`. Apply tight tracking (`letter-spacing: -0.02em` to `-0.04em`) and tight line-height (`1.1`).
|
|
28
|
+
- Monospace (Code, Keystrokes, Meta-data): Target: `font-family: 'Geist Mono', 'SF Mono', 'JetBrains Mono', monospace`.
|
|
29
|
+
- Text Colors: Body text must never be absolute black (`#000000`). Use off-black/charcoal (`#111111` or `#2F3437`) with a generous `line-height` of `1.6` for legibility. Secondary text should be muted gray (`#787774`).
|
|
30
|
+
|
|
31
|
+
## 4. Color Palette (Warm Monochrome + Spot Pastels)
|
|
32
|
+
Color is a scarce resource, utilized only for semantic meaning or subtle accents.
|
|
33
|
+
- Canvas / Background: Pure White `#FFFFFF` or Warm Bone/Off-White `#F7F6F3` / `#FBFBFA`.
|
|
34
|
+
- Primary Surface (Cards): `#FFFFFF` or `#F9F9F8`.
|
|
35
|
+
- Structural Borders / Dividers: Ultra-light gray `#EAEAEA` or `rgba(0,0,0,0.06)`.
|
|
36
|
+
- Accent Colors: Exclusively use highly desaturated, washed-out pastels for tags, inline code backgrounds, or subtle icon backgrounds.
|
|
37
|
+
- Pale Red: `#FDEBEC` (Text: `#9F2F2D`)
|
|
38
|
+
- Pale Blue: `#E1F3FE` (Text: `#1F6C9F`)
|
|
39
|
+
- Pale Green: `#EDF3EC` (Text: `#346538`)
|
|
40
|
+
- Pale Yellow: `#FBF3DB` (Text: `#956400`)
|
|
41
|
+
|
|
42
|
+
## 5. Component Specifications
|
|
43
|
+
- Bento Box Feature Grids:
|
|
44
|
+
- Utilize asymmetrical CSS Grid layouts.
|
|
45
|
+
- Cards must have exactly `border: 1px solid #EAEAEA`.
|
|
46
|
+
- Border-radius must be crisp: `8px` or `12px` maximum.
|
|
47
|
+
- Internal padding must be generous (e.g., `24px` to `40px`).
|
|
48
|
+
- Primary Call-To-Action (Buttons):
|
|
49
|
+
- Solid background `#111111`, text `#FFFFFF`.
|
|
50
|
+
- Slight border-radius (`4px` to `6px`). No box-shadow.
|
|
51
|
+
- Hover state should be a subtle color shift to `#333333` or a micro-scale `transform: scale(0.98)`.
|
|
52
|
+
- Tags & Status Badges:
|
|
53
|
+
- Pill-shaped (`border-radius: 9999px`), very small typography (`text-xs`), uppercase with wide tracking (`letter-spacing: 0.05em`).
|
|
54
|
+
- Background must use the defined Muted Pastels.
|
|
55
|
+
- Accordions (FAQ):
|
|
56
|
+
- Strip all container boxes. Separate items only with a `border-bottom: 1px solid #EAEAEA`.
|
|
57
|
+
- Use a clean, sharp `+` and `-` icon for the toggle state.
|
|
58
|
+
- Keystroke Micro-UIs:
|
|
59
|
+
- Render shortcuts as physical keys using `<kbd>` tags: `border: 1px solid #EAEAEA`, `border-radius: 4px`, `background: #F7F6F3`, using the Monospace font.
|
|
60
|
+
- Faux-OS Window Chrome:
|
|
61
|
+
- When mocking up software, wrap it in a minimalist container with a white top bar containing three small, light gray circles (replicating macOS window controls).
|
|
62
|
+
|
|
63
|
+
## 6. Iconography & Imagery Directives
|
|
64
|
+
- System Icons: Use "Phosphor Icons (Bold or Fill weights)" or "Radix UI Icons" for a technical, slightly thicker-stroke aesthetic. Standardize stroke width across all icons.
|
|
65
|
+
- Illustrations: Monochromatic, rough continuous-line ink sketches on a white background, featuring a single offset geometric shape filled with a muted pastel color.
|
|
66
|
+
- Photography: Use high-quality, desaturated images with a warm tone. Apply subtle overlays (`opacity: 0.04` warm grain) to blend photos into the monochrome palette. Never use oversaturated stock photos. Use reliable placeholders like `https://picsum.photos/seed/{context}/1200/800` when real assets are unavailable.
|
|
67
|
+
- Hero & Section Backgrounds: Sections should not feel empty and flat. Use subtle full-width background imagery at very low opacity, soft radial light spots (`radial-gradient` with warm tones at `opacity: 0.03`), or minimal geometric line patterns to add depth without breaking the clean aesthetic.
|
|
68
|
+
|
|
69
|
+
## 7. Subtle Motion & Micro-Animations
|
|
70
|
+
Motion should feel invisible — present but never distracting. The goal is quiet sophistication, not spectacle.
|
|
71
|
+
- Scroll Entry: Elements fade in gently as they enter the viewport. Use `translateY(12px)` + `opacity: 0` resolving over `600ms` with `cubic-bezier(0.16, 1, 0.3, 1)`. Use `IntersectionObserver`, never `window.addEventListener('scroll')`.
|
|
72
|
+
- Hover States: Cards lift with an ultra-subtle shadow shift (`box-shadow` transitioning from `0 0 0` to `0 2px 8px rgba(0,0,0,0.04)` over `200ms`). Buttons respond with `scale(0.98)` on `:active`.
|
|
73
|
+
- Staggered Reveals: Lists and grid items enter with a cascade delay (`animation-delay: calc(var(--index) * 80ms)`). Never mount everything at once.
|
|
74
|
+
- Background Ambient Motion: Optional. A single, very slow-moving radial gradient blob (`animation-duration: 20s+`, `opacity: 0.02-0.04`) drifting behind hero sections. Must be applied to a `position: fixed; pointer-events: none` layer. Never on scrolling containers.
|
|
75
|
+
- Performance: Animate exclusively via `transform` and `opacity`. No layout-triggering properties (`top`, `left`, `width`, `height`). Use `will-change: transform` sparingly and only on actively animating elements.
|
|
76
|
+
|
|
77
|
+
## 8. Execution Protocol
|
|
78
|
+
When tasked with writing frontend code (HTML, React, Tailwind, Vue) or designing a layout:
|
|
79
|
+
1. Establish the macro-whitespace first. Use massive vertical padding between sections (e.g., `py-24` or `py-32` in Tailwind).
|
|
80
|
+
2. Constrain the main typography content width to `max-w-4xl` or `max-w-5xl`.
|
|
81
|
+
3. Apply the custom typographic hierarchy and monochromatic color variables immediately.
|
|
82
|
+
4. Ensure every card, divider, and border adheres strictly to the `1px solid #EAEAEA` rule.
|
|
83
|
+
5. Add scroll-entry animations to all major content blocks.
|
|
84
|
+
6. Ensure sections have visual depth through imagery, ambient gradients, or subtle textures — no empty flat backgrounds.
|
|
85
|
+
7. Provide code that reflects this high-end, uncluttered, editorial aesthetic natively without requiring manual adjustments.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: full-output-enforcement
|
|
3
|
+
description: Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Full-Output Enforcement
|
|
7
|
+
|
|
8
|
+
## Baseline
|
|
9
|
+
|
|
10
|
+
Treat every task as production-critical. A partial output is a broken output. Do not optimize for brevity — optimize for completeness. If the user asks for a full file, deliver the full file. If the user asks for 5 components, deliver 5 components. No exceptions.
|
|
11
|
+
|
|
12
|
+
## Banned Output Patterns
|
|
13
|
+
|
|
14
|
+
The following patterns are hard failures. Never produce them:
|
|
15
|
+
|
|
16
|
+
**In code blocks:** `// ...`, `// rest of code`, `// implement here`, `// TODO`, `/* ... */`, `// similar to above`, `// continue pattern`, `// add more as needed`, bare `...` standing in for omitted code
|
|
17
|
+
|
|
18
|
+
**In prose:** "Let me know if you want me to continue", "I can provide more details if needed", "for brevity", "the rest follows the same pattern", "similarly for the remaining", "and so on" (when replacing actual content), "I'll leave that as an exercise"
|
|
19
|
+
|
|
20
|
+
**Structural shortcuts:** Outputting a skeleton when the request was for a full implementation. Showing the first and last section while skipping the middle. Replacing repeated logic with one example and a description. Describing what code should do instead of writing it.
|
|
21
|
+
|
|
22
|
+
## Execution Process
|
|
23
|
+
|
|
24
|
+
1. **Scope** — Read the full request. Count how many distinct deliverables are expected (files, functions, sections, answers). Lock that number.
|
|
25
|
+
2. **Build** — Generate every deliverable completely. No partial drafts, no "you can extend this later."
|
|
26
|
+
3. **Cross-check** — Before output, re-read the original request. Compare your deliverable count against the scope count. If anything is missing, add it before responding.
|
|
27
|
+
|
|
28
|
+
## Handling Long Outputs
|
|
29
|
+
|
|
30
|
+
When a response approaches the token limit:
|
|
31
|
+
|
|
32
|
+
- Do not compress remaining sections to squeeze them in.
|
|
33
|
+
- Do not skip ahead to a conclusion.
|
|
34
|
+
- Write at full quality up to a clean breakpoint (end of a function, end of a file, end of a section).
|
|
35
|
+
- End with:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
[PAUSED — X of Y complete. Send "continue" to resume from: next section name]
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
On "continue", pick up exactly where you stopped. No recap, no repetition.
|
|
42
|
+
|
|
43
|
+
## Quick Check
|
|
44
|
+
|
|
45
|
+
Before finalizing any response, verify:
|
|
46
|
+
- No banned patterns from the list above appear anywhere in the output
|
|
47
|
+
- Every item the user requested is present and finished
|
|
48
|
+
- Code blocks contain actual runnable code, not descriptions of what code would do
|
|
49
|
+
- Nothing was shortened to save space
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: owasp-security
|
|
3
|
+
description: Reviews code for security vulnerabilities and guides secure implementation using OWASP Top 10:2025, ASVS 5.0, the OWASP Top 10 for LLM Applications (2026), and the OWASP Top 10 for Agentic Applications (2026). Use when reviewing code or a diff for security issues, implementing authentication, authorization, sessions, or cryptography, handling untrusted input, files, or URLs, hardening config, dependencies, or CI, or building LLM and AI agent features.
|
|
4
|
+
when_to_use: Trigger phrases include "security review", "security check", "anything exploitable", "audit this", "is this secure", "is this safe to ship", "check for vulnerabilities", "find security bugs", "threat model", "OWASP", "ASVS", "CWE", "prompt injection", "MCP server security", "secrets in code", "supply chain", and "harden this Dockerfile or workflow".
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# OWASP Security
|
|
8
|
+
|
|
9
|
+
Apply these standards when writing or reviewing code. For a review, follow the workflow below.
|
|
10
|
+
|
|
11
|
+
**Reference files** (read the one the task needs, and only the section you need):
|
|
12
|
+
- [`reference/review-checklist.md`](reference/review-checklist.md): coverage checklist for every Top 10 category, plus LLM and agent checks. Read during step 3 of a review.
|
|
13
|
+
- [`reference/languages.md`](reference/languages.md): per-language pitfalls with unsafe/safe examples for 20+ languages. Read the section for the language under review.
|
|
14
|
+
- [`reference/config-and-supply-chain.md`](reference/config-and-supply-chain.md): A02 and A03 in Dockerfiles, Kubernetes, Terraform, framework config, security headers, lockfiles, and CI/CD. Read when the change touches config, IaC, dependencies, or pipelines.
|
|
15
|
+
- [`reference/owasp-report.md`](reference/owasp-report.md): attack vectors, mitigations, and worked examples for every Top 10:2025, ASVS 5.0, LLM Top 10, and Agentic item. About 1100 lines: jump to the section you need.
|
|
16
|
+
|
|
17
|
+
## Security Review Workflow
|
|
18
|
+
|
|
19
|
+
Copy this checklist into your response and tick it off as you go:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
Security Review Progress:
|
|
23
|
+
- [ ] Step 1: Map entry points and trust boundaries
|
|
24
|
+
- [ ] Step 2: Load the references this code needs
|
|
25
|
+
- [ ] Step 3: Sweep for candidate issues
|
|
26
|
+
- [ ] Step 4: Triage every candidate
|
|
27
|
+
- [ ] Step 5: Report findings
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Step 1: Map entry points and trust boundaries.** List where attacker-controlled data enters:
|
|
31
|
+
routes and handlers, headers and cookies, uploads, webhooks, queue consumers, CLI arguments,
|
|
32
|
+
third-party API responses, and anything an LLM reads or returns. Note where authentication and
|
|
33
|
+
authorization are enforced; it is often centralized in middleware rather than per route.
|
|
34
|
+
|
|
35
|
+
**Step 2: Load the references this code needs.** The language section of `languages.md`;
|
|
36
|
+
`config-and-supply-chain.md` if config, IaC, dependencies, or CI changed; the LLM and Agentic
|
|
37
|
+
sections of `owasp-report.md` if the code calls a model or runs an agent.
|
|
38
|
+
|
|
39
|
+
**Step 3: Sweep for candidate issues.** Walk `review-checklist.md` for the categories the code
|
|
40
|
+
touches. For each candidate, trace the path from an entry point in step 1 to the sink.
|
|
41
|
+
|
|
42
|
+
**Step 4: Triage every candidate** with the rubric in "Before Reporting a Finding" below. Drop
|
|
43
|
+
candidates that fail it, or downgrade them to defense-in-depth. If a candidate's reachability
|
|
44
|
+
is unclear, go back to step 1 for that input before deciding.
|
|
45
|
+
|
|
46
|
+
**Step 5: Report findings** in the format below, highest severity first.
|
|
47
|
+
|
|
48
|
+
## Before Reporting a Finding
|
|
49
|
+
|
|
50
|
+
A pattern match is not a vulnerability. The most common failure mode in automated security
|
|
51
|
+
review is reporting unreachable or already-mitigated code, which buries the real findings.
|
|
52
|
+
Confirm all four before reporting:
|
|
53
|
+
|
|
54
|
+
1. **Is the input actually attacker-controlled?** Trace it back to a real entry point: a
|
|
55
|
+
request parameter, header, cookie, uploaded file, webhook, queue message, or third-party
|
|
56
|
+
API response. A value that only ever comes from a constant, an enum, or trusted internal
|
|
57
|
+
config is not an injection source.
|
|
58
|
+
2. **Is the sink reachable with that input?** Check whether validation, an allowlist, an ORM,
|
|
59
|
+
or a framework-level control already sits between them. Look for auth middleware
|
|
60
|
+
(`middleware.ts`, `proxy.ts`, Express/Django/Rails middleware, a base controller,
|
|
61
|
+
decorators) before flagging a route as missing authorization. Enforcement is often
|
|
62
|
+
centralized rather than per-route.
|
|
63
|
+
3. **What is the blast radius?** Who can trigger it, what do they get, and does it cross a
|
|
64
|
+
trust boundary? An SSRF reaching cloud metadata differs from one reaching localhost only.
|
|
65
|
+
4. **Can the attacker perform every step?** Each step of the exploit must be possible from
|
|
66
|
+
the attacker's position. A symlink race needs a way to create symlinks on the server; a
|
|
67
|
+
header attack needs a client that can set that header. If a step needs a capability the
|
|
68
|
+
code doesn't show the attacker having, the finding is "Needs verification", not High.
|
|
69
|
+
|
|
70
|
+
Report severity by exploitability, not by pattern. State the concrete path (*this input
|
|
71
|
+
reaches this sink*) and say so explicitly when a finding is theoretical or defense-in-depth
|
|
72
|
+
rather than directly exploitable. If reachability can't be determined from the code available,
|
|
73
|
+
say that instead of asserting either way.
|
|
74
|
+
|
|
75
|
+
## Reporting Format
|
|
76
|
+
|
|
77
|
+
One block per finding, highest severity first:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
[SEVERITY] Title (CWE-###, OWASP A##:2025, LLM## Risk Name, ASI## Risk Name)
|
|
81
|
+
Location: path/to/file.ext:LINE
|
|
82
|
+
Path: <entry point> -> <intermediate hops> -> <sink>
|
|
83
|
+
Impact: who can trigger it, what they get, which trust boundary it crosses
|
|
84
|
+
Fix: the concrete change, with a code snippet when it isn't obvious
|
|
85
|
+
Confidence: Confirmed | Likely | Needs verification (say what you couldn't see)
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Write every LLM and ASI ID with its risk name, e.g. "LLM03 Excessive Agency". A bare LLM ID is
|
|
89
|
+
ambiguous: the 2025 and 2026 editions use the same numbers for different risks.
|
|
90
|
+
|
|
91
|
+
| Severity | Meaning |
|
|
92
|
+
|---|---|
|
|
93
|
+
| Critical | Unauthenticated remote code execution, auth bypass, or mass data exposure |
|
|
94
|
+
| High | Authenticated exploitation crossing a trust boundary (IDOR into other tenants, SQLi behind login) |
|
|
95
|
+
| Medium | Needs unusual preconditions, or impact is limited to the attacker's own data |
|
|
96
|
+
| Low | Defense-in-depth gap with no demonstrated exploit path |
|
|
97
|
+
| Info | Hardening suggestion; say plainly that it is not a vulnerability |
|
|
98
|
+
|
|
99
|
+
If the review finds nothing exploitable, say so directly. Do not pad the report with Info items
|
|
100
|
+
to look thorough; a long list is what makes real findings get ignored.
|
|
101
|
+
|
|
102
|
+
## OWASP Top 10:2025
|
|
103
|
+
|
|
104
|
+
Three categories were renamed from 2021 and two are new (A03, A10). Use these names and
|
|
105
|
+
numbers; much OWASP material online still cites the 2021 list.
|
|
106
|
+
|
|
107
|
+
| # | Category | Key Prevention |
|
|
108
|
+
|---|----------|----------------|
|
|
109
|
+
| A01 | Broken Access Control (now includes SSRF) | Deny by default, enforce server-side, verify ownership |
|
|
110
|
+
| A02 | Security Misconfiguration | Harden configs, disable defaults, minimize features |
|
|
111
|
+
| A03 | Software Supply Chain Failures | Lock versions, verify integrity, audit dependencies |
|
|
112
|
+
| A04 | Cryptographic Failures | TLS 1.2+, AES-256-GCM, Argon2/bcrypt for passwords |
|
|
113
|
+
| A05 | Injection | Parameterized queries, input validation, safe APIs |
|
|
114
|
+
| A06 | Insecure Design | Threat model, rate limit, design security controls |
|
|
115
|
+
| A07 | Authentication Failures | MFA, check breached passwords, secure sessions |
|
|
116
|
+
| A08 | Software or Data Integrity Failures | Sign packages, SRI for CDN, safe serialization |
|
|
117
|
+
| A09 | Security Logging and Alerting Failures | Log security events, structured format, alerting |
|
|
118
|
+
| A10 | Mishandling of Exceptional Conditions | Fail-closed, hide internals, log with context |
|
|
119
|
+
|
|
120
|
+
## OWASP Top 10 for LLM Applications (2026)
|
|
121
|
+
|
|
122
|
+
For applications that call LLMs (chatbots, RAG, copilots, agents). The 2026 edition renumbered
|
|
123
|
+
the list; translate 2025 IDs with the table in `owasp-report.md` and cite 2026 IDs only.
|
|
124
|
+
|
|
125
|
+
| # | Risk | Key Mitigation |
|
|
126
|
+
|---|------|----------------|
|
|
127
|
+
| LLM01 | Prompt Injection | No complete fix exists. Fence untrusted content (including images, audio, tool output), keep privileges out of the model's reach, filter outputs |
|
|
128
|
+
| LLM02 | Sensitive Information Disclosure | Sanitize training/RAG data, strip PII from context, restrict what the model can retrieve per user |
|
|
129
|
+
| LLM03 | Excessive Agency | Minimize tools and permissions, require human approval for destructive actions, scope credentials per task |
|
|
130
|
+
| LLM04 | Supply Chain | Verify model provenance and signatures, vet third-party model hubs, lock model + adapter versions |
|
|
131
|
+
| LLM05 | Data and Model Poisoning | Validate training/fine-tuning sources, anomaly-detect on data ingestion, hold-out integrity tests |
|
|
132
|
+
| LLM06 | Unbounded Consumption | Rate-limit per user/key, cap tokens and tool calls per request, monitor cost, set hard timeouts |
|
|
133
|
+
| LLM07 | Misinformation | Cite sources, surface confidence, require grounding for high-stakes answers, disclose AI provenance |
|
|
134
|
+
| LLM08 | Hidden Context Exposure | Assume the system prompt, tool schemas, and other hidden context are extractable: no secrets there, and no authorization or policy that relies on them staying hidden |
|
|
135
|
+
| LLM09 | Vector and Embedding Weaknesses | Tenant-isolate vector stores, access-control on retrieval, sign or hash chunks against indirect prompt injection |
|
|
136
|
+
| LLM10 | Improper Output Handling | Treat all LLM output, including generated code, as untrusted input: validate, escape, or sandbox before any sink (SQL, shell, HTML, code, tool calls) |
|
|
137
|
+
|
|
138
|
+
## OWASP Top 10 for Agentic Applications (2026)
|
|
139
|
+
|
|
140
|
+
For AI agent systems that plan, call tools, or keep memory:
|
|
141
|
+
|
|
142
|
+
| Risk | Description | Mitigation |
|
|
143
|
+
|------|-------------|------------|
|
|
144
|
+
| ASI01: Agent Goal Hijack | Prompt injection alters agent objectives | Treat tool and retrieved content as data, goal boundaries, behavioral monitoring |
|
|
145
|
+
| ASI02: Tool Misuse & Exploitation | Tools used in unintended ways | Least privilege, fine-grained permissions, validate I/O |
|
|
146
|
+
| ASI03: Identity & Privilege Abuse | Delegated trust, inherited credentials, role chain exploits | Short-lived scoped tokens, identity verification |
|
|
147
|
+
| ASI04: Agentic Supply Chain Vulnerabilities | Compromised plugins/MCP servers | Verify signatures, sandbox, allowlist plugins |
|
|
148
|
+
| ASI05: Unexpected Code Execution | Unsafe code generation/execution | Sandbox execution, static analysis, human approval |
|
|
149
|
+
| ASI06: Memory & Context Poisoning | Corrupted RAG/context data | Validate stored content, segment by trust level |
|
|
150
|
+
| ASI07: Insecure Inter-Agent Communication | Spoofing/intercepting agent-to-agent messages | Authenticate, encrypt, verify message integrity |
|
|
151
|
+
| ASI08: Cascading Failures | Errors propagate across systems | Circuit breakers, graceful degradation, isolation |
|
|
152
|
+
| ASI09: Human-Agent Trust Exploitation | Over-trust in agents leveraged to manipulate users | Label AI content, user education, verification steps |
|
|
153
|
+
| ASI10: Rogue Agents | Compromised agents acting maliciously | Behavior monitoring, kill switches, anomaly detection |
|
|
154
|
+
|
|
155
|
+
## ASVS 5.0 Key Requirements
|
|
156
|
+
|
|
157
|
+
ASVS 5.0 (May 2025) renumbered and reorganized every chapter. **4.0 requirement IDs do not
|
|
158
|
+
map to 5.0** — `V2.1.1` meant "password length" in 4.0 and means something else now. Cite
|
|
159
|
+
5.0 IDs only. Levels are defined by share of requirements, not by application category:
|
|
160
|
+
|
|
161
|
+
| Level | Share | Intent |
|
|
162
|
+
|---|---|---|
|
|
163
|
+
| L1 | ~20% | Minimum bar; deliberately small to lower the barrier to entry |
|
|
164
|
+
| L2 | ~50% (≈70% cumulative) | What most applications should target |
|
|
165
|
+
| L3 | remaining ~30% | Highest assurance |
|
|
166
|
+
|
|
167
|
+
### Level 1 — the minimum bar
|
|
168
|
+
- Passwords **at least 8 characters**; 15+ strongly recommended (6.2.1)
|
|
169
|
+
- No composition rules — permit any characters, paste, and password managers (6.2.5, 6.2.7)
|
|
170
|
+
- Block at least the top 3000 common passwords (6.2.4)
|
|
171
|
+
- Anti-automation against credential stuffing and brute force (6.3.1)
|
|
172
|
+
- No default accounts like `root`/`admin`/`sa` (6.3.2)
|
|
173
|
+
- Reference session tokens from a CSPRNG with 128+ bits entropy (7.2.3)
|
|
174
|
+
- New session token issued on authentication and re-authentication (7.2.4)
|
|
175
|
+
- Session fully unusable after logout or expiry (7.4.1)
|
|
176
|
+
- Function-level and data-level access restricted to explicit permissions (8.2.1, 8.2.2)
|
|
177
|
+
- Authorization enforced at a trusted service layer the client cannot manipulate (8.3.1)
|
|
178
|
+
- Parameterized queries / ORM for all data access (1.2.4); parameterized OS calls (1.2.5)
|
|
179
|
+
- Context-appropriate output encoding for HTML, URLs, and JavaScript/JSON (1.2.1–1.2.3)
|
|
180
|
+
- Avoid `eval()` and dynamic code execution (1.3.2)
|
|
181
|
+
- Input validated at a trusted service layer, positive/allowlist where possible (2.2.1, 2.2.2)
|
|
182
|
+
- TLS 1.2+ on all external traffic, publicly trusted certificates (12.1.1, 12.2.1, 12.2.2)
|
|
183
|
+
- Approved ciphers and modes only — no ECB, no PKCS#1 v1.5 padding (11.3.1, 11.3.2)
|
|
184
|
+
- No sensitive data in URLs or query strings (14.2.1)
|
|
185
|
+
|
|
186
|
+
### Level 2 — what most applications should target
|
|
187
|
+
- MFA, or a documented combination of single factors (6.3.3)
|
|
188
|
+
- Passwords checked against a breached-password set (6.2.12)
|
|
189
|
+
- No forced periodic password rotation — rotate only on compromise (6.2.10)
|
|
190
|
+
- **All security logging starts here.** ASVS 5.0 has *no* L1 logging requirements; the whole
|
|
191
|
+
of V16 is L2+. Log authentication attempts, failed authorization, security events, and
|
|
192
|
+
unexpected errors (16.3.1–16.3.4)
|
|
193
|
+
- Log entries carry when/where/who/what metadata on a synchronized clock (16.2.1, 16.2.2)
|
|
194
|
+
- Logs encoded against log injection, protected from modification, shipped off-box (16.4.1–16.4.3)
|
|
195
|
+
- Generic error message to the user; detail stays in the log (16.5.1)
|
|
196
|
+
|
|
197
|
+
### Level 3 — highest assurance
|
|
198
|
+
|
|
199
|
+
ASVS 5.0 has **92 L3 requirements**; they are not enumerated here. Two worth knowing because
|
|
200
|
+
they tighten an L2 requirement rather than adding a new one:
|
|
201
|
+
|
|
202
|
+
- One factor must be hardware-based and phishing-resistant, e.g. a FIDO key (6.3.3, L3 clause)
|
|
203
|
+
- Log **all** authorization decisions, not only failures (16.3.2, L3 clause)
|
|
204
|
+
|
|
205
|
+
For an actual L3 assessment, work from the standard itself — see
|
|
206
|
+
[`reference/owasp-report.md`](reference/owasp-report.md) for the chapter map.
|