agentic-qe 3.7.8 → 3.7.10
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/.claude/skills/.validation/README.md +111 -111
- package/.claude/skills/.validation/examples/chaos-engineering-output.example.json +530 -530
- package/.claude/skills/.validation/examples/performance-testing-output.example.json +252 -252
- package/.claude/skills/.validation/examples/security-testing-output.example.json +413 -413
- package/.claude/skills/.validation/examples/testability-scoring-output.example.json +350 -350
- package/.claude/skills/.validation/schemas/skill-eval.schema.json +462 -462
- package/.claude/skills/.validation/schemas/skill-frontmatter.schema.json +341 -341
- package/.claude/skills/.validation/schemas/skill-output-meta.schema.json +199 -199
- package/.claude/skills/.validation/schemas/skill-output.template.json +610 -610
- package/.claude/skills/.validation/skill-validation-mcp-integration.md +250 -250
- package/.claude/skills/.validation/templates/eval.template.yaml +366 -366
- package/.claude/skills/.validation/templates/schemas/output.json +145 -145
- package/.claude/skills/.validation/templates/security-testing-eval.template.yaml +725 -725
- package/.claude/skills/.validation/templates/skill-frontmatter.example.yaml +225 -225
- package/.claude/skills/.validation/test-data/invalid-output.json +5 -5
- package/.claude/skills/.validation/test-data/minimal-output.json +9 -9
- package/.claude/skills/.validation/test-data/sample-output.json +73 -73
- package/.claude/skills/a11y-ally/evals/a11y-ally.yaml +376 -376
- package/.claude/skills/a11y-ally/schemas/output.json +549 -549
- package/.claude/skills/accessibility-testing/evals/accessibility-testing.yaml +719 -719
- package/.claude/skills/accessibility-testing/schemas/output.json +776 -776
- package/.claude/skills/accessibility-testing/test-data/sample-output.json +191 -191
- package/.claude/skills/agentic-quality-engineering/schemas/output.json +577 -577
- package/.claude/skills/api-testing-patterns/evals/api-testing-patterns.yaml +696 -696
- package/.claude/skills/api-testing-patterns/schemas/output.json +845 -845
- package/.claude/skills/aqe-v2-v3-migration/schemas/output.json +513 -513
- package/.claude/skills/brutal-honesty-review/schemas/output.json +291 -291
- package/.claude/skills/bug-reporting-excellence/schemas/output.json +288 -288
- package/.claude/skills/chaos-engineering-resilience/evals/chaos-engineering-resilience.yaml +761 -761
- package/.claude/skills/chaos-engineering-resilience/schemas/output.json +1205 -1205
- package/.claude/skills/cicd-pipeline-qe-orchestrator/evals/cicd-pipeline-qe-orchestrator.yaml +157 -157
- package/.claude/skills/cicd-pipeline-qe-orchestrator/schemas/output.json +542 -542
- package/.claude/skills/code-review-quality/schemas/output.json +264 -264
- package/.claude/skills/compatibility-testing/evals/compatibility-testing.yaml +410 -410
- package/.claude/skills/compatibility-testing/schemas/output.json +551 -551
- package/.claude/skills/compliance-testing/evals/compliance-testing.yaml +1107 -1107
- package/.claude/skills/compliance-testing/schemas/output.json +845 -845
- package/.claude/skills/consultancy-practices/schemas/output.json +282 -282
- package/.claude/skills/contract-testing/evals/contract-testing.yaml +748 -748
- package/.claude/skills/contract-testing/schemas/output.json +638 -638
- package/.claude/skills/database-testing/evals/database-testing.yaml +968 -968
- package/.claude/skills/database-testing/schemas/output.json +1446 -1446
- package/.claude/skills/debug-loop/SKILL.md +61 -61
- package/.claude/skills/enterprise-integration-testing/SKILL.md +735 -735
- package/.claude/skills/enterprise-integration-testing/evals/enterprise-integration-testing.yaml +158 -0
- package/.claude/skills/enterprise-integration-testing/schemas/output.json +74 -0
- package/.claude/skills/enterprise-integration-testing/scripts/validate-config.json +25 -0
- package/.claude/skills/iterative-loop/SKILL.md +371 -371
- package/.claude/skills/localization-testing/evals/localization-testing.yaml +544 -544
- package/.claude/skills/localization-testing/schemas/output.json +325 -325
- package/.claude/skills/middleware-testing-patterns/SKILL.md +798 -798
- package/.claude/skills/middleware-testing-patterns/evals/middleware-testing-patterns.yaml +153 -0
- package/.claude/skills/middleware-testing-patterns/schemas/output.json +58 -0
- package/.claude/skills/middleware-testing-patterns/scripts/validate-config.json +25 -0
- package/.claude/skills/mobile-testing/evals/mobile-testing.yaml +537 -537
- package/.claude/skills/mobile-testing/schemas/output.json +318 -318
- package/.claude/skills/mutation-testing/evals/mutation-testing.yaml +652 -652
- package/.claude/skills/mutation-testing/schemas/output.json +707 -707
- package/.claude/skills/mutation-testing/test-data/sample-output.json +295 -295
- package/.claude/skills/n8n-expression-testing/evals/n8n-expression-testing.yaml +450 -450
- package/.claude/skills/n8n-expression-testing/schemas/output.json +369 -369
- package/.claude/skills/n8n-integration-testing-patterns/evals/n8n-integration-testing-patterns.yaml +522 -522
- package/.claude/skills/n8n-integration-testing-patterns/schemas/output.json +291 -291
- package/.claude/skills/n8n-security-testing/evals/n8n-security-testing.yaml +493 -493
- package/.claude/skills/n8n-security-testing/schemas/output.json +293 -293
- package/.claude/skills/n8n-trigger-testing-strategies/evals/n8n-trigger-testing-strategies.yaml +500 -500
- package/.claude/skills/n8n-trigger-testing-strategies/schemas/output.json +295 -295
- package/.claude/skills/n8n-workflow-testing-fundamentals/evals/n8n-workflow-testing-fundamentals.yaml +497 -497
- package/.claude/skills/n8n-workflow-testing-fundamentals/schemas/output.json +254 -254
- package/.claude/skills/observability-testing-patterns/SKILL.md +930 -930
- package/.claude/skills/observability-testing-patterns/evals/observability-testing-patterns.yaml +157 -0
- package/.claude/skills/observability-testing-patterns/schemas/output.json +58 -0
- package/.claude/skills/observability-testing-patterns/scripts/validate-config.json +25 -0
- package/.claude/skills/pentest-validation/SKILL.md +268 -268
- package/.claude/skills/pentest-validation/evals/pentest-validation.yaml +708 -708
- package/.claude/skills/pentest-validation/schemas/output.json +281 -281
- package/.claude/skills/performance-analysis/evals/performance-analysis.yaml +144 -144
- package/.claude/skills/performance-analysis/schemas/output.json +588 -588
- package/.claude/skills/performance-testing/evals/performance-testing.yaml +772 -772
- package/.claude/skills/performance-testing/schemas/output.json +1184 -1184
- package/.claude/skills/pr-review/SKILL.md +61 -61
- package/.claude/skills/qcsd-cicd-swarm/SKILL.md +2206 -2206
- package/.claude/skills/qcsd-cicd-swarm/evals/qcsd-cicd-swarm.yaml +211 -0
- package/.claude/skills/qcsd-cicd-swarm/schemas/output.json +86 -0
- package/.claude/skills/qcsd-cicd-swarm/scripts/validate-config.json +30 -0
- package/.claude/skills/qcsd-development-swarm/SKILL.md +2154 -2154
- package/.claude/skills/qcsd-development-swarm/evals/qcsd-development-swarm.yaml +162 -0
- package/.claude/skills/qcsd-development-swarm/schemas/output.json +72 -0
- package/.claude/skills/qcsd-development-swarm/scripts/validate-config.json +25 -0
- package/.claude/skills/qcsd-ideation-swarm/evals/qcsd-ideation-swarm.yaml +138 -138
- package/.claude/skills/qcsd-ideation-swarm/schemas/output.json +568 -568
- package/.claude/skills/qcsd-production-swarm/SKILL.md +2781 -2781
- package/.claude/skills/qcsd-production-swarm/evals/qcsd-production-swarm.yaml +246 -246
- package/.claude/skills/qcsd-production-swarm/schemas/output.json +505 -505
- package/.claude/skills/qcsd-production-swarm/scripts/validate-config.json +25 -25
- package/.claude/skills/qe-chaos-resilience/evals/qe-chaos-resilience.yaml +443 -443
- package/.claude/skills/qe-chaos-resilience/schemas/output.json +314 -314
- package/.claude/skills/qe-code-intelligence/evals/qe-code-intelligence.yaml +459 -459
- package/.claude/skills/qe-code-intelligence/schemas/output.json +315 -315
- package/.claude/skills/qe-contract-testing/evals/qe-contract-testing.yaml +513 -513
- package/.claude/skills/qe-contract-testing/schemas/output.json +295 -295
- package/.claude/skills/qe-coverage-analysis/evals/qe-coverage-analysis.yaml +494 -494
- package/.claude/skills/qe-coverage-analysis/schemas/output.json +286 -286
- package/.claude/skills/qe-defect-intelligence/evals/qe-defect-intelligence.yaml +511 -511
- package/.claude/skills/qe-defect-intelligence/schemas/output.json +283 -283
- package/.claude/skills/qe-iterative-loop/schemas/output.json +264 -264
- package/.claude/skills/qe-learning-optimization/evals/qe-learning-optimization.yaml +144 -144
- package/.claude/skills/qe-learning-optimization/schemas/output.json +288 -288
- package/.claude/skills/qe-quality-assessment/evals/qe-quality-assessment.yaml +506 -506
- package/.claude/skills/qe-quality-assessment/schemas/output.json +550 -550
- package/.claude/skills/qe-requirements-validation/evals/qe-requirements-validation.yaml +598 -598
- package/.claude/skills/qe-requirements-validation/schemas/output.json +587 -587
- package/.claude/skills/qe-security-compliance/evals/qe-security-compliance.yaml +595 -595
- package/.claude/skills/qe-security-compliance/schemas/output.json +498 -498
- package/.claude/skills/qe-test-execution/evals/qe-test-execution.yaml +607 -607
- package/.claude/skills/qe-test-execution/schemas/output.json +529 -529
- package/.claude/skills/qe-test-generation/evals/qe-test-generation.yaml +148 -148
- package/.claude/skills/qe-test-generation/schemas/output.json +439 -439
- package/.claude/skills/qe-visual-accessibility/evals/qe-visual-accessibility.yaml +142 -142
- package/.claude/skills/qe-visual-accessibility/schemas/output.json +491 -491
- package/.claude/skills/quality-metrics/evals/quality-metrics.yaml +494 -494
- package/.claude/skills/quality-metrics/schemas/output.json +403 -403
- package/.claude/skills/refactoring-patterns/schemas/output.json +475 -475
- package/.claude/skills/regression-testing/evals/regression-testing.yaml +504 -504
- package/.claude/skills/regression-testing/schemas/output.json +311 -311
- package/.claude/skills/release/SKILL.md +347 -347
- package/.claude/skills/risk-based-testing/evals/risk-based-testing.yaml +141 -141
- package/.claude/skills/risk-based-testing/schemas/output.json +480 -480
- package/.claude/skills/security-testing/evals/security-testing.yaml +789 -789
- package/.claude/skills/security-testing/schemas/output.json +879 -879
- package/.claude/skills/security-visual-testing/evals/security-visual-testing.yaml +163 -163
- package/.claude/skills/security-visual-testing/schemas/output.json +486 -486
- package/.claude/skills/sfdipot-product-factors/SKILL.md +239 -239
- package/.claude/skills/sherlock-review/schemas/output.json +297 -297
- package/.claude/skills/shift-left-testing/evals/shift-left-testing.yaml +145 -145
- package/.claude/skills/shift-left-testing/schemas/output.json +459 -459
- package/.claude/skills/shift-right-testing/evals/shift-right-testing.yaml +147 -147
- package/.claude/skills/shift-right-testing/schemas/output.json +418 -418
- package/.claude/skills/skills-manifest.json +1 -1
- package/.claude/skills/tdd-london-chicago/schemas/output.json +444 -444
- package/.claude/skills/technical-writing/schemas/output.json +268 -268
- package/.claude/skills/test-automation-strategy/evals/test-automation-strategy.yaml +148 -148
- package/.claude/skills/test-automation-strategy/schemas/output.json +444 -444
- package/.claude/skills/test-data-management/evals/test-data-management.yaml +504 -504
- package/.claude/skills/test-data-management/schemas/output.json +284 -284
- package/.claude/skills/test-design-techniques/evals/test-design-techniques.yaml +142 -142
- package/.claude/skills/test-design-techniques/schemas/output.json +295 -295
- package/.claude/skills/test-environment-management/schemas/output.json +310 -310
- package/.claude/skills/test-idea-rewriting/SKILL.md +229 -229
- package/.claude/skills/test-reporting-analytics/evals/test-reporting-analytics.yaml +155 -155
- package/.claude/skills/test-reporting-analytics/schemas/output.json +329 -329
- package/.claude/skills/testability-scoring/evals/testability-scoring.yaml +814 -814
- package/.claude/skills/testability-scoring/resources/templates/config.template.js +84 -84
- package/.claude/skills/testability-scoring/schemas/output.json +606 -606
- package/.claude/skills/testability-scoring/scripts/generate-html-report.js +1007 -1007
- package/.claude/skills/trust-tier-manifest.json +78 -7
- package/.claude/skills/verification-quality/evals/verification-quality.yaml +150 -150
- package/.claude/skills/verification-quality/schemas/output.json +432 -432
- package/.claude/skills/visual-testing-advanced/evals/visual-testing-advanced.yaml +154 -154
- package/.claude/skills/visual-testing-advanced/schemas/output.json +294 -294
- package/.claude/skills/wms-testing-patterns/evals/wms-testing-patterns.yaml +165 -165
- package/.claude/skills/wms-testing-patterns/schemas/output.json +150 -150
- package/.claude/skills/wms-testing-patterns/scripts/validate-config.json +51 -51
- package/CHANGELOG.md +34 -0
- package/README.md +169 -900
- package/assets/agents/v3/helpers/quality-criteria/evidence-classification.md +116 -116
- package/assets/agents/v3/helpers/quality-criteria/htsm-categories.md +139 -139
- package/assets/governance/constitution.md +202 -202
- package/assets/governance/shards/chaos-resilience.shard.md +221 -221
- package/assets/governance/shards/code-intelligence.shard.md +178 -178
- package/assets/governance/shards/contract-testing.shard.md +206 -206
- package/assets/governance/shards/coverage-analysis.shard.md +146 -146
- package/assets/governance/shards/defect-intelligence.shard.md +182 -182
- package/assets/governance/shards/learning-optimization.shard.md +248 -248
- package/assets/governance/shards/quality-assessment.shard.md +165 -165
- package/assets/governance/shards/requirements-validation.shard.md +177 -177
- package/assets/governance/shards/security-compliance.shard.md +196 -196
- package/assets/governance/shards/test-execution.shard.md +156 -156
- package/assets/governance/shards/test-generation.shard.md +128 -128
- package/assets/governance/shards/visual-accessibility.shard.md +209 -209
- package/assets/hooks/cross-phase-memory.yaml +253 -253
- package/assets/patterns/adr-051-booster-patterns.json +78 -78
- package/assets/patterns/adr-051-embedding-patterns.json +147 -147
- package/assets/patterns/adr-051-integration-summary.json +62 -62
- package/assets/patterns/adr-051-reasoning-patterns.json +166 -166
- package/assets/patterns/adr-051-router-patterns.json +113 -113
- package/assets/patterns/index.json +136 -136
- package/assets/skills/.validation/README.md +111 -111
- package/assets/skills/.validation/examples/chaos-engineering-output.example.json +530 -530
- package/assets/skills/.validation/examples/performance-testing-output.example.json +252 -252
- package/assets/skills/.validation/examples/security-testing-output.example.json +413 -413
- package/assets/skills/.validation/examples/testability-scoring-output.example.json +350 -350
- package/assets/skills/.validation/schemas/skill-eval.schema.json +462 -462
- package/assets/skills/.validation/schemas/skill-frontmatter.schema.json +341 -341
- package/assets/skills/.validation/schemas/skill-output-meta.schema.json +199 -199
- package/assets/skills/.validation/schemas/skill-output.template.json +610 -610
- package/assets/skills/.validation/skill-validation-mcp-integration.md +250 -250
- package/assets/skills/.validation/templates/eval.template.yaml +366 -366
- package/assets/skills/.validation/templates/schemas/output.json +145 -145
- package/assets/skills/.validation/templates/security-testing-eval.template.yaml +725 -725
- package/assets/skills/.validation/templates/skill-frontmatter.example.yaml +225 -225
- package/assets/skills/.validation/test-data/invalid-output.json +5 -5
- package/assets/skills/.validation/test-data/minimal-output.json +9 -9
- package/assets/skills/.validation/test-data/sample-output.json +73 -73
- package/assets/skills/a11y-ally/SKILL.md +1664 -1658
- package/assets/skills/a11y-ally/evals/a11y-ally.yaml +376 -0
- package/assets/skills/a11y-ally/schemas/output.json +549 -0
- package/assets/skills/a11y-ally/scripts/validate-config.json +42 -0
- package/assets/skills/accessibility-testing/evals/accessibility-testing.yaml +719 -719
- package/assets/skills/accessibility-testing/schemas/output.json +776 -776
- package/assets/skills/accessibility-testing/test-data/sample-output.json +191 -191
- package/assets/skills/agentic-quality-engineering/schemas/output.json +577 -577
- package/assets/skills/api-testing-patterns/evals/api-testing-patterns.yaml +696 -696
- package/assets/skills/api-testing-patterns/schemas/output.json +845 -845
- package/assets/skills/aqe-v2-v3-migration/schemas/output.json +513 -513
- package/assets/skills/brutal-honesty-review/SKILL.md +5 -0
- package/assets/skills/brutal-honesty-review/schemas/output.json +291 -0
- package/assets/skills/brutal-honesty-review/scripts/validate-config.json +34 -0
- package/assets/skills/bug-reporting-excellence/schemas/output.json +288 -288
- package/assets/skills/chaos-engineering-resilience/evals/chaos-engineering-resilience.yaml +761 -761
- package/assets/skills/chaos-engineering-resilience/schemas/output.json +1205 -1205
- package/assets/skills/cicd-pipeline-qe-orchestrator/README.md +1 -1
- package/assets/skills/cicd-pipeline-qe-orchestrator/SKILL.md +6 -0
- package/assets/skills/cicd-pipeline-qe-orchestrator/evals/cicd-pipeline-qe-orchestrator.yaml +157 -0
- package/assets/skills/cicd-pipeline-qe-orchestrator/schemas/output.json +542 -0
- package/assets/skills/cicd-pipeline-qe-orchestrator/scripts/validate-config.json +42 -0
- package/assets/skills/code-review-quality/schemas/output.json +264 -264
- package/assets/skills/compatibility-testing/evals/compatibility-testing.yaml +410 -410
- package/assets/skills/compatibility-testing/schemas/output.json +551 -551
- package/assets/skills/compliance-testing/evals/compliance-testing.yaml +1107 -1107
- package/assets/skills/compliance-testing/schemas/output.json +845 -845
- package/assets/skills/consultancy-practices/schemas/output.json +282 -282
- package/assets/skills/contract-testing/evals/contract-testing.yaml +748 -748
- package/assets/skills/contract-testing/schemas/output.json +638 -638
- package/assets/skills/database-testing/evals/database-testing.yaml +968 -968
- package/assets/skills/database-testing/schemas/output.json +1446 -1446
- package/assets/skills/debug-loop/SKILL.md +61 -61
- package/assets/skills/enterprise-integration-testing/SKILL.md +735 -735
- package/assets/skills/enterprise-integration-testing/evals/enterprise-integration-testing.yaml +158 -0
- package/assets/skills/enterprise-integration-testing/schemas/output.json +74 -0
- package/assets/skills/enterprise-integration-testing/scripts/validate-config.json +25 -0
- package/assets/skills/localization-testing/evals/localization-testing.yaml +544 -544
- package/assets/skills/localization-testing/schemas/output.json +325 -325
- package/assets/skills/middleware-testing-patterns/SKILL.md +798 -798
- package/assets/skills/middleware-testing-patterns/evals/middleware-testing-patterns.yaml +153 -0
- package/assets/skills/middleware-testing-patterns/schemas/output.json +58 -0
- package/assets/skills/middleware-testing-patterns/scripts/validate-config.json +25 -0
- package/assets/skills/mobile-testing/evals/mobile-testing.yaml +537 -537
- package/assets/skills/mobile-testing/schemas/output.json +318 -318
- package/assets/skills/mutation-testing/evals/mutation-testing.yaml +652 -652
- package/assets/skills/mutation-testing/schemas/output.json +707 -707
- package/assets/skills/mutation-testing/test-data/sample-output.json +295 -295
- package/assets/skills/n8n-expression-testing/SKILL.md +6 -0
- package/assets/skills/n8n-expression-testing/evals/n8n-expression-testing.yaml +450 -0
- package/assets/skills/n8n-expression-testing/schemas/output.json +369 -0
- package/assets/skills/n8n-expression-testing/scripts/validate-config.json +39 -0
- package/assets/skills/n8n-integration-testing-patterns/SKILL.md +6 -0
- package/assets/skills/n8n-integration-testing-patterns/evals/n8n-integration-testing-patterns.yaml +522 -0
- package/assets/skills/n8n-integration-testing-patterns/schemas/output.json +291 -0
- package/assets/skills/n8n-integration-testing-patterns/scripts/validate-config.json +34 -0
- package/assets/skills/n8n-security-testing/SKILL.md +6 -0
- package/assets/skills/n8n-security-testing/evals/n8n-security-testing.yaml +493 -0
- package/assets/skills/n8n-security-testing/schemas/output.json +293 -0
- package/assets/skills/n8n-security-testing/scripts/validate-config.json +34 -0
- package/assets/skills/n8n-trigger-testing-strategies/SKILL.md +6 -0
- package/assets/skills/n8n-trigger-testing-strategies/evals/n8n-trigger-testing-strategies.yaml +500 -0
- package/assets/skills/n8n-trigger-testing-strategies/schemas/output.json +295 -0
- package/assets/skills/n8n-trigger-testing-strategies/scripts/validate-config.json +34 -0
- package/assets/skills/n8n-workflow-testing-fundamentals/SKILL.md +6 -0
- package/assets/skills/n8n-workflow-testing-fundamentals/evals/n8n-workflow-testing-fundamentals.yaml +497 -0
- package/assets/skills/n8n-workflow-testing-fundamentals/schemas/output.json +254 -0
- package/assets/skills/n8n-workflow-testing-fundamentals/scripts/validate-config.json +35 -0
- package/assets/skills/observability-testing-patterns/SKILL.md +930 -930
- package/assets/skills/observability-testing-patterns/evals/observability-testing-patterns.yaml +157 -0
- package/assets/skills/observability-testing-patterns/schemas/output.json +58 -0
- package/assets/skills/observability-testing-patterns/scripts/validate-config.json +25 -0
- package/assets/skills/pentest-validation/SKILL.md +268 -268
- package/assets/skills/pentest-validation/evals/pentest-validation.yaml +708 -708
- package/assets/skills/pentest-validation/schemas/output.json +281 -281
- package/assets/skills/pentest-validation/scripts/validate-config.json +12 -0
- package/assets/skills/performance-testing/evals/performance-testing.yaml +772 -772
- package/assets/skills/performance-testing/schemas/output.json +1184 -1184
- package/assets/skills/pr-review/SKILL.md +61 -61
- package/assets/skills/qcsd-cicd-swarm/SKILL.md +2206 -2206
- package/assets/skills/qcsd-cicd-swarm/evals/qcsd-cicd-swarm.yaml +211 -0
- package/assets/skills/qcsd-cicd-swarm/schemas/output.json +86 -0
- package/assets/skills/qcsd-cicd-swarm/scripts/validate-config.json +30 -0
- package/assets/skills/qcsd-development-swarm/SKILL.md +2154 -2154
- package/assets/skills/qcsd-development-swarm/evals/qcsd-development-swarm.yaml +162 -0
- package/assets/skills/qcsd-development-swarm/schemas/output.json +72 -0
- package/assets/skills/qcsd-development-swarm/scripts/validate-config.json +25 -0
- package/assets/skills/qcsd-ideation-swarm/evals/qcsd-ideation-swarm.yaml +138 -0
- package/assets/skills/qcsd-ideation-swarm/schemas/output.json +568 -0
- package/assets/skills/qcsd-ideation-swarm/scripts/validate-config.json +25 -0
- package/assets/skills/qcsd-production-swarm/SKILL.md +2781 -0
- package/assets/skills/qcsd-production-swarm/evals/qcsd-production-swarm.yaml +246 -0
- package/assets/skills/qcsd-production-swarm/schemas/output.json +505 -0
- package/assets/skills/qcsd-production-swarm/scripts/validate-config.json +25 -0
- package/assets/skills/qcsd-refinement-swarm/evals/qcsd-refinement-swarm.yaml +139 -0
- package/assets/skills/qcsd-refinement-swarm/schemas/output.json +811 -0
- package/assets/skills/qcsd-refinement-swarm/scripts/validate-config.json +25 -0
- package/assets/skills/qe-chaos-resilience/evals/qe-chaos-resilience.yaml +443 -443
- package/assets/skills/qe-chaos-resilience/schemas/output.json +314 -314
- package/assets/skills/qe-code-intelligence/evals/qe-code-intelligence.yaml +459 -459
- package/assets/skills/qe-code-intelligence/schemas/output.json +315 -315
- package/assets/skills/qe-contract-testing/evals/qe-contract-testing.yaml +513 -513
- package/assets/skills/qe-contract-testing/schemas/output.json +295 -295
- package/assets/skills/qe-coverage-analysis/evals/qe-coverage-analysis.yaml +494 -494
- package/assets/skills/qe-coverage-analysis/schemas/output.json +286 -286
- package/assets/skills/qe-defect-intelligence/evals/qe-defect-intelligence.yaml +511 -511
- package/assets/skills/qe-defect-intelligence/schemas/output.json +283 -283
- package/assets/skills/qe-iterative-loop/schemas/output.json +264 -264
- package/assets/skills/qe-learning-optimization/evals/qe-learning-optimization.yaml +144 -144
- package/assets/skills/qe-learning-optimization/schemas/output.json +288 -288
- package/assets/skills/qe-quality-assessment/evals/qe-quality-assessment.yaml +506 -506
- package/assets/skills/qe-quality-assessment/schemas/output.json +550 -550
- package/assets/skills/qe-requirements-validation/evals/qe-requirements-validation.yaml +598 -598
- package/assets/skills/qe-requirements-validation/schemas/output.json +587 -587
- package/assets/skills/qe-security-compliance/evals/qe-security-compliance.yaml +595 -595
- package/assets/skills/qe-security-compliance/schemas/output.json +498 -498
- package/assets/skills/qe-test-execution/evals/qe-test-execution.yaml +607 -607
- package/assets/skills/qe-test-execution/schemas/output.json +529 -529
- package/assets/skills/qe-test-generation/evals/qe-test-generation.yaml +148 -148
- package/assets/skills/qe-test-generation/schemas/output.json +439 -439
- package/assets/skills/qe-visual-accessibility/evals/qe-visual-accessibility.yaml +142 -142
- package/assets/skills/qe-visual-accessibility/schemas/output.json +491 -491
- package/assets/skills/quality-metrics/evals/quality-metrics.yaml +494 -494
- package/assets/skills/quality-metrics/schemas/output.json +403 -403
- package/assets/skills/refactoring-patterns/schemas/output.json +475 -475
- package/assets/skills/regression-testing/evals/regression-testing.yaml +504 -504
- package/assets/skills/regression-testing/schemas/output.json +311 -311
- package/assets/skills/risk-based-testing/evals/risk-based-testing.yaml +141 -141
- package/assets/skills/risk-based-testing/schemas/output.json +480 -480
- package/assets/skills/security-testing/evals/security-testing.yaml +789 -789
- package/assets/skills/security-testing/schemas/output.json +879 -879
- package/assets/skills/security-visual-testing/evals/security-visual-testing.yaml +163 -163
- package/assets/skills/security-visual-testing/schemas/output.json +486 -486
- package/assets/skills/security-visual-testing/scripts/validate-config.json +45 -0
- package/assets/skills/sfdipot-product-factors/SKILL.md +239 -239
- package/assets/skills/sherlock-review/SKILL.md +5 -0
- package/assets/skills/sherlock-review/schemas/output.json +297 -0
- package/assets/skills/sherlock-review/scripts/validate-config.json +35 -0
- package/assets/skills/shift-left-testing/evals/shift-left-testing.yaml +145 -145
- package/assets/skills/shift-left-testing/schemas/output.json +459 -459
- package/assets/skills/shift-right-testing/evals/shift-right-testing.yaml +147 -147
- package/assets/skills/shift-right-testing/schemas/output.json +418 -418
- package/assets/skills/tdd-london-chicago/schemas/output.json +444 -444
- package/assets/skills/technical-writing/schemas/output.json +268 -268
- package/assets/skills/test-automation-strategy/evals/test-automation-strategy.yaml +148 -148
- package/assets/skills/test-automation-strategy/schemas/output.json +444 -444
- package/assets/skills/test-data-management/evals/test-data-management.yaml +504 -504
- package/assets/skills/test-data-management/schemas/output.json +284 -284
- package/assets/skills/test-design-techniques/evals/test-design-techniques.yaml +142 -142
- package/assets/skills/test-design-techniques/schemas/output.json +295 -295
- package/assets/skills/test-environment-management/schemas/output.json +310 -310
- package/assets/skills/test-idea-rewriting/SKILL.md +229 -229
- package/assets/skills/test-reporting-analytics/evals/test-reporting-analytics.yaml +155 -155
- package/assets/skills/test-reporting-analytics/schemas/output.json +329 -329
- package/assets/skills/testability-scoring/SKILL.md +5 -0
- package/assets/skills/testability-scoring/evals/testability-scoring.yaml +814 -0
- package/assets/skills/testability-scoring/resources/templates/config.template.js +84 -84
- package/assets/skills/testability-scoring/schemas/output.json +606 -0
- package/assets/skills/testability-scoring/scripts/generate-html-report.js +1007 -1007
- package/assets/skills/testability-scoring/scripts/validate-config.json +42 -0
- package/assets/skills/trust-tier-manifest.json +2404 -0
- package/assets/skills/verification-quality/evals/verification-quality.yaml +150 -150
- package/assets/skills/verification-quality/schemas/output.json +432 -432
- package/assets/skills/visual-testing-advanced/evals/visual-testing-advanced.yaml +154 -154
- package/assets/skills/visual-testing-advanced/schemas/output.json +294 -294
- package/assets/skills/wms-testing-patterns/evals/wms-testing-patterns.yaml +165 -0
- package/assets/skills/wms-testing-patterns/schemas/output.json +150 -0
- package/assets/skills/wms-testing-patterns/scripts/validate-config.json +51 -0
- package/assets/templates/validation-summary.json +56 -56
- package/dist/benchmarks/performance-benchmarks.js +1 -1
- package/dist/cli/bundle.js +9158 -2288
- package/dist/cli/commands/hooks.d.ts.map +1 -1
- package/dist/cli/commands/hooks.js +92 -0
- package/dist/cli/commands/hooks.js.map +1 -1
- package/dist/cli/commands/mcp.d.ts.map +1 -1
- package/dist/cli/commands/mcp.js +11 -9
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/cli/commands/migrate.js +2 -2
- package/dist/coordination/constants.d.ts +1 -1
- package/dist/coordination/constants.js +1 -1
- package/dist/coordination/handlers/coverage-handlers.js +1 -1
- package/dist/coordination/handlers/coverage-handlers.js.map +1 -1
- package/dist/domains/code-intelligence/services/semantic-analyzer.d.ts +1 -1
- package/dist/domains/code-intelligence/services/semantic-analyzer.d.ts.map +1 -1
- package/dist/domains/code-intelligence/services/semantic-analyzer.js +1 -1
- package/dist/domains/code-intelligence/services/semantic-analyzer.js.map +1 -1
- package/dist/domains/coverage-analysis/coordinator.js +1 -1
- package/dist/domains/coverage-analysis/services/coverage-analyzer.js +1 -1
- package/dist/domains/coverage-analysis/services/coverage-embedder.d.ts +1 -1
- package/dist/domains/coverage-analysis/services/coverage-embedder.js +1 -1
- package/dist/domains/coverage-analysis/services/gap-detector.js +1 -1
- package/dist/domains/coverage-analysis/services/ghost-coverage-analyzer.js +1 -1
- package/dist/domains/coverage-analysis/services/hnsw-index.d.ts +2 -2
- package/dist/domains/coverage-analysis/services/hnsw-index.js +3 -3
- package/dist/domains/coverage-analysis/services/sublinear-analyzer.d.ts +1 -1
- package/dist/domains/coverage-analysis/services/sublinear-analyzer.js +1 -1
- package/dist/domains/test-execution/services/test-prioritizer.js +1 -1
- package/dist/domains/test-generation/context/rust-context-builder.d.ts +31 -0
- package/dist/domains/test-generation/context/rust-context-builder.d.ts.map +1 -0
- package/dist/domains/test-generation/context/rust-context-builder.js +27 -0
- package/dist/domains/test-generation/context/rust-context-builder.js.map +1 -0
- package/dist/domains/test-generation/coordinator.js +3 -3
- package/dist/domains/test-generation/coordinator.js.map +1 -1
- package/dist/domains/test-generation/detectors/mobile-detector.d.ts +41 -0
- package/dist/domains/test-generation/detectors/mobile-detector.d.ts.map +1 -0
- package/dist/domains/test-generation/detectors/mobile-detector.js +111 -0
- package/dist/domains/test-generation/detectors/mobile-detector.js.map +1 -0
- package/dist/domains/test-generation/detectors/spring-detector.d.ts +22 -0
- package/dist/domains/test-generation/detectors/spring-detector.d.ts.map +1 -0
- package/dist/domains/test-generation/detectors/spring-detector.js +37 -0
- package/dist/domains/test-generation/detectors/spring-detector.js.map +1 -0
- package/dist/domains/test-generation/factories/test-generator-factory.d.ts +2 -1
- package/dist/domains/test-generation/factories/test-generator-factory.d.ts.map +1 -1
- package/dist/domains/test-generation/factories/test-generator-factory.js +33 -13
- package/dist/domains/test-generation/factories/test-generator-factory.js.map +1 -1
- package/dist/domains/test-generation/generators/flutter-test-generator.d.ts +107 -0
- package/dist/domains/test-generation/generators/flutter-test-generator.d.ts.map +1 -0
- package/dist/domains/test-generation/generators/flutter-test-generator.js +590 -0
- package/dist/domains/test-generation/generators/flutter-test-generator.js.map +1 -0
- package/dist/domains/test-generation/generators/go-test-generator.d.ts +139 -0
- package/dist/domains/test-generation/generators/go-test-generator.d.ts.map +1 -0
- package/dist/domains/test-generation/generators/go-test-generator.js +654 -0
- package/dist/domains/test-generation/generators/go-test-generator.js.map +1 -0
- package/dist/domains/test-generation/generators/index.d.ts +8 -0
- package/dist/domains/test-generation/generators/index.d.ts.map +1 -1
- package/dist/domains/test-generation/generators/index.js +8 -0
- package/dist/domains/test-generation/generators/index.js.map +1 -1
- package/dist/domains/test-generation/generators/jest-rn-generator.d.ts +95 -0
- package/dist/domains/test-generation/generators/jest-rn-generator.d.ts.map +1 -0
- package/dist/domains/test-generation/generators/jest-rn-generator.js +591 -0
- package/dist/domains/test-generation/generators/jest-rn-generator.js.map +1 -0
- package/dist/domains/test-generation/generators/junit5-generator.d.ts +107 -0
- package/dist/domains/test-generation/generators/junit5-generator.d.ts.map +1 -0
- package/dist/domains/test-generation/generators/junit5-generator.js +588 -0
- package/dist/domains/test-generation/generators/junit5-generator.js.map +1 -0
- package/dist/domains/test-generation/generators/kotlin-junit-generator.d.ts +109 -0
- package/dist/domains/test-generation/generators/kotlin-junit-generator.d.ts.map +1 -0
- package/dist/domains/test-generation/generators/kotlin-junit-generator.js +588 -0
- package/dist/domains/test-generation/generators/kotlin-junit-generator.js.map +1 -0
- package/dist/domains/test-generation/generators/pytest-generator.d.ts +8 -1
- package/dist/domains/test-generation/generators/pytest-generator.d.ts.map +1 -1
- package/dist/domains/test-generation/generators/pytest-generator.js +57 -0
- package/dist/domains/test-generation/generators/pytest-generator.js.map +1 -1
- package/dist/domains/test-generation/generators/rust-test-generator.d.ts +80 -0
- package/dist/domains/test-generation/generators/rust-test-generator.d.ts.map +1 -0
- package/dist/domains/test-generation/generators/rust-test-generator.js +442 -0
- package/dist/domains/test-generation/generators/rust-test-generator.js.map +1 -0
- package/dist/domains/test-generation/generators/swift-testing-generator.d.ts +97 -0
- package/dist/domains/test-generation/generators/swift-testing-generator.d.ts.map +1 -0
- package/dist/domains/test-generation/generators/swift-testing-generator.js +482 -0
- package/dist/domains/test-generation/generators/swift-testing-generator.js.map +1 -0
- package/dist/domains/test-generation/generators/xunit-generator.d.ts +110 -0
- package/dist/domains/test-generation/generators/xunit-generator.d.ts.map +1 -0
- package/dist/domains/test-generation/generators/xunit-generator.js +611 -0
- package/dist/domains/test-generation/generators/xunit-generator.js.map +1 -0
- package/dist/domains/test-generation/interfaces.d.ts +11 -2
- package/dist/domains/test-generation/interfaces.d.ts.map +1 -1
- package/dist/domains/test-generation/prompts/language-prompts.d.ts +29 -0
- package/dist/domains/test-generation/prompts/language-prompts.d.ts.map +1 -0
- package/dist/domains/test-generation/prompts/language-prompts.js +135 -0
- package/dist/domains/test-generation/prompts/language-prompts.js.map +1 -0
- package/dist/domains/test-generation/services/compilation-validator.d.ts +43 -0
- package/dist/domains/test-generation/services/compilation-validator.d.ts.map +1 -0
- package/dist/domains/test-generation/services/compilation-validator.js +134 -0
- package/dist/domains/test-generation/services/compilation-validator.js.map +1 -0
- package/dist/domains/test-generation/services/index.d.ts +2 -1
- package/dist/domains/test-generation/services/index.d.ts.map +1 -1
- package/dist/domains/test-generation/services/index.js +3 -1
- package/dist/domains/test-generation/services/index.js.map +1 -1
- package/dist/domains/test-generation/services/test-file-resolver.d.ts +32 -0
- package/dist/domains/test-generation/services/test-file-resolver.d.ts.map +1 -0
- package/dist/domains/test-generation/services/test-file-resolver.js +159 -0
- package/dist/domains/test-generation/services/test-file-resolver.js.map +1 -0
- package/dist/domains/test-generation/services/test-generator.d.ts +10 -0
- package/dist/domains/test-generation/services/test-generator.d.ts.map +1 -1
- package/dist/domains/test-generation/services/test-generator.js +87 -10
- package/dist/domains/test-generation/services/test-generator.js.map +1 -1
- package/dist/governance/feature-flags.js +2 -2
- package/dist/governance/feature-flags.js.map +1 -1
- package/dist/governance/shard-embeddings.js +1 -1
- package/dist/init/init-wizard-hooks.d.ts.map +1 -1
- package/dist/init/init-wizard-hooks.js +0 -1
- package/dist/init/init-wizard-hooks.js.map +1 -1
- package/dist/init/phases/07-hooks.d.ts.map +1 -1
- package/dist/init/phases/07-hooks.js +0 -2
- package/dist/init/phases/07-hooks.js.map +1 -1
- package/dist/init/phases/08-mcp.d.ts +8 -4
- package/dist/init/phases/08-mcp.d.ts.map +1 -1
- package/dist/init/phases/08-mcp.js +13 -31
- package/dist/init/phases/08-mcp.js.map +1 -1
- package/dist/init/phases/10-workers.js +4 -4
- package/dist/init/phases/10-workers.js.map +1 -1
- package/dist/init/settings-merge.d.ts.map +1 -1
- package/dist/init/settings-merge.js +0 -2
- package/dist/init/settings-merge.js.map +1 -1
- package/dist/init/token-bootstrap.js +1 -1
- package/dist/init/token-bootstrap.js.map +1 -1
- package/dist/integrations/rl-suite/algorithms/decision-transformer.js +1 -1
- package/dist/kernel/constants.d.ts +2 -2
- package/dist/kernel/constants.js +2 -2
- package/dist/kernel/hnsw-adapter.js +1 -1
- package/dist/kernel/progressive-hnsw-backend.d.ts +2 -2
- package/dist/kernel/progressive-hnsw-backend.js +2 -2
- package/dist/learning/dream/concept-graph.d.ts +1 -1
- package/dist/learning/dream/concept-graph.js +1 -1
- package/dist/learning/dream/dream-engine.d.ts +1 -1
- package/dist/learning/dream/dream-engine.js +1 -1
- package/dist/learning/dream/index.d.ts +1 -1
- package/dist/learning/dream/index.js +1 -1
- package/dist/learning/dream/types.d.ts +1 -1
- package/dist/learning/dream/types.d.ts.map +1 -1
- package/dist/learning/dream/types.js +1 -1
- package/dist/learning/dream/types.js.map +1 -1
- package/dist/learning/token-tracker.js +1 -1
- package/dist/learning/token-tracker.js.map +1 -1
- package/dist/mcp/bundle.js +7538 -893
- package/dist/routing/qe-agent-registry.js +4 -4
- package/dist/routing/qe-agent-registry.js.map +1 -1
- package/dist/routing/types.d.ts +5 -8
- package/dist/routing/types.d.ts.map +1 -1
- package/dist/routing/types.js.map +1 -1
- package/dist/shared/embeddings/embedding-cache.js +2 -2
- package/dist/shared/embeddings/index.d.ts +2 -2
- package/dist/shared/embeddings/index.js +2 -2
- package/dist/shared/embeddings/nomic-embedder.d.ts +4 -4
- package/dist/shared/embeddings/nomic-embedder.js +2 -2
- package/dist/shared/embeddings/ollama-client.d.ts +1 -1
- package/dist/shared/embeddings/ollama-client.js +2 -2
- package/dist/shared/embeddings/ollama-client.js.map +1 -1
- package/dist/shared/embeddings/types.d.ts +2 -2
- package/dist/shared/embeddings/types.js +2 -2
- package/dist/shared/language-detector.d.ts +46 -0
- package/dist/shared/language-detector.d.ts.map +1 -0
- package/dist/shared/language-detector.js +183 -0
- package/dist/shared/language-detector.js.map +1 -0
- package/dist/shared/llm/providers/ollama.js +1 -1
- package/dist/shared/metrics/code-metrics.d.ts.map +1 -1
- package/dist/shared/metrics/code-metrics.js +24 -1
- package/dist/shared/metrics/code-metrics.js.map +1 -1
- package/dist/shared/parsers/index.d.ts +2 -0
- package/dist/shared/parsers/index.d.ts.map +1 -1
- package/dist/shared/parsers/index.js +2 -0
- package/dist/shared/parsers/index.js.map +1 -1
- package/dist/shared/parsers/interfaces.d.ts +81 -0
- package/dist/shared/parsers/interfaces.d.ts.map +1 -0
- package/dist/shared/parsers/interfaces.js +6 -0
- package/dist/shared/parsers/interfaces.js.map +1 -0
- package/dist/shared/parsers/multi-language-parser.d.ts +144 -0
- package/dist/shared/parsers/multi-language-parser.d.ts.map +1 -0
- package/dist/shared/parsers/multi-language-parser.js +1271 -0
- package/dist/shared/parsers/multi-language-parser.js.map +1 -0
- package/dist/shared/parsers/rust-ownership-analyzer.d.ts +45 -0
- package/dist/shared/parsers/rust-ownership-analyzer.d.ts.map +1 -0
- package/dist/shared/parsers/rust-ownership-analyzer.js +52 -0
- package/dist/shared/parsers/rust-ownership-analyzer.js.map +1 -0
- package/dist/shared/parsers/typescript-parser.d.ts +16 -0
- package/dist/shared/parsers/typescript-parser.d.ts.map +1 -1
- package/dist/shared/parsers/typescript-parser.js +85 -0
- package/dist/shared/parsers/typescript-parser.js.map +1 -1
- package/dist/shared/types/test-frameworks.d.ts +25 -0
- package/dist/shared/types/test-frameworks.d.ts.map +1 -0
- package/dist/shared/types/test-frameworks.js +111 -0
- package/dist/shared/types/test-frameworks.js.map +1 -0
- package/package.json +1 -1
- package/scripts/prepare-assets.sh +16 -2
|
@@ -1,1107 +1,1107 @@
|
|
|
1
|
-
# =============================================================================
|
|
2
|
-
# AQE Skill Evaluation Test Suite: Compliance Testing v1.0.0
|
|
3
|
-
# =============================================================================
|
|
4
|
-
#
|
|
5
|
-
# Comprehensive evaluation suite for the compliance-testing skill.
|
|
6
|
-
# Tests regulatory compliance detection across GDPR, HIPAA, SOC2, PCI-DSS, CCPA.
|
|
7
|
-
#
|
|
8
|
-
# Coverage:
|
|
9
|
-
# - Data privacy controls (GDPR/CCPA)
|
|
10
|
-
# - Healthcare data protection (HIPAA)
|
|
11
|
-
# - Payment security (PCI-DSS)
|
|
12
|
-
# - Security controls (SOC2)
|
|
13
|
-
# - Access control and audit logging
|
|
14
|
-
# - Multi-model consistency
|
|
15
|
-
#
|
|
16
|
-
# Schema: .claude/skills/.validation/schemas/skill-eval.schema.json
|
|
17
|
-
# Runner: scripts/run-skill-eval.ts
|
|
18
|
-
#
|
|
19
|
-
# =============================================================================
|
|
20
|
-
|
|
21
|
-
skill: compliance-testing
|
|
22
|
-
version: 1.0.0
|
|
23
|
-
description: >
|
|
24
|
-
Comprehensive evaluation suite for the compliance-testing skill.
|
|
25
|
-
Validates detection of compliance violations across major regulatory frameworks
|
|
26
|
-
(GDPR, HIPAA, SOC2, PCI-DSS, CCPA), control assessment accuracy, risk scoring,
|
|
27
|
-
and remediation quality. Integrates with ReasoningBank for pattern learning.
|
|
28
|
-
|
|
29
|
-
# =============================================================================
|
|
30
|
-
# Multi-Model Configuration
|
|
31
|
-
# =============================================================================
|
|
32
|
-
|
|
33
|
-
models_to_test:
|
|
34
|
-
- claude-3.5-sonnet # Primary model (high accuracy expected)
|
|
35
|
-
- claude-3-haiku # Fast model (minimum quality threshold)
|
|
36
|
-
- gpt-4o # Cross-vendor validation
|
|
37
|
-
|
|
38
|
-
# =============================================================================
|
|
39
|
-
# MCP Integration Configuration
|
|
40
|
-
# =============================================================================
|
|
41
|
-
|
|
42
|
-
mcp_integration:
|
|
43
|
-
enabled: true
|
|
44
|
-
namespace: skill-validation
|
|
45
|
-
|
|
46
|
-
query_patterns: true
|
|
47
|
-
track_outcomes: true
|
|
48
|
-
store_patterns: true
|
|
49
|
-
share_learning: true
|
|
50
|
-
update_quality_gate: true
|
|
51
|
-
|
|
52
|
-
target_agents:
|
|
53
|
-
- qe-learning-coordinator
|
|
54
|
-
- qe-queen-coordinator
|
|
55
|
-
- qe-security-scanner
|
|
56
|
-
- qe-security-auditor
|
|
57
|
-
|
|
58
|
-
# =============================================================================
|
|
59
|
-
# ReasoningBank Learning Configuration
|
|
60
|
-
# =============================================================================
|
|
61
|
-
|
|
62
|
-
learning:
|
|
63
|
-
store_success_patterns: true
|
|
64
|
-
store_failure_patterns: true
|
|
65
|
-
pattern_ttl_days: 90
|
|
66
|
-
min_confidence_to_store: 0.7
|
|
67
|
-
cross_model_comparison: true
|
|
68
|
-
|
|
69
|
-
# =============================================================================
|
|
70
|
-
# Result Format Configuration
|
|
71
|
-
# =============================================================================
|
|
72
|
-
|
|
73
|
-
result_format:
|
|
74
|
-
json_output: true
|
|
75
|
-
markdown_report: true
|
|
76
|
-
include_raw_output: false
|
|
77
|
-
include_timing: true
|
|
78
|
-
include_token_usage: true
|
|
79
|
-
|
|
80
|
-
# =============================================================================
|
|
81
|
-
# Environment Setup
|
|
82
|
-
# =============================================================================
|
|
83
|
-
|
|
84
|
-
setup:
|
|
85
|
-
required_tools:
|
|
86
|
-
- jq # JSON processing
|
|
87
|
-
|
|
88
|
-
environment_variables:
|
|
89
|
-
COMPLIANCE_AUDIT_MODE: "comprehensive"
|
|
90
|
-
GDPR_ENABLED: "true"
|
|
91
|
-
HIPAA_ENABLED: "true"
|
|
92
|
-
PCI_DSS_ENABLED: "true"
|
|
93
|
-
SOC2_ENABLED: "true"
|
|
94
|
-
CCPA_ENABLED: "true"
|
|
95
|
-
|
|
96
|
-
fixtures:
|
|
97
|
-
- name: gdpr_violation_app
|
|
98
|
-
path: fixtures/gdpr-violation.js
|
|
99
|
-
content: |
|
|
100
|
-
// GDPR Violation: No consent tracking, no data subject rights
|
|
101
|
-
const express = require('express');
|
|
102
|
-
const app = express();
|
|
103
|
-
|
|
104
|
-
// No consent management
|
|
105
|
-
app.post('/newsletter/subscribe', (req, res) => {
|
|
106
|
-
db.insert('subscribers', {
|
|
107
|
-
email: req.body.email,
|
|
108
|
-
// No consent timestamp, no IP, no opt-in record
|
|
109
|
-
});
|
|
110
|
-
res.send('Subscribed!');
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
// No right to erasure
|
|
114
|
-
app.delete('/user/:id', (req, res) => {
|
|
115
|
-
// Deletes user but not their data from other tables
|
|
116
|
-
db.delete('users', { id: req.params.id });
|
|
117
|
-
// Still has: orders, logs, analytics, backups
|
|
118
|
-
res.send('Deleted');
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
// No data portability
|
|
122
|
-
// Missing /user/:id/export endpoint
|
|
123
|
-
|
|
124
|
-
- name: hipaa_violation_app
|
|
125
|
-
path: fixtures/hipaa-violation.py
|
|
126
|
-
content: |
|
|
127
|
-
# HIPAA Violation: PHI exposed, no encryption, no audit logging
|
|
128
|
-
from flask import Flask, request
|
|
129
|
-
import sqlite3
|
|
130
|
-
|
|
131
|
-
app = Flask(__name__)
|
|
132
|
-
|
|
133
|
-
@app.route('/patient/<patient_id>')
|
|
134
|
-
def get_patient(patient_id):
|
|
135
|
-
# No access control check
|
|
136
|
-
# No audit logging
|
|
137
|
-
conn = sqlite3.connect('patients.db')
|
|
138
|
-
cursor = conn.cursor()
|
|
139
|
-
# PHI returned without encryption
|
|
140
|
-
cursor.execute(f"SELECT ssn, medical_history, diagnosis FROM patients WHERE id = {patient_id}")
|
|
141
|
-
return str(cursor.fetchone()) # Plain text response with PHI
|
|
142
|
-
|
|
143
|
-
@app.route('/patient', methods=['POST'])
|
|
144
|
-
def create_patient():
|
|
145
|
-
# PHI stored without encryption
|
|
146
|
-
data = request.json
|
|
147
|
-
conn = sqlite3.connect('patients.db')
|
|
148
|
-
cursor = conn.cursor()
|
|
149
|
-
cursor.execute(f"""
|
|
150
|
-
INSERT INTO patients (ssn, name, medical_history)
|
|
151
|
-
VALUES ('{data['ssn']}', '{data['name']}', '{data['history']}')
|
|
152
|
-
""")
|
|
153
|
-
# No audit log of PHI access
|
|
154
|
-
return 'Created'
|
|
155
|
-
|
|
156
|
-
- name: pci_dss_violation_app
|
|
157
|
-
path: fixtures/pci-violation.js
|
|
158
|
-
content: |
|
|
159
|
-
// PCI-DSS Violation: Card data stored, CVV logged
|
|
160
|
-
const express = require('express');
|
|
161
|
-
const app = express();
|
|
162
|
-
|
|
163
|
-
app.post('/payment', (req, res) => {
|
|
164
|
-
const { cardNumber, expiry, cvv, amount } = req.body;
|
|
165
|
-
|
|
166
|
-
// Violation: Storing full card number
|
|
167
|
-
db.insert('payments', {
|
|
168
|
-
card_number: cardNumber, // Should only store last 4
|
|
169
|
-
expiry: expiry, // Should not store
|
|
170
|
-
cvv: cvv, // NEVER store CVV
|
|
171
|
-
amount: amount
|
|
172
|
-
});
|
|
173
|
-
|
|
174
|
-
// Violation: Logging sensitive card data
|
|
175
|
-
console.log(`Payment processed: ${cardNumber}, CVV: ${cvv}`);
|
|
176
|
-
|
|
177
|
-
res.send('Payment processed');
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
// Violation: Exposing card data via API
|
|
181
|
-
app.get('/payments/:id', (req, res) => {
|
|
182
|
-
const payment = db.findOne('payments', { id: req.params.id });
|
|
183
|
-
res.json(payment); // Returns full card number
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
# =============================================================================
|
|
187
|
-
# TEST CASES
|
|
188
|
-
# =============================================================================
|
|
189
|
-
|
|
190
|
-
test_cases:
|
|
191
|
-
# ---------------------------------------------------------------------------
|
|
192
|
-
# CATEGORY: GDPR Compliance (Data Privacy)
|
|
193
|
-
# ---------------------------------------------------------------------------
|
|
194
|
-
|
|
195
|
-
- id: tc001_gdpr_consent_violation
|
|
196
|
-
description: "Detect missing consent management for data collection"
|
|
197
|
-
category: gdpr
|
|
198
|
-
priority: critical
|
|
199
|
-
|
|
200
|
-
input:
|
|
201
|
-
code: |
|
|
202
|
-
app.post('/newsletter/subscribe', (req, res) => {
|
|
203
|
-
db.insert('subscribers', {
|
|
204
|
-
email: req.body.email,
|
|
205
|
-
subscribed_at: new Date()
|
|
206
|
-
});
|
|
207
|
-
res.send('Subscribed!');
|
|
208
|
-
});
|
|
209
|
-
context:
|
|
210
|
-
language: javascript
|
|
211
|
-
framework: express
|
|
212
|
-
regulation: GDPR
|
|
213
|
-
|
|
214
|
-
expected_output:
|
|
215
|
-
must_contain:
|
|
216
|
-
- "consent"
|
|
217
|
-
- "GDPR"
|
|
218
|
-
- "Article 7"
|
|
219
|
-
- "lawful basis"
|
|
220
|
-
must_not_contain:
|
|
221
|
-
- "compliant"
|
|
222
|
-
- "no issues"
|
|
223
|
-
severity_classification: high
|
|
224
|
-
finding_count:
|
|
225
|
-
min: 1
|
|
226
|
-
|
|
227
|
-
validation:
|
|
228
|
-
schema_check: true
|
|
229
|
-
keyword_match_threshold: 0.8
|
|
230
|
-
reasoning_quality_min: 0.7
|
|
231
|
-
|
|
232
|
-
- id: tc002_gdpr_right_to_erasure
|
|
233
|
-
description: "Detect incomplete implementation of right to erasure (Article 17)"
|
|
234
|
-
category: gdpr
|
|
235
|
-
priority: critical
|
|
236
|
-
|
|
237
|
-
input:
|
|
238
|
-
code: |
|
|
239
|
-
app.delete('/user/:id', async (req, res) => {
|
|
240
|
-
const userId = req.params.id;
|
|
241
|
-
await db.delete('users', { id: userId });
|
|
242
|
-
// Orders, logs, and analytics still contain user data
|
|
243
|
-
res.send('User deleted');
|
|
244
|
-
});
|
|
245
|
-
context:
|
|
246
|
-
language: javascript
|
|
247
|
-
framework: express
|
|
248
|
-
regulation: GDPR
|
|
249
|
-
|
|
250
|
-
expected_output:
|
|
251
|
-
must_contain:
|
|
252
|
-
- "erasure"
|
|
253
|
-
- "Article 17"
|
|
254
|
-
- "right to be forgotten"
|
|
255
|
-
- "incomplete"
|
|
256
|
-
- "related data"
|
|
257
|
-
must_match_regex:
|
|
258
|
-
- "GDPR-Art17|Art\\.?\\s*17"
|
|
259
|
-
severity_classification: high
|
|
260
|
-
finding_count:
|
|
261
|
-
min: 1
|
|
262
|
-
|
|
263
|
-
validation:
|
|
264
|
-
schema_check: true
|
|
265
|
-
keyword_match_threshold: 0.7
|
|
266
|
-
|
|
267
|
-
- id: tc003_gdpr_data_portability
|
|
268
|
-
description: "Detect missing data portability implementation (Article 20)"
|
|
269
|
-
category: gdpr
|
|
270
|
-
priority: high
|
|
271
|
-
|
|
272
|
-
input:
|
|
273
|
-
code: |
|
|
274
|
-
// User management API - No data export endpoint
|
|
275
|
-
app.get('/user/:id', (req, res) => {
|
|
276
|
-
const user = db.findOne('users', { id: req.params.id });
|
|
277
|
-
res.json(user);
|
|
278
|
-
});
|
|
279
|
-
|
|
280
|
-
app.put('/user/:id', (req, res) => {
|
|
281
|
-
db.update('users', { id: req.params.id }, req.body);
|
|
282
|
-
res.send('Updated');
|
|
283
|
-
});
|
|
284
|
-
|
|
285
|
-
// Missing: GET /user/:id/export
|
|
286
|
-
context:
|
|
287
|
-
language: javascript
|
|
288
|
-
framework: express
|
|
289
|
-
regulation: GDPR
|
|
290
|
-
|
|
291
|
-
expected_output:
|
|
292
|
-
must_contain:
|
|
293
|
-
- "portability"
|
|
294
|
-
- "Article 20"
|
|
295
|
-
- "export"
|
|
296
|
-
- "machine-readable"
|
|
297
|
-
severity_classification: medium
|
|
298
|
-
|
|
299
|
-
validation:
|
|
300
|
-
schema_check: true
|
|
301
|
-
keyword_match_threshold: 0.7
|
|
302
|
-
|
|
303
|
-
# ---------------------------------------------------------------------------
|
|
304
|
-
# CATEGORY: HIPAA Compliance (Healthcare Data)
|
|
305
|
-
# ---------------------------------------------------------------------------
|
|
306
|
-
|
|
307
|
-
- id: tc004_hipaa_phi_encryption
|
|
308
|
-
description: "Detect unencrypted PHI storage and transmission"
|
|
309
|
-
category: hipaa
|
|
310
|
-
priority: critical
|
|
311
|
-
|
|
312
|
-
input:
|
|
313
|
-
code: |
|
|
314
|
-
@app.route('/patient', methods=['POST'])
|
|
315
|
-
def create_patient():
|
|
316
|
-
data = request.json
|
|
317
|
-
conn = sqlite3.connect('patients.db')
|
|
318
|
-
cursor = conn.cursor()
|
|
319
|
-
cursor.execute(f"""
|
|
320
|
-
INSERT INTO patients (ssn, name, diagnosis, medical_history)
|
|
321
|
-
VALUES ('{data['ssn']}', '{data['name']}', '{data['diagnosis']}', '{data['history']}')
|
|
322
|
-
""")
|
|
323
|
-
conn.commit()
|
|
324
|
-
return 'Patient created'
|
|
325
|
-
context:
|
|
326
|
-
language: python
|
|
327
|
-
framework: flask
|
|
328
|
-
regulation: HIPAA
|
|
329
|
-
|
|
330
|
-
expected_output:
|
|
331
|
-
must_contain:
|
|
332
|
-
- "PHI"
|
|
333
|
-
- "encryption"
|
|
334
|
-
- "HIPAA"
|
|
335
|
-
- "protected health information"
|
|
336
|
-
- "encrypt at rest"
|
|
337
|
-
must_match_regex:
|
|
338
|
-
- "HIPAA-[0-9]+|164\\.312"
|
|
339
|
-
severity_classification: critical
|
|
340
|
-
finding_count:
|
|
341
|
-
min: 1
|
|
342
|
-
|
|
343
|
-
validation:
|
|
344
|
-
schema_check: true
|
|
345
|
-
keyword_match_threshold: 0.8
|
|
346
|
-
reasoning_quality_min: 0.75
|
|
347
|
-
|
|
348
|
-
- id: tc005_hipaa_audit_logging
|
|
349
|
-
description: "Detect missing audit logging for PHI access"
|
|
350
|
-
category: hipaa
|
|
351
|
-
priority: critical
|
|
352
|
-
|
|
353
|
-
input:
|
|
354
|
-
code: |
|
|
355
|
-
@app.route('/patient/<patient_id>')
|
|
356
|
-
def get_patient(patient_id):
|
|
357
|
-
conn = sqlite3.connect('patients.db')
|
|
358
|
-
cursor = conn.cursor()
|
|
359
|
-
cursor.execute(f"SELECT * FROM patients WHERE id = {patient_id}")
|
|
360
|
-
return jsonify(cursor.fetchone())
|
|
361
|
-
context:
|
|
362
|
-
language: python
|
|
363
|
-
framework: flask
|
|
364
|
-
regulation: HIPAA
|
|
365
|
-
|
|
366
|
-
expected_output:
|
|
367
|
-
must_contain:
|
|
368
|
-
- "audit"
|
|
369
|
-
- "logging"
|
|
370
|
-
- "HIPAA"
|
|
371
|
-
- "access"
|
|
372
|
-
- "who accessed"
|
|
373
|
-
severity_classification: high
|
|
374
|
-
|
|
375
|
-
validation:
|
|
376
|
-
schema_check: true
|
|
377
|
-
keyword_match_threshold: 0.7
|
|
378
|
-
|
|
379
|
-
- id: tc006_hipaa_access_control
|
|
380
|
-
description: "Detect missing access control for PHI"
|
|
381
|
-
category: hipaa
|
|
382
|
-
priority: critical
|
|
383
|
-
|
|
384
|
-
input:
|
|
385
|
-
code: |
|
|
386
|
-
@app.route('/patient/<patient_id>/records')
|
|
387
|
-
def get_patient_records(patient_id):
|
|
388
|
-
# No authentication check
|
|
389
|
-
# No authorization check (role-based access)
|
|
390
|
-
# No minimum necessary principle
|
|
391
|
-
conn = sqlite3.connect('patients.db')
|
|
392
|
-
cursor = conn.cursor()
|
|
393
|
-
cursor.execute("SELECT * FROM patient_records WHERE patient_id = ?", [patient_id])
|
|
394
|
-
return jsonify(cursor.fetchall()) # Returns all fields, not minimum necessary
|
|
395
|
-
context:
|
|
396
|
-
language: python
|
|
397
|
-
framework: flask
|
|
398
|
-
regulation: HIPAA
|
|
399
|
-
|
|
400
|
-
expected_output:
|
|
401
|
-
must_contain:
|
|
402
|
-
- "access control"
|
|
403
|
-
- "authorization"
|
|
404
|
-
- "minimum necessary"
|
|
405
|
-
- "role-based"
|
|
406
|
-
severity_classification: critical
|
|
407
|
-
|
|
408
|
-
validation:
|
|
409
|
-
schema_check: true
|
|
410
|
-
keyword_match_threshold: 0.7
|
|
411
|
-
|
|
412
|
-
# ---------------------------------------------------------------------------
|
|
413
|
-
# CATEGORY: PCI-DSS Compliance (Payment Card Data)
|
|
414
|
-
# ---------------------------------------------------------------------------
|
|
415
|
-
|
|
416
|
-
- id: tc007_pci_card_storage
|
|
417
|
-
description: "Detect prohibited storage of full card numbers"
|
|
418
|
-
category: pci-dss
|
|
419
|
-
priority: critical
|
|
420
|
-
|
|
421
|
-
input:
|
|
422
|
-
code: |
|
|
423
|
-
app.post('/payment', (req, res) => {
|
|
424
|
-
const { cardNumber, expiry, amount } = req.body;
|
|
425
|
-
|
|
426
|
-
db.insert('payments', {
|
|
427
|
-
card_number: cardNumber, // Full card number stored
|
|
428
|
-
expiry_date: expiry,
|
|
429
|
-
amount: amount
|
|
430
|
-
});
|
|
431
|
-
|
|
432
|
-
res.send('Payment processed');
|
|
433
|
-
});
|
|
434
|
-
context:
|
|
435
|
-
language: javascript
|
|
436
|
-
framework: express
|
|
437
|
-
regulation: PCI-DSS
|
|
438
|
-
|
|
439
|
-
expected_output:
|
|
440
|
-
must_contain:
|
|
441
|
-
- "PCI"
|
|
442
|
-
- "card number"
|
|
443
|
-
- "storage"
|
|
444
|
-
- "tokenize"
|
|
445
|
-
- "last 4"
|
|
446
|
-
must_match_regex:
|
|
447
|
-
- "PCI-DSS|Requirement\\s*3"
|
|
448
|
-
severity_classification: critical
|
|
449
|
-
finding_count:
|
|
450
|
-
min: 1
|
|
451
|
-
|
|
452
|
-
validation:
|
|
453
|
-
schema_check: true
|
|
454
|
-
keyword_match_threshold: 0.8
|
|
455
|
-
|
|
456
|
-
- id: tc008_pci_cvv_storage
|
|
457
|
-
description: "Detect prohibited CVV/CVC storage"
|
|
458
|
-
category: pci-dss
|
|
459
|
-
priority: critical
|
|
460
|
-
|
|
461
|
-
input:
|
|
462
|
-
code: |
|
|
463
|
-
app.post('/checkout', (req, res) => {
|
|
464
|
-
const { cardNumber, cvv, expiry } = req.body;
|
|
465
|
-
|
|
466
|
-
// Process payment
|
|
467
|
-
const result = paymentGateway.charge({
|
|
468
|
-
card: cardNumber,
|
|
469
|
-
cvv: cvv,
|
|
470
|
-
exp: expiry
|
|
471
|
-
});
|
|
472
|
-
|
|
473
|
-
// Store for later reference (VIOLATION)
|
|
474
|
-
db.insert('transactions', {
|
|
475
|
-
card_last4: cardNumber.slice(-4),
|
|
476
|
-
cvv: cvv, // NEVER store CVV
|
|
477
|
-
transaction_id: result.id
|
|
478
|
-
});
|
|
479
|
-
|
|
480
|
-
res.json(result);
|
|
481
|
-
});
|
|
482
|
-
context:
|
|
483
|
-
language: javascript
|
|
484
|
-
framework: express
|
|
485
|
-
regulation: PCI-DSS
|
|
486
|
-
|
|
487
|
-
expected_output:
|
|
488
|
-
must_contain:
|
|
489
|
-
- "CVV"
|
|
490
|
-
- "never store"
|
|
491
|
-
- "PCI"
|
|
492
|
-
- "Requirement 3.2"
|
|
493
|
-
severity_classification: critical
|
|
494
|
-
|
|
495
|
-
validation:
|
|
496
|
-
schema_check: true
|
|
497
|
-
keyword_match_threshold: 0.8
|
|
498
|
-
|
|
499
|
-
- id: tc009_pci_logging_card_data
|
|
500
|
-
description: "Detect card data in logs"
|
|
501
|
-
category: pci-dss
|
|
502
|
-
priority: critical
|
|
503
|
-
|
|
504
|
-
input:
|
|
505
|
-
code: |
|
|
506
|
-
app.post('/payment', (req, res) => {
|
|
507
|
-
const { cardNumber, amount } = req.body;
|
|
508
|
-
|
|
509
|
-
// Log the transaction (VIOLATION)
|
|
510
|
-
console.log(`Processing payment: card=${cardNumber}, amount=${amount}`);
|
|
511
|
-
logger.info({ card: cardNumber, amount }, 'Payment request received');
|
|
512
|
-
|
|
513
|
-
// Process payment
|
|
514
|
-
const result = gateway.charge({ card: cardNumber, amount });
|
|
515
|
-
|
|
516
|
-
res.json(result);
|
|
517
|
-
});
|
|
518
|
-
context:
|
|
519
|
-
language: javascript
|
|
520
|
-
framework: express
|
|
521
|
-
regulation: PCI-DSS
|
|
522
|
-
|
|
523
|
-
expected_output:
|
|
524
|
-
must_contain:
|
|
525
|
-
- "log"
|
|
526
|
-
- "card"
|
|
527
|
-
- "mask"
|
|
528
|
-
- "PCI"
|
|
529
|
-
severity_classification: high
|
|
530
|
-
|
|
531
|
-
validation:
|
|
532
|
-
schema_check: true
|
|
533
|
-
keyword_match_threshold: 0.7
|
|
534
|
-
|
|
535
|
-
# ---------------------------------------------------------------------------
|
|
536
|
-
# CATEGORY: SOC2 Compliance (Security Controls)
|
|
537
|
-
# ---------------------------------------------------------------------------
|
|
538
|
-
|
|
539
|
-
- id: tc010_soc2_access_logging
|
|
540
|
-
description: "Detect missing access logging for SOC2 CC6.1"
|
|
541
|
-
category: soc2
|
|
542
|
-
priority: high
|
|
543
|
-
|
|
544
|
-
input:
|
|
545
|
-
code: |
|
|
546
|
-
app.get('/admin/users', requireAdmin, (req, res) => {
|
|
547
|
-
// No access logging
|
|
548
|
-
const users = db.findAll('users');
|
|
549
|
-
res.json(users);
|
|
550
|
-
});
|
|
551
|
-
|
|
552
|
-
app.delete('/admin/users/:id', requireAdmin, (req, res) => {
|
|
553
|
-
// No access logging for destructive operation
|
|
554
|
-
db.delete('users', { id: req.params.id });
|
|
555
|
-
res.send('Deleted');
|
|
556
|
-
});
|
|
557
|
-
context:
|
|
558
|
-
language: javascript
|
|
559
|
-
framework: express
|
|
560
|
-
regulation: SOC2
|
|
561
|
-
|
|
562
|
-
expected_output:
|
|
563
|
-
must_contain:
|
|
564
|
-
- "SOC2"
|
|
565
|
-
- "CC6"
|
|
566
|
-
- "logging"
|
|
567
|
-
- "audit trail"
|
|
568
|
-
severity_classification: high
|
|
569
|
-
|
|
570
|
-
validation:
|
|
571
|
-
schema_check: true
|
|
572
|
-
keyword_match_threshold: 0.7
|
|
573
|
-
|
|
574
|
-
- id: tc011_soc2_change_management
|
|
575
|
-
description: "Detect missing change management controls for SOC2 CC8.1"
|
|
576
|
-
category: soc2
|
|
577
|
-
priority: medium
|
|
578
|
-
|
|
579
|
-
input:
|
|
580
|
-
code: |
|
|
581
|
-
// Deployment script - no change management
|
|
582
|
-
const deploy = async () => {
|
|
583
|
-
// No approval workflow
|
|
584
|
-
// No change tracking
|
|
585
|
-
// No rollback capability
|
|
586
|
-
|
|
587
|
-
await executeSQL('ALTER TABLE users ADD COLUMN admin BOOLEAN');
|
|
588
|
-
await restartService('api');
|
|
589
|
-
console.log('Deployed!');
|
|
590
|
-
};
|
|
591
|
-
|
|
592
|
-
deploy();
|
|
593
|
-
context:
|
|
594
|
-
language: javascript
|
|
595
|
-
framework: nodejs
|
|
596
|
-
regulation: SOC2
|
|
597
|
-
|
|
598
|
-
expected_output:
|
|
599
|
-
must_contain:
|
|
600
|
-
- "SOC2"
|
|
601
|
-
- "change management"
|
|
602
|
-
- "CC8"
|
|
603
|
-
- "approval"
|
|
604
|
-
- "rollback"
|
|
605
|
-
severity_classification: medium
|
|
606
|
-
|
|
607
|
-
validation:
|
|
608
|
-
schema_check: true
|
|
609
|
-
keyword_match_threshold: 0.6
|
|
610
|
-
|
|
611
|
-
# ---------------------------------------------------------------------------
|
|
612
|
-
# CATEGORY: CCPA Compliance (California Consumer Privacy)
|
|
613
|
-
# ---------------------------------------------------------------------------
|
|
614
|
-
|
|
615
|
-
- id: tc012_ccpa_opt_out
|
|
616
|
-
description: "Detect missing 'Do Not Sell' opt-out mechanism"
|
|
617
|
-
category: ccpa
|
|
618
|
-
priority: high
|
|
619
|
-
|
|
620
|
-
input:
|
|
621
|
-
code: |
|
|
622
|
-
// Data sharing API - No opt-out mechanism
|
|
623
|
-
app.post('/analytics/share', (req, res) => {
|
|
624
|
-
const userData = db.findOne('users', { id: req.body.userId });
|
|
625
|
-
|
|
626
|
-
// Share data with third parties without opt-out check
|
|
627
|
-
thirdPartyAnalytics.send({
|
|
628
|
-
email: userData.email,
|
|
629
|
-
browsing_history: userData.history,
|
|
630
|
-
purchases: userData.purchases
|
|
631
|
-
});
|
|
632
|
-
|
|
633
|
-
res.send('Data shared');
|
|
634
|
-
});
|
|
635
|
-
context:
|
|
636
|
-
language: javascript
|
|
637
|
-
framework: express
|
|
638
|
-
regulation: CCPA
|
|
639
|
-
|
|
640
|
-
expected_output:
|
|
641
|
-
must_contain:
|
|
642
|
-
- "CCPA"
|
|
643
|
-
- "opt-out"
|
|
644
|
-
- "do not sell"
|
|
645
|
-
- "consumer"
|
|
646
|
-
severity_classification: high
|
|
647
|
-
|
|
648
|
-
validation:
|
|
649
|
-
schema_check: true
|
|
650
|
-
keyword_match_threshold: 0.7
|
|
651
|
-
|
|
652
|
-
- id: tc013_ccpa_disclosure
|
|
653
|
-
description: "Detect missing data collection disclosure"
|
|
654
|
-
category: ccpa
|
|
655
|
-
priority: high
|
|
656
|
-
|
|
657
|
-
input:
|
|
658
|
-
code: |
|
|
659
|
-
// User signup - no disclosure of data practices
|
|
660
|
-
app.post('/signup', (req, res) => {
|
|
661
|
-
const user = db.insert('users', {
|
|
662
|
-
email: req.body.email,
|
|
663
|
-
name: req.body.name,
|
|
664
|
-
ip_address: req.ip,
|
|
665
|
-
device_info: req.headers['user-agent'],
|
|
666
|
-
location: geoip.lookup(req.ip)
|
|
667
|
-
});
|
|
668
|
-
|
|
669
|
-
// Collect data without disclosing what's collected
|
|
670
|
-
// No link to privacy policy
|
|
671
|
-
// No categories of data disclosed
|
|
672
|
-
|
|
673
|
-
res.json({ success: true });
|
|
674
|
-
});
|
|
675
|
-
context:
|
|
676
|
-
language: javascript
|
|
677
|
-
framework: express
|
|
678
|
-
regulation: CCPA
|
|
679
|
-
|
|
680
|
-
expected_output:
|
|
681
|
-
must_contain:
|
|
682
|
-
- "CCPA"
|
|
683
|
-
- "disclosure"
|
|
684
|
-
- "categories"
|
|
685
|
-
- "privacy"
|
|
686
|
-
severity_classification: medium
|
|
687
|
-
|
|
688
|
-
validation:
|
|
689
|
-
schema_check: true
|
|
690
|
-
keyword_match_threshold: 0.7
|
|
691
|
-
|
|
692
|
-
# ---------------------------------------------------------------------------
|
|
693
|
-
# CATEGORY: Negative Tests (Compliant Code)
|
|
694
|
-
# ---------------------------------------------------------------------------
|
|
695
|
-
|
|
696
|
-
- id: tc014_compliant_gdpr_code
|
|
697
|
-
description: "Verify compliant GDPR implementation is not flagged"
|
|
698
|
-
category: negative
|
|
699
|
-
priority: high
|
|
700
|
-
|
|
701
|
-
input:
|
|
702
|
-
code: |
|
|
703
|
-
// GDPR-compliant user data handling
|
|
704
|
-
app.post('/newsletter/subscribe', (req, res) => {
|
|
705
|
-
// Verify consent
|
|
706
|
-
if (!req.body.consent || !req.body.consent.marketing) {
|
|
707
|
-
return res.status(400).json({ error: 'Consent required' });
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
db.insert('subscribers', {
|
|
711
|
-
email: req.body.email,
|
|
712
|
-
consent: {
|
|
713
|
-
marketing: true,
|
|
714
|
-
timestamp: new Date().toISOString(),
|
|
715
|
-
ip_address: req.ip,
|
|
716
|
-
version: 'consent-v2.1'
|
|
717
|
-
}
|
|
718
|
-
});
|
|
719
|
-
|
|
720
|
-
res.json({ success: true, message: 'Subscribed with consent' });
|
|
721
|
-
});
|
|
722
|
-
|
|
723
|
-
// Right to erasure implementation
|
|
724
|
-
app.delete('/user/:id/data', async (req, res) => {
|
|
725
|
-
const userId = req.params.id;
|
|
726
|
-
|
|
727
|
-
// Delete from all tables
|
|
728
|
-
await Promise.all([
|
|
729
|
-
db.delete('users', { id: userId }),
|
|
730
|
-
db.delete('orders', { user_id: userId }),
|
|
731
|
-
db.delete('analytics', { user_id: userId }),
|
|
732
|
-
db.delete('preferences', { user_id: userId })
|
|
733
|
-
]);
|
|
734
|
-
|
|
735
|
-
// Log the erasure (retain audit log)
|
|
736
|
-
await db.insert('audit_log', {
|
|
737
|
-
action: 'GDPR_ERASURE',
|
|
738
|
-
user_id: userId,
|
|
739
|
-
timestamp: new Date().toISOString()
|
|
740
|
-
});
|
|
741
|
-
|
|
742
|
-
res.json({ success: true, message: 'All data erased' });
|
|
743
|
-
});
|
|
744
|
-
|
|
745
|
-
// Data portability
|
|
746
|
-
app.get('/user/:id/export', async (req, res) => {
|
|
747
|
-
const userId = req.params.id;
|
|
748
|
-
const userData = await collectAllUserData(userId);
|
|
749
|
-
|
|
750
|
-
res.json({
|
|
751
|
-
format: 'JSON',
|
|
752
|
-
schema_version: '1.0',
|
|
753
|
-
exported_at: new Date().toISOString(),
|
|
754
|
-
data: userData
|
|
755
|
-
});
|
|
756
|
-
});
|
|
757
|
-
context:
|
|
758
|
-
language: javascript
|
|
759
|
-
framework: express
|
|
760
|
-
regulation: GDPR
|
|
761
|
-
|
|
762
|
-
expected_output:
|
|
763
|
-
must_contain:
|
|
764
|
-
- "compliant"
|
|
765
|
-
- "consent"
|
|
766
|
-
- "erasure"
|
|
767
|
-
- "portability"
|
|
768
|
-
must_not_contain:
|
|
769
|
-
- "critical"
|
|
770
|
-
- "violation"
|
|
771
|
-
- "missing"
|
|
772
|
-
finding_count:
|
|
773
|
-
max: 2 # Allow informational findings only
|
|
774
|
-
|
|
775
|
-
validation:
|
|
776
|
-
schema_check: true
|
|
777
|
-
allow_partial: true
|
|
778
|
-
|
|
779
|
-
- id: tc015_compliant_pci_code
|
|
780
|
-
description: "Verify PCI-DSS compliant payment handling is not flagged"
|
|
781
|
-
category: negative
|
|
782
|
-
priority: high
|
|
783
|
-
|
|
784
|
-
input:
|
|
785
|
-
code: |
|
|
786
|
-
// PCI-DSS compliant payment processing
|
|
787
|
-
const processPayment = async (req, res) => {
|
|
788
|
-
const { paymentToken, amount } = req.body; // Only token, no raw card data
|
|
789
|
-
|
|
790
|
-
// Log without sensitive data
|
|
791
|
-
logger.info({
|
|
792
|
-
amount,
|
|
793
|
-
tokenId: paymentToken.slice(0, 8) + '***',
|
|
794
|
-
timestamp: new Date().toISOString()
|
|
795
|
-
}, 'Processing payment');
|
|
796
|
-
|
|
797
|
-
// Process via tokenized gateway
|
|
798
|
-
const result = await paymentGateway.charge({
|
|
799
|
-
token: paymentToken,
|
|
800
|
-
amount
|
|
801
|
-
});
|
|
802
|
-
|
|
803
|
-
// Store only safe reference
|
|
804
|
-
await db.insert('transactions', {
|
|
805
|
-
transaction_id: result.id,
|
|
806
|
-
card_last4: result.card.last4,
|
|
807
|
-
card_brand: result.card.brand,
|
|
808
|
-
amount,
|
|
809
|
-
status: result.status
|
|
810
|
-
});
|
|
811
|
-
|
|
812
|
-
res.json({
|
|
813
|
-
success: true,
|
|
814
|
-
transactionId: result.id
|
|
815
|
-
});
|
|
816
|
-
};
|
|
817
|
-
context:
|
|
818
|
-
language: javascript
|
|
819
|
-
framework: express
|
|
820
|
-
regulation: PCI-DSS
|
|
821
|
-
|
|
822
|
-
expected_output:
|
|
823
|
-
must_contain:
|
|
824
|
-
- "token"
|
|
825
|
-
- "compliant"
|
|
826
|
-
must_not_contain:
|
|
827
|
-
- "CVV"
|
|
828
|
-
- "card number"
|
|
829
|
-
- "violation"
|
|
830
|
-
- "critical"
|
|
831
|
-
finding_count:
|
|
832
|
-
max: 1
|
|
833
|
-
|
|
834
|
-
validation:
|
|
835
|
-
schema_check: true
|
|
836
|
-
allow_partial: true
|
|
837
|
-
|
|
838
|
-
# ---------------------------------------------------------------------------
|
|
839
|
-
# CATEGORY: Multi-Framework Tests
|
|
840
|
-
# ---------------------------------------------------------------------------
|
|
841
|
-
|
|
842
|
-
- id: tc016_multi_framework_violations
|
|
843
|
-
description: "Detect violations across multiple compliance frameworks"
|
|
844
|
-
category: multi-framework
|
|
845
|
-
priority: high
|
|
846
|
-
|
|
847
|
-
input:
|
|
848
|
-
code: |
|
|
849
|
-
// Healthcare payment app - violates HIPAA and PCI-DSS
|
|
850
|
-
app.post('/patient/payment', (req, res) => {
|
|
851
|
-
const { patientId, cardNumber, cvv, diagnosis } = req.body;
|
|
852
|
-
|
|
853
|
-
// HIPAA violation: PHI without encryption/logging
|
|
854
|
-
db.insert('patient_payments', {
|
|
855
|
-
patient_id: patientId,
|
|
856
|
-
diagnosis: diagnosis, // PHI stored unencrypted
|
|
857
|
-
// No audit log
|
|
858
|
-
|
|
859
|
-
// PCI-DSS violation: Card data storage
|
|
860
|
-
card_number: cardNumber,
|
|
861
|
-
cvv: cvv // Never store CVV
|
|
862
|
-
});
|
|
863
|
-
|
|
864
|
-
console.log(`Payment for patient ${patientId}, card ${cardNumber}`);
|
|
865
|
-
|
|
866
|
-
res.send('Payment recorded');
|
|
867
|
-
});
|
|
868
|
-
context:
|
|
869
|
-
language: javascript
|
|
870
|
-
framework: express
|
|
871
|
-
regulation: [HIPAA, PCI-DSS]
|
|
872
|
-
|
|
873
|
-
expected_output:
|
|
874
|
-
must_contain:
|
|
875
|
-
- "HIPAA"
|
|
876
|
-
- "PCI"
|
|
877
|
-
- "PHI"
|
|
878
|
-
- "CVV"
|
|
879
|
-
- "encryption"
|
|
880
|
-
finding_count:
|
|
881
|
-
min: 3
|
|
882
|
-
max: 8
|
|
883
|
-
|
|
884
|
-
validation:
|
|
885
|
-
schema_check: true
|
|
886
|
-
keyword_match_threshold: 0.7
|
|
887
|
-
|
|
888
|
-
timeout_ms: 45000
|
|
889
|
-
|
|
890
|
-
- id: tc017_gdpr_ccpa_overlap
|
|
891
|
-
description: "Detect privacy violations applicable to both GDPR and CCPA"
|
|
892
|
-
category: multi-framework
|
|
893
|
-
priority: high
|
|
894
|
-
|
|
895
|
-
input:
|
|
896
|
-
code: |
|
|
897
|
-
// Privacy violations applicable to GDPR and CCPA
|
|
898
|
-
app.post('/signup', (req, res) => {
|
|
899
|
-
// No consent collection
|
|
900
|
-
// No disclosure of data practices
|
|
901
|
-
// No opt-out mechanism
|
|
902
|
-
|
|
903
|
-
db.insert('users', {
|
|
904
|
-
email: req.body.email,
|
|
905
|
-
ip: req.ip,
|
|
906
|
-
browser: req.headers['user-agent'],
|
|
907
|
-
location: geoip.lookup(req.ip),
|
|
908
|
-
referrer: req.headers.referer
|
|
909
|
-
});
|
|
910
|
-
|
|
911
|
-
// Share with third parties without consent
|
|
912
|
-
analytics.track(req.body.email, 'signup');
|
|
913
|
-
marketing.addLead(req.body.email);
|
|
914
|
-
|
|
915
|
-
res.send('Signed up!');
|
|
916
|
-
});
|
|
917
|
-
context:
|
|
918
|
-
language: javascript
|
|
919
|
-
framework: express
|
|
920
|
-
regulation: [GDPR, CCPA]
|
|
921
|
-
|
|
922
|
-
expected_output:
|
|
923
|
-
must_contain:
|
|
924
|
-
- "consent"
|
|
925
|
-
- "disclosure"
|
|
926
|
-
- "third party"
|
|
927
|
-
must_match_regex:
|
|
928
|
-
- "GDPR|CCPA"
|
|
929
|
-
finding_count:
|
|
930
|
-
min: 2
|
|
931
|
-
|
|
932
|
-
validation:
|
|
933
|
-
schema_check: true
|
|
934
|
-
|
|
935
|
-
# ---------------------------------------------------------------------------
|
|
936
|
-
# CATEGORY: Edge Cases
|
|
937
|
-
# ---------------------------------------------------------------------------
|
|
938
|
-
|
|
939
|
-
- id: tc018_encrypted_but_logged
|
|
940
|
-
description: "Detect sensitive data encrypted but logged in plain text"
|
|
941
|
-
category: edge_cases
|
|
942
|
-
priority: medium
|
|
943
|
-
|
|
944
|
-
input:
|
|
945
|
-
code: |
|
|
946
|
-
app.post('/patient', async (req, res) => {
|
|
947
|
-
const { ssn, diagnosis } = req.body;
|
|
948
|
-
|
|
949
|
-
// Properly encrypted for storage
|
|
950
|
-
const encryptedSSN = await encrypt(ssn);
|
|
951
|
-
const encryptedDiagnosis = await encrypt(diagnosis);
|
|
952
|
-
|
|
953
|
-
await db.insert('patients', {
|
|
954
|
-
ssn: encryptedSSN,
|
|
955
|
-
diagnosis: encryptedDiagnosis
|
|
956
|
-
});
|
|
957
|
-
|
|
958
|
-
// But logged in plain text (VIOLATION)
|
|
959
|
-
console.log(`Created patient with SSN: ${ssn}, diagnosis: ${diagnosis}`);
|
|
960
|
-
|
|
961
|
-
res.send('Patient created');
|
|
962
|
-
});
|
|
963
|
-
context:
|
|
964
|
-
language: javascript
|
|
965
|
-
framework: express
|
|
966
|
-
regulation: HIPAA
|
|
967
|
-
|
|
968
|
-
expected_output:
|
|
969
|
-
must_contain:
|
|
970
|
-
- "log"
|
|
971
|
-
- "plain text"
|
|
972
|
-
- "SSN"
|
|
973
|
-
- "diagnosis"
|
|
974
|
-
severity_classification: high
|
|
975
|
-
|
|
976
|
-
validation:
|
|
977
|
-
schema_check: true
|
|
978
|
-
|
|
979
|
-
- id: tc019_partial_compliance
|
|
980
|
-
description: "Detect partial compliance with some controls passing"
|
|
981
|
-
category: edge_cases
|
|
982
|
-
priority: medium
|
|
983
|
-
|
|
984
|
-
input:
|
|
985
|
-
code: |
|
|
986
|
-
// Partial GDPR compliance
|
|
987
|
-
app.post('/subscribe', (req, res) => {
|
|
988
|
-
// PASS: Has consent
|
|
989
|
-
if (!req.body.consent) {
|
|
990
|
-
return res.status(400).json({ error: 'Consent required' });
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
db.insert('subscribers', {
|
|
994
|
-
email: req.body.email,
|
|
995
|
-
consent: true,
|
|
996
|
-
// FAIL: Missing timestamp and IP
|
|
997
|
-
subscribed_at: new Date()
|
|
998
|
-
});
|
|
999
|
-
|
|
1000
|
-
res.send('Subscribed');
|
|
1001
|
-
});
|
|
1002
|
-
|
|
1003
|
-
// PASS: Has data export
|
|
1004
|
-
app.get('/user/:id/export', (req, res) => {
|
|
1005
|
-
const data = collectUserData(req.params.id);
|
|
1006
|
-
res.json(data);
|
|
1007
|
-
});
|
|
1008
|
-
|
|
1009
|
-
// FAIL: Incomplete erasure
|
|
1010
|
-
app.delete('/user/:id', (req, res) => {
|
|
1011
|
-
db.delete('users', { id: req.params.id });
|
|
1012
|
-
// Missing: orders, logs, analytics
|
|
1013
|
-
res.send('Deleted');
|
|
1014
|
-
});
|
|
1015
|
-
context:
|
|
1016
|
-
language: javascript
|
|
1017
|
-
framework: express
|
|
1018
|
-
regulation: GDPR
|
|
1019
|
-
|
|
1020
|
-
expected_output:
|
|
1021
|
-
must_contain:
|
|
1022
|
-
- "partial"
|
|
1023
|
-
- "consent"
|
|
1024
|
-
- "erasure"
|
|
1025
|
-
- "incomplete"
|
|
1026
|
-
severity_classification: medium
|
|
1027
|
-
|
|
1028
|
-
validation:
|
|
1029
|
-
schema_check: true
|
|
1030
|
-
allow_partial: true
|
|
1031
|
-
|
|
1032
|
-
- id: tc020_typescript_compliance
|
|
1033
|
-
description: "Detect compliance issues in TypeScript code"
|
|
1034
|
-
category: language_support
|
|
1035
|
-
priority: medium
|
|
1036
|
-
|
|
1037
|
-
input:
|
|
1038
|
-
code: |
|
|
1039
|
-
interface PatientRecord {
|
|
1040
|
-
id: string;
|
|
1041
|
-
ssn: string; // PHI
|
|
1042
|
-
medicalHistory: string[]; // PHI
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
export const getPatient = async (
|
|
1046
|
-
patientId: string,
|
|
1047
|
-
requester: User // Unused - no access control
|
|
1048
|
-
): Promise<PatientRecord> => {
|
|
1049
|
-
// No audit logging
|
|
1050
|
-
// No encryption check
|
|
1051
|
-
const patient = await db.patients.findOne({ id: patientId });
|
|
1052
|
-
return patient as PatientRecord;
|
|
1053
|
-
};
|
|
1054
|
-
context:
|
|
1055
|
-
language: typescript
|
|
1056
|
-
framework: nodejs
|
|
1057
|
-
regulation: HIPAA
|
|
1058
|
-
|
|
1059
|
-
expected_output:
|
|
1060
|
-
must_contain:
|
|
1061
|
-
- "HIPAA"
|
|
1062
|
-
- "PHI"
|
|
1063
|
-
- "access control"
|
|
1064
|
-
- "audit"
|
|
1065
|
-
|
|
1066
|
-
validation:
|
|
1067
|
-
schema_check: true
|
|
1068
|
-
|
|
1069
|
-
# =============================================================================
|
|
1070
|
-
# SUCCESS CRITERIA
|
|
1071
|
-
# =============================================================================
|
|
1072
|
-
|
|
1073
|
-
success_criteria:
|
|
1074
|
-
# 90% of tests must pass overall
|
|
1075
|
-
pass_rate: 0.9
|
|
1076
|
-
|
|
1077
|
-
# All critical tests must pass
|
|
1078
|
-
critical_pass_rate: 1.0
|
|
1079
|
-
|
|
1080
|
-
# Average reasoning quality score
|
|
1081
|
-
avg_reasoning_quality: 0.75
|
|
1082
|
-
|
|
1083
|
-
# Maximum suite execution time (5 minutes)
|
|
1084
|
-
max_execution_time_ms: 300000
|
|
1085
|
-
|
|
1086
|
-
# Maximum variance between model results (15%)
|
|
1087
|
-
cross_model_variance: 0.15
|
|
1088
|
-
|
|
1089
|
-
# =============================================================================
|
|
1090
|
-
# METADATA
|
|
1091
|
-
# =============================================================================
|
|
1092
|
-
|
|
1093
|
-
metadata:
|
|
1094
|
-
author: "qe-security-auditor"
|
|
1095
|
-
created: "2026-02-02"
|
|
1096
|
-
last_updated: "2026-02-02"
|
|
1097
|
-
coverage_target: >
|
|
1098
|
-
Major compliance frameworks: GDPR (Articles 7, 17, 20), HIPAA (PHI protection,
|
|
1099
|
-
access control, audit logging), PCI-DSS (Requirements 3, 4, 10), SOC2 (CC6, CC8),
|
|
1100
|
-
CCPA (opt-out, disclosure). Covers JavaScript/TypeScript and Python applications.
|
|
1101
|
-
test_count: 20
|
|
1102
|
-
frameworks_covered:
|
|
1103
|
-
- GDPR
|
|
1104
|
-
- HIPAA
|
|
1105
|
-
- PCI-DSS
|
|
1106
|
-
- SOC2
|
|
1107
|
-
- CCPA
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# AQE Skill Evaluation Test Suite: Compliance Testing v1.0.0
|
|
3
|
+
# =============================================================================
|
|
4
|
+
#
|
|
5
|
+
# Comprehensive evaluation suite for the compliance-testing skill.
|
|
6
|
+
# Tests regulatory compliance detection across GDPR, HIPAA, SOC2, PCI-DSS, CCPA.
|
|
7
|
+
#
|
|
8
|
+
# Coverage:
|
|
9
|
+
# - Data privacy controls (GDPR/CCPA)
|
|
10
|
+
# - Healthcare data protection (HIPAA)
|
|
11
|
+
# - Payment security (PCI-DSS)
|
|
12
|
+
# - Security controls (SOC2)
|
|
13
|
+
# - Access control and audit logging
|
|
14
|
+
# - Multi-model consistency
|
|
15
|
+
#
|
|
16
|
+
# Schema: .claude/skills/.validation/schemas/skill-eval.schema.json
|
|
17
|
+
# Runner: scripts/run-skill-eval.ts
|
|
18
|
+
#
|
|
19
|
+
# =============================================================================
|
|
20
|
+
|
|
21
|
+
skill: compliance-testing
|
|
22
|
+
version: 1.0.0
|
|
23
|
+
description: >
|
|
24
|
+
Comprehensive evaluation suite for the compliance-testing skill.
|
|
25
|
+
Validates detection of compliance violations across major regulatory frameworks
|
|
26
|
+
(GDPR, HIPAA, SOC2, PCI-DSS, CCPA), control assessment accuracy, risk scoring,
|
|
27
|
+
and remediation quality. Integrates with ReasoningBank for pattern learning.
|
|
28
|
+
|
|
29
|
+
# =============================================================================
|
|
30
|
+
# Multi-Model Configuration
|
|
31
|
+
# =============================================================================
|
|
32
|
+
|
|
33
|
+
models_to_test:
|
|
34
|
+
- claude-3.5-sonnet # Primary model (high accuracy expected)
|
|
35
|
+
- claude-3-haiku # Fast model (minimum quality threshold)
|
|
36
|
+
- gpt-4o # Cross-vendor validation
|
|
37
|
+
|
|
38
|
+
# =============================================================================
|
|
39
|
+
# MCP Integration Configuration
|
|
40
|
+
# =============================================================================
|
|
41
|
+
|
|
42
|
+
mcp_integration:
|
|
43
|
+
enabled: true
|
|
44
|
+
namespace: skill-validation
|
|
45
|
+
|
|
46
|
+
query_patterns: true
|
|
47
|
+
track_outcomes: true
|
|
48
|
+
store_patterns: true
|
|
49
|
+
share_learning: true
|
|
50
|
+
update_quality_gate: true
|
|
51
|
+
|
|
52
|
+
target_agents:
|
|
53
|
+
- qe-learning-coordinator
|
|
54
|
+
- qe-queen-coordinator
|
|
55
|
+
- qe-security-scanner
|
|
56
|
+
- qe-security-auditor
|
|
57
|
+
|
|
58
|
+
# =============================================================================
|
|
59
|
+
# ReasoningBank Learning Configuration
|
|
60
|
+
# =============================================================================
|
|
61
|
+
|
|
62
|
+
learning:
|
|
63
|
+
store_success_patterns: true
|
|
64
|
+
store_failure_patterns: true
|
|
65
|
+
pattern_ttl_days: 90
|
|
66
|
+
min_confidence_to_store: 0.7
|
|
67
|
+
cross_model_comparison: true
|
|
68
|
+
|
|
69
|
+
# =============================================================================
|
|
70
|
+
# Result Format Configuration
|
|
71
|
+
# =============================================================================
|
|
72
|
+
|
|
73
|
+
result_format:
|
|
74
|
+
json_output: true
|
|
75
|
+
markdown_report: true
|
|
76
|
+
include_raw_output: false
|
|
77
|
+
include_timing: true
|
|
78
|
+
include_token_usage: true
|
|
79
|
+
|
|
80
|
+
# =============================================================================
|
|
81
|
+
# Environment Setup
|
|
82
|
+
# =============================================================================
|
|
83
|
+
|
|
84
|
+
setup:
|
|
85
|
+
required_tools:
|
|
86
|
+
- jq # JSON processing
|
|
87
|
+
|
|
88
|
+
environment_variables:
|
|
89
|
+
COMPLIANCE_AUDIT_MODE: "comprehensive"
|
|
90
|
+
GDPR_ENABLED: "true"
|
|
91
|
+
HIPAA_ENABLED: "true"
|
|
92
|
+
PCI_DSS_ENABLED: "true"
|
|
93
|
+
SOC2_ENABLED: "true"
|
|
94
|
+
CCPA_ENABLED: "true"
|
|
95
|
+
|
|
96
|
+
fixtures:
|
|
97
|
+
- name: gdpr_violation_app
|
|
98
|
+
path: fixtures/gdpr-violation.js
|
|
99
|
+
content: |
|
|
100
|
+
// GDPR Violation: No consent tracking, no data subject rights
|
|
101
|
+
const express = require('express');
|
|
102
|
+
const app = express();
|
|
103
|
+
|
|
104
|
+
// No consent management
|
|
105
|
+
app.post('/newsletter/subscribe', (req, res) => {
|
|
106
|
+
db.insert('subscribers', {
|
|
107
|
+
email: req.body.email,
|
|
108
|
+
// No consent timestamp, no IP, no opt-in record
|
|
109
|
+
});
|
|
110
|
+
res.send('Subscribed!');
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
// No right to erasure
|
|
114
|
+
app.delete('/user/:id', (req, res) => {
|
|
115
|
+
// Deletes user but not their data from other tables
|
|
116
|
+
db.delete('users', { id: req.params.id });
|
|
117
|
+
// Still has: orders, logs, analytics, backups
|
|
118
|
+
res.send('Deleted');
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
// No data portability
|
|
122
|
+
// Missing /user/:id/export endpoint
|
|
123
|
+
|
|
124
|
+
- name: hipaa_violation_app
|
|
125
|
+
path: fixtures/hipaa-violation.py
|
|
126
|
+
content: |
|
|
127
|
+
# HIPAA Violation: PHI exposed, no encryption, no audit logging
|
|
128
|
+
from flask import Flask, request
|
|
129
|
+
import sqlite3
|
|
130
|
+
|
|
131
|
+
app = Flask(__name__)
|
|
132
|
+
|
|
133
|
+
@app.route('/patient/<patient_id>')
|
|
134
|
+
def get_patient(patient_id):
|
|
135
|
+
# No access control check
|
|
136
|
+
# No audit logging
|
|
137
|
+
conn = sqlite3.connect('patients.db')
|
|
138
|
+
cursor = conn.cursor()
|
|
139
|
+
# PHI returned without encryption
|
|
140
|
+
cursor.execute(f"SELECT ssn, medical_history, diagnosis FROM patients WHERE id = {patient_id}")
|
|
141
|
+
return str(cursor.fetchone()) # Plain text response with PHI
|
|
142
|
+
|
|
143
|
+
@app.route('/patient', methods=['POST'])
|
|
144
|
+
def create_patient():
|
|
145
|
+
# PHI stored without encryption
|
|
146
|
+
data = request.json
|
|
147
|
+
conn = sqlite3.connect('patients.db')
|
|
148
|
+
cursor = conn.cursor()
|
|
149
|
+
cursor.execute(f"""
|
|
150
|
+
INSERT INTO patients (ssn, name, medical_history)
|
|
151
|
+
VALUES ('{data['ssn']}', '{data['name']}', '{data['history']}')
|
|
152
|
+
""")
|
|
153
|
+
# No audit log of PHI access
|
|
154
|
+
return 'Created'
|
|
155
|
+
|
|
156
|
+
- name: pci_dss_violation_app
|
|
157
|
+
path: fixtures/pci-violation.js
|
|
158
|
+
content: |
|
|
159
|
+
// PCI-DSS Violation: Card data stored, CVV logged
|
|
160
|
+
const express = require('express');
|
|
161
|
+
const app = express();
|
|
162
|
+
|
|
163
|
+
app.post('/payment', (req, res) => {
|
|
164
|
+
const { cardNumber, expiry, cvv, amount } = req.body;
|
|
165
|
+
|
|
166
|
+
// Violation: Storing full card number
|
|
167
|
+
db.insert('payments', {
|
|
168
|
+
card_number: cardNumber, // Should only store last 4
|
|
169
|
+
expiry: expiry, // Should not store
|
|
170
|
+
cvv: cvv, // NEVER store CVV
|
|
171
|
+
amount: amount
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
// Violation: Logging sensitive card data
|
|
175
|
+
console.log(`Payment processed: ${cardNumber}, CVV: ${cvv}`);
|
|
176
|
+
|
|
177
|
+
res.send('Payment processed');
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
// Violation: Exposing card data via API
|
|
181
|
+
app.get('/payments/:id', (req, res) => {
|
|
182
|
+
const payment = db.findOne('payments', { id: req.params.id });
|
|
183
|
+
res.json(payment); // Returns full card number
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
# =============================================================================
|
|
187
|
+
# TEST CASES
|
|
188
|
+
# =============================================================================
|
|
189
|
+
|
|
190
|
+
test_cases:
|
|
191
|
+
# ---------------------------------------------------------------------------
|
|
192
|
+
# CATEGORY: GDPR Compliance (Data Privacy)
|
|
193
|
+
# ---------------------------------------------------------------------------
|
|
194
|
+
|
|
195
|
+
- id: tc001_gdpr_consent_violation
|
|
196
|
+
description: "Detect missing consent management for data collection"
|
|
197
|
+
category: gdpr
|
|
198
|
+
priority: critical
|
|
199
|
+
|
|
200
|
+
input:
|
|
201
|
+
code: |
|
|
202
|
+
app.post('/newsletter/subscribe', (req, res) => {
|
|
203
|
+
db.insert('subscribers', {
|
|
204
|
+
email: req.body.email,
|
|
205
|
+
subscribed_at: new Date()
|
|
206
|
+
});
|
|
207
|
+
res.send('Subscribed!');
|
|
208
|
+
});
|
|
209
|
+
context:
|
|
210
|
+
language: javascript
|
|
211
|
+
framework: express
|
|
212
|
+
regulation: GDPR
|
|
213
|
+
|
|
214
|
+
expected_output:
|
|
215
|
+
must_contain:
|
|
216
|
+
- "consent"
|
|
217
|
+
- "GDPR"
|
|
218
|
+
- "Article 7"
|
|
219
|
+
- "lawful basis"
|
|
220
|
+
must_not_contain:
|
|
221
|
+
- "compliant"
|
|
222
|
+
- "no issues"
|
|
223
|
+
severity_classification: high
|
|
224
|
+
finding_count:
|
|
225
|
+
min: 1
|
|
226
|
+
|
|
227
|
+
validation:
|
|
228
|
+
schema_check: true
|
|
229
|
+
keyword_match_threshold: 0.8
|
|
230
|
+
reasoning_quality_min: 0.7
|
|
231
|
+
|
|
232
|
+
- id: tc002_gdpr_right_to_erasure
|
|
233
|
+
description: "Detect incomplete implementation of right to erasure (Article 17)"
|
|
234
|
+
category: gdpr
|
|
235
|
+
priority: critical
|
|
236
|
+
|
|
237
|
+
input:
|
|
238
|
+
code: |
|
|
239
|
+
app.delete('/user/:id', async (req, res) => {
|
|
240
|
+
const userId = req.params.id;
|
|
241
|
+
await db.delete('users', { id: userId });
|
|
242
|
+
// Orders, logs, and analytics still contain user data
|
|
243
|
+
res.send('User deleted');
|
|
244
|
+
});
|
|
245
|
+
context:
|
|
246
|
+
language: javascript
|
|
247
|
+
framework: express
|
|
248
|
+
regulation: GDPR
|
|
249
|
+
|
|
250
|
+
expected_output:
|
|
251
|
+
must_contain:
|
|
252
|
+
- "erasure"
|
|
253
|
+
- "Article 17"
|
|
254
|
+
- "right to be forgotten"
|
|
255
|
+
- "incomplete"
|
|
256
|
+
- "related data"
|
|
257
|
+
must_match_regex:
|
|
258
|
+
- "GDPR-Art17|Art\\.?\\s*17"
|
|
259
|
+
severity_classification: high
|
|
260
|
+
finding_count:
|
|
261
|
+
min: 1
|
|
262
|
+
|
|
263
|
+
validation:
|
|
264
|
+
schema_check: true
|
|
265
|
+
keyword_match_threshold: 0.7
|
|
266
|
+
|
|
267
|
+
- id: tc003_gdpr_data_portability
|
|
268
|
+
description: "Detect missing data portability implementation (Article 20)"
|
|
269
|
+
category: gdpr
|
|
270
|
+
priority: high
|
|
271
|
+
|
|
272
|
+
input:
|
|
273
|
+
code: |
|
|
274
|
+
// User management API - No data export endpoint
|
|
275
|
+
app.get('/user/:id', (req, res) => {
|
|
276
|
+
const user = db.findOne('users', { id: req.params.id });
|
|
277
|
+
res.json(user);
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
app.put('/user/:id', (req, res) => {
|
|
281
|
+
db.update('users', { id: req.params.id }, req.body);
|
|
282
|
+
res.send('Updated');
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
// Missing: GET /user/:id/export
|
|
286
|
+
context:
|
|
287
|
+
language: javascript
|
|
288
|
+
framework: express
|
|
289
|
+
regulation: GDPR
|
|
290
|
+
|
|
291
|
+
expected_output:
|
|
292
|
+
must_contain:
|
|
293
|
+
- "portability"
|
|
294
|
+
- "Article 20"
|
|
295
|
+
- "export"
|
|
296
|
+
- "machine-readable"
|
|
297
|
+
severity_classification: medium
|
|
298
|
+
|
|
299
|
+
validation:
|
|
300
|
+
schema_check: true
|
|
301
|
+
keyword_match_threshold: 0.7
|
|
302
|
+
|
|
303
|
+
# ---------------------------------------------------------------------------
|
|
304
|
+
# CATEGORY: HIPAA Compliance (Healthcare Data)
|
|
305
|
+
# ---------------------------------------------------------------------------
|
|
306
|
+
|
|
307
|
+
- id: tc004_hipaa_phi_encryption
|
|
308
|
+
description: "Detect unencrypted PHI storage and transmission"
|
|
309
|
+
category: hipaa
|
|
310
|
+
priority: critical
|
|
311
|
+
|
|
312
|
+
input:
|
|
313
|
+
code: |
|
|
314
|
+
@app.route('/patient', methods=['POST'])
|
|
315
|
+
def create_patient():
|
|
316
|
+
data = request.json
|
|
317
|
+
conn = sqlite3.connect('patients.db')
|
|
318
|
+
cursor = conn.cursor()
|
|
319
|
+
cursor.execute(f"""
|
|
320
|
+
INSERT INTO patients (ssn, name, diagnosis, medical_history)
|
|
321
|
+
VALUES ('{data['ssn']}', '{data['name']}', '{data['diagnosis']}', '{data['history']}')
|
|
322
|
+
""")
|
|
323
|
+
conn.commit()
|
|
324
|
+
return 'Patient created'
|
|
325
|
+
context:
|
|
326
|
+
language: python
|
|
327
|
+
framework: flask
|
|
328
|
+
regulation: HIPAA
|
|
329
|
+
|
|
330
|
+
expected_output:
|
|
331
|
+
must_contain:
|
|
332
|
+
- "PHI"
|
|
333
|
+
- "encryption"
|
|
334
|
+
- "HIPAA"
|
|
335
|
+
- "protected health information"
|
|
336
|
+
- "encrypt at rest"
|
|
337
|
+
must_match_regex:
|
|
338
|
+
- "HIPAA-[0-9]+|164\\.312"
|
|
339
|
+
severity_classification: critical
|
|
340
|
+
finding_count:
|
|
341
|
+
min: 1
|
|
342
|
+
|
|
343
|
+
validation:
|
|
344
|
+
schema_check: true
|
|
345
|
+
keyword_match_threshold: 0.8
|
|
346
|
+
reasoning_quality_min: 0.75
|
|
347
|
+
|
|
348
|
+
- id: tc005_hipaa_audit_logging
|
|
349
|
+
description: "Detect missing audit logging for PHI access"
|
|
350
|
+
category: hipaa
|
|
351
|
+
priority: critical
|
|
352
|
+
|
|
353
|
+
input:
|
|
354
|
+
code: |
|
|
355
|
+
@app.route('/patient/<patient_id>')
|
|
356
|
+
def get_patient(patient_id):
|
|
357
|
+
conn = sqlite3.connect('patients.db')
|
|
358
|
+
cursor = conn.cursor()
|
|
359
|
+
cursor.execute(f"SELECT * FROM patients WHERE id = {patient_id}")
|
|
360
|
+
return jsonify(cursor.fetchone())
|
|
361
|
+
context:
|
|
362
|
+
language: python
|
|
363
|
+
framework: flask
|
|
364
|
+
regulation: HIPAA
|
|
365
|
+
|
|
366
|
+
expected_output:
|
|
367
|
+
must_contain:
|
|
368
|
+
- "audit"
|
|
369
|
+
- "logging"
|
|
370
|
+
- "HIPAA"
|
|
371
|
+
- "access"
|
|
372
|
+
- "who accessed"
|
|
373
|
+
severity_classification: high
|
|
374
|
+
|
|
375
|
+
validation:
|
|
376
|
+
schema_check: true
|
|
377
|
+
keyword_match_threshold: 0.7
|
|
378
|
+
|
|
379
|
+
- id: tc006_hipaa_access_control
|
|
380
|
+
description: "Detect missing access control for PHI"
|
|
381
|
+
category: hipaa
|
|
382
|
+
priority: critical
|
|
383
|
+
|
|
384
|
+
input:
|
|
385
|
+
code: |
|
|
386
|
+
@app.route('/patient/<patient_id>/records')
|
|
387
|
+
def get_patient_records(patient_id):
|
|
388
|
+
# No authentication check
|
|
389
|
+
# No authorization check (role-based access)
|
|
390
|
+
# No minimum necessary principle
|
|
391
|
+
conn = sqlite3.connect('patients.db')
|
|
392
|
+
cursor = conn.cursor()
|
|
393
|
+
cursor.execute("SELECT * FROM patient_records WHERE patient_id = ?", [patient_id])
|
|
394
|
+
return jsonify(cursor.fetchall()) # Returns all fields, not minimum necessary
|
|
395
|
+
context:
|
|
396
|
+
language: python
|
|
397
|
+
framework: flask
|
|
398
|
+
regulation: HIPAA
|
|
399
|
+
|
|
400
|
+
expected_output:
|
|
401
|
+
must_contain:
|
|
402
|
+
- "access control"
|
|
403
|
+
- "authorization"
|
|
404
|
+
- "minimum necessary"
|
|
405
|
+
- "role-based"
|
|
406
|
+
severity_classification: critical
|
|
407
|
+
|
|
408
|
+
validation:
|
|
409
|
+
schema_check: true
|
|
410
|
+
keyword_match_threshold: 0.7
|
|
411
|
+
|
|
412
|
+
# ---------------------------------------------------------------------------
|
|
413
|
+
# CATEGORY: PCI-DSS Compliance (Payment Card Data)
|
|
414
|
+
# ---------------------------------------------------------------------------
|
|
415
|
+
|
|
416
|
+
- id: tc007_pci_card_storage
|
|
417
|
+
description: "Detect prohibited storage of full card numbers"
|
|
418
|
+
category: pci-dss
|
|
419
|
+
priority: critical
|
|
420
|
+
|
|
421
|
+
input:
|
|
422
|
+
code: |
|
|
423
|
+
app.post('/payment', (req, res) => {
|
|
424
|
+
const { cardNumber, expiry, amount } = req.body;
|
|
425
|
+
|
|
426
|
+
db.insert('payments', {
|
|
427
|
+
card_number: cardNumber, // Full card number stored
|
|
428
|
+
expiry_date: expiry,
|
|
429
|
+
amount: amount
|
|
430
|
+
});
|
|
431
|
+
|
|
432
|
+
res.send('Payment processed');
|
|
433
|
+
});
|
|
434
|
+
context:
|
|
435
|
+
language: javascript
|
|
436
|
+
framework: express
|
|
437
|
+
regulation: PCI-DSS
|
|
438
|
+
|
|
439
|
+
expected_output:
|
|
440
|
+
must_contain:
|
|
441
|
+
- "PCI"
|
|
442
|
+
- "card number"
|
|
443
|
+
- "storage"
|
|
444
|
+
- "tokenize"
|
|
445
|
+
- "last 4"
|
|
446
|
+
must_match_regex:
|
|
447
|
+
- "PCI-DSS|Requirement\\s*3"
|
|
448
|
+
severity_classification: critical
|
|
449
|
+
finding_count:
|
|
450
|
+
min: 1
|
|
451
|
+
|
|
452
|
+
validation:
|
|
453
|
+
schema_check: true
|
|
454
|
+
keyword_match_threshold: 0.8
|
|
455
|
+
|
|
456
|
+
- id: tc008_pci_cvv_storage
|
|
457
|
+
description: "Detect prohibited CVV/CVC storage"
|
|
458
|
+
category: pci-dss
|
|
459
|
+
priority: critical
|
|
460
|
+
|
|
461
|
+
input:
|
|
462
|
+
code: |
|
|
463
|
+
app.post('/checkout', (req, res) => {
|
|
464
|
+
const { cardNumber, cvv, expiry } = req.body;
|
|
465
|
+
|
|
466
|
+
// Process payment
|
|
467
|
+
const result = paymentGateway.charge({
|
|
468
|
+
card: cardNumber,
|
|
469
|
+
cvv: cvv,
|
|
470
|
+
exp: expiry
|
|
471
|
+
});
|
|
472
|
+
|
|
473
|
+
// Store for later reference (VIOLATION)
|
|
474
|
+
db.insert('transactions', {
|
|
475
|
+
card_last4: cardNumber.slice(-4),
|
|
476
|
+
cvv: cvv, // NEVER store CVV
|
|
477
|
+
transaction_id: result.id
|
|
478
|
+
});
|
|
479
|
+
|
|
480
|
+
res.json(result);
|
|
481
|
+
});
|
|
482
|
+
context:
|
|
483
|
+
language: javascript
|
|
484
|
+
framework: express
|
|
485
|
+
regulation: PCI-DSS
|
|
486
|
+
|
|
487
|
+
expected_output:
|
|
488
|
+
must_contain:
|
|
489
|
+
- "CVV"
|
|
490
|
+
- "never store"
|
|
491
|
+
- "PCI"
|
|
492
|
+
- "Requirement 3.2"
|
|
493
|
+
severity_classification: critical
|
|
494
|
+
|
|
495
|
+
validation:
|
|
496
|
+
schema_check: true
|
|
497
|
+
keyword_match_threshold: 0.8
|
|
498
|
+
|
|
499
|
+
- id: tc009_pci_logging_card_data
|
|
500
|
+
description: "Detect card data in logs"
|
|
501
|
+
category: pci-dss
|
|
502
|
+
priority: critical
|
|
503
|
+
|
|
504
|
+
input:
|
|
505
|
+
code: |
|
|
506
|
+
app.post('/payment', (req, res) => {
|
|
507
|
+
const { cardNumber, amount } = req.body;
|
|
508
|
+
|
|
509
|
+
// Log the transaction (VIOLATION)
|
|
510
|
+
console.log(`Processing payment: card=${cardNumber}, amount=${amount}`);
|
|
511
|
+
logger.info({ card: cardNumber, amount }, 'Payment request received');
|
|
512
|
+
|
|
513
|
+
// Process payment
|
|
514
|
+
const result = gateway.charge({ card: cardNumber, amount });
|
|
515
|
+
|
|
516
|
+
res.json(result);
|
|
517
|
+
});
|
|
518
|
+
context:
|
|
519
|
+
language: javascript
|
|
520
|
+
framework: express
|
|
521
|
+
regulation: PCI-DSS
|
|
522
|
+
|
|
523
|
+
expected_output:
|
|
524
|
+
must_contain:
|
|
525
|
+
- "log"
|
|
526
|
+
- "card"
|
|
527
|
+
- "mask"
|
|
528
|
+
- "PCI"
|
|
529
|
+
severity_classification: high
|
|
530
|
+
|
|
531
|
+
validation:
|
|
532
|
+
schema_check: true
|
|
533
|
+
keyword_match_threshold: 0.7
|
|
534
|
+
|
|
535
|
+
# ---------------------------------------------------------------------------
|
|
536
|
+
# CATEGORY: SOC2 Compliance (Security Controls)
|
|
537
|
+
# ---------------------------------------------------------------------------
|
|
538
|
+
|
|
539
|
+
- id: tc010_soc2_access_logging
|
|
540
|
+
description: "Detect missing access logging for SOC2 CC6.1"
|
|
541
|
+
category: soc2
|
|
542
|
+
priority: high
|
|
543
|
+
|
|
544
|
+
input:
|
|
545
|
+
code: |
|
|
546
|
+
app.get('/admin/users', requireAdmin, (req, res) => {
|
|
547
|
+
// No access logging
|
|
548
|
+
const users = db.findAll('users');
|
|
549
|
+
res.json(users);
|
|
550
|
+
});
|
|
551
|
+
|
|
552
|
+
app.delete('/admin/users/:id', requireAdmin, (req, res) => {
|
|
553
|
+
// No access logging for destructive operation
|
|
554
|
+
db.delete('users', { id: req.params.id });
|
|
555
|
+
res.send('Deleted');
|
|
556
|
+
});
|
|
557
|
+
context:
|
|
558
|
+
language: javascript
|
|
559
|
+
framework: express
|
|
560
|
+
regulation: SOC2
|
|
561
|
+
|
|
562
|
+
expected_output:
|
|
563
|
+
must_contain:
|
|
564
|
+
- "SOC2"
|
|
565
|
+
- "CC6"
|
|
566
|
+
- "logging"
|
|
567
|
+
- "audit trail"
|
|
568
|
+
severity_classification: high
|
|
569
|
+
|
|
570
|
+
validation:
|
|
571
|
+
schema_check: true
|
|
572
|
+
keyword_match_threshold: 0.7
|
|
573
|
+
|
|
574
|
+
- id: tc011_soc2_change_management
|
|
575
|
+
description: "Detect missing change management controls for SOC2 CC8.1"
|
|
576
|
+
category: soc2
|
|
577
|
+
priority: medium
|
|
578
|
+
|
|
579
|
+
input:
|
|
580
|
+
code: |
|
|
581
|
+
// Deployment script - no change management
|
|
582
|
+
const deploy = async () => {
|
|
583
|
+
// No approval workflow
|
|
584
|
+
// No change tracking
|
|
585
|
+
// No rollback capability
|
|
586
|
+
|
|
587
|
+
await executeSQL('ALTER TABLE users ADD COLUMN admin BOOLEAN');
|
|
588
|
+
await restartService('api');
|
|
589
|
+
console.log('Deployed!');
|
|
590
|
+
};
|
|
591
|
+
|
|
592
|
+
deploy();
|
|
593
|
+
context:
|
|
594
|
+
language: javascript
|
|
595
|
+
framework: nodejs
|
|
596
|
+
regulation: SOC2
|
|
597
|
+
|
|
598
|
+
expected_output:
|
|
599
|
+
must_contain:
|
|
600
|
+
- "SOC2"
|
|
601
|
+
- "change management"
|
|
602
|
+
- "CC8"
|
|
603
|
+
- "approval"
|
|
604
|
+
- "rollback"
|
|
605
|
+
severity_classification: medium
|
|
606
|
+
|
|
607
|
+
validation:
|
|
608
|
+
schema_check: true
|
|
609
|
+
keyword_match_threshold: 0.6
|
|
610
|
+
|
|
611
|
+
# ---------------------------------------------------------------------------
|
|
612
|
+
# CATEGORY: CCPA Compliance (California Consumer Privacy)
|
|
613
|
+
# ---------------------------------------------------------------------------
|
|
614
|
+
|
|
615
|
+
- id: tc012_ccpa_opt_out
|
|
616
|
+
description: "Detect missing 'Do Not Sell' opt-out mechanism"
|
|
617
|
+
category: ccpa
|
|
618
|
+
priority: high
|
|
619
|
+
|
|
620
|
+
input:
|
|
621
|
+
code: |
|
|
622
|
+
// Data sharing API - No opt-out mechanism
|
|
623
|
+
app.post('/analytics/share', (req, res) => {
|
|
624
|
+
const userData = db.findOne('users', { id: req.body.userId });
|
|
625
|
+
|
|
626
|
+
// Share data with third parties without opt-out check
|
|
627
|
+
thirdPartyAnalytics.send({
|
|
628
|
+
email: userData.email,
|
|
629
|
+
browsing_history: userData.history,
|
|
630
|
+
purchases: userData.purchases
|
|
631
|
+
});
|
|
632
|
+
|
|
633
|
+
res.send('Data shared');
|
|
634
|
+
});
|
|
635
|
+
context:
|
|
636
|
+
language: javascript
|
|
637
|
+
framework: express
|
|
638
|
+
regulation: CCPA
|
|
639
|
+
|
|
640
|
+
expected_output:
|
|
641
|
+
must_contain:
|
|
642
|
+
- "CCPA"
|
|
643
|
+
- "opt-out"
|
|
644
|
+
- "do not sell"
|
|
645
|
+
- "consumer"
|
|
646
|
+
severity_classification: high
|
|
647
|
+
|
|
648
|
+
validation:
|
|
649
|
+
schema_check: true
|
|
650
|
+
keyword_match_threshold: 0.7
|
|
651
|
+
|
|
652
|
+
- id: tc013_ccpa_disclosure
|
|
653
|
+
description: "Detect missing data collection disclosure"
|
|
654
|
+
category: ccpa
|
|
655
|
+
priority: high
|
|
656
|
+
|
|
657
|
+
input:
|
|
658
|
+
code: |
|
|
659
|
+
// User signup - no disclosure of data practices
|
|
660
|
+
app.post('/signup', (req, res) => {
|
|
661
|
+
const user = db.insert('users', {
|
|
662
|
+
email: req.body.email,
|
|
663
|
+
name: req.body.name,
|
|
664
|
+
ip_address: req.ip,
|
|
665
|
+
device_info: req.headers['user-agent'],
|
|
666
|
+
location: geoip.lookup(req.ip)
|
|
667
|
+
});
|
|
668
|
+
|
|
669
|
+
// Collect data without disclosing what's collected
|
|
670
|
+
// No link to privacy policy
|
|
671
|
+
// No categories of data disclosed
|
|
672
|
+
|
|
673
|
+
res.json({ success: true });
|
|
674
|
+
});
|
|
675
|
+
context:
|
|
676
|
+
language: javascript
|
|
677
|
+
framework: express
|
|
678
|
+
regulation: CCPA
|
|
679
|
+
|
|
680
|
+
expected_output:
|
|
681
|
+
must_contain:
|
|
682
|
+
- "CCPA"
|
|
683
|
+
- "disclosure"
|
|
684
|
+
- "categories"
|
|
685
|
+
- "privacy"
|
|
686
|
+
severity_classification: medium
|
|
687
|
+
|
|
688
|
+
validation:
|
|
689
|
+
schema_check: true
|
|
690
|
+
keyword_match_threshold: 0.7
|
|
691
|
+
|
|
692
|
+
# ---------------------------------------------------------------------------
|
|
693
|
+
# CATEGORY: Negative Tests (Compliant Code)
|
|
694
|
+
# ---------------------------------------------------------------------------
|
|
695
|
+
|
|
696
|
+
- id: tc014_compliant_gdpr_code
|
|
697
|
+
description: "Verify compliant GDPR implementation is not flagged"
|
|
698
|
+
category: negative
|
|
699
|
+
priority: high
|
|
700
|
+
|
|
701
|
+
input:
|
|
702
|
+
code: |
|
|
703
|
+
// GDPR-compliant user data handling
|
|
704
|
+
app.post('/newsletter/subscribe', (req, res) => {
|
|
705
|
+
// Verify consent
|
|
706
|
+
if (!req.body.consent || !req.body.consent.marketing) {
|
|
707
|
+
return res.status(400).json({ error: 'Consent required' });
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
db.insert('subscribers', {
|
|
711
|
+
email: req.body.email,
|
|
712
|
+
consent: {
|
|
713
|
+
marketing: true,
|
|
714
|
+
timestamp: new Date().toISOString(),
|
|
715
|
+
ip_address: req.ip,
|
|
716
|
+
version: 'consent-v2.1'
|
|
717
|
+
}
|
|
718
|
+
});
|
|
719
|
+
|
|
720
|
+
res.json({ success: true, message: 'Subscribed with consent' });
|
|
721
|
+
});
|
|
722
|
+
|
|
723
|
+
// Right to erasure implementation
|
|
724
|
+
app.delete('/user/:id/data', async (req, res) => {
|
|
725
|
+
const userId = req.params.id;
|
|
726
|
+
|
|
727
|
+
// Delete from all tables
|
|
728
|
+
await Promise.all([
|
|
729
|
+
db.delete('users', { id: userId }),
|
|
730
|
+
db.delete('orders', { user_id: userId }),
|
|
731
|
+
db.delete('analytics', { user_id: userId }),
|
|
732
|
+
db.delete('preferences', { user_id: userId })
|
|
733
|
+
]);
|
|
734
|
+
|
|
735
|
+
// Log the erasure (retain audit log)
|
|
736
|
+
await db.insert('audit_log', {
|
|
737
|
+
action: 'GDPR_ERASURE',
|
|
738
|
+
user_id: userId,
|
|
739
|
+
timestamp: new Date().toISOString()
|
|
740
|
+
});
|
|
741
|
+
|
|
742
|
+
res.json({ success: true, message: 'All data erased' });
|
|
743
|
+
});
|
|
744
|
+
|
|
745
|
+
// Data portability
|
|
746
|
+
app.get('/user/:id/export', async (req, res) => {
|
|
747
|
+
const userId = req.params.id;
|
|
748
|
+
const userData = await collectAllUserData(userId);
|
|
749
|
+
|
|
750
|
+
res.json({
|
|
751
|
+
format: 'JSON',
|
|
752
|
+
schema_version: '1.0',
|
|
753
|
+
exported_at: new Date().toISOString(),
|
|
754
|
+
data: userData
|
|
755
|
+
});
|
|
756
|
+
});
|
|
757
|
+
context:
|
|
758
|
+
language: javascript
|
|
759
|
+
framework: express
|
|
760
|
+
regulation: GDPR
|
|
761
|
+
|
|
762
|
+
expected_output:
|
|
763
|
+
must_contain:
|
|
764
|
+
- "compliant"
|
|
765
|
+
- "consent"
|
|
766
|
+
- "erasure"
|
|
767
|
+
- "portability"
|
|
768
|
+
must_not_contain:
|
|
769
|
+
- "critical"
|
|
770
|
+
- "violation"
|
|
771
|
+
- "missing"
|
|
772
|
+
finding_count:
|
|
773
|
+
max: 2 # Allow informational findings only
|
|
774
|
+
|
|
775
|
+
validation:
|
|
776
|
+
schema_check: true
|
|
777
|
+
allow_partial: true
|
|
778
|
+
|
|
779
|
+
- id: tc015_compliant_pci_code
|
|
780
|
+
description: "Verify PCI-DSS compliant payment handling is not flagged"
|
|
781
|
+
category: negative
|
|
782
|
+
priority: high
|
|
783
|
+
|
|
784
|
+
input:
|
|
785
|
+
code: |
|
|
786
|
+
// PCI-DSS compliant payment processing
|
|
787
|
+
const processPayment = async (req, res) => {
|
|
788
|
+
const { paymentToken, amount } = req.body; // Only token, no raw card data
|
|
789
|
+
|
|
790
|
+
// Log without sensitive data
|
|
791
|
+
logger.info({
|
|
792
|
+
amount,
|
|
793
|
+
tokenId: paymentToken.slice(0, 8) + '***',
|
|
794
|
+
timestamp: new Date().toISOString()
|
|
795
|
+
}, 'Processing payment');
|
|
796
|
+
|
|
797
|
+
// Process via tokenized gateway
|
|
798
|
+
const result = await paymentGateway.charge({
|
|
799
|
+
token: paymentToken,
|
|
800
|
+
amount
|
|
801
|
+
});
|
|
802
|
+
|
|
803
|
+
// Store only safe reference
|
|
804
|
+
await db.insert('transactions', {
|
|
805
|
+
transaction_id: result.id,
|
|
806
|
+
card_last4: result.card.last4,
|
|
807
|
+
card_brand: result.card.brand,
|
|
808
|
+
amount,
|
|
809
|
+
status: result.status
|
|
810
|
+
});
|
|
811
|
+
|
|
812
|
+
res.json({
|
|
813
|
+
success: true,
|
|
814
|
+
transactionId: result.id
|
|
815
|
+
});
|
|
816
|
+
};
|
|
817
|
+
context:
|
|
818
|
+
language: javascript
|
|
819
|
+
framework: express
|
|
820
|
+
regulation: PCI-DSS
|
|
821
|
+
|
|
822
|
+
expected_output:
|
|
823
|
+
must_contain:
|
|
824
|
+
- "token"
|
|
825
|
+
- "compliant"
|
|
826
|
+
must_not_contain:
|
|
827
|
+
- "CVV"
|
|
828
|
+
- "card number"
|
|
829
|
+
- "violation"
|
|
830
|
+
- "critical"
|
|
831
|
+
finding_count:
|
|
832
|
+
max: 1
|
|
833
|
+
|
|
834
|
+
validation:
|
|
835
|
+
schema_check: true
|
|
836
|
+
allow_partial: true
|
|
837
|
+
|
|
838
|
+
# ---------------------------------------------------------------------------
|
|
839
|
+
# CATEGORY: Multi-Framework Tests
|
|
840
|
+
# ---------------------------------------------------------------------------
|
|
841
|
+
|
|
842
|
+
- id: tc016_multi_framework_violations
|
|
843
|
+
description: "Detect violations across multiple compliance frameworks"
|
|
844
|
+
category: multi-framework
|
|
845
|
+
priority: high
|
|
846
|
+
|
|
847
|
+
input:
|
|
848
|
+
code: |
|
|
849
|
+
// Healthcare payment app - violates HIPAA and PCI-DSS
|
|
850
|
+
app.post('/patient/payment', (req, res) => {
|
|
851
|
+
const { patientId, cardNumber, cvv, diagnosis } = req.body;
|
|
852
|
+
|
|
853
|
+
// HIPAA violation: PHI without encryption/logging
|
|
854
|
+
db.insert('patient_payments', {
|
|
855
|
+
patient_id: patientId,
|
|
856
|
+
diagnosis: diagnosis, // PHI stored unencrypted
|
|
857
|
+
// No audit log
|
|
858
|
+
|
|
859
|
+
// PCI-DSS violation: Card data storage
|
|
860
|
+
card_number: cardNumber,
|
|
861
|
+
cvv: cvv // Never store CVV
|
|
862
|
+
});
|
|
863
|
+
|
|
864
|
+
console.log(`Payment for patient ${patientId}, card ${cardNumber}`);
|
|
865
|
+
|
|
866
|
+
res.send('Payment recorded');
|
|
867
|
+
});
|
|
868
|
+
context:
|
|
869
|
+
language: javascript
|
|
870
|
+
framework: express
|
|
871
|
+
regulation: [HIPAA, PCI-DSS]
|
|
872
|
+
|
|
873
|
+
expected_output:
|
|
874
|
+
must_contain:
|
|
875
|
+
- "HIPAA"
|
|
876
|
+
- "PCI"
|
|
877
|
+
- "PHI"
|
|
878
|
+
- "CVV"
|
|
879
|
+
- "encryption"
|
|
880
|
+
finding_count:
|
|
881
|
+
min: 3
|
|
882
|
+
max: 8
|
|
883
|
+
|
|
884
|
+
validation:
|
|
885
|
+
schema_check: true
|
|
886
|
+
keyword_match_threshold: 0.7
|
|
887
|
+
|
|
888
|
+
timeout_ms: 45000
|
|
889
|
+
|
|
890
|
+
- id: tc017_gdpr_ccpa_overlap
|
|
891
|
+
description: "Detect privacy violations applicable to both GDPR and CCPA"
|
|
892
|
+
category: multi-framework
|
|
893
|
+
priority: high
|
|
894
|
+
|
|
895
|
+
input:
|
|
896
|
+
code: |
|
|
897
|
+
// Privacy violations applicable to GDPR and CCPA
|
|
898
|
+
app.post('/signup', (req, res) => {
|
|
899
|
+
// No consent collection
|
|
900
|
+
// No disclosure of data practices
|
|
901
|
+
// No opt-out mechanism
|
|
902
|
+
|
|
903
|
+
db.insert('users', {
|
|
904
|
+
email: req.body.email,
|
|
905
|
+
ip: req.ip,
|
|
906
|
+
browser: req.headers['user-agent'],
|
|
907
|
+
location: geoip.lookup(req.ip),
|
|
908
|
+
referrer: req.headers.referer
|
|
909
|
+
});
|
|
910
|
+
|
|
911
|
+
// Share with third parties without consent
|
|
912
|
+
analytics.track(req.body.email, 'signup');
|
|
913
|
+
marketing.addLead(req.body.email);
|
|
914
|
+
|
|
915
|
+
res.send('Signed up!');
|
|
916
|
+
});
|
|
917
|
+
context:
|
|
918
|
+
language: javascript
|
|
919
|
+
framework: express
|
|
920
|
+
regulation: [GDPR, CCPA]
|
|
921
|
+
|
|
922
|
+
expected_output:
|
|
923
|
+
must_contain:
|
|
924
|
+
- "consent"
|
|
925
|
+
- "disclosure"
|
|
926
|
+
- "third party"
|
|
927
|
+
must_match_regex:
|
|
928
|
+
- "GDPR|CCPA"
|
|
929
|
+
finding_count:
|
|
930
|
+
min: 2
|
|
931
|
+
|
|
932
|
+
validation:
|
|
933
|
+
schema_check: true
|
|
934
|
+
|
|
935
|
+
# ---------------------------------------------------------------------------
|
|
936
|
+
# CATEGORY: Edge Cases
|
|
937
|
+
# ---------------------------------------------------------------------------
|
|
938
|
+
|
|
939
|
+
- id: tc018_encrypted_but_logged
|
|
940
|
+
description: "Detect sensitive data encrypted but logged in plain text"
|
|
941
|
+
category: edge_cases
|
|
942
|
+
priority: medium
|
|
943
|
+
|
|
944
|
+
input:
|
|
945
|
+
code: |
|
|
946
|
+
app.post('/patient', async (req, res) => {
|
|
947
|
+
const { ssn, diagnosis } = req.body;
|
|
948
|
+
|
|
949
|
+
// Properly encrypted for storage
|
|
950
|
+
const encryptedSSN = await encrypt(ssn);
|
|
951
|
+
const encryptedDiagnosis = await encrypt(diagnosis);
|
|
952
|
+
|
|
953
|
+
await db.insert('patients', {
|
|
954
|
+
ssn: encryptedSSN,
|
|
955
|
+
diagnosis: encryptedDiagnosis
|
|
956
|
+
});
|
|
957
|
+
|
|
958
|
+
// But logged in plain text (VIOLATION)
|
|
959
|
+
console.log(`Created patient with SSN: ${ssn}, diagnosis: ${diagnosis}`);
|
|
960
|
+
|
|
961
|
+
res.send('Patient created');
|
|
962
|
+
});
|
|
963
|
+
context:
|
|
964
|
+
language: javascript
|
|
965
|
+
framework: express
|
|
966
|
+
regulation: HIPAA
|
|
967
|
+
|
|
968
|
+
expected_output:
|
|
969
|
+
must_contain:
|
|
970
|
+
- "log"
|
|
971
|
+
- "plain text"
|
|
972
|
+
- "SSN"
|
|
973
|
+
- "diagnosis"
|
|
974
|
+
severity_classification: high
|
|
975
|
+
|
|
976
|
+
validation:
|
|
977
|
+
schema_check: true
|
|
978
|
+
|
|
979
|
+
- id: tc019_partial_compliance
|
|
980
|
+
description: "Detect partial compliance with some controls passing"
|
|
981
|
+
category: edge_cases
|
|
982
|
+
priority: medium
|
|
983
|
+
|
|
984
|
+
input:
|
|
985
|
+
code: |
|
|
986
|
+
// Partial GDPR compliance
|
|
987
|
+
app.post('/subscribe', (req, res) => {
|
|
988
|
+
// PASS: Has consent
|
|
989
|
+
if (!req.body.consent) {
|
|
990
|
+
return res.status(400).json({ error: 'Consent required' });
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
db.insert('subscribers', {
|
|
994
|
+
email: req.body.email,
|
|
995
|
+
consent: true,
|
|
996
|
+
// FAIL: Missing timestamp and IP
|
|
997
|
+
subscribed_at: new Date()
|
|
998
|
+
});
|
|
999
|
+
|
|
1000
|
+
res.send('Subscribed');
|
|
1001
|
+
});
|
|
1002
|
+
|
|
1003
|
+
// PASS: Has data export
|
|
1004
|
+
app.get('/user/:id/export', (req, res) => {
|
|
1005
|
+
const data = collectUserData(req.params.id);
|
|
1006
|
+
res.json(data);
|
|
1007
|
+
});
|
|
1008
|
+
|
|
1009
|
+
// FAIL: Incomplete erasure
|
|
1010
|
+
app.delete('/user/:id', (req, res) => {
|
|
1011
|
+
db.delete('users', { id: req.params.id });
|
|
1012
|
+
// Missing: orders, logs, analytics
|
|
1013
|
+
res.send('Deleted');
|
|
1014
|
+
});
|
|
1015
|
+
context:
|
|
1016
|
+
language: javascript
|
|
1017
|
+
framework: express
|
|
1018
|
+
regulation: GDPR
|
|
1019
|
+
|
|
1020
|
+
expected_output:
|
|
1021
|
+
must_contain:
|
|
1022
|
+
- "partial"
|
|
1023
|
+
- "consent"
|
|
1024
|
+
- "erasure"
|
|
1025
|
+
- "incomplete"
|
|
1026
|
+
severity_classification: medium
|
|
1027
|
+
|
|
1028
|
+
validation:
|
|
1029
|
+
schema_check: true
|
|
1030
|
+
allow_partial: true
|
|
1031
|
+
|
|
1032
|
+
- id: tc020_typescript_compliance
|
|
1033
|
+
description: "Detect compliance issues in TypeScript code"
|
|
1034
|
+
category: language_support
|
|
1035
|
+
priority: medium
|
|
1036
|
+
|
|
1037
|
+
input:
|
|
1038
|
+
code: |
|
|
1039
|
+
interface PatientRecord {
|
|
1040
|
+
id: string;
|
|
1041
|
+
ssn: string; // PHI
|
|
1042
|
+
medicalHistory: string[]; // PHI
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
export const getPatient = async (
|
|
1046
|
+
patientId: string,
|
|
1047
|
+
requester: User // Unused - no access control
|
|
1048
|
+
): Promise<PatientRecord> => {
|
|
1049
|
+
// No audit logging
|
|
1050
|
+
// No encryption check
|
|
1051
|
+
const patient = await db.patients.findOne({ id: patientId });
|
|
1052
|
+
return patient as PatientRecord;
|
|
1053
|
+
};
|
|
1054
|
+
context:
|
|
1055
|
+
language: typescript
|
|
1056
|
+
framework: nodejs
|
|
1057
|
+
regulation: HIPAA
|
|
1058
|
+
|
|
1059
|
+
expected_output:
|
|
1060
|
+
must_contain:
|
|
1061
|
+
- "HIPAA"
|
|
1062
|
+
- "PHI"
|
|
1063
|
+
- "access control"
|
|
1064
|
+
- "audit"
|
|
1065
|
+
|
|
1066
|
+
validation:
|
|
1067
|
+
schema_check: true
|
|
1068
|
+
|
|
1069
|
+
# =============================================================================
|
|
1070
|
+
# SUCCESS CRITERIA
|
|
1071
|
+
# =============================================================================
|
|
1072
|
+
|
|
1073
|
+
success_criteria:
|
|
1074
|
+
# 90% of tests must pass overall
|
|
1075
|
+
pass_rate: 0.9
|
|
1076
|
+
|
|
1077
|
+
# All critical tests must pass
|
|
1078
|
+
critical_pass_rate: 1.0
|
|
1079
|
+
|
|
1080
|
+
# Average reasoning quality score
|
|
1081
|
+
avg_reasoning_quality: 0.75
|
|
1082
|
+
|
|
1083
|
+
# Maximum suite execution time (5 minutes)
|
|
1084
|
+
max_execution_time_ms: 300000
|
|
1085
|
+
|
|
1086
|
+
# Maximum variance between model results (15%)
|
|
1087
|
+
cross_model_variance: 0.15
|
|
1088
|
+
|
|
1089
|
+
# =============================================================================
|
|
1090
|
+
# METADATA
|
|
1091
|
+
# =============================================================================
|
|
1092
|
+
|
|
1093
|
+
metadata:
|
|
1094
|
+
author: "qe-security-auditor"
|
|
1095
|
+
created: "2026-02-02"
|
|
1096
|
+
last_updated: "2026-02-02"
|
|
1097
|
+
coverage_target: >
|
|
1098
|
+
Major compliance frameworks: GDPR (Articles 7, 17, 20), HIPAA (PHI protection,
|
|
1099
|
+
access control, audit logging), PCI-DSS (Requirements 3, 4, 10), SOC2 (CC6, CC8),
|
|
1100
|
+
CCPA (opt-out, disclosure). Covers JavaScript/TypeScript and Python applications.
|
|
1101
|
+
test_count: 20
|
|
1102
|
+
frameworks_covered:
|
|
1103
|
+
- GDPR
|
|
1104
|
+
- HIPAA
|
|
1105
|
+
- PCI-DSS
|
|
1106
|
+
- SOC2
|
|
1107
|
+
- CCPA
|