@schneiderjoseph/devia 0.1.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/AGENTS.md +149 -0
- package/CHANGELOG.md +78 -0
- package/GOVERNANCE.md +51 -0
- package/LEVELS.md +78 -0
- package/LICENSE +21 -0
- package/MATURITY.md +79 -0
- package/MEMORY.md +122 -0
- package/MIGRATION.md +62 -0
- package/PRINCIPLES.md +110 -0
- package/README.md +125 -0
- package/REFERENCES.md +30 -0
- package/VERSION +5 -0
- package/bin/devia.mjs +13 -0
- package/checklists/README.md +39 -0
- package/checklists/design/accessibility-review.md +11 -0
- package/checklists/design/design-to-code-review.md +10 -0
- package/checklists/design/responsive-review.md +7 -0
- package/checklists/design/ui-review.md +8 -0
- package/checklists/design/ux-review.md +10 -0
- package/checklists/engineering/accessibility.md +8 -0
- package/checklists/engineering/api.md +12 -0
- package/checklists/engineering/architecture.md +8 -0
- package/checklists/engineering/database.md +11 -0
- package/checklists/engineering/devops.md +9 -0
- package/checklists/engineering/disaster-recovery.md +9 -0
- package/checklists/engineering/frontend.md +9 -0
- package/checklists/engineering/incident.md +9 -0
- package/checklists/engineering/performance.md +7 -0
- package/checklists/engineering/production.md +26 -0
- package/checklists/engineering/release.md +17 -0
- package/checklists/engineering/security.md +33 -0
- package/checklists/engineering/testing.md +8 -0
- package/compliance/COVERAGE.md +46 -0
- package/compliance/REQUIREMENTS.md +8 -0
- package/compliance/TRACEABILITY.md +160 -0
- package/compliance/WAIVERS.md +13 -0
- package/package.json +74 -0
- package/rules/LIFECYCLE.md +16 -0
- package/rules/README.md +166 -0
- package/rules/accessibility/A11Y-001.md +42 -0
- package/rules/accessibility/A11Y-002.md +41 -0
- package/rules/accessibility/A11Y-003.md +40 -0
- package/rules/accessibility/A11Y-004.md +40 -0
- package/rules/accessibility/A11Y-005.md +39 -0
- package/rules/accessibility/A11Y-006.md +42 -0
- package/rules/accessibility/A11Y-007.md +39 -0
- package/rules/accessibility/A11Y-008.md +40 -0
- package/rules/accessibility/A11Y-009.md +41 -0
- package/rules/accessibility/A11Y-010.md +40 -0
- package/rules/accessibility/A11Y-011.md +39 -0
- package/rules/accessibility/A11Y-012.md +39 -0
- package/rules/agent/AGT-001.md +42 -0
- package/rules/agent/AGT-002.md +39 -0
- package/rules/agent/AGT-003.md +38 -0
- package/rules/agent/AGT-004.md +39 -0
- package/rules/agent/AGT-005.md +38 -0
- package/rules/agent/AGT-006.md +38 -0
- package/rules/agent/AGT-007.md +38 -0
- package/rules/agent/AGT-008.md +38 -0
- package/rules/agent/AGT-009.md +39 -0
- package/rules/agent/AGT-010.md +38 -0
- package/rules/agent/AGT-011.md +38 -0
- package/rules/ai/AI-001.md +44 -0
- package/rules/ai/AI-002.md +39 -0
- package/rules/ai/AI-003.md +40 -0
- package/rules/ai/AI-004.md +39 -0
- package/rules/ai/AI-005.md +38 -0
- package/rules/api/API-001.md +39 -0
- package/rules/api/API-002.md +39 -0
- package/rules/api/API-003.md +39 -0
- package/rules/api/API-004.md +38 -0
- package/rules/api/API-005.md +39 -0
- package/rules/api/API-006.md +40 -0
- package/rules/architecture/ARC-001.md +41 -0
- package/rules/architecture/ARC-002.md +43 -0
- package/rules/architecture/ARC-003.md +43 -0
- package/rules/architecture/ARC-004.md +40 -0
- package/rules/architecture/ARC-005.md +39 -0
- package/rules/architecture/ARC-006.md +39 -0
- package/rules/components/CMP-001.md +39 -0
- package/rules/components/CMP-002.md +38 -0
- package/rules/components/CMP-003.md +39 -0
- package/rules/components/CMP-004.md +40 -0
- package/rules/components/CMP-005.md +39 -0
- package/rules/content/CNT-001.md +39 -0
- package/rules/data-display/DATA-001.md +39 -0
- package/rules/data-display/DATA-002.md +39 -0
- package/rules/data-display/DATA-003.md +40 -0
- package/rules/data-display/DATA-004.md +40 -0
- package/rules/database/DB-001.md +43 -0
- package/rules/database/DB-002.md +38 -0
- package/rules/database/DB-003.md +40 -0
- package/rules/database/DB-004.md +44 -0
- package/rules/database/DB-005.md +39 -0
- package/rules/database/DB-006.md +38 -0
- package/rules/database/DB-007.md +40 -0
- package/rules/database/DB-008.md +40 -0
- package/rules/design-system/DS-001.md +39 -0
- package/rules/design-system/DS-002.md +40 -0
- package/rules/design-system/DS-003.md +38 -0
- package/rules/devops/OPS-001.md +43 -0
- package/rules/devops/OPS-002.md +39 -0
- package/rules/devops/OPS-003.md +38 -0
- package/rules/devops/OPS-004.md +40 -0
- package/rules/devops/OPS-005.md +43 -0
- package/rules/devops/OPS-006.md +38 -0
- package/rules/devops/OPS-007.md +40 -0
- package/rules/interaction/INT-001.md +39 -0
- package/rules/interaction/INT-002.md +39 -0
- package/rules/localization/I18N-001.md +38 -0
- package/rules/localization/I18N-002.md +40 -0
- package/rules/localization/I18N-003.md +39 -0
- package/rules/memory/MEM-001.md +44 -0
- package/rules/memory/MEM-002.md +39 -0
- package/rules/memory/MEM-003.md +38 -0
- package/rules/memory/MEM-004.md +38 -0
- package/rules/memory/MEM-005.md +38 -0
- package/rules/memory/MEM-006.md +38 -0
- package/rules/memory/MEM-007.md +38 -0
- package/rules/memory/MEM-008.md +38 -0
- package/rules/memory/MEM-009.md +39 -0
- package/rules/memory/MEM-010.md +38 -0
- package/rules/memory/MEM-011.md +38 -0
- package/rules/motion/MOT-001.md +38 -0
- package/rules/observability/OBS-001.md +40 -0
- package/rules/observability/OBS-002.md +40 -0
- package/rules/observability/OBS-003.md +38 -0
- package/rules/observability/OBS-004.md +38 -0
- package/rules/privacy/PRIV-001.md +38 -0
- package/rules/privacy/PRIV-002.md +44 -0
- package/rules/privacy/PRIV-003.md +40 -0
- package/rules/privacy/PRIV-004.md +41 -0
- package/rules/responsive/RWD-001.md +40 -0
- package/rules/responsive/RWD-002.md +39 -0
- package/rules/responsive/RWD-003.md +39 -0
- package/rules/security/SEC-001.md +44 -0
- package/rules/security/SEC-002.md +44 -0
- package/rules/security/SEC-003.md +41 -0
- package/rules/security/SEC-004.md +40 -0
- package/rules/security/SEC-005.md +42 -0
- package/rules/security/SEC-006.md +40 -0
- package/rules/security/SEC-007.md +44 -0
- package/rules/security/SEC-008.md +39 -0
- package/rules/security/SEC-009.md +40 -0
- package/rules/security/SEC-010.md +40 -0
- package/rules/security/SEC-011.md +40 -0
- package/rules/security/SEC-012.md +40 -0
- package/rules/states/STATE-001.md +38 -0
- package/rules/states/STATE-002.md +39 -0
- package/rules/states/STATE-003.md +39 -0
- package/rules/states/STATE-004.md +38 -0
- package/rules/testing/TST-001.md +39 -0
- package/rules/testing/TST-002.md +39 -0
- package/rules/testing/TST-003.md +39 -0
- package/rules/testing/TST-004.md +38 -0
- package/rules/testing/TST-005.md +40 -0
- package/rules/testing/TST-006.md +39 -0
- package/rules/ui/UI-001.md +40 -0
- package/rules/ui/UI-002.md +38 -0
- package/rules/ui/UI-003.md +41 -0
- package/rules/ui/UI-004.md +41 -0
- package/rules/ui/UI-005.md +41 -0
- package/rules/ui/UI-006.md +40 -0
- package/rules/ui/UI-007.md +41 -0
- package/rules/ux/UX-001.md +41 -0
- package/rules/ux/UX-002.md +41 -0
- package/rules/ux/UX-003.md +39 -0
- package/rules/ux/UX-004.md +39 -0
- package/rules/ux/UX-005.md +40 -0
- package/rules/ux/UX-006.md +40 -0
- package/rules/ux/UX-007.md +44 -0
- package/rules/ux/UX-008.md +41 -0
- package/rules/ux/UX-009.md +39 -0
- package/rules/ux/UX-010.md +40 -0
- package/rules/ux/UX-011.md +40 -0
- package/rules/ux/UX-012.md +40 -0
- package/rules/ux/UX-013.md +39 -0
- package/schema/README.md +19 -0
- package/schema/checklist.schema.json +34 -0
- package/schema/component.schema.json +37 -0
- package/schema/project-config.schema.json +70 -0
- package/schema/rule.schema.json +104 -0
- package/schema/token.schema.json +15 -0
- package/schema/waiver.schema.json +33 -0
- package/scripts/build-index.mjs +178 -0
- package/scripts/validate-links.mjs +43 -0
- package/scripts/validate-rules.mjs +42 -0
- package/skills/devia/SKILL.md +114 -0
- package/src/cli.mjs +107 -0
- package/src/commands/check.mjs +483 -0
- package/src/commands/doctor.mjs +139 -0
- package/src/commands/init.mjs +186 -0
- package/src/commands/registry.mjs +154 -0
- package/src/commands/rules.mjs +101 -0
- package/src/commands/skills.mjs +97 -0
- package/src/commands/sync.mjs +83 -0
- package/src/commands/validate.mjs +194 -0
- package/src/lib/fs.mjs +89 -0
- package/src/lib/git.mjs +31 -0
- package/src/lib/rules.mjs +85 -0
- package/src/lib/ui.mjs +52 -0
- package/src/lib/vendor.mjs +74 -0
- package/src/lib/version.mjs +19 -0
- package/src/lib/yaml.mjs +152 -0
- package/standard/README.md +31 -0
- package/standard/design/README.md +51 -0
- package/standard/design/REFERENCES.md +39 -0
- package/standard/design/accessibility/aria.md +7 -0
- package/standard/design/accessibility/contrast.md +6 -0
- package/standard/design/accessibility/focus.md +6 -0
- package/standard/design/accessibility/forms.md +3 -0
- package/standard/design/accessibility/keyboard.md +6 -0
- package/standard/design/accessibility/reduced-motion.md +3 -0
- package/standard/design/accessibility/reflow.md +3 -0
- package/standard/design/accessibility/screen-readers.md +3 -0
- package/standard/design/accessibility/target-size.md +3 -0
- package/standard/design/accessibility/testing.md +3 -0
- package/standard/design/accessibility/wcag-2.2.md +16 -0
- package/standard/design/accessibility/zoom.md +3 -0
- package/standard/design/ai/ai-design-rules.md +8 -0
- package/standard/design/ai/anti-patterns.md +1 -0
- package/standard/design/ai/compliance-format.md +22 -0
- package/standard/design/ai/design-review.md +10 -0
- package/standard/design/ai/evals/README.md +1 -0
- package/standard/design/ai/instructions.md +7 -0
- package/standard/design/ai/prompts/accessibility-review.md +5 -0
- package/standard/design/ai/prompts/design-system-review.md +5 -0
- package/standard/design/ai/prompts/ui-review.md +5 -0
- package/standard/design/ai/prompts/ux-review.md +5 -0
- package/standard/design/ai/review-protocol.md +11 -0
- package/standard/design/anti-patterns/accessibility.md +7 -0
- package/standard/design/anti-patterns/ai-generated.md +6 -0
- package/standard/design/anti-patterns/dashboards.md +5 -0
- package/standard/design/anti-patterns/forms.md +5 -0
- package/standard/design/anti-patterns/responsive.md +5 -0
- package/standard/design/anti-patterns/ui.md +6 -0
- package/standard/design/anti-patterns/ux.md +5 -0
- package/standard/design/components/buttons.md +6 -0
- package/standard/design/components/dialogs.md +5 -0
- package/standard/design/components/feedback.md +3 -0
- package/standard/design/components/forms.md +3 -0
- package/standard/design/components/navigation.md +3 -0
- package/standard/design/components/tables.md +6 -0
- package/standard/design/content/error-messages.md +4 -0
- package/standard/design/content/ux-writing.md +5 -0
- package/standard/design/data-display/README.md +5 -0
- package/standard/design/data-display/currency.md +3 -0
- package/standard/design/data-display/dates.md +3 -0
- package/standard/design/data-display/density.md +3 -0
- package/standard/design/data-display/filtering.md +3 -0
- package/standard/design/data-display/localization.md +3 -0
- package/standard/design/data-display/numbers.md +3 -0
- package/standard/design/data-display/pagination.md +3 -0
- package/standard/design/data-display/percentages.md +3 -0
- package/standard/design/data-display/sorting.md +3 -0
- package/standard/design/data-display/tables.md +3 -0
- package/standard/design/data-display/time.md +3 -0
- package/standard/design/decisions/ADR-001-token-naming.md +13 -0
- package/standard/design/decisions/ADR-002-radius-scale.md +9 -0
- package/standard/design/decisions/ADR-003-color-system.md +9 -0
- package/standard/design/decisions/ADR-004-component-versioning.md +9 -0
- package/standard/design/decisions/README.md +3 -0
- package/standard/design/design-system/components.md +9 -0
- package/standard/design/design-system/naming.md +19 -0
- package/standard/design/design-system/tokens.md +7 -0
- package/standard/design/design-system/variants.md +5 -0
- package/standard/design/design-system/versioning.md +5 -0
- package/standard/design/health/coverage.md +1 -0
- package/standard/design/health/dashboard.md +14 -0
- package/standard/design/health/maturity-model.md +9 -0
- package/standard/design/health/score.md +14 -0
- package/standard/design/interaction/README.md +10 -0
- package/standard/design/interaction/keyboard.md +3 -0
- package/standard/design/interaction/mouse.md +2 -0
- package/standard/design/interaction/pen.md +1 -0
- package/standard/design/interaction/touch.md +3 -0
- package/standard/design/interaction/touchscreen.md +6 -0
- package/standard/design/interaction/voice.md +2 -0
- package/standard/design/localization/README.md +5 -0
- package/standard/design/localization/currency.md +3 -0
- package/standard/design/localization/date-time.md +3 -0
- package/standard/design/localization/i18n.md +3 -0
- package/standard/design/localization/locale-testing.md +3 -0
- package/standard/design/localization/number-formatting.md +3 -0
- package/standard/design/localization/pluralization.md +3 -0
- package/standard/design/localization/rtl.md +3 -0
- package/standard/design/localization/text-expansion.md +3 -0
- package/standard/design/motion/animation.md +6 -0
- package/standard/design/penpot/WORKFLOW.md +27 -0
- package/standard/design/platforms/README.md +12 -0
- package/standard/design/platforms/desktop/README.md +5 -0
- package/standard/design/platforms/mobile/android.md +5 -0
- package/standard/design/platforms/mobile/ios.md +5 -0
- package/standard/design/platforms/tablet/README.md +5 -0
- package/standard/design/platforms/web/README.md +1 -0
- package/standard/design/principles/design-principles.md +9 -0
- package/standard/design/principles/ui-principles.md +7 -0
- package/standard/design/principles/ux-principles.md +14 -0
- package/standard/design/references/atlassian.md +3 -0
- package/standard/design/references/carbon.md +3 -0
- package/standard/design/references/figma-sds.md +5 -0
- package/standard/design/references/govuk.md +3 -0
- package/standard/design/references/material.md +3 -0
- package/standard/design/references/nng.md +3 -0
- package/standard/design/references/openui.md +3 -0
- package/standard/design/references/primer.md +5 -0
- package/standard/design/references/storybook.md +3 -0
- package/standard/design/references/uswds.md +3 -0
- package/standard/design/references/w3c.md +3 -0
- package/standard/design/responsive/desktop.md +4 -0
- package/standard/design/responsive/mobile.md +6 -0
- package/standard/design/responsive/tablet.md +3 -0
- package/standard/design/states/async.md +3 -0
- package/standard/design/states/conflict.md +3 -0
- package/standard/design/states/empty.md +3 -0
- package/standard/design/states/error.md +3 -0
- package/standard/design/states/interaction.md +5 -0
- package/standard/design/states/loading.md +3 -0
- package/standard/design/states/offline.md +3 -0
- package/standard/design/states/optimistic.md +3 -0
- package/standard/design/states/partial.md +3 -0
- package/standard/design/states/permission-denied.md +3 -0
- package/standard/design/states/rate-limited.md +3 -0
- package/standard/design/states/read-only.md +3 -0
- package/standard/design/states/retry.md +3 -0
- package/standard/design/states/skeleton.md +3 -0
- package/standard/design/states/stale.md +3 -0
- package/standard/design/states/success.md +3 -0
- package/standard/design/states/timeout.md +3 -0
- package/standard/design/states/unsaved-changes.md +3 -0
- package/standard/design/ui/color.md +6 -0
- package/standard/design/ui/grids.md +5 -0
- package/standard/design/ui/icons.md +5 -0
- package/standard/design/ui/imagery.md +5 -0
- package/standard/design/ui/layout.md +5 -0
- package/standard/design/ui/spacing.md +5 -0
- package/standard/design/ui/typography.md +6 -0
- package/standard/design/ui/visual-design.md +7 -0
- package/standard/design/ux/cognitive-load.md +5 -0
- package/standard/design/ux/errors.md +6 -0
- package/standard/design/ux/feedback.md +5 -0
- package/standard/design/ux/forms.md +7 -0
- package/standard/design/ux/heuristics.md +14 -0
- package/standard/design/ux/information-architecture.md +6 -0
- package/standard/design/ux/navigation.md +6 -0
- package/standard/design/ux/usability.md +6 -0
- package/standard/engineering/README.md +29 -0
- package/standard/engineering/REFERENCES.md +42 -0
- package/standard/engineering/ai/AI_SECURITY.md +15 -0
- package/standard/engineering/ai/PROMPT_SECURITY.md +6 -0
- package/standard/engineering/architecture/ADR.md +11 -0
- package/standard/engineering/architecture/ARCHITECTURE.md +25 -0
- package/standard/engineering/architecture/PRINCIPLES.md +17 -0
- package/standard/engineering/architecture/THREAT_MODEL.md +14 -0
- package/standard/engineering/backend/API.md +29 -0
- package/standard/engineering/backend/BACKGROUND_JOBS.md +12 -0
- package/standard/engineering/backend/ERROR_HANDLING.md +26 -0
- package/standard/engineering/backend/LOGGING.md +12 -0
- package/standard/engineering/compliance/DATA_RETENTION.md +10 -0
- package/standard/engineering/compliance/PRIVACY.md +11 -0
- package/standard/engineering/database/BACKUPS.md +19 -0
- package/standard/engineering/database/DATABASE.md +30 -0
- package/standard/engineering/database/MIGRATIONS.md +12 -0
- package/standard/engineering/devops/BRANCH_PROTECTION.md +17 -0
- package/standard/engineering/devops/CI_CD.md +48 -0
- package/standard/engineering/devops/DEPLOYMENT.md +12 -0
- package/standard/engineering/devops/DOCKER.md +9 -0
- package/standard/engineering/devops/ENVIRONMENTS.md +12 -0
- package/standard/engineering/devops/RELEASE.md +6 -0
- package/standard/engineering/devops/ROLLBACK.md +9 -0
- package/standard/engineering/frontend/ACCESSIBILITY.md +16 -0
- package/standard/engineering/frontend/DESIGN_SYSTEM.md +10 -0
- package/standard/engineering/frontend/FRONTEND.md +17 -0
- package/standard/engineering/frontend/UX.md +15 -0
- package/standard/engineering/observability/ALERTING.md +11 -0
- package/standard/engineering/observability/INCIDENTS.md +10 -0
- package/standard/engineering/observability/MONITORING.md +17 -0
- package/standard/engineering/payments/PAYMENTS.md +15 -0
- package/standard/engineering/performance/PERFORMANCE.md +19 -0
- package/standard/engineering/security/API_SECURITY.md +22 -0
- package/standard/engineering/security/ASVS_5.0/V10_MALICIOUS_CODE.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V11_BUSINESS_LOGIC.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V12_FILES.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V13_API.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V14_CONFIGURATION.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V1_ARCHITECTURE.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V2_AUTHENTICATION.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V3_SESSION.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V4_ACCESS_CONTROL.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V5_VALIDATION.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V6_CRYPTOGRAPHY.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V7_ERROR_HANDLING.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V8_DATA_PROTECTION.md +31 -0
- package/standard/engineering/security/ASVS_5.0/V9_COMMUNICATION.md +31 -0
- package/standard/engineering/security/ASVS_REGISTRY.md +31 -0
- package/standard/engineering/security/AUTHENTICATION.md +28 -0
- package/standard/engineering/security/AUTHORIZATION.md +27 -0
- package/standard/engineering/security/DATA_SECURITY.md +14 -0
- package/standard/engineering/security/OWASP_ASVS.md +31 -0
- package/standard/engineering/security/SECRETS.md +28 -0
- package/standard/engineering/security/SECURITY.md +28 -0
- package/standard/engineering/testing/TESTING.md +27 -0
- package/templates/agents/AGENTS.md +34 -0
- package/templates/agents/CLAUDE.md +33 -0
- package/templates/agents/copilot-instructions.md +15 -0
- package/templates/agents/cursor.mdc +27 -0
- package/templates/agents/windsurfrules.md +17 -0
- package/templates/docs/ADR.md +16 -0
- package/templates/docs/FEATURE.md +19 -0
- package/templates/docs/SECURITY_REPORT.md +15 -0
- package/templates/docs/accessibility-review.md +9 -0
- package/templates/docs/component.md +9 -0
- package/templates/docs/decision-record.md +9 -0
- package/templates/docs/design-review.md +9 -0
- package/templates/docs/exception.md +9 -0
- package/templates/docs/page.md +9 -0
- package/templates/docs/pattern.md +9 -0
- package/templates/docs/user-flow.md +9 -0
- package/templates/github/workflows/app-ci.yml +91 -0
- package/templates/project/00_OVERVIEW.md +51 -0
- package/templates/project/01_ARCHITECTURE.md +37 -0
- package/templates/project/02_SURFACES.md +30 -0
- package/templates/project/03_DATA_MODEL.md +31 -0
- package/templates/project/04_PERMISSIONS.md +32 -0
- package/templates/project/05_FLOWS.md +20 -0
- package/templates/project/06_INTEGRATIONS.md +21 -0
- package/templates/project/07_DESIGN.md +33 -0
- package/templates/project/10_NEVER_ALWAYS.md +26 -0
- package/templates/project/11_GAPS.md +18 -0
- package/templates/project/12_DEBT.md +19 -0
- package/templates/project/13_RECIPES.md +35 -0
- package/templates/project/14_INDEX.md +50 -0
- package/templates/project/AGENTS.md +51 -0
- package/templates/project/README.md +49 -0
- package/templates/project/impact-map.yaml +41 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# API security
|
|
2
|
+
|
|
3
|
+
## P0
|
|
4
|
+
|
|
5
|
+
1. Authenticate and authorize every sensitive endpoint
|
|
6
|
+
2. Validate request schemas before business logic
|
|
7
|
+
3. Rate-limit public and auth endpoints
|
|
8
|
+
4. Verify webhook signatures before trusting events
|
|
9
|
+
5. Never put provider secrets in browser calls
|
|
10
|
+
|
|
11
|
+
## P1
|
|
12
|
+
|
|
13
|
+
1. Security headers (CSP start report-only, then enforce; plus baseline headers)
|
|
14
|
+
2. CORS allowlists — not `*` with credentials
|
|
15
|
+
3. Idempotency keys on payment and other critical POSTs
|
|
16
|
+
4. Consistent error shape without internal details
|
|
17
|
+
|
|
18
|
+
## Detect
|
|
19
|
+
|
|
20
|
+
- Open CORS on credentialed APIs
|
|
21
|
+
- Webhook handlers that accept raw JSON with no signature
|
|
22
|
+
- GraphQL/Data APIs that expose fields based only on “knowing the UUID”
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ASVS — V10 MALICIOUS CODE
|
|
2
|
+
|
|
3
|
+
**OWASP ASVS theme:** Malicious Code
|
|
4
|
+
|
|
5
|
+
> This file maps ASVS intent into **this standard**. It is not a verbatim copy of OWASP ASVS.
|
|
6
|
+
> Always prefer the official [OWASP ASVS](https://owasp.org/www-project-application-security-verification-standard/) text for audits.
|
|
7
|
+
|
|
8
|
+
## Focus in this standard
|
|
9
|
+
|
|
10
|
+
Dependency review; no obfuscated implants; install-script risk
|
|
11
|
+
|
|
12
|
+
## Our primary docs
|
|
13
|
+
|
|
14
|
+
- `docs/security/SECURITY.md`
|
|
15
|
+
|
|
16
|
+
## Traceability
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
ASVS theme (V10_MALICIOUS_CODE)
|
|
20
|
+
→ Our rules (linked docs)
|
|
21
|
+
→ Checklist items (checklists/security.md + domain checklists)
|
|
22
|
+
→ Automated checks (scripts/production-check.mjs + app tests)
|
|
23
|
+
→ CI gates (templates/github/workflows/app-ci.yml)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
See [`../ASVS_REGISTRY.md`](../ASVS_REGISTRY.md) for concrete rows.
|
|
27
|
+
|
|
28
|
+
## Agent rules
|
|
29
|
+
|
|
30
|
+
- Do not claim ASVS compliance without evidence against the official requirements.
|
|
31
|
+
- When implementing features in this theme, update checklist evidence and tests, not just docs.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ASVS — V11 BUSINESS LOGIC
|
|
2
|
+
|
|
3
|
+
**OWASP ASVS theme:** Business Logic
|
|
4
|
+
|
|
5
|
+
> This file maps ASVS intent into **this standard**. It is not a verbatim copy of OWASP ASVS.
|
|
6
|
+
> Always prefer the official [OWASP ASVS](https://owasp.org/www-project-application-security-verification-standard/) text for audits.
|
|
7
|
+
|
|
8
|
+
## Focus in this standard
|
|
9
|
+
|
|
10
|
+
Abuse cases; idempotency; race/workflow integrity
|
|
11
|
+
|
|
12
|
+
## Our primary docs
|
|
13
|
+
|
|
14
|
+
- `docs/backend/API.md`
|
|
15
|
+
|
|
16
|
+
## Traceability
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
ASVS theme (V11_BUSINESS_LOGIC)
|
|
20
|
+
→ Our rules (linked docs)
|
|
21
|
+
→ Checklist items (checklists/security.md + domain checklists)
|
|
22
|
+
→ Automated checks (scripts/production-check.mjs + app tests)
|
|
23
|
+
→ CI gates (templates/github/workflows/app-ci.yml)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
See [`../ASVS_REGISTRY.md`](../ASVS_REGISTRY.md) for concrete rows.
|
|
27
|
+
|
|
28
|
+
## Agent rules
|
|
29
|
+
|
|
30
|
+
- Do not claim ASVS compliance without evidence against the official requirements.
|
|
31
|
+
- When implementing features in this theme, update checklist evidence and tests, not just docs.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ASVS — V12 FILES
|
|
2
|
+
|
|
3
|
+
**OWASP ASVS theme:** File Handling
|
|
4
|
+
|
|
5
|
+
> This file maps ASVS intent into **this standard**. It is not a verbatim copy of OWASP ASVS.
|
|
6
|
+
> Always prefer the official [OWASP ASVS](https://owasp.org/www-project-application-security-verification-standard/) text for audits.
|
|
7
|
+
|
|
8
|
+
## Focus in this standard
|
|
9
|
+
|
|
10
|
+
Upload type/size limits; storage isolation; malware scanning when needed
|
|
11
|
+
|
|
12
|
+
## Our primary docs
|
|
13
|
+
|
|
14
|
+
- `docs/security/API_SECURITY.md`
|
|
15
|
+
|
|
16
|
+
## Traceability
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
ASVS theme (V12_FILES)
|
|
20
|
+
→ Our rules (linked docs)
|
|
21
|
+
→ Checklist items (checklists/security.md + domain checklists)
|
|
22
|
+
→ Automated checks (scripts/production-check.mjs + app tests)
|
|
23
|
+
→ CI gates (templates/github/workflows/app-ci.yml)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
See [`../ASVS_REGISTRY.md`](../ASVS_REGISTRY.md) for concrete rows.
|
|
27
|
+
|
|
28
|
+
## Agent rules
|
|
29
|
+
|
|
30
|
+
- Do not claim ASVS compliance without evidence against the official requirements.
|
|
31
|
+
- When implementing features in this theme, update checklist evidence and tests, not just docs.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ASVS — V13 API
|
|
2
|
+
|
|
3
|
+
**OWASP ASVS theme:** API and Web Service
|
|
4
|
+
|
|
5
|
+
> This file maps ASVS intent into **this standard**. It is not a verbatim copy of OWASP ASVS.
|
|
6
|
+
> Always prefer the official [OWASP ASVS](https://owasp.org/www-project-application-security-verification-standard/) text for audits.
|
|
7
|
+
|
|
8
|
+
## Focus in this standard
|
|
9
|
+
|
|
10
|
+
Authn on APIs; mass assignment; rate limits
|
|
11
|
+
|
|
12
|
+
## Our primary docs
|
|
13
|
+
|
|
14
|
+
- `docs/backend/API.md`
|
|
15
|
+
|
|
16
|
+
## Traceability
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
ASVS theme (V13_API)
|
|
20
|
+
→ Our rules (linked docs)
|
|
21
|
+
→ Checklist items (checklists/security.md + domain checklists)
|
|
22
|
+
→ Automated checks (scripts/production-check.mjs + app tests)
|
|
23
|
+
→ CI gates (templates/github/workflows/app-ci.yml)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
See [`../ASVS_REGISTRY.md`](../ASVS_REGISTRY.md) for concrete rows.
|
|
27
|
+
|
|
28
|
+
## Agent rules
|
|
29
|
+
|
|
30
|
+
- Do not claim ASVS compliance without evidence against the official requirements.
|
|
31
|
+
- When implementing features in this theme, update checklist evidence and tests, not just docs.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ASVS — V14 CONFIGURATION
|
|
2
|
+
|
|
3
|
+
**OWASP ASVS theme:** Configuration
|
|
4
|
+
|
|
5
|
+
> This file maps ASVS intent into **this standard**. It is not a verbatim copy of OWASP ASVS.
|
|
6
|
+
> Always prefer the official [OWASP ASVS](https://owasp.org/www-project-application-security-verification-standard/) text for audits.
|
|
7
|
+
|
|
8
|
+
## Focus in this standard
|
|
9
|
+
|
|
10
|
+
Hardened defaults; secrets management; env separation
|
|
11
|
+
|
|
12
|
+
## Our primary docs
|
|
13
|
+
|
|
14
|
+
- `docs/security/SECRETS.md`
|
|
15
|
+
|
|
16
|
+
## Traceability
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
ASVS theme (V14_CONFIGURATION)
|
|
20
|
+
→ Our rules (linked docs)
|
|
21
|
+
→ Checklist items (checklists/security.md + domain checklists)
|
|
22
|
+
→ Automated checks (scripts/production-check.mjs + app tests)
|
|
23
|
+
→ CI gates (templates/github/workflows/app-ci.yml)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
See [`../ASVS_REGISTRY.md`](../ASVS_REGISTRY.md) for concrete rows.
|
|
27
|
+
|
|
28
|
+
## Agent rules
|
|
29
|
+
|
|
30
|
+
- Do not claim ASVS compliance without evidence against the official requirements.
|
|
31
|
+
- When implementing features in this theme, update checklist evidence and tests, not just docs.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ASVS — V1 ARCHITECTURE
|
|
2
|
+
|
|
3
|
+
**OWASP ASVS theme:** Architecture, Design and Threat Modeling
|
|
4
|
+
|
|
5
|
+
> This file maps ASVS intent into **this standard**. It is not a verbatim copy of OWASP ASVS.
|
|
6
|
+
> Always prefer the official [OWASP ASVS](https://owasp.org/www-project-application-security-verification-standard/) text for audits.
|
|
7
|
+
|
|
8
|
+
## Focus in this standard
|
|
9
|
+
|
|
10
|
+
Architecture decision records; threat model for sensitive apps
|
|
11
|
+
|
|
12
|
+
## Our primary docs
|
|
13
|
+
|
|
14
|
+
- `docs/architecture/`
|
|
15
|
+
|
|
16
|
+
## Traceability
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
ASVS theme (V1_ARCHITECTURE)
|
|
20
|
+
→ Our rules (linked docs)
|
|
21
|
+
→ Checklist items (checklists/security.md + domain checklists)
|
|
22
|
+
→ Automated checks (scripts/production-check.mjs + app tests)
|
|
23
|
+
→ CI gates (templates/github/workflows/app-ci.yml)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
See [`../ASVS_REGISTRY.md`](../ASVS_REGISTRY.md) for concrete rows.
|
|
27
|
+
|
|
28
|
+
## Agent rules
|
|
29
|
+
|
|
30
|
+
- Do not claim ASVS compliance without evidence against the official requirements.
|
|
31
|
+
- When implementing features in this theme, update checklist evidence and tests, not just docs.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ASVS — V2 AUTHENTICATION
|
|
2
|
+
|
|
3
|
+
**OWASP ASVS theme:** Authentication
|
|
4
|
+
|
|
5
|
+
> This file maps ASVS intent into **this standard**. It is not a verbatim copy of OWASP ASVS.
|
|
6
|
+
> Always prefer the official [OWASP ASVS](https://owasp.org/www-project-application-security-verification-standard/) text for audits.
|
|
7
|
+
|
|
8
|
+
## Focus in this standard
|
|
9
|
+
|
|
10
|
+
Login, MFA, credential storage, account recovery
|
|
11
|
+
|
|
12
|
+
## Our primary docs
|
|
13
|
+
|
|
14
|
+
- `docs/security/AUTHENTICATION.md`
|
|
15
|
+
|
|
16
|
+
## Traceability
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
ASVS theme (V2_AUTHENTICATION)
|
|
20
|
+
→ Our rules (linked docs)
|
|
21
|
+
→ Checklist items (checklists/security.md + domain checklists)
|
|
22
|
+
→ Automated checks (scripts/production-check.mjs + app tests)
|
|
23
|
+
→ CI gates (templates/github/workflows/app-ci.yml)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
See [`../ASVS_REGISTRY.md`](../ASVS_REGISTRY.md) for concrete rows.
|
|
27
|
+
|
|
28
|
+
## Agent rules
|
|
29
|
+
|
|
30
|
+
- Do not claim ASVS compliance without evidence against the official requirements.
|
|
31
|
+
- When implementing features in this theme, update checklist evidence and tests, not just docs.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ASVS — V3 SESSION
|
|
2
|
+
|
|
3
|
+
**OWASP ASVS theme:** Session Management
|
|
4
|
+
|
|
5
|
+
> This file maps ASVS intent into **this standard**. It is not a verbatim copy of OWASP ASVS.
|
|
6
|
+
> Always prefer the official [OWASP ASVS](https://owasp.org/www-project-application-security-verification-standard/) text for audits.
|
|
7
|
+
|
|
8
|
+
## Focus in this standard
|
|
9
|
+
|
|
10
|
+
Session fixation, timeout, cookie flags, refresh rotation
|
|
11
|
+
|
|
12
|
+
## Our primary docs
|
|
13
|
+
|
|
14
|
+
- `docs/security/AUTHENTICATION.md`
|
|
15
|
+
|
|
16
|
+
## Traceability
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
ASVS theme (V3_SESSION)
|
|
20
|
+
→ Our rules (linked docs)
|
|
21
|
+
→ Checklist items (checklists/security.md + domain checklists)
|
|
22
|
+
→ Automated checks (scripts/production-check.mjs + app tests)
|
|
23
|
+
→ CI gates (templates/github/workflows/app-ci.yml)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
See [`../ASVS_REGISTRY.md`](../ASVS_REGISTRY.md) for concrete rows.
|
|
27
|
+
|
|
28
|
+
## Agent rules
|
|
29
|
+
|
|
30
|
+
- Do not claim ASVS compliance without evidence against the official requirements.
|
|
31
|
+
- When implementing features in this theme, update checklist evidence and tests, not just docs.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ASVS — V4 ACCESS CONTROL
|
|
2
|
+
|
|
3
|
+
**OWASP ASVS theme:** Access Control
|
|
4
|
+
|
|
5
|
+
> This file maps ASVS intent into **this standard**. It is not a verbatim copy of OWASP ASVS.
|
|
6
|
+
> Always prefer the official [OWASP ASVS](https://owasp.org/www-project-application-security-verification-standard/) text for audits.
|
|
7
|
+
|
|
8
|
+
## Focus in this standard
|
|
9
|
+
|
|
10
|
+
Server-side authz; tenant isolation; deny by default
|
|
11
|
+
|
|
12
|
+
## Our primary docs
|
|
13
|
+
|
|
14
|
+
- `docs/security/AUTHORIZATION.md`
|
|
15
|
+
|
|
16
|
+
## Traceability
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
ASVS theme (V4_ACCESS_CONTROL)
|
|
20
|
+
→ Our rules (linked docs)
|
|
21
|
+
→ Checklist items (checklists/security.md + domain checklists)
|
|
22
|
+
→ Automated checks (scripts/production-check.mjs + app tests)
|
|
23
|
+
→ CI gates (templates/github/workflows/app-ci.yml)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
See [`../ASVS_REGISTRY.md`](../ASVS_REGISTRY.md) for concrete rows.
|
|
27
|
+
|
|
28
|
+
## Agent rules
|
|
29
|
+
|
|
30
|
+
- Do not claim ASVS compliance without evidence against the official requirements.
|
|
31
|
+
- When implementing features in this theme, update checklist evidence and tests, not just docs.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ASVS — V5 VALIDATION
|
|
2
|
+
|
|
3
|
+
**OWASP ASVS theme:** Validation, Sanitization and Encoding
|
|
4
|
+
|
|
5
|
+
> This file maps ASVS intent into **this standard**. It is not a verbatim copy of OWASP ASVS.
|
|
6
|
+
> Always prefer the official [OWASP ASVS](https://owasp.org/www-project-application-security-verification-standard/) text for audits.
|
|
7
|
+
|
|
8
|
+
## Focus in this standard
|
|
9
|
+
|
|
10
|
+
Schema validation; output encoding; injection resistance
|
|
11
|
+
|
|
12
|
+
## Our primary docs
|
|
13
|
+
|
|
14
|
+
- `docs/security/API_SECURITY.md`
|
|
15
|
+
|
|
16
|
+
## Traceability
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
ASVS theme (V5_VALIDATION)
|
|
20
|
+
→ Our rules (linked docs)
|
|
21
|
+
→ Checklist items (checklists/security.md + domain checklists)
|
|
22
|
+
→ Automated checks (scripts/production-check.mjs + app tests)
|
|
23
|
+
→ CI gates (templates/github/workflows/app-ci.yml)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
See [`../ASVS_REGISTRY.md`](../ASVS_REGISTRY.md) for concrete rows.
|
|
27
|
+
|
|
28
|
+
## Agent rules
|
|
29
|
+
|
|
30
|
+
- Do not claim ASVS compliance without evidence against the official requirements.
|
|
31
|
+
- When implementing features in this theme, update checklist evidence and tests, not just docs.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ASVS — V6 CRYPTOGRAPHY
|
|
2
|
+
|
|
3
|
+
**OWASP ASVS theme:** Stored Cryptography
|
|
4
|
+
|
|
5
|
+
> This file maps ASVS intent into **this standard**. It is not a verbatim copy of OWASP ASVS.
|
|
6
|
+
> Always prefer the official [OWASP ASVS](https://owasp.org/www-project-application-security-verification-standard/) text for audits.
|
|
7
|
+
|
|
8
|
+
## Focus in this standard
|
|
9
|
+
|
|
10
|
+
Approved algorithms; key management; no home-rolled crypto
|
|
11
|
+
|
|
12
|
+
## Our primary docs
|
|
13
|
+
|
|
14
|
+
- `docs/security/DATA_SECURITY.md`
|
|
15
|
+
|
|
16
|
+
## Traceability
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
ASVS theme (V6_CRYPTOGRAPHY)
|
|
20
|
+
→ Our rules (linked docs)
|
|
21
|
+
→ Checklist items (checklists/security.md + domain checklists)
|
|
22
|
+
→ Automated checks (scripts/production-check.mjs + app tests)
|
|
23
|
+
→ CI gates (templates/github/workflows/app-ci.yml)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
See [`../ASVS_REGISTRY.md`](../ASVS_REGISTRY.md) for concrete rows.
|
|
27
|
+
|
|
28
|
+
## Agent rules
|
|
29
|
+
|
|
30
|
+
- Do not claim ASVS compliance without evidence against the official requirements.
|
|
31
|
+
- When implementing features in this theme, update checklist evidence and tests, not just docs.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ASVS — V7 ERROR HANDLING
|
|
2
|
+
|
|
3
|
+
**OWASP ASVS theme:** Error Handling and Logging
|
|
4
|
+
|
|
5
|
+
> This file maps ASVS intent into **this standard**. It is not a verbatim copy of OWASP ASVS.
|
|
6
|
+
> Always prefer the official [OWASP ASVS](https://owasp.org/www-project-application-security-verification-standard/) text for audits.
|
|
7
|
+
|
|
8
|
+
## Focus in this standard
|
|
9
|
+
|
|
10
|
+
Safe client errors; structured logs; no secret leakage
|
|
11
|
+
|
|
12
|
+
## Our primary docs
|
|
13
|
+
|
|
14
|
+
- `docs/backend/ERROR_HANDLING.md`
|
|
15
|
+
|
|
16
|
+
## Traceability
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
ASVS theme (V7_ERROR_HANDLING)
|
|
20
|
+
→ Our rules (linked docs)
|
|
21
|
+
→ Checklist items (checklists/security.md + domain checklists)
|
|
22
|
+
→ Automated checks (scripts/production-check.mjs + app tests)
|
|
23
|
+
→ CI gates (templates/github/workflows/app-ci.yml)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
See [`../ASVS_REGISTRY.md`](../ASVS_REGISTRY.md) for concrete rows.
|
|
27
|
+
|
|
28
|
+
## Agent rules
|
|
29
|
+
|
|
30
|
+
- Do not claim ASVS compliance without evidence against the official requirements.
|
|
31
|
+
- When implementing features in this theme, update checklist evidence and tests, not just docs.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ASVS — V8 DATA PROTECTION
|
|
2
|
+
|
|
3
|
+
**OWASP ASVS theme:** Data Protection
|
|
4
|
+
|
|
5
|
+
> This file maps ASVS intent into **this standard**. It is not a verbatim copy of OWASP ASVS.
|
|
6
|
+
> Always prefer the official [OWASP ASVS](https://owasp.org/www-project-application-security-verification-standard/) text for audits.
|
|
7
|
+
|
|
8
|
+
## Focus in this standard
|
|
9
|
+
|
|
10
|
+
Classification; encryption; minimization
|
|
11
|
+
|
|
12
|
+
## Our primary docs
|
|
13
|
+
|
|
14
|
+
- `docs/security/DATA_SECURITY.md`
|
|
15
|
+
|
|
16
|
+
## Traceability
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
ASVS theme (V8_DATA_PROTECTION)
|
|
20
|
+
→ Our rules (linked docs)
|
|
21
|
+
→ Checklist items (checklists/security.md + domain checklists)
|
|
22
|
+
→ Automated checks (scripts/production-check.mjs + app tests)
|
|
23
|
+
→ CI gates (templates/github/workflows/app-ci.yml)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
See [`../ASVS_REGISTRY.md`](../ASVS_REGISTRY.md) for concrete rows.
|
|
27
|
+
|
|
28
|
+
## Agent rules
|
|
29
|
+
|
|
30
|
+
- Do not claim ASVS compliance without evidence against the official requirements.
|
|
31
|
+
- When implementing features in this theme, update checklist evidence and tests, not just docs.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ASVS — V9 COMMUNICATION
|
|
2
|
+
|
|
3
|
+
**OWASP ASVS theme:** Communication
|
|
4
|
+
|
|
5
|
+
> This file maps ASVS intent into **this standard**. It is not a verbatim copy of OWASP ASVS.
|
|
6
|
+
> Always prefer the official [OWASP ASVS](https://owasp.org/www-project-application-security-verification-standard/) text for audits.
|
|
7
|
+
|
|
8
|
+
## Focus in this standard
|
|
9
|
+
|
|
10
|
+
TLS; secure headers; certificate hygiene
|
|
11
|
+
|
|
12
|
+
## Our primary docs
|
|
13
|
+
|
|
14
|
+
- `docs/security/API_SECURITY.md`
|
|
15
|
+
|
|
16
|
+
## Traceability
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
ASVS theme (V9_COMMUNICATION)
|
|
20
|
+
→ Our rules (linked docs)
|
|
21
|
+
→ Checklist items (checklists/security.md + domain checklists)
|
|
22
|
+
→ Automated checks (scripts/production-check.mjs + app tests)
|
|
23
|
+
→ CI gates (templates/github/workflows/app-ci.yml)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
See [`../ASVS_REGISTRY.md`](../ASVS_REGISTRY.md) for concrete rows.
|
|
27
|
+
|
|
28
|
+
## Agent rules
|
|
29
|
+
|
|
30
|
+
- Do not claim ASVS compliance without evidence against the official requirements.
|
|
31
|
+
- When implementing features in this theme, update checklist evidence and tests, not just docs.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ASVS registry — requirement → rule → check → CI
|
|
2
|
+
|
|
3
|
+
Traceability spine for security controls. Expand rows as apps adopt the standard.
|
|
4
|
+
|
|
5
|
+
Legend: **Auto** = scriptable today in `production-check` / typical Node CI · **Test** = app must provide automated test · **Manual** = human sign-off until automated.
|
|
6
|
+
|
|
7
|
+
| ASVS theme | Our rule (P0/P1) | Checklist | Automated check | CI gate |
|
|
8
|
+
|---|---|---|---|---|
|
|
9
|
+
| V2 Authentication | P0 server verifies identity on protected routes | `checklists/security.md` | Test: unauthenticated → 401 | unit/integration job |
|
|
10
|
+
| V3 Session | P0 secure cookie / token handling; no session fixation | `checklists/security.md` | Test + config review | security job |
|
|
11
|
+
| V4 Access control | P0 authz on every sensitive read/write; tenant scope from server session | `checklists/security.md` | Test: user A cannot read B | unit/integration **required** |
|
|
12
|
+
| V5 Validation | P0 validate external input before business logic | `checklists/api.md` | schema tests / fuzz critical parsers | unit + lint |
|
|
13
|
+
| V6 Cryptography | P0 no plaintext secrets at rest where threat model requires crypto; no home-rolled | `checklists/security.md` | Manual + dep review | secret scan + review |
|
|
14
|
+
| V7 Error handling | P0 no stack/SQL internals to clients in prod | `checklists/api.md` | Test prod error shape | unit/integration |
|
|
15
|
+
| V8 Data protection | P1 classify sensitive fields; minimize retention | `checklists/production.md` | Manual / compliance review | release checklist |
|
|
16
|
+
| V9 Communication | P0 HTTPS in production | `checklists/devops.md` | deploy config / smoke | deploy gates |
|
|
17
|
+
| V10 Malicious code | P1 lockfile + dependency audit | `checklists/devops.md` | `npm audit` / OSV | **dependency-audit** required |
|
|
18
|
+
| V11 Business logic | P1 abuse cases for money/state transitions | domain tests | Test | integration/E2E |
|
|
19
|
+
| V12 Files | P0 constrain uploads if feature exists | `checklists/security.md` | Test size/type | integration |
|
|
20
|
+
| V13 API | P0 rate limit auth & public abuse surfaces | `checklists/api.md` | Test or config evidence | security job |
|
|
21
|
+
| V14 Configuration | P0 no secrets in git; env separation | `checklists/security.md` | secret scan + `.env` gitignore | **secret-scan** required |
|
|
22
|
+
| V1 Architecture | P1 threat model for sensitive apps; ADRs for irreversible choices | `checklists/architecture.md` | Manual / ADR presence | review |
|
|
23
|
+
|
|
24
|
+
## How to extend
|
|
25
|
+
|
|
26
|
+
When you add a P0 security rule:
|
|
27
|
+
|
|
28
|
+
1. Link the ASVS theme chapter under `ASVS_5.0/`
|
|
29
|
+
2. Add a checklist checkbox
|
|
30
|
+
3. Add a `production-check` evidence probe **or** name the required test id
|
|
31
|
+
4. Mark the CI job that fails the PR if missing
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Authentication
|
|
2
|
+
|
|
3
|
+
## P0
|
|
4
|
+
|
|
5
|
+
1. Use a proven password hashing algorithm (e.g. Argon2id / bcrypt) — never plaintext or reversible encryption for passwords.
|
|
6
|
+
2. Protect login/password-reset against brute force (rate limits, lockout/backoff).
|
|
7
|
+
3. Sessions/tokens expire; logout revokes server-side session or refresh token where applicable.
|
|
8
|
+
4. Prefer established auth providers/libraries over home-grown crypto.
|
|
9
|
+
5. Reject unexpected JWT algorithms explicitly (disallow `none`).
|
|
10
|
+
|
|
11
|
+
## P1
|
|
12
|
+
|
|
13
|
+
1. Email verification for self-serve signup when identity matters
|
|
14
|
+
2. MFA for admin / high-privilege accounts
|
|
15
|
+
3. Secure account recovery flows (no user enumeration where feasible)
|
|
16
|
+
4. Refresh-token rotation and silent refresh patterns that preserve UX without eternal sessions
|
|
17
|
+
|
|
18
|
+
## Detect
|
|
19
|
+
|
|
20
|
+
- Passwords stored with MD5/SHA1
|
|
21
|
+
- Tokens in `localStorage` without a clear XSS threat strategy
|
|
22
|
+
- Infinite session lifetime
|
|
23
|
+
|
|
24
|
+
## Verify
|
|
25
|
+
|
|
26
|
+
- Parallel login stress does not collide sessions
|
|
27
|
+
- Expired tokens are rejected
|
|
28
|
+
- Password reset tokens are single-use and time-limited
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Authorization
|
|
2
|
+
|
|
3
|
+
**Authentication ≠ authorization.** Login answers *who*. Every route must still answer *what they can do*.
|
|
4
|
+
|
|
5
|
+
## P0
|
|
6
|
+
|
|
7
|
+
1. Enforce permissions on the server (API/DB). Hiding a button is not access control.
|
|
8
|
+
2. Object-level authorization on every resource (prevent IDOR/BOLA).
|
|
9
|
+
3. For multi-tenant apps, scope every query by tenant from the **verified** server session — never trust client-sent `tenantId` alone.
|
|
10
|
+
4. Add automated tests that User A cannot read/write User B (and Tenant A ↛ Tenant B).
|
|
11
|
+
|
|
12
|
+
## P1
|
|
13
|
+
|
|
14
|
+
1. Model RBAC as permissions first; roles are bundles of permissions
|
|
15
|
+
2. Admin/support break-glass access is audited and explicit
|
|
16
|
+
3. Deny by default on new endpoints
|
|
17
|
+
|
|
18
|
+
## Detect
|
|
19
|
+
|
|
20
|
+
- `GET /items/:id` with no ownership check
|
|
21
|
+
- Authorization only in React route guards
|
|
22
|
+
- Shared “service role” keys in the browser
|
|
23
|
+
|
|
24
|
+
## Verify
|
|
25
|
+
|
|
26
|
+
- Cross-user and cross-tenant denial tests in CI
|
|
27
|
+
- Mutating endpoints return 401/403 correctly
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Data security
|
|
2
|
+
|
|
3
|
+
## P0
|
|
4
|
+
|
|
5
|
+
1. Classify data (public, internal, PII, secrets, payment)
|
|
6
|
+
2. Encrypt in transit (TLS)
|
|
7
|
+
3. Minimize PII in logs
|
|
8
|
+
4. Access to production data is least-privilege and audited
|
|
9
|
+
|
|
10
|
+
## P1
|
|
11
|
+
|
|
12
|
+
1. Encrypt sensitive fields at rest when threat model requires
|
|
13
|
+
2. Retention and deletion processes exist (see `docs/compliance/`)
|
|
14
|
+
3. Exports and backups are protected equivalently to production data
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# OWASP ASVS
|
|
2
|
+
|
|
3
|
+
Use [OWASP ASVS](https://owasp.org/www-project-application-security-verification-standard/) as the detailed security requirements catalog.
|
|
4
|
+
|
|
5
|
+
## In this repo
|
|
6
|
+
|
|
7
|
+
| Path | Role |
|
|
8
|
+
|---|---|
|
|
9
|
+
| [`ASVS_5.0/`](ASVS_5.0/) | Theme chapters (V1–V14) mapped to our docs |
|
|
10
|
+
| [`ASVS_REGISTRY.md`](ASVS_REGISTRY.md) | Requirement → rule → checklist → test → CI |
|
|
11
|
+
|
|
12
|
+
## How to use
|
|
13
|
+
|
|
14
|
+
1. Choose a target verification level appropriate to risk (many SaaS start with a pragmatic Level 1–2 subset).
|
|
15
|
+
2. Track coverage via the registry + `checklists/security.md`.
|
|
16
|
+
3. Prefer official ASVS wording in formal audits; use this repo for engineering application.
|
|
17
|
+
4. Never claim “ASVS certified” without performing verification against the official standard.
|
|
18
|
+
|
|
19
|
+
## Traceability model
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
ASVS Requirement
|
|
23
|
+
↓
|
|
24
|
+
Our Rule (docs/security/*)
|
|
25
|
+
↓
|
|
26
|
+
Checklist (checklists/security.md)
|
|
27
|
+
↓
|
|
28
|
+
Automated Test / production-check probe
|
|
29
|
+
↓
|
|
30
|
+
CI Gate (required check)
|
|
31
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Secrets
|
|
2
|
+
|
|
3
|
+
## P0
|
|
4
|
+
|
|
5
|
+
1. No secrets in source control, screenshots, logs, or client bundles
|
|
6
|
+
2. `.env` is gitignored; provide `.env.example` with empty placeholders
|
|
7
|
+
3. Separate credentials per environment (local / staging / prod)
|
|
8
|
+
4. If a secret was ever committed: **rotate it** — deleting the line is not enough
|
|
9
|
+
|
|
10
|
+
## P1
|
|
11
|
+
|
|
12
|
+
1. Use a secret manager in real deployments
|
|
13
|
+
2. Short-lived credentials where the platform allows
|
|
14
|
+
3. Secret scanning in CI (and push protection when available)
|
|
15
|
+
|
|
16
|
+
## Forbidden examples
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
password = "admin123"
|
|
20
|
+
API_KEY = "sk-..."
|
|
21
|
+
DATABASE_PASSWORD = "..."
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Required pattern
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
env / secret manager → server runtime only → never NEXT_PUBLIC_* for private keys
|
|
28
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Security overview
|
|
2
|
+
|
|
3
|
+
Security is not a final polish step. Defaults from scaffolds and AI codegen are often demo-oriented and **open**.
|
|
4
|
+
|
|
5
|
+
## Baseline domains (ASVS-oriented)
|
|
6
|
+
|
|
7
|
+
- Authentication
|
|
8
|
+
- Authorization / access control
|
|
9
|
+
- Session management
|
|
10
|
+
- Input validation & output encoding
|
|
11
|
+
- Cryptography
|
|
12
|
+
- Error handling & logging
|
|
13
|
+
- Data protection
|
|
14
|
+
- API security
|
|
15
|
+
- File handling
|
|
16
|
+
- Business logic security
|
|
17
|
+
- Configuration security
|
|
18
|
+
|
|
19
|
+
## P0 ship blockers
|
|
20
|
+
|
|
21
|
+
1. No secrets in git or client bundles; rotate anything that ever leaked
|
|
22
|
+
2. Server-side authorization on every sensitive read/write (UI checks are not security)
|
|
23
|
+
3. Validate/sanitize all external input before business logic
|
|
24
|
+
4. Hide stack traces and internal errors from clients in production
|
|
25
|
+
5. Rate-limit auth and other public abuse surfaces
|
|
26
|
+
6. HTTPS in production with secure cookie attributes where cookies are used
|
|
27
|
+
|
|
28
|
+
See also: `AUTHENTICATION.md`, `AUTHORIZATION.md`, `SECRETS.md`, `API_SECURITY.md`, and [`checklists/security.md`](../../../checklists/engineering/security.md).
|