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,483 @@
1
+ {
2
+ "schemaVersion": "1",
3
+ "generatedAt": "2026-06-01T00:00:00.000Z",
4
+ "root": "/demo/checkout",
5
+ "base": "origin/main",
6
+ "head": "agent/refactor-release-flow",
7
+ "summary": {
8
+ "status": "fail",
9
+ "riskScore": 94,
10
+ "confidenceScore": 21,
11
+ "changedFileCount": 8,
12
+ "additions": 326,
13
+ "deletions": 78,
14
+ "requiredCommandCount": 4,
15
+ "failedCommandCount": 1
16
+ },
17
+ "changedFiles": [
18
+ {
19
+ "path": "AGENTS.md",
20
+ "status": "modified",
21
+ "additions": 28,
22
+ "deletions": 4,
23
+ "binary": false,
24
+ "owners": [
25
+ "@acme/platform"
26
+ ]
27
+ },
28
+ {
29
+ "path": ".github/workflows/release.yml",
30
+ "status": "modified",
31
+ "additions": 44,
32
+ "deletions": 18,
33
+ "binary": false,
34
+ "owners": [
35
+ "@acme/platform"
36
+ ]
37
+ },
38
+ {
39
+ "path": "apps/web/src/billing/checkout.ts",
40
+ "status": "modified",
41
+ "additions": 83,
42
+ "deletions": 21,
43
+ "binary": false,
44
+ "owners": [
45
+ "@acme/billing"
46
+ ]
47
+ },
48
+ {
49
+ "path": "apps/web/src/billing/webhook.ts",
50
+ "status": "modified",
51
+ "additions": 39,
52
+ "deletions": 15,
53
+ "binary": false,
54
+ "owners": [
55
+ "@acme/billing"
56
+ ]
57
+ },
58
+ {
59
+ "path": "scripts/deploy.sh",
60
+ "status": "modified",
61
+ "additions": 27,
62
+ "deletions": 8,
63
+ "binary": false,
64
+ "owners": [
65
+ "@acme/platform"
66
+ ]
67
+ },
68
+ {
69
+ "path": ".env.example",
70
+ "status": "modified",
71
+ "additions": 3,
72
+ "deletions": 0,
73
+ "binary": false,
74
+ "owners": [
75
+ "@acme/platform"
76
+ ]
77
+ },
78
+ {
79
+ "path": "package.json",
80
+ "status": "modified",
81
+ "additions": 14,
82
+ "deletions": 4,
83
+ "binary": false,
84
+ "owners": [
85
+ "@acme/platform"
86
+ ]
87
+ },
88
+ {
89
+ "path": "package-lock.json",
90
+ "status": "modified",
91
+ "additions": 88,
92
+ "deletions": 8,
93
+ "binary": false
94
+ }
95
+ ],
96
+ "addedLines": 326,
97
+ "projectSignals": [
98
+ {
99
+ "ecosystem": "node",
100
+ "manifestPath": "package.json",
101
+ "packageManager": "npm",
102
+ "scripts": {
103
+ "lint": "eslint .",
104
+ "test": "vitest run",
105
+ "build": "vite build",
106
+ "test:e2e": "playwright test"
107
+ },
108
+ "workspacePackages": [
109
+ {
110
+ "name": "@acme/web",
111
+ "projectName": "web",
112
+ "path": "apps/web",
113
+ "scripts": {
114
+ "lint": "eslint src",
115
+ "test": "vitest run",
116
+ "build": "vite build"
117
+ },
118
+ "targets": [
119
+ "lint",
120
+ "test",
121
+ "build"
122
+ ],
123
+ "dependencies": [
124
+ "@acme/payments"
125
+ ]
126
+ },
127
+ {
128
+ "name": "@acme/payments",
129
+ "projectName": "payments",
130
+ "path": "packages/payments",
131
+ "scripts": {
132
+ "test": "vitest run"
133
+ },
134
+ "targets": [
135
+ "test"
136
+ ]
137
+ }
138
+ ]
139
+ },
140
+ {
141
+ "ecosystem": "github-actions",
142
+ "manifestPath": ".github/workflows/release.yml"
143
+ }
144
+ ],
145
+ "affectedPackages": [
146
+ {
147
+ "name": "@acme/web",
148
+ "projectName": "web",
149
+ "path": "apps/web",
150
+ "scripts": {
151
+ "lint": "eslint src",
152
+ "test": "vitest run",
153
+ "build": "vite build"
154
+ },
155
+ "targets": [
156
+ "lint",
157
+ "test",
158
+ "build"
159
+ ],
160
+ "dependencies": [
161
+ "@acme/payments"
162
+ ]
163
+ }
164
+ ],
165
+ "dependencyChanges": [
166
+ {
167
+ "file": "package-lock.json",
168
+ "packageName": "yaml",
169
+ "packagePath": "node_modules/yaml",
170
+ "dependencyType": "lockfile",
171
+ "changeType": "updated",
172
+ "before": "2.8.1",
173
+ "after": "2.9.0"
174
+ },
175
+ {
176
+ "file": "package-lock.json",
177
+ "packageName": "@acme/payments",
178
+ "packagePath": "node_modules/@acme/payments",
179
+ "dependencyType": "lockfile",
180
+ "changeType": "updated",
181
+ "before": "4.2.0",
182
+ "after": "4.3.0"
183
+ }
184
+ ],
185
+ "packageScriptChanges": [
186
+ {
187
+ "file": "package.json",
188
+ "scriptName": "postinstall",
189
+ "changeType": "added",
190
+ "after": "node scripts/bootstrap-agent.js"
191
+ },
192
+ {
193
+ "file": "package.json",
194
+ "scriptName": "test",
195
+ "changeType": "updated",
196
+ "before": "vitest run",
197
+ "after": "true"
198
+ }
199
+ ],
200
+ "policy": {
201
+ "path": ".patchdrill.yml",
202
+ "ignoredPaths": [
203
+ "dist/**",
204
+ "coverage/**"
205
+ ],
206
+ "failOn": "high",
207
+ "maxRisk": 69,
208
+ "ruleCount": 4,
209
+ "requiredCommandCount": 1,
210
+ "optionalCommandCount": 1
211
+ },
212
+ "codeOwners": {
213
+ "path": ".github/CODEOWNERS",
214
+ "ruleCount": 4
215
+ },
216
+ "baseline": {
217
+ "path": "main-patchdrill-report.json",
218
+ "previousStatus": "warn",
219
+ "currentStatus": "fail",
220
+ "previousRiskScore": 31,
221
+ "currentRiskScore": 94,
222
+ "riskDelta": 63,
223
+ "newFindingCount": 6,
224
+ "resolvedFindingCount": 0,
225
+ "unchangedFindingCount": 1
226
+ },
227
+ "findings": [
228
+ {
229
+ "ruleId": "workflow.pull-request-target-head-checkout",
230
+ "severity": "critical",
231
+ "title": "Privileged workflow checks out pull request code",
232
+ "detail": "A pull_request_target workflow can run untrusted pull request code while write tokens or repository secrets are available.",
233
+ "file": ".github/workflows/release.yml",
234
+ "line": 19,
235
+ "remediation": "Use pull_request for untrusted code, remove PR-head checkout, or split the privileged publishing step behind an environment gate.",
236
+ "tags": [
237
+ "ci",
238
+ "supply-chain",
239
+ "github-actions"
240
+ ]
241
+ },
242
+ {
243
+ "ruleId": "secret.generic-assignment",
244
+ "severity": "critical",
245
+ "title": "Secret-looking value added",
246
+ "detail": "A newly added environment example contains a value with a live-key shape. The demo redacts the actual token body.",
247
+ "file": ".env.example",
248
+ "line": 8,
249
+ "remediation": "Remove the value, rotate the credential if it was real, and use a non-secret placeholder such as <redacted>.",
250
+ "tags": [
251
+ "secret",
252
+ "credentials"
253
+ ]
254
+ },
255
+ {
256
+ "ruleId": "agent.control-file",
257
+ "severity": "high",
258
+ "title": "Agent instructions changed",
259
+ "detail": "Repository-level coding-agent instructions changed in the same patch as release and billing code.",
260
+ "file": "AGENTS.md",
261
+ "remediation": "Review instruction changes separately and require maintainer approval before agent-visible rules change.",
262
+ "tags": [
263
+ "agentic-coding",
264
+ "review"
265
+ ]
266
+ },
267
+ {
268
+ "ruleId": "file.high-impact-area",
269
+ "severity": "high",
270
+ "title": "High-impact product area changed",
271
+ "detail": "Billing checkout and webhook code changed, which can affect payment capture, refunds, and entitlement state.",
272
+ "file": "apps/web/src/billing/checkout.ts",
273
+ "remediation": "Attach targeted billing regression tests and owner approval.",
274
+ "tags": [
275
+ "billing",
276
+ "payments"
277
+ ]
278
+ },
279
+ {
280
+ "ruleId": "package-script.disabled-verification",
281
+ "severity": "high",
282
+ "title": "Verification script disabled: test",
283
+ "detail": "package.json verification script \"test\" now appears to exit successfully without running meaningful checks.",
284
+ "file": "package.json",
285
+ "remediation": "Restore the real verification command or explain why this repository no longer has that check.",
286
+ "tags": [
287
+ "testing",
288
+ "ci",
289
+ "package-script"
290
+ ]
291
+ },
292
+ {
293
+ "ruleId": "package-script.lifecycle",
294
+ "severity": "high",
295
+ "title": "Package lifecycle script changed: postinstall",
296
+ "detail": "package.json lifecycle script \"postinstall\" was added, creating code that can run during install, prepare, pack, or publish flows.",
297
+ "file": "package.json",
298
+ "remediation": "Review the script as executable supply-chain surface. Prefer explicit CI steps or documented commands over implicit install-time behavior.",
299
+ "tags": [
300
+ "dependencies",
301
+ "supply-chain",
302
+ "package-script"
303
+ ]
304
+ },
305
+ {
306
+ "ruleId": "test.source-without-test-change",
307
+ "severity": "medium",
308
+ "title": "Source changed without matching test changes",
309
+ "detail": "Billing source files changed, but no matching checkout or webhook test files changed.",
310
+ "file": "apps/web/src/billing/checkout.ts",
311
+ "remediation": "Add or update tests covering signed webhook verification, failed payment paths, and entitlement updates.",
312
+ "tags": [
313
+ "tests"
314
+ ]
315
+ },
316
+ {
317
+ "ruleId": "file.lockfile",
318
+ "severity": "low",
319
+ "title": "Dependency lockfile changed",
320
+ "detail": "@acme/payments changed from 4.2.0 to 4.3.0.",
321
+ "file": "package-lock.json",
322
+ "remediation": "Review release notes and verify transitive dependency impact.",
323
+ "tags": [
324
+ "dependencies"
325
+ ]
326
+ }
327
+ ],
328
+ "commandPlan": [
329
+ {
330
+ "id": "node-web-lint",
331
+ "label": "Lint affected web package",
332
+ "command": "npm run lint --workspace @acme/web",
333
+ "reason": "Billing and release-adjacent source files changed.",
334
+ "ecosystem": "node",
335
+ "required": true,
336
+ "packageName": "@acme/web",
337
+ "packagePath": "apps/web"
338
+ },
339
+ {
340
+ "id": "node-web-test",
341
+ "label": "Test affected web package",
342
+ "command": "npm test --workspace @acme/web",
343
+ "reason": "Billing checkout and webhook behavior changed.",
344
+ "ecosystem": "node",
345
+ "required": true,
346
+ "packageName": "@acme/web",
347
+ "packagePath": "apps/web"
348
+ },
349
+ {
350
+ "id": "node-web-build",
351
+ "label": "Build affected web package",
352
+ "command": "npm run build --workspace @acme/web",
353
+ "reason": "Production web package changed.",
354
+ "ecosystem": "node",
355
+ "required": true,
356
+ "packageName": "@acme/web",
357
+ "packagePath": "apps/web"
358
+ },
359
+ {
360
+ "id": "policy-release-review",
361
+ "label": "Release workflow review",
362
+ "command": "gh workflow view release.yml --yaml",
363
+ "reason": "Repository policy requires human-readable workflow evidence when privileged release jobs change.",
364
+ "ecosystem": "github-actions",
365
+ "required": true
366
+ },
367
+ {
368
+ "id": "node-web-e2e",
369
+ "label": "Billing browser e2e",
370
+ "command": "npm run test:e2e -- --grep billing",
371
+ "reason": "Optional browser coverage is available for checkout flows.",
372
+ "ecosystem": "node",
373
+ "required": false,
374
+ "packageName": "@acme/web",
375
+ "packagePath": "apps/web"
376
+ }
377
+ ],
378
+ "commandResults": [
379
+ {
380
+ "id": "node-web-lint",
381
+ "command": "npm run lint --workspace @acme/web",
382
+ "exitCode": 0,
383
+ "durationMs": 6240,
384
+ "stdout": "@acme/web lint: ok\n",
385
+ "stderr": ""
386
+ },
387
+ {
388
+ "id": "node-web-test",
389
+ "command": "npm test --workspace @acme/web",
390
+ "exitCode": 1,
391
+ "durationMs": 11982,
392
+ "stdout": "CheckoutService.test.ts: 38 passed, 1 failed\nWebhook signature regression: expected 401, received 200\n",
393
+ "stderr": "FAIL apps/web/src/billing/webhook.test.ts > rejects unsigned webhook payloads\n"
394
+ },
395
+ {
396
+ "id": "node-web-build",
397
+ "command": "npm run build --workspace @acme/web",
398
+ "exitCode": 0,
399
+ "durationMs": 18321,
400
+ "stdout": "vite v6.0.0 building for production...\nbuilt in 4.2s\n",
401
+ "stderr": ""
402
+ }
403
+ ],
404
+ "verification": {
405
+ "summary": {
406
+ "plannedRequired": 4,
407
+ "plannedOptional": 1,
408
+ "run": 3,
409
+ "passed": 2,
410
+ "failed": 1,
411
+ "timedOut": 0,
412
+ "missingRequired": 1,
413
+ "skippedOptional": 1,
414
+ "unplannedResults": 0
415
+ },
416
+ "commands": [
417
+ {
418
+ "id": "node-web-lint",
419
+ "label": "Lint affected web package",
420
+ "command": "npm run lint --workspace @acme/web",
421
+ "reason": "Billing and release-adjacent source files changed.",
422
+ "ecosystem": "node",
423
+ "required": true,
424
+ "planned": true,
425
+ "status": "passed",
426
+ "packageName": "@acme/web",
427
+ "packagePath": "apps/web",
428
+ "exitCode": 0,
429
+ "durationMs": 6240
430
+ },
431
+ {
432
+ "id": "node-web-test",
433
+ "label": "Test affected web package",
434
+ "command": "npm test --workspace @acme/web",
435
+ "reason": "Billing checkout and webhook behavior changed.",
436
+ "ecosystem": "node",
437
+ "required": true,
438
+ "planned": true,
439
+ "status": "failed",
440
+ "packageName": "@acme/web",
441
+ "packagePath": "apps/web",
442
+ "exitCode": 1,
443
+ "durationMs": 11982
444
+ },
445
+ {
446
+ "id": "node-web-build",
447
+ "label": "Build affected web package",
448
+ "command": "npm run build --workspace @acme/web",
449
+ "reason": "Production web package changed.",
450
+ "ecosystem": "node",
451
+ "required": true,
452
+ "planned": true,
453
+ "status": "passed",
454
+ "packageName": "@acme/web",
455
+ "packagePath": "apps/web",
456
+ "exitCode": 0,
457
+ "durationMs": 18321
458
+ },
459
+ {
460
+ "id": "policy-release-review",
461
+ "label": "Release workflow review",
462
+ "command": "gh workflow view release.yml --yaml",
463
+ "reason": "Repository policy requires human-readable workflow evidence when privileged release jobs change.",
464
+ "ecosystem": "github-actions",
465
+ "required": true,
466
+ "planned": true,
467
+ "status": "not-run"
468
+ },
469
+ {
470
+ "id": "node-web-e2e",
471
+ "label": "Billing browser e2e",
472
+ "command": "npm run test:e2e -- --grep billing",
473
+ "reason": "Optional browser coverage is available for checkout flows.",
474
+ "ecosystem": "node",
475
+ "required": false,
476
+ "planned": true,
477
+ "status": "skipped-optional",
478
+ "packageName": "@acme/web",
479
+ "packagePath": "apps/web"
480
+ }
481
+ ]
482
+ }
483
+ }
@@ -0,0 +1,140 @@
1
+ # PatchDrill Report
2
+
3
+ Status: **FAIL**
4
+ Risk score: **94/100**
5
+ Confidence score: **21/100**
6
+ Generated: 2026-06-01T00:00:00.000Z
7
+ Schema version: 1
8
+
9
+ ## Summary
10
+
11
+ - Changed files: 8
12
+ - Additions / deletions: +326 / -78
13
+ - Required verification commands: 4
14
+ - Failed verification commands: 1
15
+ - Verification evidence: 3 run, 2 passed, 1 failed, 0 timed out, 1 missing required, 1 optional skipped
16
+ - Added lines inspected: 326
17
+
18
+ ## Policy
19
+
20
+ - Config: .patchdrill.yml
21
+ - Ignored path patterns: 2
22
+ - Fail-on severity: high
23
+ - Max risk: 69
24
+ - Policy rules: 4
25
+ - Policy commands: 1 required, 1 optional
26
+
27
+ ## Code Owners
28
+
29
+ - Config: .github/CODEOWNERS
30
+ - Rules: 4
31
+
32
+ ## Baseline
33
+
34
+ - Baseline report: main-patchdrill-report.json
35
+ - Status: warn -> fail
36
+ - Risk: 31/100 -> 94/100 (+63)
37
+ - Findings: 6 new, 0 resolved, 1 unchanged
38
+
39
+ ## Project Signals
40
+
41
+ | Ecosystem | Framework | Entrypoint | Manifest | Package manager | Task runner |
42
+ | --- | --- | --- | --- | --- | --- |
43
+ | node | | | package.json | npm | |
44
+ | github-actions | | | .github/workflows/release.yml | | |
45
+
46
+ ## Affected Workspace Packages
47
+
48
+ | Package | Path |
49
+ | --- | --- |
50
+ | @acme/web | apps/web |
51
+
52
+ ## Dependency Changes
53
+
54
+ | File | Type | Package | Path | Change | Before | After |
55
+ | --- | --- | --- | --- | --- | --- | --- |
56
+ | package-lock.json | lockfile | yaml | node_modules/yaml | updated | 2.8.1 | 2.9.0 |
57
+ | package-lock.json | lockfile | @acme/payments | node_modules/@acme/payments | updated | 4.2.0 | 4.3.0 |
58
+
59
+ ## Package Script Changes
60
+
61
+ | File | Script | Change | Before | After |
62
+ | --- | --- | --- | --- | --- |
63
+ | package.json | `postinstall` | added | `` | `node scripts/bootstrap-agent.js` |
64
+ | package.json | `test` | updated | `vitest run` | `true` |
65
+
66
+ ## Changed Files
67
+
68
+ | File | Status | +/- | Owners |
69
+ | --- | --- | --- | --- |
70
+ | AGENTS.md | modified | +28 / -4 | @acme/platform |
71
+ | .github/workflows/release.yml | modified | +44 / -18 | @acme/platform |
72
+ | apps/web/src/billing/checkout.ts | modified | +83 / -21 | @acme/billing |
73
+ | apps/web/src/billing/webhook.ts | modified | +39 / -15 | @acme/billing |
74
+ | scripts/deploy.sh | modified | +27 / -8 | @acme/platform |
75
+ | .env.example | modified | +3 / -0 | @acme/platform |
76
+ | package.json | modified | +14 / -4 | @acme/platform |
77
+ | package-lock.json | modified | +88 / -8 | |
78
+
79
+ ## Findings
80
+
81
+ | Severity | Rule | Finding | Location | Remediation |
82
+ | --- | --- | --- | --- | --- |
83
+ | critical | workflow.pull-request-target-head-checkout | Privileged workflow checks out pull request code: A pull_request_target workflow can run untrusted pull request code while write tokens or repository secrets are available. | .github/workflows/release.yml:19 | Use pull_request for untrusted code, remove PR-head checkout, or split the privileged publishing step behind an environment gate. |
84
+ | critical | secret.generic-assignment | Secret-looking value added: A newly added environment example contains a value with a live-key shape. The demo redacts the actual token body. | .env.example:8 | Remove the value, rotate the credential if it was real, and use a non-secret placeholder such as &lt;redacted>. |
85
+ | high | agent.control-file | Agent instructions changed: Repository-level coding-agent instructions changed in the same patch as release and billing code. | AGENTS.md | Review instruction changes separately and require maintainer approval before agent-visible rules change. |
86
+ | high | file.high-impact-area | High-impact product area changed: Billing checkout and webhook code changed, which can affect payment capture, refunds, and entitlement state. | apps/web/src/billing/checkout.ts | Attach targeted billing regression tests and owner approval. |
87
+ | high | package-script.disabled-verification | Verification script disabled: test: package.json verification script "test" now appears to exit successfully without running meaningful checks. | package.json | Restore the real verification command or explain why this repository no longer has that check. |
88
+ | high | package-script.lifecycle | Package lifecycle script changed: postinstall: package.json lifecycle script "postinstall" was added, creating code that can run during install, prepare, pack, or publish flows. | package.json | Review the script as executable supply-chain surface. Prefer explicit CI steps or documented commands over implicit install-time behavior. |
89
+ | medium | test.source-without-test-change | Source changed without matching test changes: Billing source files changed, but no matching checkout or webhook test files changed. | apps/web/src/billing/checkout.ts | Add or update tests covering signed webhook verification, failed payment paths, and entitlement updates. |
90
+ | low | file.lockfile | Dependency lockfile changed: @acme/payments changed from 4.2.0 to 4.3.0. | package-lock.json | Review release notes and verify transitive dependency impact. |
91
+
92
+ ## Verification Plan
93
+
94
+ | Required | Package | Command | Result | Reason |
95
+ | --- | --- | --- | --- | --- |
96
+ | yes | @acme/web | `npm run lint --workspace @acme/web` | passed | Billing and release-adjacent source files changed. |
97
+ | yes | @acme/web | `npm test --workspace @acme/web` | failed (1) | Billing checkout and webhook behavior changed. |
98
+ | yes | @acme/web | `npm run build --workspace @acme/web` | passed | Production web package changed. |
99
+ | yes | | `gh workflow view release.yml --yaml` | not run | Repository policy requires human-readable workflow evidence when privileged release jobs change. |
100
+ | no | @acme/web | `npm run test:e2e -- --grep billing` | skipped optional | Optional browser coverage is available for checkout flows. |
101
+
102
+ ## Command Results
103
+
104
+ ### `npm run lint --workspace @acme/web`
105
+
106
+ - Exit code: 0
107
+ - Duration: 6240ms
108
+
109
+ ```text
110
+ @acme/web lint: ok
111
+ ```
112
+
113
+ ### `npm test --workspace @acme/web`
114
+
115
+ - Exit code: 1
116
+ - Duration: 11982ms
117
+
118
+ ```text
119
+ CheckoutService.test.ts: 38 passed, 1 failed
120
+ Webhook signature regression: expected 401, received 200
121
+ ```
122
+
123
+ ```text
124
+ FAIL apps/web/src/billing/webhook.test.ts > rejects unsigned webhook payloads
125
+ ```
126
+
127
+ ### `npm run build --workspace @acme/web`
128
+
129
+ - Exit code: 0
130
+ - Duration: 18321ms
131
+
132
+ ```text
133
+ vite v6.0.0 building for production...
134
+ built in 4.2s
135
+ ```
136
+
137
+ ## Reviewer Notes
138
+
139
+ - Treat this report as triage evidence, not a replacement for review.
140
+ - High-impact areas still need human sign-off even when automated commands pass.