patchdrill 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/.patchdrill.yml +33 -0
  2. package/CHANGELOG.md +150 -0
  3. package/CONTRIBUTING.md +59 -0
  4. package/LICENSE +21 -0
  5. package/README.md +601 -0
  6. package/SECURITY.md +28 -0
  7. package/action.yml +338 -0
  8. package/dist/baseline.d.ts +9 -0
  9. package/dist/baseline.js +38 -0
  10. package/dist/baseline.js.map +1 -0
  11. package/dist/cli.d.ts +19 -0
  12. package/dist/cli.js +662 -0
  13. package/dist/cli.js.map +1 -0
  14. package/dist/codeowners.d.ts +14 -0
  15. package/dist/codeowners.js +104 -0
  16. package/dist/codeowners.js.map +1 -0
  17. package/dist/command-plan.d.ts +3 -0
  18. package/dist/command-plan.js +26 -0
  19. package/dist/command-plan.js.map +1 -0
  20. package/dist/demo.d.ts +5 -0
  21. package/dist/demo.js +525 -0
  22. package/dist/demo.js.map +1 -0
  23. package/dist/dependency.d.ts +4 -0
  24. package/dist/dependency.js +1424 -0
  25. package/dist/dependency.js.map +1 -0
  26. package/dist/doctor.d.ts +26 -0
  27. package/dist/doctor.js +183 -0
  28. package/dist/doctor.js.map +1 -0
  29. package/dist/evidence.d.ts +64 -0
  30. package/dist/evidence.js +352 -0
  31. package/dist/evidence.js.map +1 -0
  32. package/dist/git.d.ts +16 -0
  33. package/dist/git.js +349 -0
  34. package/dist/git.js.map +1 -0
  35. package/dist/i18n-catalog.d.ts +8 -0
  36. package/dist/i18n-catalog.js +446 -0
  37. package/dist/i18n-catalog.js.map +1 -0
  38. package/dist/i18n.d.ts +20 -0
  39. package/dist/i18n.js +67 -0
  40. package/dist/i18n.js.map +1 -0
  41. package/dist/init.d.ts +13 -0
  42. package/dist/init.js +312 -0
  43. package/dist/init.js.map +1 -0
  44. package/dist/markdown-links.d.ts +18 -0
  45. package/dist/markdown-links.js +180 -0
  46. package/dist/markdown-links.js.map +1 -0
  47. package/dist/package-scripts.d.ts +3 -0
  48. package/dist/package-scripts.js +55 -0
  49. package/dist/package-scripts.js.map +1 -0
  50. package/dist/planner.d.ts +8 -0
  51. package/dist/planner.js +2351 -0
  52. package/dist/planner.js.map +1 -0
  53. package/dist/policy.d.ts +12 -0
  54. package/dist/policy.js +255 -0
  55. package/dist/policy.js.map +1 -0
  56. package/dist/project.d.ts +2 -0
  57. package/dist/project.js +1085 -0
  58. package/dist/project.js.map +1 -0
  59. package/dist/release-readiness.d.ts +25 -0
  60. package/dist/release-readiness.js +426 -0
  61. package/dist/release-readiness.js.map +1 -0
  62. package/dist/report-annotations.d.ts +3 -0
  63. package/dist/report-annotations.js +28 -0
  64. package/dist/report-annotations.js.map +1 -0
  65. package/dist/report-contract.d.ts +2 -0
  66. package/dist/report-contract.js +82 -0
  67. package/dist/report-contract.js.map +1 -0
  68. package/dist/report-html.d.ts +7 -0
  69. package/dist/report-html.js +706 -0
  70. package/dist/report-html.js.map +1 -0
  71. package/dist/report-sarif.d.ts +2 -0
  72. package/dist/report-sarif.js +90 -0
  73. package/dist/report-sarif.js.map +1 -0
  74. package/dist/report.d.ts +14 -0
  75. package/dist/report.js +310 -0
  76. package/dist/report.js.map +1 -0
  77. package/dist/risk.d.ts +19 -0
  78. package/dist/risk.js +1226 -0
  79. package/dist/risk.js.map +1 -0
  80. package/dist/runner.d.ts +8 -0
  81. package/dist/runner.js +113 -0
  82. package/dist/runner.js.map +1 -0
  83. package/dist/scan.d.ts +2 -0
  84. package/dist/scan.js +195 -0
  85. package/dist/scan.js.map +1 -0
  86. package/dist/schema.d.ts +12 -0
  87. package/dist/schema.js +30 -0
  88. package/dist/schema.js.map +1 -0
  89. package/dist/stack-coverage.d.ts +8 -0
  90. package/dist/stack-coverage.js +94 -0
  91. package/dist/stack-coverage.js.map +1 -0
  92. package/dist/types.d.ts +206 -0
  93. package/dist/types.js +2 -0
  94. package/dist/types.js.map +1 -0
  95. package/dist/verification.d.ts +11 -0
  96. package/dist/verification.js +108 -0
  97. package/dist/verification.js.map +1 -0
  98. package/docs/ANNOTATIONS.md +34 -0
  99. package/docs/ARCHITECTURE.md +79 -0
  100. package/docs/BASELINES.md +32 -0
  101. package/docs/CASE_STUDIES.md +106 -0
  102. package/docs/CODEOWNERS.md +23 -0
  103. package/docs/DASHBOARD.md +87 -0
  104. package/docs/EVIDENCE.md +55 -0
  105. package/docs/LAUNCH_PLAYBOOK.md +103 -0
  106. package/docs/MONOREPOS.md +74 -0
  107. package/docs/POLICY.md +98 -0
  108. package/docs/PROOF_PACKS.md +57 -0
  109. package/docs/PR_COMMENTS.md +56 -0
  110. package/docs/RELEASE.md +35 -0
  111. package/docs/ROADMAP.md +152 -0
  112. package/docs/RULE_CATALOG.md +90 -0
  113. package/docs/SARIF.md +74 -0
  114. package/docs/SCHEMAS.md +49 -0
  115. package/docs/SECURITY_POSTURE.md +32 -0
  116. package/docs/STACK_COVERAGE.md +20 -0
  117. package/docs/assets/patchdrill-demo.svg +21 -0
  118. package/docs/media/patchdrill-dashboard.png +0 -0
  119. package/docs/media/patchdrill-demo.gif +0 -0
  120. package/examples/case-studies/README.md +20 -0
  121. package/examples/demo/README.md +21 -0
  122. package/examples/demo/patchdrill-demo-summary.md +35 -0
  123. package/examples/demo/patchdrill-demo.html +623 -0
  124. package/examples/demo/patchdrill-demo.json +355 -0
  125. package/examples/demo/patchdrill-demo.md +120 -0
  126. package/examples/demo/patchdrill-demo.sarif +195 -0
  127. package/examples/report.md +128 -0
  128. package/examples/risky-agent-pr/README.md +15 -0
  129. package/examples/risky-agent-pr/patchdrill-demo-summary.md +41 -0
  130. package/examples/risky-agent-pr/patchdrill-demo.html +681 -0
  131. package/examples/risky-agent-pr/patchdrill-demo.json +483 -0
  132. package/examples/risky-agent-pr/patchdrill-demo.md +140 -0
  133. package/examples/risky-agent-pr/patchdrill-demo.sarif +398 -0
  134. package/fixtures/stacks/README.md +4 -0
  135. package/fixtures/stacks/android-gradle/fixture.json +33 -0
  136. package/fixtures/stacks/aspnet-core-service/fixture.json +36 -0
  137. package/fixtures/stacks/bazel-workspace/fixture.json +30 -0
  138. package/fixtures/stacks/buck2-workspace/fixture.json +30 -0
  139. package/fixtures/stacks/cargo-workspace/fixture.json +48 -0
  140. package/fixtures/stacks/django-app/fixture.json +25 -0
  141. package/fixtures/stacks/docker-compose/fixture.json +17 -0
  142. package/fixtures/stacks/dockerfile-service/fixture.json +17 -0
  143. package/fixtures/stacks/dotnet-service/fixture.json +36 -0
  144. package/fixtures/stacks/dotnet-solution-filter/fixture.json +62 -0
  145. package/fixtures/stacks/fastapi-app/fixture.json +29 -0
  146. package/fixtures/stacks/go-workspace/fixture.json +48 -0
  147. package/fixtures/stacks/java-gradle/fixture.json +29 -0
  148. package/fixtures/stacks/java-maven/fixture.json +32 -0
  149. package/fixtures/stacks/kubernetes-helm/fixture.json +25 -0
  150. package/fixtures/stacks/kubernetes-kustomize/fixture.json +21 -0
  151. package/fixtures/stacks/nested-go-workspace/fixture.json +51 -0
  152. package/fixtures/stacks/nextjs-app/fixture.json +34 -0
  153. package/fixtures/stacks/node-turbo-workspace/fixture.json +39 -0
  154. package/fixtures/stacks/pants-python/fixture.json +33 -0
  155. package/fixtures/stacks/php-composer/fixture.json +31 -0
  156. package/fixtures/stacks/python-service/fixture.json +21 -0
  157. package/fixtures/stacks/rails-app/fixture.json +25 -0
  158. package/fixtures/stacks/spring-boot-gradle/fixture.json +29 -0
  159. package/fixtures/stacks/spring-boot-maven/fixture.json +43 -0
  160. package/fixtures/stacks/swift-package/fixture.json +21 -0
  161. package/fixtures/stacks/terraform-module/fixture.json +17 -0
  162. package/fixtures/stacks/uv-python-service/fixture.json +47 -0
  163. package/fixtures/stacks/xcode-app/fixture.json +72 -0
  164. package/package.json +80 -0
  165. package/schemas/patchdrill-doctor.schema.json +171 -0
  166. package/schemas/patchdrill-evidence.schema.json +239 -0
  167. package/schemas/patchdrill-policy.schema.json +170 -0
  168. package/schemas/patchdrill-release-check.schema.json +78 -0
  169. package/schemas/patchdrill-report.schema.json +647 -0
