dasv 1.0.0__tar.gz

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.
Files changed (235) hide show
  1. dasv-1.0.0/.editorconfig +16 -0
  2. dasv-1.0.0/.github/workflows/ci.yml +60 -0
  3. dasv-1.0.0/.github/workflows/dasv-action-ci.yml +37 -0
  4. dasv-1.0.0/.github/workflows/publish.yml +93 -0
  5. dasv-1.0.0/.gitignore +33 -0
  6. dasv-1.0.0/CHANGELOG.md +32 -0
  7. dasv-1.0.0/LICENSE +198 -0
  8. dasv-1.0.0/PKG-INFO +219 -0
  9. dasv-1.0.0/README.md +184 -0
  10. dasv-1.0.0/SECURITY.md +15 -0
  11. dasv-1.0.0/action/README.md +50 -0
  12. dasv-1.0.0/action/action.yml +212 -0
  13. dasv-1.0.0/assets/social/github-social-preview.png +0 -0
  14. dasv-1.0.0/assets/social/linkedin_x_hero_2seed_ablation.png +0 -0
  15. dasv-1.0.0/assets/social/linkedin_x_public_audit_45envs.png +0 -0
  16. dasv-1.0.0/benchmarks/planted_vulns/README.md +33 -0
  17. dasv-1.0.0/benchmarks/planted_vulns/corpus.json +75 -0
  18. dasv-1.0.0/benchmarks/planted_vulns/hardened/01_hardened_calculator/environment/Dockerfile +3 -0
  19. dasv-1.0.0/benchmarks/planted_vulns/hardened/01_hardened_calculator/instruction.md +1 -0
  20. dasv-1.0.0/benchmarks/planted_vulns/hardened/01_hardened_calculator/src/calculator.py +6 -0
  21. dasv-1.0.0/benchmarks/planted_vulns/hardened/01_hardened_calculator/task.toml +8 -0
  22. dasv-1.0.0/benchmarks/planted_vulns/hardened/01_hardened_calculator/tests/test.sh +7 -0
  23. dasv-1.0.0/benchmarks/planted_vulns/hardened/01_hardened_calculator/tests/test_calc.py +18 -0
  24. dasv-1.0.0/benchmarks/planted_vulns/hardened/02_hardened_parser/environment/Dockerfile +3 -0
  25. dasv-1.0.0/benchmarks/planted_vulns/hardened/02_hardened_parser/instruction.md +1 -0
  26. dasv-1.0.0/benchmarks/planted_vulns/hardened/02_hardened_parser/src/parser.py +9 -0
  27. dasv-1.0.0/benchmarks/planted_vulns/hardened/02_hardened_parser/task.toml +8 -0
  28. dasv-1.0.0/benchmarks/planted_vulns/hardened/02_hardened_parser/tests/test_parser.py +38 -0
  29. dasv-1.0.0/benchmarks/planted_vulns/hardened/03_hardened_prorubric_v1/README.md +1 -0
  30. dasv-1.0.0/benchmarks/planted_vulns/hardened/03_hardened_prorubric_v1/env.py +30 -0
  31. dasv-1.0.0/benchmarks/planted_vulns/hardened/03_hardened_prorubric_v1/pyproject.toml +4 -0
  32. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/01_test_tampering_copy/environment/Dockerfile +3 -0
  33. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/01_test_tampering_copy/instruction.md +1 -0
  34. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/01_test_tampering_copy/task.toml +8 -0
  35. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/01_test_tampering_copy/tests/test.sh +2 -0
  36. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/02_network_and_secret_leak/environment/Dockerfile +3 -0
  37. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/02_network_and_secret_leak/instruction.md +1 -0
  38. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/02_network_and_secret_leak/task.toml +9 -0
  39. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/02_network_and_secret_leak/tests/test.sh +2 -0
  40. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/03_git_history_leak/environment/Dockerfile +2 -0
  41. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/03_git_history_leak/instruction.md +1 -0
  42. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/03_git_history_leak/planted_git_leak.json +8 -0
  43. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/03_git_history_leak/solution/solve.sh +2 -0
  44. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/03_git_history_leak/task.toml +8 -0
  45. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/03_git_history_leak/tests/test.sh +2 -0
  46. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/04_stub_return_survival/environment/Dockerfile +3 -0
  47. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/04_stub_return_survival/instruction.md +1 -0
  48. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/04_stub_return_survival/src/calculator.py +4 -0
  49. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/04_stub_return_survival/task.toml +8 -0
  50. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/04_stub_return_survival/tests/test_calc.py +8 -0
  51. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/05_exit_zero_runner_spoof/environment/Dockerfile +3 -0
  52. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/05_exit_zero_runner_spoof/instruction.md +1 -0
  53. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/05_exit_zero_runner_spoof/src/solver.py +4 -0
  54. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/05_exit_zero_runner_spoof/task.toml +8 -0
  55. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/05_exit_zero_runner_spoof/tests/test_solver.py +7 -0
  56. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/06_additive_rubric_fluff/README.md +1 -0
  57. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/06_additive_rubric_fluff/env.py +24 -0
  58. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/06_additive_rubric_fluff/pyproject.toml +4 -0
  59. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/07_non_deterministic_boot_install/entrypoint.sh +3 -0
  60. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/07_non_deterministic_boot_install/environment/Dockerfile +2 -0
  61. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/07_non_deterministic_boot_install/instruction.md +1 -0
  62. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/07_non_deterministic_boot_install/task.toml +8 -0
  63. dasv-1.0.0/benchmarks/planted_vulns/vulnerable/07_non_deterministic_boot_install/tests/test.sh +2 -0
  64. dasv-1.0.0/dasv.toml.example +28 -0
  65. dasv-1.0.0/docs/00-CHARTER.md +77 -0
  66. dasv-1.0.0/docs/01-BRD.md +163 -0
  67. dasv-1.0.0/docs/02-PRD-FEATURES.md +429 -0
  68. dasv-1.0.0/docs/03-ARCHITECTURE.md +234 -0
  69. dasv-1.0.0/docs/04-DESIGN-INTEROP-ADAPTERS.md +123 -0
  70. dasv-1.0.0/docs/04-DESIGN-RL-INTEGRATION.md +131 -0
  71. dasv-1.0.0/docs/04-DESIGN-SANDBOX-RUNTIME.md +167 -0
  72. dasv-1.0.0/docs/04-DESIGN-TELEMETRY-EVAL.md +101 -0
  73. dasv-1.0.0/docs/04-DESIGN-VERIFIER-ENGINE.md +153 -0
  74. dasv-1.0.0/docs/RESEARCH-DOSSIER.md +240 -0
  75. dasv-1.0.0/docs/TECHNICAL-REPORT.md +232 -0
  76. dasv-1.0.0/pyproject.toml +104 -0
  77. dasv-1.0.0/recipes/__init__.py +1 -0
  78. dasv-1.0.0/recipes/lora_dr_grpo_ablation/README.md +72 -0
  79. dasv-1.0.0/recipes/lora_dr_grpo_ablation/__init__.py +1 -0
  80. dasv-1.0.0/recipes/lora_dr_grpo_ablation/config.yaml +39 -0
  81. dasv-1.0.0/recipes/lora_dr_grpo_ablation/plot_ablation.py +543 -0
  82. dasv-1.0.0/recipes/lora_dr_grpo_ablation/prepare_taskset.py +1299 -0
  83. dasv-1.0.0/recipes/lora_dr_grpo_ablation/requirements-gpu.txt +15 -0
  84. dasv-1.0.0/recipes/lora_dr_grpo_ablation/run.sh +115 -0
  85. dasv-1.0.0/recipes/lora_dr_grpo_ablation/train_dr_grpo.py +1237 -0
  86. dasv-1.0.0/results/public_audit/AUDIT_REPORT.md +60 -0
  87. dasv-1.0.0/results/public_audit/cards/card_cleanest.html +263 -0
  88. dasv-1.0.0/results/public_audit/cards/card_most_vulnerable.html +314 -0
  89. dasv-1.0.0/results/public_audit/reports/verifiers_v1/alphabet-sort/rubric_cherrl/prorubric_gate.yaml +37 -0
  90. dasv-1.0.0/results/public_audit/reports/verifiers_v1/alphabet-sort/rubric_cherrl/rubric_audit.json +117 -0
  91. dasv-1.0.0/results/public_audit/reports/verifiers_v1/bash-interception/rubric_cherrl/prorubric_gate.yaml +37 -0
  92. dasv-1.0.0/results/public_audit/reports/verifiers_v1/bash-interception/rubric_cherrl/rubric_audit.json +117 -0
  93. dasv-1.0.0/results/public_audit/reports/verifiers_v1/code-golf/rubric_cherrl/prorubric_gate.yaml +37 -0
  94. dasv-1.0.0/results/public_audit/reports/verifiers_v1/code-golf/rubric_cherrl/rubric_audit.json +117 -0
  95. dasv-1.0.0/results/public_audit/reports/verifiers_v1/color-codeword/rubric_cherrl/prorubric_gate.yaml +37 -0
  96. dasv-1.0.0/results/public_audit/reports/verifiers_v1/color-codeword/rubric_cherrl/rubric_audit.json +117 -0
  97. dasv-1.0.0/results/public_audit/reports/verifiers_v1/deepwiki/rubric_cherrl/prorubric_gate.yaml +37 -0
  98. dasv-1.0.0/results/public_audit/reports/verifiers_v1/deepwiki/rubric_cherrl/rubric_audit.json +117 -0
  99. dasv-1.0.0/results/public_audit/sources.json +20 -0
  100. dasv-1.0.0/results/public_audit/summary.json +1034 -0
  101. dasv-1.0.0/results/v1_ablation/multiseed_summary.json +173 -0
  102. dasv-1.0.0/results/v1_ablation/pngs/seed_1337_hacking_and_tamper.png +0 -0
  103. dasv-1.0.0/results/v1_ablation/pngs/seed_1337_logprob_drift.png +0 -0
  104. dasv-1.0.0/results/v1_ablation/pngs/seed_1337_reward_and_heldout.png +0 -0
  105. dasv-1.0.0/results/v1_ablation/pngs/seed_42_hacking_and_tamper.png +0 -0
  106. dasv-1.0.0/results/v1_ablation/pngs/seed_42_logprob_drift.png +0 -0
  107. dasv-1.0.0/results/v1_ablation/pngs/seed_42_reward_and_heldout.png +0 -0
  108. dasv-1.0.0/results/v1_ablation/seed_1337/ablation_comparison.html +50 -0
  109. dasv-1.0.0/results/v1_ablation/seed_1337/arm0/heldout_eval.jsonl +1 -0
  110. dasv-1.0.0/results/v1_ablation/seed_1337/arm0/manifest.json +156 -0
  111. dasv-1.0.0/results/v1_ablation/seed_1337/arm1/drift.jsonl +160 -0
  112. dasv-1.0.0/results/v1_ablation/seed_1337/arm1/heldout_eval.jsonl +4 -0
  113. dasv-1.0.0/results/v1_ablation/seed_1337/arm1/manifest.json +17 -0
  114. dasv-1.0.0/results/v1_ablation/seed_1337/arm1/metrics.jsonl +160 -0
  115. dasv-1.0.0/results/v1_ablation/seed_1337/arm2/drift.jsonl +160 -0
  116. dasv-1.0.0/results/v1_ablation/seed_1337/arm2/heldout_eval.jsonl +4 -0
  117. dasv-1.0.0/results/v1_ablation/seed_1337/arm2/manifest.json +17 -0
  118. dasv-1.0.0/results/v1_ablation/seed_1337/arm2/metrics.jsonl +160 -0
  119. dasv-1.0.0/results/v1_ablation/seed_1337/svgs/ablation_hacking_and_tamper.svg +1 -0
  120. dasv-1.0.0/results/v1_ablation/seed_1337/svgs/ablation_logprob_drift.svg +1 -0
  121. dasv-1.0.0/results/v1_ablation/seed_1337/svgs/ablation_reward_and_heldout.svg +1 -0
  122. dasv-1.0.0/results/v1_ablation/seed_1337/svgs/significance.json +44 -0
  123. dasv-1.0.0/results/v1_ablation/seed_42/ablation_comparison.html +50 -0
  124. dasv-1.0.0/results/v1_ablation/seed_42/arm0/heldout_eval.jsonl +1 -0
  125. dasv-1.0.0/results/v1_ablation/seed_42/arm0/manifest.json +156 -0
  126. dasv-1.0.0/results/v1_ablation/seed_42/arm1/drift.jsonl +160 -0
  127. dasv-1.0.0/results/v1_ablation/seed_42/arm1/heldout_eval.jsonl +4 -0
  128. dasv-1.0.0/results/v1_ablation/seed_42/arm1/manifest.json +17 -0
  129. dasv-1.0.0/results/v1_ablation/seed_42/arm1/metrics.jsonl +160 -0
  130. dasv-1.0.0/results/v1_ablation/seed_42/arm2/drift.jsonl +160 -0
  131. dasv-1.0.0/results/v1_ablation/seed_42/arm2/heldout_eval.jsonl +4 -0
  132. dasv-1.0.0/results/v1_ablation/seed_42/arm2/manifest.json +17 -0
  133. dasv-1.0.0/results/v1_ablation/seed_42/arm2/metrics.jsonl +160 -0
  134. dasv-1.0.0/results/v1_ablation/seed_42/svgs/ablation_hacking_and_tamper.svg +1 -0
  135. dasv-1.0.0/results/v1_ablation/seed_42/svgs/ablation_logprob_drift.svg +1 -0
  136. dasv-1.0.0/results/v1_ablation/seed_42/svgs/ablation_reward_and_heldout.svg +1 -0
  137. dasv-1.0.0/results/v1_ablation/seed_42/svgs/significance.json +44 -0
  138. dasv-1.0.0/results/v1_ablation/taskset_manifest.json +19 -0
  139. dasv-1.0.0/scripts/export_social_assets.py +611 -0
  140. dasv-1.0.0/scripts/run_public_audit.py +643 -0
  141. dasv-1.0.0/src/dasv/__init__.py +7 -0
  142. dasv-1.0.0/src/dasv/adapters/__init__.py +1 -0
  143. dasv-1.0.0/src/dasv/adapters/base.py +51 -0
  144. dasv-1.0.0/src/dasv/adapters/harbor.py +204 -0
  145. dasv-1.0.0/src/dasv/adapters/hud.py +182 -0
  146. dasv-1.0.0/src/dasv/adapters/native.py +137 -0
  147. dasv-1.0.0/src/dasv/adapters/openenv.py +223 -0
  148. dasv-1.0.0/src/dasv/adapters/registry.py +81 -0
  149. dasv-1.0.0/src/dasv/adapters/verifiers_v1.py +323 -0
  150. dasv-1.0.0/src/dasv/cli/__init__.py +1 -0
  151. dasv-1.0.0/src/dasv/cli/app.py +1407 -0
  152. dasv-1.0.0/src/dasv/core/__init__.py +1 -0
  153. dasv-1.0.0/src/dasv/core/budget.py +211 -0
  154. dasv-1.0.0/src/dasv/core/config.py +80 -0
  155. dasv-1.0.0/src/dasv/core/errors.py +57 -0
  156. dasv-1.0.0/src/dasv/core/manifest.py +97 -0
  157. dasv-1.0.0/src/dasv/core/orchestrator.py +579 -0
  158. dasv-1.0.0/src/dasv/core/schemas.py +139 -0
  159. dasv-1.0.0/src/dasv/drift/__init__.py +33 -0
  160. dasv-1.0.0/src/dasv/drift/logprob_drift.py +236 -0
  161. dasv-1.0.0/src/dasv/drift/recipe_config.py +105 -0
  162. dasv-1.0.0/src/dasv/export/__init__.py +44 -0
  163. dasv-1.0.0/src/dasv/export/common.py +153 -0
  164. dasv-1.0.0/src/dasv/export/openenv.py +179 -0
  165. dasv-1.0.0/src/dasv/export/prime_rl.py +109 -0
  166. dasv-1.0.0/src/dasv/export/trl.py +169 -0
  167. dasv-1.0.0/src/dasv/export/verl.py +95 -0
  168. dasv-1.0.0/src/dasv/mutate/__init__.py +39 -0
  169. dasv-1.0.0/src/dasv/mutate/anti_patches.py +418 -0
  170. dasv-1.0.0/src/dasv/mutate/impossible_bench.py +279 -0
  171. dasv-1.0.0/src/dasv/mutate/runner.py +237 -0
  172. dasv-1.0.0/src/dasv/profile/__init__.py +72 -0
  173. dasv-1.0.0/src/dasv/profile/signal_profiler.py +692 -0
  174. dasv-1.0.0/src/dasv/profile/stats.py +178 -0
  175. dasv-1.0.0/src/dasv/py.typed +0 -0
  176. dasv-1.0.0/src/dasv/redteam/__init__.py +56 -0
  177. dasv-1.0.0/src/dasv/redteam/fencing.py +47 -0
  178. dasv-1.0.0/src/dasv/redteam/fixer_agent.py +151 -0
  179. dasv-1.0.0/src/dasv/redteam/hacker_agent.py +469 -0
  180. dasv-1.0.0/src/dasv/redteam/llm_client.py +341 -0
  181. dasv-1.0.0/src/dasv/redteam/runner.py +348 -0
  182. dasv-1.0.0/src/dasv/reporting/__init__.py +16 -0
  183. dasv-1.0.0/src/dasv/reporting/html_renderer.py +186 -0
  184. dasv-1.0.0/src/dasv/reporting/json_writer.py +21 -0
  185. dasv-1.0.0/src/dasv/reporting/sarif_writer.py +137 -0
  186. dasv-1.0.0/src/dasv/reporting/templates/report.html.j2 +429 -0
  187. dasv-1.0.0/src/dasv/rubric/__init__.py +81 -0
  188. dasv-1.0.0/src/dasv/rubric/divergence.py +513 -0
  189. dasv-1.0.0/src/dasv/rubric/perturbations.py +370 -0
  190. dasv-1.0.0/src/dasv/rubric/prorubric_audit.py +858 -0
  191. dasv-1.0.0/src/dasv/sandbox/__init__.py +54 -0
  192. dasv-1.0.0/src/dasv/sandbox/docker_provider.py +517 -0
  193. dasv-1.0.0/src/dasv/sandbox/janitor.py +321 -0
  194. dasv-1.0.0/src/dasv/sandbox/probes.py +738 -0
  195. dasv-1.0.0/src/dasv/sandbox/provider.py +153 -0
  196. dasv-1.0.0/src/dasv/verifier/__init__.py +61 -0
  197. dasv-1.0.0/src/dasv/verifier/artifact_extractor.py +360 -0
  198. dasv-1.0.0/src/dasv/verifier/clean_grader.py +586 -0
  199. dasv-1.0.0/src/dasv/verifier/determinism.py +322 -0
  200. dasv-1.0.0/src/dasv/verifier/gold_sanity.py +252 -0
  201. dasv-1.0.0/tests/__init__.py +0 -0
  202. dasv-1.0.0/tests/adversarial/__init__.py +1 -0
  203. dasv-1.0.0/tests/adversarial/test_planted_vulns.py +289 -0
  204. dasv-1.0.0/tests/adversarial/test_prompt_injection_and_redteam.py +76 -0
  205. dasv-1.0.0/tests/adversarial/test_sandbox_security.py +229 -0
  206. dasv-1.0.0/tests/adversarial/test_tamper_resistance.py +149 -0
  207. dasv-1.0.0/tests/conftest.py +189 -0
  208. dasv-1.0.0/tests/integration/__init__.py +1 -0
  209. dasv-1.0.0/tests/integration/test_redteam_live_e2e.py +673 -0
  210. dasv-1.0.0/tests/unit/__init__.py +0 -0
  211. dasv-1.0.0/tests/unit/conftest.py +178 -0
  212. dasv-1.0.0/tests/unit/test_adapters.py +366 -0
  213. dasv-1.0.0/tests/unit/test_budget.py +121 -0
  214. dasv-1.0.0/tests/unit/test_cli.py +253 -0
  215. dasv-1.0.0/tests/unit/test_exporters.py +248 -0
  216. dasv-1.0.0/tests/unit/test_github_action.py +57 -0
  217. dasv-1.0.0/tests/unit/test_html_renderer.py +160 -0
  218. dasv-1.0.0/tests/unit/test_hud_and_recipe.py +118 -0
  219. dasv-1.0.0/tests/unit/test_llm_client.py +171 -0
  220. dasv-1.0.0/tests/unit/test_logprob_drift.py +111 -0
  221. dasv-1.0.0/tests/unit/test_mutators.py +181 -0
  222. dasv-1.0.0/tests/unit/test_orchestrator.py +281 -0
  223. dasv-1.0.0/tests/unit/test_probes.py +50 -0
  224. dasv-1.0.0/tests/unit/test_public_audit.py +82 -0
  225. dasv-1.0.0/tests/unit/test_redteam_and_gold_sanity.py +432 -0
  226. dasv-1.0.0/tests/unit/test_reporting.py +194 -0
  227. dasv-1.0.0/tests/unit/test_rubric_audit.py +368 -0
  228. dasv-1.0.0/tests/unit/test_rubric_divergence.py +319 -0
  229. dasv-1.0.0/tests/unit/test_sandbox_runtime.py +461 -0
  230. dasv-1.0.0/tests/unit/test_schemas_and_config.py +123 -0
  231. dasv-1.0.0/tests/unit/test_signal_profiler.py +439 -0
  232. dasv-1.0.0/tests/unit/test_stats_and_grading.py +127 -0
  233. dasv-1.0.0/tests/unit/test_train_dr_grpo.py +363 -0
  234. dasv-1.0.0/tests/unit/test_verifier_and_determinism.py +475 -0
  235. dasv-1.0.0/uv.lock +2034 -0
