dsh-security-assurance 0.1.0-rc.12

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 (60) hide show
  1. package/CHANGELOG.md +273 -0
  2. package/LICENSE +21 -0
  3. package/README.md +432 -0
  4. package/SECURITY.md +24 -0
  5. package/assets/security-assurance-evidence-flow.svg +200 -0
  6. package/cordis.patch.yml +43 -0
  7. package/lib/analyzer.js +2090 -0
  8. package/lib/conformance.js +2525 -0
  9. package/lib/contracts.js +1852 -0
  10. package/lib/control-plane-provider.js +2103 -0
  11. package/lib/evaluation.js +3062 -0
  12. package/lib/host-repository-provider.js +1963 -0
  13. package/lib/index.js +12665 -0
  14. package/lib/invariant.js +2111 -0
  15. package/lib/release-assemble.js +2015 -0
  16. package/lib/release-bind.js +285 -0
  17. package/lib/release-collect.js +379 -0
  18. package/lib/release-file-bindings.js +75 -0
  19. package/lib/release-handoff.js +2192 -0
  20. package/lib/release-promotion.js +67 -0
  21. package/lib/release-proof.js +127 -0
  22. package/lib/release-qualification.js +1754 -0
  23. package/lib/release-qualify.js +3131 -0
  24. package/lib/tools.js +3285 -0
  25. package/lib/typert.host.d.ts +3 -0
  26. package/lib/typert.host.js +3040 -0
  27. package/lib/typert.remote-client.d.ts +57 -0
  28. package/lib/typert.remote-client.js +2290 -0
  29. package/lib/types/analyzer.d.ts +155 -0
  30. package/lib/types/analyzer.d.ts.map +1 -0
  31. package/lib/types/conformance.d.ts +64 -0
  32. package/lib/types/conformance.d.ts.map +1 -0
  33. package/lib/types/contracts.d.ts +1345 -0
  34. package/lib/types/contracts.d.ts.map +1 -0
  35. package/lib/types/control-plane-provider.d.ts +20 -0
  36. package/lib/types/control-plane-provider.d.ts.map +1 -0
  37. package/lib/types/digest-envelope.d.ts +11 -0
  38. package/lib/types/digest-envelope.d.ts.map +1 -0
  39. package/lib/types/evaluation.d.ts +22399 -0
  40. package/lib/types/evaluation.d.ts.map +1 -0
  41. package/lib/types/host-repository-provider.d.ts +55 -0
  42. package/lib/types/host-repository-provider.d.ts.map +1 -0
  43. package/lib/types/index.d.ts +122 -0
  44. package/lib/types/index.d.ts.map +1 -0
  45. package/lib/types/invariant.d.ts +6 -0
  46. package/lib/types/invariant.d.ts.map +1 -0
  47. package/lib/types/release-file-bindings.d.ts +54 -0
  48. package/lib/types/release-file-bindings.d.ts.map +1 -0
  49. package/lib/types/release-promotion.d.ts +42 -0
  50. package/lib/types/release-promotion.d.ts.map +1 -0
  51. package/lib/types/release-proof.d.ts +231 -0
  52. package/lib/types/release-proof.d.ts.map +1 -0
  53. package/lib/types/release-qualification.d.ts +39 -0
  54. package/lib/types/release-qualification.d.ts.map +1 -0
  55. package/lib/types/tools.d.ts +139 -0
  56. package/lib/types/tools.d.ts.map +1 -0
  57. package/lib/types/workbench-remote.d.ts +216 -0
  58. package/lib/types/workbench-remote.d.ts.map +1 -0
  59. package/lib/workbench-remote.js +442 -0
  60. package/package.json +230 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,273 @@