@@ -0,0 +1,128 @@
1
+ # PatchDrill Report
2
+
3
+ Status: **WARN**
4
+ Risk score: **48/100**
5
+ Confidence score: **52/100**
6
+ Generated: 2026-06-01T00:00:00.000Z
7
+ Schema version: 1
8
+
9
+ ## Summary
10
+
11
+ - Changed files: 4
12
+ - Additions / deletions: +96 / -18
13
+ - Required verification commands: 3
14
+ - Failed verification commands: 0
15
+ - Verification evidence: 3 run, 3 passed, 0 failed, 0 timed out, 0 missing required, 0 optional skipped
16
+ - Added lines inspected: 96
17
+
18
+ ## Policy
19
+
20
+ - Config: .patchdrill.yml
21
+ - Ignored path patterns: 3
22
+ - Fail-on severity: high
23
+ - Max risk: 69
24
+ - Policy rules: 1
25
+ - Policy commands: 1 required, 0 optional
26
+
27
+ ## Code Owners
28
+
29
+ - Config: .github/CODEOWNERS
30
+ - Rules: 4
31
+
32
+ ## Baseline
33
+
34
+ - Baseline report: previous-patchdrill-report.json
35
+ - Status: pass -> warn
36
+ - Risk: 34/100 -> 48/100 (+14)
37
+ - Findings: 1 new, 0 resolved, 2 unchanged
38
+
39
+ ## Project Signals
40
+
41
+ | Ecosystem | Framework | Entrypoint | Manifest | Package manager | Task runner |
42
+ | --- | --- | --- | --- | --- | --- |
43
+ | node | | | package.json | pnpm | turbo |
44
+
45
+ ## Affected Workspace Packages
46
+
47
+ | Package | Path |
48
+ | --- | --- |
49
+ | @acme/auth | packages/auth |
50
+ | @acme/web | apps/web |
51
+
52
+ ## Dependency Changes
53
+
54
+ | File | Type | Package | Path | Change | Before | After |
55
+ | --- | --- | --- | --- | --- | --- | --- |
56
+ | package.json | dependencies | react | | updated | ^18.2.0 | ^19.0.0 |
57
+ | requirements.txt | dependencies | requests | | updated | ==2.31.0 | ==2.32.0 |
58
+ | package-lock.json | lockfile | react | node_modules/react | updated | 18.2.0 | 19.0.0 |
59
+ | pnpm-lock.yaml | lockfile | @acme/ui | @acme/ui@1.4.0 -> @acme/ui@1.5.0 | updated | 1.4.0 | 1.5.0 |
60
+ | yarn.lock | lockfile | zod | zod@^3.0.0 -> zod@^4.0.0 | updated | 3.0.0 | 4.0.0 |
61
+ | bun.lock | lockfile | react | react | updated | 18.2.0 | 19.0.0 |
62
+ | go.sum | lockfile | github.com/gin-gonic/gin | github.com/gin-gonic/gin@v1.9.0 -> github.com/gin-gonic/gin@v1.10.0 | updated | v1.9.0 | v1.10.0 |
63
+ | Cargo.lock | lockfile | anyhow | anyhow@1.0.80 -> anyhow@1.0.81 | updated | 1.0.80 | 1.0.81 |
64
+ | poetry.lock | lockfile | black | black@24.1.0 -> black@24.2.0 | updated | 24.1.0 | 24.2.0 |
65
+ | Pipfile.lock | lockfile | requests | default.requests | updated | ==2.31.0 | ==2.32.0 |
66
+ | Gemfile.lock | lockfile | rails | rails@7.1.3 -> rails@7.2.0 | updated | 7.1.3 | 7.2.0 |
67
+ | composer.lock | lockfile | monolog/monolog | packages.monolog/monolog | updated | 3.5.0 | 3.6.0 |
68
+ | package-lock.json | lockfile | yaml | node_modules/yaml | added | | 2.0.0 |
69
+
70
+ ## Changed Files
71
+
72
+ | File | Status | +/- | Owners |
73
+ | --- | --- | --- | --- |
74
+ | packages/auth/src/session.ts | modified | +44 / -10 | @acme/security |
75
+ | packages/auth/src/session.test.ts | modified | +38 / -8 | @acme/security |
76
+ | apps/web/src/login.tsx | modified | +9 / -0 | @acme/web |
77
+ | package-lock.json | modified | +5 / -0 | @acme/platform |
78
+
79
+ ## Findings
80
+
81
+ | Severity | Rule | Finding | Location | Remediation |
82
+ | --- | --- | --- | --- | --- |
83
+ | high | file.high-impact-area | High-impact product area changed: Authentication, billing, migrations, or security changes need stronger regression proof. | packages/auth/src/session.ts | Add targeted tests and include manual verification notes in the PR. |
84
+ | medium | file.lockfile | Dependency lockfile changed: Dependency graph changes can introduce supply-chain, licensing, or runtime regressions. | package-lock.json | Review direct and transitive dependency changes before merge. |
85
+
86
+ ## Verification Plan
87
+
88
+ | Required | Package | Command | Result | Reason |
89
+ | --- | --- | --- | --- | --- |
90
+ | yes | @acme/auth | `pnpm exec turbo run test --filter=@acme/auth` | passed | @acme/auth changed under packages/auth, and its package.json defines "test". PatchDrill detected turbo and will use its task graph. |
91
+ | yes | @acme/auth | `pnpm exec turbo run build --filter=@acme/auth` | passed | @acme/auth changed under packages/auth, and its package.json defines "build". PatchDrill detected turbo and will use its task graph. |
92
+ | yes | @acme/web | `pnpm exec turbo run test --filter=@acme/web` | passed | @acme/web depends on @acme/auth, and its package.json defines "test". PatchDrill detected turbo and will use its task graph. |
93
+
94
+ ## Command Results
95
+
96
+ ### pnpm exec turbo run test --filter=@acme/auth
97
+
98
+ - Exit code: 0
99
+ - Duration: 1240ms
100
+
101
+ ```text
102
+ Test Files 12 passed
103
+ Tests 87 passed
104
+ ```
105
+
106
+ ### pnpm exec turbo run build --filter=@acme/auth
107
+
108
+ - Exit code: 0
109
+ - Duration: 2180ms
110
+
111
+ ```text
112
+ @acme/auth:build: compiled 18 modules
113
+ ```
114
+
115
+ ### pnpm exec turbo run test --filter=@acme/web
116
+
117
+ - Exit code: 0
118
+ - Duration: 1830ms
119
+
120
+ ```text
121
+ Test Files 9 passed
122
+ Tests 54 passed
123
+ ```
124
+
125
+ ## Reviewer Notes
126
+
127
+ - Treat this report as triage evidence, not a replacement for review.
128
+ - High-impact areas still need human sign-off even when automated commands pass.
@@ -0,0 +1,15 @@
1
+ # Risky Agent PR Demo
2
+
3
+ These files are generated by:
4
+
5
+ ```bash
6
+ patchdrill demo --scenario risky-agent-pr --output examples/risky-agent-pr
7
+ ```
8
+
9
+ This scenario shows a fail-state agent-authored pull request with privileged workflow, secret-looking value, agent-instruction, billing, missing-test, dependency, and failed-command evidence.
10
+
11
+ - `patchdrill-demo-summary.md`: compact PR comment and step-summary preview.
12
+ - `patchdrill-demo.md`: reviewer-facing Markdown report.
13
+ - `patchdrill-demo.json`: machine-readable report contract.
14
+ - `patchdrill-demo.sarif`: GitHub code scanning upload format.
15
+ - `patchdrill-demo.html`: self-contained static dashboard.
@@ -0,0 +1,41 @@
1
+ # PatchDrill Summary
2
+
3
+ **FAIL** - risk 94/100, confidence 21/100
4
+
5
+ - Changed files: 8 (+326 / -78)
6
+ - Verification plan: 4 required, 1 optional
7
+ - Verification evidence: 3 run, 2 passed, 1 failed, 0 timed out, 1 missing required, 1 optional skipped
8
+ - Baseline risk delta: +63 (6 new findings)
9
+
10
+ ## Changed Files
11
+
12
+ - `AGENTS.md` (modified, +28 / -4)
13
+ - `.github/workflows/release.yml` (modified, +44 / -18)
14
+ - `apps/web/src/billing/checkout.ts` (modified, +83 / -21)
15
+ - `apps/web/src/billing/webhook.ts` (modified, +39 / -15)
16
+ - `scripts/deploy.sh` (modified, +27 / -8)
17
+
18
+ _3 more changed files in the full report._
19
+
20
+ ## Top Findings
21
+
22
+ | Severity | Finding | Location |
23
+ | --- | --- | --- |
24
+ | critical | Privileged workflow checks out pull request code | .github/workflows/release.yml:19 |
25
+ | critical | Secret-looking value added | .env.example:8 |
26
+ | high | Agent instructions changed | AGENTS.md |
27
+ | high | High-impact product area changed | apps/web/src/billing/checkout.ts |
28
+ | high | Verification script disabled: test | package.json |
29
+
30
+ _3 more findings in the full report._
31
+
32
+ ## Required Checks
33
+
34
+ | Command | Result |
35
+ | --- | --- |
36
+ | `npm run lint --workspace @acme/web` | passed |
37
+ | `npm test --workspace @acme/web` | failed (1) |
38
+ | `npm run build --workspace @acme/web` | passed |
39
+ | `gh workflow view release.yml --yaml` | not run |
40
+
41
+ Full Markdown, JSON, SARIF, and HTML reports remain available as CI artifacts when configured.