@lornatang/dsh-codex-security 0.1.7 → 0.1.8

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 (55) hide show
  1. package/CHANGELOG.md +118 -103
  2. package/README.md +196 -189
  3. package/README.zh.md +196 -189
  4. package/docs/ARCHITECTURE.md +59 -53
  5. package/docs/ARTIFACTS.md +49 -46
  6. package/docs/CODEX-COMPATIBILITY.md +17 -0
  7. package/docs/SPEC.md +43 -43
  8. package/docs/TOOLS.md +364 -341
  9. package/docs/VALIDATION.md +33 -31
  10. package/docs/superpowers/plans/2026-11-16-deep-scan.md +71 -0
  11. package/docs/superpowers/specs/2026-11-16-deep-scan-design.md +31 -0
  12. package/lib/constants.js +3 -3
  13. package/lib/contracts.js +114 -34
  14. package/lib/deep-coordinator.js +599 -0
  15. package/lib/deep-host.js +36 -0
  16. package/lib/deep-worker.js +254 -0
  17. package/lib/git.js +24 -22
  18. package/lib/index.js +23 -1
  19. package/lib/secure-read.js +229 -0
  20. package/lib/service.js +403 -62
  21. package/lib/state-lock.js +71 -0
  22. package/lib/store.js +33 -15
  23. package/lib/target.js +33 -13
  24. package/lib/tools.js +54 -19
  25. package/lib/types/constants.d.ts +1 -1
  26. package/lib/types/contracts.d.ts +5 -2
  27. package/lib/types/deep-coordinator.d.ts +70 -0
  28. package/lib/types/deep-host.d.ts +32 -0
  29. package/lib/types/deep-worker.d.ts +110 -0
  30. package/lib/types/git.d.ts +10 -10
  31. package/lib/types/index.d.ts +1 -1
  32. package/lib/types/secure-read.d.ts +15 -0
  33. package/lib/types/service.d.ts +20 -4
  34. package/lib/types/state-lock.d.ts +9 -0
  35. package/lib/types/store.d.ts +5 -2
  36. package/lib/types/target.d.ts +1 -0
  37. package/lib/types/tools.d.ts +3 -2
  38. package/lib/types/types.d.ts +42 -7
  39. package/lib/types/util.d.ts +4 -0
  40. package/lib/types/worker-preset.d.ts +18 -0
  41. package/lib/util.js +27 -4
  42. package/lib/worker-preset.js +8 -0
  43. package/package.json +131 -123
  44. package/schemas/coverage.schema.json +136 -134
  45. package/skills/README.md +122 -116
  46. package/skills/assess-patch-risk/SKILL.md +10 -0
  47. package/skills/attack-path-analysis/SKILL.md +10 -0
  48. package/skills/deep-security-scan/SKILL.md +15 -116
  49. package/skills/define-security-policy/SKILL.md +10 -0
  50. package/skills/finding-discovery/SKILL.md +10 -0
  51. package/skills/fix-finding/SKILL.md +14 -112
  52. package/skills/propose-security-hardening/SKILL.md +10 -0
  53. package/skills/track-findings/SKILL.md +12 -113
  54. package/skills/validation/SKILL.md +10 -0
  55. package/skills/verify-fix/SKILL.md +14 -108