1
+ # Changelog
2
+
3
+ ## [Unreleased]
4
+
5
+ ## [0.1.0-rc.12] - 2026-09-09
6
+
7
+ - Resolve packaged release CLI entry points through their real filesystem path
8
+ so npm's POSIX `.bin` symlinks execute binding, collection, assembly,
9
+ qualification, and promotion-handoff commands instead of exiting silently.
10
+ The release-evidence workflow now also fails if collection produces no index.
11
+ - Admit DeepSeek Harness `0.1.5-rc.1` into the closed verified compatibility
12
+ set after its dynamically discovered lanes passed every non-admission
13
+ composition check. Admit its Cordis `4.0.2` runtime through the existing
14
+ compatible `4.0.x` line, and keep package peers plus bilingual support
15
+ documentation aligned with the exact-version invariant.
16
+ - Admit DeepSeek Harness `0.1.5-alpha.2` into the closed verified
17
+ compatibility set after its dynamically discovered lanes passed every
18
+ non-admission composition check. Adapt the test Inbox double to the public
19
+ Agent contract and preserve Security error codes across Harness's bundled
20
+ ToolRuntime boundary. Keep the package peer range and bilingual support
21
+ documentation aligned with the exact-version invariant.
22
+
23
+ - Admit DeepSeek Harness `0.1.3-alpha.2` and `0.1.5-alpha.1` into the closed
24
+ verified compatibility set after their dynamically discovered lanes passed
25
+ build and all non-admission joint checks, reaching only the expected
26
+ exact-version invariant. Keep peer declarations and bilingual support docs
27
+ aligned while retaining `0.1.2-alpha.1` as the primary target.
28
+ - Bound GitHub Actions supply-chain Candidate emission to the largest set that
29
+ fits the v1 sealed Evidence and bundle-record budgets. Higher-cardinality
30
+ workflows now seal fail-closed with explicit incomplete Coverage instead of
31
+ becoming operationally `BLOCKED` during Evidence publication. Advance the
32
+ corrected Analyzer to version `1.0.1`, method `v2`, and qualification `v2`.
33
+ - Add the bundled PURE `security/npm-publish-surface` Policy for
34
+ `REPOSITORY` and `CHANGE` Assessments. It verifies the frozen root
35
+ `package.json` publish identity, public access, explicit files allowlist,
36
+ and containment of `exports`, `main`, `types`, and `bin` targets.
37
+ - Independently re-derive the complete npm publish surface Contribution before
38
+ Coverage or Findings become verdict-bearing. Malformed, duplicate, broad, or
39
+ tampered manifest input fails closed; v1 does not claim actual `npm pack`
40
+ contents, file existence, provenance, or dependency safety.
41
+ - Add the bundled PURE `security/pnpm-lockfile-integrity` Policy for
42
+ `REPOSITORY` and `CHANGE` Assessments. It verifies the frozen root
43
+ `package.json` and pnpm v9 lockfile, requires an exact package-manager pin,
44
+ exact importer specifier parity, and valid SRI for every package resolution.
45
+ - Independently re-derive the complete lockfile Contribution before Coverage
46
+ or Findings become verdict-bearing. Missing or drifted locks produce
47
+ blocking Findings, while malformed, aliased, unsupported, or tampered input
48
+ fails closed without publishing contributed prose or private package names.
49
+ - Add the bundled PURE `security/github-actions-supply-chain` Policy for
50
+ `REPOSITORY`, `CHANGE`, and `TARGETED` Assessments. It reads only verified
51
+ frozen workflow YAML, requires explicit read-only token permissions, full
52
+ commit pins for external Actions and reusable workflows, and SHA-256 digest
53
+ pins for container Actions.
54
+ - Re-run the complete YAML analysis in an independent package-owned Validation
55
+ Contract before Coverage or Findings become verdict-bearing. Malformed,
56
+ aliased, structurally unsupported, or tampered input fails closed without
57
+ publishing attacker-controlled workflow prose.
58
+ - Add a packaged `release:handoff` verifier and a versioned public promotion
59
+ receipt contract. It binds a verified `PROMOTE` qualification portfolio to
60
+ the retained RC tarball, compares a proposed stable tarball entry by entry,
61
+ permits only the exact RC-to-stable version-token transition plus bounded
62
+ README/CHANGELOG release metadata, and emits an explicitly non-authorizing
63
+ receipt without tagging, signing, uploading, or publishing.
64
+ - Add a packaged `release:assemble` adapter and side-effect-free qualification
65
+ input contracts. The adapter re-verifies the deterministic proof index,
66
+ binding bytes, candidate identity, and referenced proof-record bytes before
67
+ merging proofs without status reinterpretation into the exact input consumed
68
+ by the existing qualification CLI. It does not qualify or promote a release.
69
+
70
+ ## [0.1.0-rc.11] - 2026-09-05
71
+
72
+ - Add a manual exact-artifact release-evidence workflow that packs and binds
73
+ one candidate, reuses its retained tarballs for Linux, macOS, and Windows
74
+ profile proofs, and collects the three records with the packaged CLI without
75
+ tagging or publishing.
76
+ - Admit DeepSeek Harness `0.1.3-alpha.1` into the closed verified compatibility
77
+ set after its dual-plugin semantic matrix passed outside the exact-version
78
+ invariant; keep peer declarations and bilingual support documentation aligned.
79
+ Harden packed-profile teardown with bounded retries for transient Windows
80
+ `EBUSY`, `ENOTEMPTY`, `EPERM`, and `EACCES` directory locks after Web exits.
81
+ - Add strict exact-artifact `ReleaseProofRecordV1` records, optional packed
82
+ profile and real-browser proof emission, and a packaged `release:collect`
83
+ CLI that validates candidate identity, rejects duplicate proof claims, hashes
84
+ the raw record bytes, and produces a deterministic Manifest-ready proof
85
+ index. The current package correctly records Workbench proof as inconclusive
86
+ because ADR 0307 excludes the retired client from this candidate. Supplied
87
+ candidates are proved against the exact installed snapshot, retained-source
88
+ drift fails closed, and Workbench records require an explicit client-shipped
89
+ assertion.
90
+ - Add packaged release binding and exact-artifact qualification CLIs. The
91
+ deterministic binder records a clean source `HEAD`, candidate tarball bytes,
92
+ and dependency-lock bytes without manufacturing proof; qualification
93
+ independently rereads those files before assembling the existing Release
94
+ Evidence Manifest, public Security Scorecard, and compact atomic verdict.
95
+ Only a verified manifest plus a `PROMOTE` Release Constitution exits zero;
96
+ valid blocked or incomplete evidence remains auditable and exits non-zero.
97
+ - Scope duplicate security-key detection to the root `scripts` property and
98
+ its direct `preinstall`, `install`, and `postinstall` properties, so legal
99
+ dependency package names such as `scripts` or `install` cannot make an
100
+ Assessment indeterminate. Advance the corrected built-in Analyzer to
101
+ version `1.1.1` and qualification `v3` with a new method and qualification
102
+ digest.
103
+ - Add fail-closed `TARGETED` Assessments for
104
+ `security/node-package-lifecycle`: the Service freezes and digest-binds the
105
+ complete Subject, requires every explicit relative file or directory to
106
+ exist, and exposes only verified in-target `package.json` slices to the
107
+ bundled PURE Analyzer.
108
+ - Seal an existing Target without an analyzable package manifest as
109
+ `INDETERMINATE`, keep npm audit and Gitleaks report policies unsupported in
110
+ `TARGETED` until their external scan scope can be independently verified,
111
+ and qualify the broadened built-in Analyzer as version `1.1.0` under
112
+ qualification `v2`.
113
+ - Support DeepSeek Harness `0.1.2-alpha.2` through `0.1.2-rc.1` alongside
114
+ the primary `0.1.2-alpha.1` target as an explicit, verified set: the
115
+ composition invariant admits one coherent supported release, rejects mixed
116
+ supported-package versions, and keeps failing closed on any other Harness
117
+ runtime; peer declarations list the exact versions.
118
+ - Read the live Session event log through a capability-tolerant seam that
119
+ accepts both the `Session.events` getter (`0.1.2-alpha.1` to
120
+ `0.1.2-alpha.3`) and its `snapshotEvents()` successor (`0.1.2-alpha.4`),
121
+ failing closed when neither shape is present, and accept both legacy and
122
+ `gateway/`-namespaced typert gateway error codes in Workbench Remote
123
+ negative-path assertions (`0.1.2-alpha.2` namespaced them).
124
+ - Add the scheduled Harness Compatibility workflow: daily discovery of the
125
+ official Harness tags feeds an auditable, peeled-commit-pinned matrix that
126
+ also runs for product-code changes and executes the dual-plugin
127
+ joint E2E (Mission, Developer workspace change, CHANGE Assessment, sealed
128
+ submission, Quality Gate with SATISFIED / FAILED / INDETERMINATE
129
+ propagation) plus a packed dual-tarball fresh-profile installation and Web
130
+ probe, across Ubuntu, macOS, and Windows on the primary target and Ubuntu
131
+ on the remaining versions, on Node 22 and 24. Newly published Harness tags
132
+ enter verification automatically and fail closed until admitted; a manual
133
+ dispatch accepts one Harness ref for debugging.
134
+ - Run Control Plane-owned Mission assessments as Host-bound `CHANGE` against
135
+ the exact produced workspace, independently verifying branch, baseline HEAD,
136
+ Git status fingerprint, byte-exact produced-change fingerprint, and the full
137
+ resulting tree before any Assessment is created.
138
+ - Support exact-commit `CHANGE` Assessments for the bundled Node lifecycle and
139
+ npm audit policies by evaluating the complete frozen head tree as a safe
140
+ superset of the Policy impact cone.
141
+ - Build the linked Control Plane and generated Security Assurance package
142
+ entries before fresh-checkout typechecking, removing reliance on stale local
143
+ `lib` artifacts across Linux, macOS, and Windows CI.
144
+ - Restore writable modes only while reaping system-temporary test fixtures so
145
+ immutable Subject snapshots remain enforced without causing POSIX teardown
146
+ failures; linked directories are removed without traversing their targets.
147
+ - Canonicalize cross-platform Export fixture roots, observe asynchronous
148
+ Delivery to its terminal status, and give shared-runner integration tests
149
+ explicit bounded timeout budgets.
150
+ - Make temporary-fixture teardown idempotent under concurrent background
151
+ staging reaping, and keep Assessment-list pagination fixtures sequential.
152
+ - Add a bundled PURE npm audit JSON normalization adapter that consumes
153
+ digest-verified `npm-audit.json` Subject slices without executing
154
+ npm or using network authority.
155
+ - Independently re-derive npm audit Candidate fields and Coverage from the
156
+ frozen report, bind Evidence producer/path/digest/entries, accept verified
157
+ clean zero-Candidate reports, and fail closed on missing or fabricated input.
158
+ - Add a bundled PURE Gitleaks v8 JSON normalization adapter for
159
+ `security/secret-leak-audit`, with exact frozen-report binding and an
160
+ independent entry-for-entry Coverage and Candidate verifier.
161
+ - Retain only rule identity, affected path, and location from Gitleaks input;
162
+ discard secret values, matches, source lines, secret hashes, author identity,
163
+ email, and commit prose before Evidence, Findings, Seals, queries, or exports,
164
+ including when a contributed result is rejected as tampered.
165
+ - Accept a verified empty Gitleaks report as complete Coverage, map every
166
+ independently validated report entry to a HIGH blocking Finding, and fail
167
+ closed on missing, malformed, contradictory, or fabricated reports in both
168
+ `REPOSITORY` and exact-commit `CHANGE` Assessments.
169
+ - Add public Linux, macOS, and Windows CI with a fresh packed-profile
170
+ installation and live Web probe, and make linting part of the release gate.
171
+ - Retry transient Windows directory locks while reaping abandoned Subject
172
+ staging trees, with deterministic regression coverage.
173
+ - Derive the packed-profile provider-version assertion from the package
174
+ manifest and align the current Harness qualification documentation.
175
+
176
+ ## [0.1.0-rc.10] - 2026-08-31
177
+
178
+ - Route Subject Freeze Git operations through the Harness-managed subprocess
179
+ capability, including credential-scrubbed environment inheritance,
180
+ tree-scoped cancellation, bounded output and quiescent teardown.
181
+ - Preserve configuration and health redaction coverage while constructing
182
+ explicitly fake credential fixtures at test runtime.
183
+
184
+ ## [0.1.0-rc.9] - 2026-08-31
185
+
186
+ - Route explicit top-level security audit requests through the catalog-first
187
+ Security tool workflow while avoiding duplicate standalone assessments for
188
+ Control Plane-owned work.
189
+ - Add the `/security [scope]` Web/CLI command, which submits a normalized
190
+ standalone Assessment request and rejects delegated-role invocation.
191
+
192
+ ## [0.1.0-rc.8] - 2026-08-30
193
+
194
+ - Re-derive coverage digests and Policy bindings at the seal-readiness seam.
195
+ - Bound private evidence and sealed-artifact reads through regular-file handles.
196
+ - Reap abandoned Subject staging trees and retry transient Windows publication
197
+ locks without misclassifying them as collisions.
198
+ - Enforce evidence-link eligibility and expiry before bounded disclosure.
199
+ - Harden evaluation identity/uncertainty bounds, risk-acceptance expiry at the
200
+ actual seal-finalization instant, SQLite schema constraints, and duplicate
201
+ lifecycle-key parsing.
202
+
203
+ ## [0.1.0-rc.7] - 2026-08-30
204
+
205
+ - Bind Control Plane Assessment start idempotency to the configured Repository
206
+ so a provider reconfiguration cannot alias or orphan another start identity.
207
+ - Require explicit Critical and High benchmark strata before effectiveness or
208
+ non-inferiority evidence can be measured.
209
+ - Reject multiplicative air-gapped evaluation inputs under one combined work
210
+ budget and replace nested adjudication scans with indexed identity lookups.
211
+
212
+ ## [0.1.0-rc.6] - 2026-08-30
213
+
214
+ - Keep generic external Analyzer clean claims advisory until an independent
215
+ Evidence verifier can bind their content to the frozen Subject and Policy.
216
+ - Derive omitted Host Repository idempotency keys from the full canonical root
217
+ with SHA-256, avoiding truncated reversible path identities.
218
+ - Canonicalize and validate Host Repository roots before registration.
219
+
220
+ ## [0.1.0-rc.5] - 2026-08-30
221
+
222
+ - Reject workspace snapshots that traverse ancestor symlinks/junctions and
223
+ bound file reads to the Subject byte limit.
224
+ - Fence all revision-advancing writes and recovery around pending cancellation.
225
+ - Recompute release paired comparisons, require pre-registered non-inferiority
226
+ plans, and reject a vacuous margin of `1.0`.
227
+ - Require package-issued authority channels and invariant owners; bootstrap
228
+ failures now install a required fail-closed health check.
229
+
230
+ ## [0.1.0-rc.4] - 2026-08-30
231
+
232
+ - Align the direct-use pair with Engineering Control Plane `0.1.3`, whose
233
+ qualified Web role policies use only tools registered by Harness
234
+ `0.1.2-alpha.1`.
235
+
236
+ ## [0.1.0-rc.3] - 2026-08-30
237
+
238
+ - Fence direct-use invariant activation on durable Host repository bootstrap.
239
+ - Make the Host Repository Provider activation promise reflect registration
240
+ success or failure instead of reporting an active Loader row prematurely.
241
+ - Extend the packed Web-profile smoke gate to require one enabled
242
+ `current-workspace` Repository in the real Security persistence store.
243
+
244
+ ## [0.1.0-rc.2] - 2026-08-30
245
+
246
+ - Add a direct-use Harness bundle for the launcher cwd and enable the Host,
247
+ invariant, Repository Provider, tool, and optional Control Plane rows.
248
+ - Resolve Control Plane integration through stable Host repository binding IDs.
249
+ - Add bounded Repository selection and Security Catalog model tools.
250
+ - Export a Schemastery `Config` schema and qualify Harness `0.1.2-alpha.1`.
251
+
252
+ All notable changes to this project are documented in this file.
253
+
254
+ ## [0.1.0-rc.1] - 2026-08-29
255
+
256
+ ### Added
257
+
258
+ - Evidence-backed Security Assessment lifecycle with versioned public
259
+ contracts, immutable receipts and snapshots, revision CAS, idempotency,
260
+ bounded waits, cancellation, restart recovery, and fail-closed persistence.
261
+ - Governed analyzer, role, evidence, finding, risk-decision, export, sealed
262
+ bundle, and Assurance Submission flows.
263
+ - Dormant-by-default Harness bundle entries, model tools, Typert remote
264
+ adapter, bilingual browser Workbench, runtime invariant, and optional
265
+ Engineering Control Plane provider integration.
266
+ - Pure evaluation, release-constitution, public scorecard, evidence-manifest,
267
+ and capability-conformance modules.
268
+ - Packed fresh-consumer smoke coverage and packed real-browser Harness E2E.
269
+
270
+ ### Release status
271
+
272
+ - This is the first v0.1 acceptance candidate. Stable `0.1.0` remains pending
273
+ the manual and platform qualification described in `docs/release-v0.1.md`.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DSH contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.