@@ -0,0 +1,16 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+
9
+ [*.py]
10
+ indent_style = space
11
+ indent_size = 4
12
+ max_line_length = 100
13
+
14
+ [*.{yml,yaml,toml,json,j2,html}]
15
+ indent_style = space
16
+ indent_size = 2
@@ -0,0 +1,60 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: ["main"]
6
+ pull_request:
7
+
8
+ jobs:
9
+ verify:
10
+ name: Lint, Typecheck, Test & Wheel Smoke (ubuntu-latest)
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout repository
14
+ uses: actions/checkout@v4
15
+
16
+ - name: Set up uv
17
+ uses: astral-sh/setup-uv@v4
18
+ with:
19
+ enable-cache: true
20
+ python-version: "3.12"
21
+
22
+ - name: Install dependencies
23
+ run: uv sync --frozen
24
+
25
+ - name: Ruff lint
26
+ run: uv run ruff check .
27
+
28
+ - name: Ruff format check
29
+ run: uv run ruff format --check .
30
+
31
+ - name: Pyright strict typecheck
32
+ run: uv run pyright
33
+
34
+ - name: Full test suite (unit, adversarial, live Docker E2E)
35
+ run: uv run pytest -v
36
+
37
+ - name: CLI smoke check
38
+ run: |
39
+ uv run dasv --version
40
+ uv run dasv doctor
41
+
42
+ - name: Build wheel & out-of-tree /tmp smoke test
43
+ run: |
44
+ uv build
45
+ WHEEL="$(ls dist/dasv-*.whl | head -n 1)"
46
+ SMOKE_DIR="/tmp/dasv-wheel-smoke"
47
+ rm -rf "${SMOKE_DIR}"
48
+ mkdir -p "${SMOKE_DIR}"
49
+ cp -R benchmarks/planted_vulns/hardened/01_hardened_calculator "${SMOKE_DIR}/env"
50
+ cd /tmp
51
+ uvx --from "${GITHUB_WORKSPACE}/${WHEEL}" dasv --version
52
+ uvx --from "${GITHUB_WORKSPACE}/${WHEEL}" dasv doctor
53
+ uvx --from "${GITHUB_WORKSPACE}/${WHEEL}" dasv inspect "${SMOKE_DIR}/env"
54
+ uvx --from "${GITHUB_WORKSPACE}/${WHEEL}" dasv audit "${SMOKE_DIR}/env" \
55
+ --tiers 0 --no-native \
56
+ --out-dir "${SMOKE_DIR}/out" \
57
+ --sarif "${SMOKE_DIR}/out/report.sarif" \
58
+ --html "${SMOKE_DIR}/out/report.html"
59
+ test -s "${SMOKE_DIR}/out/report.sarif"
60
+ test -s "${SMOKE_DIR}/out/report.html"
@@ -0,0 +1,37 @@
1
+ name: dasv-action Self-Test
2
+
3
+ on:
4
+ push:
5
+ branches: ["main"]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+ actions: read
12
+ security-events: write
13
+
14
+ jobs:
15
+ dasv-action-gate:
16
+ name: Verify dasv-action on Hardened Reference Env
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Checkout repository
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Run dasv-action (Tier 0 + SARIF + Offline HTML)
23
+ id: dasv
24
+ uses: ./action
25
+ with:
26
+ path: benchmarks/planted_vulns/hardened/01_hardened_calculator
27
+ tiers: "0"
28
+ native: "false"
29
+ fail-on: high
30
+ dasv-package: "."
31
+ upload-sarif: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
32
+ upload-html-artifact: "true"
33
+
34
+ - name: Assert Grade A output
35
+ run: |
36
+ echo "Grade=${{ steps.dasv.outputs.grade }} Score=${{ steps.dasv.outputs.hackability-score }}"
37
+ test "${{ steps.dasv.outputs.grade }}" = "A"
@@ -0,0 +1,93 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+ inputs:
8
+ target:
9
+ description: "Publish target (testpypi or pypi)"
10
+ required: true
11
+ default: "testpypi"
12
+ type: choice
13
+ options:
14
+ - testpypi
15
+ - pypi
16
+
17
+ permissions:
18
+ contents: read
19
+
20
+ jobs:
21
+ build:
22
+ name: Build sdist & wheel
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - name: Checkout repository
26
+ uses: actions/checkout@v4
27
+
28
+ - name: Set up uv
29
+ uses: astral-sh/setup-uv@v4
30
+ with:
31
+ enable-cache: true
32
+ python-version: "3.12"
33
+
34
+ - name: Verify lockfile & build distributions
35
+ run: |
36
+ uv sync --frozen
37
+ uv build
38
+
39
+ - name: Upload dist artifacts
40
+ uses: actions/upload-artifact@v4
41
+ with:
42
+ name: dasv-dist
43
+ path: dist/
44
+
45
+ publish-testpypi:
46
+ name: Publish to TestPyPI (OIDC)
47
+ needs: [build]
48
+ if: github.event_name == 'workflow_dispatch' && inputs.target == 'testpypi'
49
+ runs-on: ubuntu-latest
50
+ environment:
51
+ name: testpypi
52
+ url: https://test.pypi.org/p/dasv
53
+ permissions:
54
+ id-token: write
55
+ steps:
56
+ - name: Download dist artifacts
57
+ uses: actions/download-artifact@v4
58
+ with:
59
+ name: dasv-dist
60
+ path: dist/
61
+
62
+ - name: Set up uv
63
+ uses: astral-sh/setup-uv@v4
64
+ with:
65
+ python-version: "3.12"
66
+
67
+ - name: Publish to TestPyPI via Trusted Publishing
68
+ run: uv publish --publish-url https://test.pypi.org/legacy/ --trusted-publishing always dist/*
69
+
70
+ publish-pypi:
71
+ name: Publish to PyPI (OIDC)
72
+ needs: [build]
73
+ if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.target == 'pypi')
74
+ runs-on: ubuntu-latest
75
+ environment:
76
+ name: pypi
77
+ url: https://pypi.org/p/dasv
78
+ permissions:
79
+ id-token: write
80
+ steps:
81
+ - name: Download dist artifacts
82
+ uses: actions/download-artifact@v4
83
+ with:
84
+ name: dasv-dist
85
+ path: dist/
86
+
87
+ - name: Set up uv
88
+ uses: astral-sh/setup-uv@v4
89
+ with:
90
+ python-version: "3.12"
91
+
92
+ - name: Publish to PyPI via Trusted Publishing
93
+ run: uv publish --trusted-publishing always dist/*
dasv-1.0.0/.gitignore ADDED
@@ -0,0 +1,33 @@
1
+ # Python / uv
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ .venv/
6
+ venv/
7
+ dist/
8
+ build/
9
+ *.egg-info/
10
+ .pytest_cache/
11
+ .ruff_cache/
12
+ .mypy_cache/
13
+ .coverage
14
+ htmlcov/
15
+
16
+ # Local artifacts & secrets
17
+ .env
18
+ .env.*
19
+ artifacts/
20
+ experiments/
21
+ dasv.toml
22
+ *.sarif
23
+ report.html
24
+ report.json
25
+ manifest.json
26
+ !results/v1_ablation/**/manifest.json
27
+ !results/v1_ablation/**/report.json
28
+
29
+ # OS / IDE
30
+ .DS_Store
31
+ .vscode/
32
+ .idea/
33
+
@@ -0,0 +1,32 @@
1
+ # Changelog
2
+
3
+ All notable changes to **`dasv`** (*Deterministic Adversarial Sandbox Verifier*) are documented in this file.
4
+
5
+ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [1.0.0] - 2026-11-23
8
+
9
+ ### Added
10
+ - **Multi-seed ablation aggregator & extended significance tests** in `recipes/lora_dr_grpo_ablation/plot_ablation.py` (`--seeds-dir`, `compute_multiseed_summary`, `Arm 2 vs Arm 0` / `Arm 1 vs Arm 0` paired bootstrap, and `pass@k` exact McNemar).
11
+ - **arXiv-style Technical Report** (`docs/TECHNICAL-REPORT.md`) consolidating `KPI-RES-01`, `KPI-RES-02`, and `KPI-RES-03` empirical results with embedded SVG telemetry.
12
+ - **Controlled 3-Arm LoRA-Dr.GRPO 2-Seed Ablation Artifacts** (`results/v1_ablation/{seed_42,seed_1337,multiseed_summary.json}`) proving `dasv` hardening eliminates weak-assertion reward hacking (`0/320` steps vs. `47/320` in Arm 1), outperforms Unhardened RLVR on both seeds (2/2), cuts `pass^4` variance by 2.2×, and achieves statistically significant pooled held-out lift (`+3.71 pp` `pass@1`, $p=0.0456$; `+7.03 pp` `pass^4`, $p=0.0072$; `+10.75 pp` MBPP+ `pass^4`, $p=0.0088$) on `Qwen/Qwen2.5-Coder-3B-Instruct`.
13
+ - **Production `README.md`** with 60-second `uvx dasv` quickstart, 9-command CLI reference, `dasv-action` workflow snippet, and empirical summary tables.
14
+
15
+ ### Fixed
16
+ - **Repo-relative SARIF 2.1.0 artifact URIs** (`src/dasv/reporting/sarif_writer.py`): Automatically resolves audited subdirectory paths relative to the enclosing `.git` root so GitHub Code Scanning attaches inline PR diff annotations (`annotations_count >= 1`) directly on modified files, and corrected `tool.driver.informationUri`.
17
+
18
+ ## [0.1.0] - 2026-11-21
19
+
20
+ ### Added
21
+ - **4-Plane Core & CLI (`dasv`)**: Frozen Pydantic v2 schemas, strict `dasv.toml` config, deterministic exit codes `0–5`, atomic `BudgetGuard` with `\$0` local-endpoint bypass, and 9 CLI commands (`doctor`, `inspect`, `audit`, `mutate`, `redteam`, `rubric`, `profile`, `export`, `report`).
22
+ - **Cross-Standard Adapters (`dasv.adapters`)**: Harbor (`task.toml` v1.1 `allow_internet`/`docker_image`), OpenEnv (`server/Dockerfile`), Prime Intellect `verifiers` v1 (`vf.Taskset` + `@vf.reward` + `RULE-ADPT-001` legacy v0 detection), and HUD (`RULE-ADPT-002` + container-backed execution) with `NativeDelegateRunner`.
23
+ - **Tier 0–3 Verification Engines**:
24
+ - Tier 0 static boundary (`RULE-BNDY-001..004`) and hermeticity (`RULE-HERM-001..002`) probes.
25
+ - Tier 1 Clean-Image Out-of-Container Grader, $N$-trial Oracle/No-op determinism (`pass^k`), deterministic Anti-Patch & *ImpossibleBench* mutators (`RULE-MUT-001..002`).
26
+ - Tier 2 budget-capped ReAct Hacker-Fixer loop + 3-invariant Gold-Sanity Gate + *ProRubric* (`RULE-RUBR-001..002`) & *CHERRL* cross-family judge divergence (`RULE-RUBR-003`).
27
+ - Tier 3 RLVR `SignalProfiler` (`pass@1`, `pass@k`, `pass^k`, GRPO zero-gradient probability, `CurriculumBucket`) + `TRL`/`veRL`/`prime-rl`/`OpenEnv` exporters.
28
+ - **Reporting & CI/CD**: Synchronized JSON, **SARIF 2.1.0**, offline zero-CDN HTML Certification Cards, `manifest.json`, composite GitHub Action (`action/action.yml`), and OIDC PyPI/TestPyPI publishing workflow (`.github/workflows/publish.yml`).
29
+ - **Empirical Benchmarks & Recipes**:
30
+ - `KPI-RES-01` Planted Vulnerability Corpus (`benchmarks/planted_vulns/`, 100% recall / 0% false alarms).
31
+ - `KPI-RES-02` 45-task public RL environment audit (`results/public_audit/`, \$0.00 API spend).
32
+ - `KPI-RES-03` VRAM-safe LoRA-Dr.GRPO/DAPO GPU ablation recipe (`recipes/lora_dr_grpo_ablation/`).
dasv-1.0.0/LICENSE ADDED
@@ -0,0 +1,198 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction of the management or policies of such entity, whether by
20
+ contract or otherwise, or (ii) ownership of fifty percent (50%) or
21
+ more of the outstanding shares, or (iii) beneficial ownership of such
22
+ entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation,
29
+ source files, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the Work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind) by name to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to the Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by the Licensor or on
59
+ behalf of the Licensor for the purpose of discussing and improving the
60
+ Work, but excluding communication that is conspicuously marked or
61
+ otherwise designated in writing by the copyright owner as "Not a
62
+ Contribution."
63
+
64
+ "Contributor" shall mean Licensor and any individual or Legal Entity
65
+ exercising permissions granted by this License.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) were submitted. If You
83
+ institute patent litigation against You or any other entity
84
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
85
+ the Work or a Contribution incorporated within the Work constitutes
86
+ direct or indirect patent infringement, then any patent licenses
87
+ granted to You under this License shall terminate as of the date
88
+ such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work commercial or
96
+ non-commercial copies of the License and this copyright notice; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright notices, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" file as part of its distribution,
108
+ then any Derivative Works that You distribute must include a
109
+ readable copy of the attribution notices contained within such
110
+ NOTICE file, excluding those notices that do not pertain to any
111
+ part of the Derivative Works, in at least one of the following
112
+ places: within a NOTICE file distributed as part of the Derivative
113
+ Works; within the Source form or documentation, if provided along
114
+ with the Derivative Works; or, within a display generated by the
115
+ Derivative Works, if and wherever such third-party notices normally
116
+ appear. The contents of the NOTICE file are for informational
117
+ purposes only and do not modify the License. You may add Your own
118
+ attribution notices within Derivative Works that You distribute,
119
+ alongside or as an addendum to the NOTICE file from the Work,
120
+ provided that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly stated otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be licensed under the terms and conditions
133
+ of this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, or service marks of the Licensor, except as required
140
+ for reasonable and customary use in describing the origin of the Work
141
+ and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ shall any Contributor be liable to You for damages, including any
156
+ direct, indirect, or consequential damages of any character arising as
157
+ a result of this License or out of the use or inability to use the
158
+ Work (including but not limited to damages for loss of goodwill,
159
+ work stoppage, computer failure or malfunction, or any and all
160
+ other commercial damages or losses), even if such Contributor
161
+ has been advised of the possibility of such damages.
162
+
163
+ 9. Accepting Warranty or Additional Liability. While redistributing
164
+ the Work or Derivative Works thereof, You may choose to offer,
165
+ and charge a fee for, additional liability terms. However, in
166
+ accepting such obligations, You may act only on Your own behalf
167
+ and on Your sole responsibility, not on behalf of any other
168
+ Contributor, and only if You agree to indemnify, defend, and hold
169
+ each Contributor harmless for any liability incurred by, or
170
+ claims asserted against, such Contributor by reason of your accepting
171
+ any such warranty or additional liability.
172
+
173
+ END OF TERMS AND CONDITIONS
174
+
175
+ APPENDIX: How to apply the Apache License to your work.
176
+
177
+ To apply the Apache License to your work, attach the following
178
+ boilerplate notice, with the fields enclosed by brackets "[]"
179
+ replaced with your own identifying information. (Don't include
180
+ the brackets!) The text should be enclosed in the appropriate
181
+ comment syntax for the file format. We also recommend that a
182
+ file or class name and copyright notice be included on the same
183
+ printed page as the copyright notice for the same "License"
184
+ description.
185
+
186
+ Copyright 2026 dasv contributors
187
+
188
+ Licensed under the Apache License, Version 2.0 (the "License");
189
+ you may not use this file except in compliance with the License.
190
+ You may obtain a copy of the License at
191
+
192
+ http://www.apache.org/licenses/LICENSE-2.0
193
+
194
+ Unless required by applicable law or agreed to in writing, software
195
+ distributed under the License is distributed on an "AS IS" BASIS,
196
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
197
+ See the License for the specific language governing permissions and
198
+ limitations under the License.