package/CHANGELOG.md CHANGED
@@ -1,103 +1,118 @@
1
- # Changelog
2
-
3
- ## [0.1.7] - 2026-11-16
4
-
5
- ### Fixed
6
-
7
- - Load platform-specific native export binaries without dependency install scripts,
8
- so a new DSH profile can install the bundle under pnpm's default build policy.
9
-
10
- ## [0.1.6] - 2026-11-15
11
-
12
- ### Changed
13
-
14
- - Allow safe links inside scan storage and Git metadata while rejecting direct or transitive aliases of an export destination.
15
- - Reduce duplicate protected-tree checks and inspect reachable directories concurrently with bounded work.
16
- - Add cross-platform tests for linked directories, cycles, dangling targets and concurrent retargeting.
17
-
18
- ## [0.1.5] - 2026-11-15
19
-
20
- ### Fixed
21
-
22
- - Revalidate scan storage and Git metadata at export checkpoints, including when a directory snapshot becomes a Git repository.
23
- - Reject aliases inside protected storage and logical output paths that escape through links.
24
- - Cover POSIX moves, protected-root changes and Git metadata redirection with cross-platform regression tests.
25
-
26
- ## [0.1.4] - 2026-11-15
27
-
28
- ### Fixed
29
-
30
- - Pin export directory identities across parent creation, exclusive publication and cleanup, detecting directory moves while preserving existing export boundaries.
31
- - Add cross-process race tests and Linux, macOS and Windows CI coverage. This release is available on GitHub only; no npm version is published.
32
-
33
- ## [0.1.3] - 2026-11-15
34
-
35
- ### Fixed
36
-
37
- - Prevent exports from replacing existing files or escaping through symlinked directories, and return complete large export documents.
38
- - Include a GitHub release archive; npm is not published for this release.
39
-
40
- All notable changes to this project will be documented in this file.
41
-
42
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
43
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
44
-
45
- ## [0.1.2] - 2026-11-15
46
-
47
- ### Fixed
48
-
49
- - Declare the required DSH skill service and register loadable bundled skills.
50
- - Validate tool arguments and JSON output through the real DSH host contract.
51
- - Bind accurate target scopes, file contents and complete Git diffs, including untracked files.
52
- - Require explicit review coverage and diff dispositions before sealing; reject changed targets,
53
- incompatible comparisons and writes to sealed artifacts.
54
- - Serialize scan mutations, rebuild missing indexes and validate sealed JSON against the bundled schemas.
55
-
56
- ### Added
57
-
58
- - A default-mode start tool, a diff review-item update tool and real-host regression tests.
59
-
60
- ### Changed
61
-
62
- - Publish the plugin as the scoped npm package `@lornatang/dsh-codex-security`. The
63
- initial bare `dsh-codex-security@0.1.0` publish is deprecated in favour of the scoped
64
- name; install with `dsh plugin --profile <profile> add @lornatang/dsh-codex-security`.
65
- - Ship the English documentation and examples with the package; align the architecture,
66
- tool reference and skill workflows with the implementation.
67
- - Rewrite the README to the package-bundle documentation convention and add a Chinese
68
- translation; the package now ships `README.md` and `README.zh.md`.
69
- - Publish `cordis.patch.yml` through the package `exports` map.
70
-
71
- ## [0.1.0] - 2026-11-13
72
-
73
- Initial public release of the DeepSeek Harness port of the codex-security scan model.
74
-
75
- ### Added
76
-
77
- - DSH plugin `codex-security` (`dsh-codex-security`) with a loader patch row,
78
- a host plugin entry point, HTTP routes under `/plugins/codex-security` and a
79
- **Codex Security** settings section in the web UI.
80
- - 27 `codex_security_*` host tools covering setup/target inspection, standard,
81
- prompt-only and deep scan lifecycle, discovery candidates, validations, attack
82
- paths, artifacts, drafts, findings and triage, diff review items, export and scan
83
- comparison.
84
- - Ten agent skills registered from `skills/`: `security-scan`,
85
- `security-diff-scan`, `deep-security-scan`, `fix-finding`, `verify-fix`,
86
- `triage-finding`, `threat-model`, `track-findings`,
87
- `resolve-dependency-alert` and `vulnerability-writeup`.
88
- - Sealed scan contract adapted from OpenAI codex-security: `findings.json`,
89
- `coverage.json`, `scan-manifest.json` and `report.md`, with stable
90
- `csf_`/`occ_` ids and `codex-security/v1` fingerprints.
91
- - Deep-scan orchestration with worker count, discovery-run budget,
92
- stop-after-no-new and time limits recorded on the scan.
93
- - Diff scanning for pull requests, commit ranges, branches and working trees, with
94
- per-file review items.
95
- - Exports in SARIF 2.1.0, JSON, CSV and Markdown, plus a `failOnSeverity`
96
- policy gate.
97
- - Web workbench: status header, scan list, findings table with severity chips and
98
- triage state, coverage summary and export links.
99
- - Configuration through Schemastery: `stateDir`, `maxFiles`, `maxFileBytes`,
100
- `defaultMode`, `failOnSeverity`, `allowExportOutsideWorkspace`,
101
- `maxScanAgeDays`, `deepWorkers` and `deepMaxDiscoveryRuns`.
102
- - Documentation: README, architecture, tool reference,
103
- artifact contract, validation guide, and a GitHub Actions CI workflow.
1
+ # Changelog
2
+
3
+ ## [0.1.8] - 2026-11-16
4
+
5
+ ### Added
6
+
7
+ - Coordinate independent, restricted Deep review workers with bounded concurrency, attempts, no-new stopping and wall-clock time.
8
+ - Persist campaign progress and recovery claims, with authenticated cross-process resume and cancellation.
9
+ - Add Codex-compatible skill workflows and artifact contracts, plus cross-platform worker, recovery and concurrency tests.
10
+
11
+ ### Fixed
12
+
13
+ - Bind worker reads and evidence to verified target objects and file snapshots; keep incomplete coverage and conflicting findings visible.
14
+ - Serialize shared indexes and scan mutations across processes and tolerate transient Windows file-sharing conflicts during atomic replacement.
15
+ - Fail closed when target inventory cannot be enumerated or Git metadata cannot be resolved.
16
+ - Use the macOS 26 ARM runner when macOS 15 ARM runners are unavailable.
17
+
18
+ ## [0.1.7] - 2026-11-16
19
+
20
+ ### Fixed
21
+
22
+ - Load platform-specific native export binaries without dependency install scripts,
23
+ so a new DSH profile can install the bundle under pnpm's default build policy.
24
+
25
+ ## [0.1.6] - 2026-11-15
26
+
27
+ ### Changed
28
+
29
+ - Allow safe links inside scan storage and Git metadata while rejecting direct or transitive aliases of an export destination.
30
+ - Reduce duplicate protected-tree checks and inspect reachable directories concurrently with bounded work.
31
+ - Add cross-platform tests for linked directories, cycles, dangling targets and concurrent retargeting.
32
+
33
+ ## [0.1.5] - 2026-11-15
34
+
35
+ ### Fixed
36
+
37
+ - Revalidate scan storage and Git metadata at export checkpoints, including when a directory snapshot becomes a Git repository.
38
+ - Reject aliases inside protected storage and logical output paths that escape through links.
39
+ - Cover POSIX moves, protected-root changes and Git metadata redirection with cross-platform regression tests.
40
+
41
+ ## [0.1.4] - 2026-11-15
42
+
43
+ ### Fixed
44
+
45
+ - Pin export directory identities across parent creation, exclusive publication and cleanup, detecting directory moves while preserving existing export boundaries.
46
+ - Add cross-process race tests and Linux, macOS and Windows CI coverage. This release is available on GitHub only; no npm version is published.
47
+
48
+ ## [0.1.3] - 2026-11-15
49
+
50
+ ### Fixed
51
+
52
+ - Prevent exports from replacing existing files or escaping through symlinked directories, and return complete large export documents.
53
+ - Include a GitHub release archive; npm is not published for this release.
54
+
55
+ All notable changes to this project will be documented in this file.
56
+
57
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
58
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
59
+
60
+ ## [0.1.2] - 2026-11-15
61
+
62
+ ### Fixed
63
+
64
+ - Declare the required DSH skill service and register loadable bundled skills.
65
+ - Validate tool arguments and JSON output through the real DSH host contract.
66
+ - Bind accurate target scopes, file contents and complete Git diffs, including untracked files.
67
+ - Require explicit review coverage and diff dispositions before sealing; reject changed targets,
68
+ incompatible comparisons and writes to sealed artifacts.
69
+ - Serialize scan mutations, rebuild missing indexes and validate sealed JSON against the bundled schemas.
70
+
71
+ ### Added
72
+
73
+ - A default-mode start tool, a diff review-item update tool and real-host regression tests.
74
+
75
+ ### Changed
76
+
77
+ - Publish the plugin as the scoped npm package `@lornatang/dsh-codex-security`. The
78
+ initial bare `dsh-codex-security@0.1.0` publish is deprecated in favour of the scoped
79
+ name; install with `dsh plugin --profile <profile> add @lornatang/dsh-codex-security`.
80
+ - Ship the English documentation and examples with the package; align the architecture,
81
+ tool reference and skill workflows with the implementation.
82
+ - Rewrite the README to the package-bundle documentation convention and add a Chinese
83
+ translation; the package now ships `README.md` and `README.zh.md`.
84
+ - Publish `cordis.patch.yml` through the package `exports` map.
85
+
86
+ ## [0.1.0] - 2026-11-13
87
+
88
+ Initial public release of the DeepSeek Harness port of the codex-security scan model.
89
+
90
+ ### Added
91
+
92
+ - DSH plugin `codex-security` (`dsh-codex-security`) with a loader patch row,
93
+ a host plugin entry point, HTTP routes under `/plugins/codex-security` and a
94
+ **Codex Security** settings section in the web UI.
95
+ - 27 `codex_security_*` host tools covering setup/target inspection, standard,
96
+ prompt-only and deep scan lifecycle, discovery candidates, validations, attack
97
+ paths, artifacts, drafts, findings and triage, diff review items, export and scan
98
+ comparison.
99
+ - Ten agent skills registered from `skills/`: `security-scan`,
100
+ `security-diff-scan`, `deep-security-scan`, `fix-finding`, `verify-fix`,
101
+ `triage-finding`, `threat-model`, `track-findings`,
102
+ `resolve-dependency-alert` and `vulnerability-writeup`.
103
+ - Sealed scan contract adapted from OpenAI codex-security: `findings.json`,
104
+ `coverage.json`, `scan-manifest.json` and `report.md`, with stable
105
+ `csf_`/`occ_` ids and `codex-security/v1` fingerprints.
106
+ - Deep-scan orchestration with worker count, discovery-run budget,
107
+ stop-after-no-new and time limits recorded on the scan.
108
+ - Diff scanning for pull requests, commit ranges, branches and working trees, with
109
+ per-file review items.
110
+ - Exports in SARIF 2.1.0, JSON, CSV and Markdown, plus a `failOnSeverity`
111
+ policy gate.
112
+ - Web workbench: status header, scan list, findings table with severity chips and
113
+ triage state, coverage summary and export links.
114
+ - Configuration through Schemastery: `stateDir`, `maxFiles`, `maxFileBytes`,
115
+ `defaultMode`, `failOnSeverity`, `allowExportOutsideWorkspace`,
116
+ `maxScanAgeDays`, `deepWorkers` and `deepMaxDiscoveryRuns`.
117
+ - Documentation: README, architecture, tool reference,
118
+ artifact contract, validation guide, and a GitHub Actions CI workflow.