@openai/codex-security 0.5.1 → 0.6.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 (173) hide show
  1. package/README.md +86 -2
  2. package/_bundled_plugin/mcp/helpers.mjs.br.part-000 +0 -0
  3. package/_bundled_plugin/mcp/native/win32-arm64/windows.node +0 -0
  4. package/_bundled_plugin/mcp/native/win32-x64/windows.node +0 -0
  5. package/_bundled_plugin/scripts/workbench_finding_workflows.py +2 -0
  6. package/_bundled_plugin/shared/workbench-migrations.json +16 -0
  7. package/_bundled_plugin/skills/fix-finding/SKILL.md +16 -8
  8. package/_bundled_plugin/skills/publish-findings/SKILL.md +130 -0
  9. package/_bundled_plugin/skills/publish-findings/agents/openai.yaml +6 -0
  10. package/_bundled_plugin/skills/verify-fix/SKILL.md +4 -2
  11. package/dist/api.d.ts +3 -0
  12. package/dist/api.d.ts.map +1 -1
  13. package/dist/api.js +76 -38
  14. package/dist/api.js.map +1 -1
  15. package/dist/classify-severity-records.d.ts +5 -2
  16. package/dist/classify-severity-records.d.ts.map +1 -1
  17. package/dist/classify-severity-records.js +40 -34
  18. package/dist/classify-severity-records.js.map +1 -1
  19. package/dist/classify-severity.d.ts +5 -1
  20. package/dist/classify-severity.d.ts.map +1 -1
  21. package/dist/classify-severity.js +20 -30
  22. package/dist/classify-severity.js.map +1 -1
  23. package/dist/cli-help.d.ts.map +1 -1
  24. package/dist/cli-help.js +1 -0
  25. package/dist/cli-help.js.map +1 -1
  26. package/dist/cli.d.ts +7 -0
  27. package/dist/cli.d.ts.map +1 -1
  28. package/dist/cli.js +412 -14
  29. package/dist/cli.js.map +1 -1
  30. package/dist/cloud-endpoint.d.ts +6 -0
  31. package/dist/cloud-endpoint.d.ts.map +1 -0
  32. package/dist/cloud-endpoint.js +51 -0
  33. package/dist/cloud-endpoint.js.map +1 -0
  34. package/dist/cloud-publish.d.ts.map +1 -1
  35. package/dist/cloud-publish.js +7 -5
  36. package/dist/cloud-publish.js.map +1 -1
  37. package/dist/default-severity-rubric.d.ts +3 -0
  38. package/dist/default-severity-rubric.d.ts.map +1 -0
  39. package/dist/default-severity-rubric.js +67 -0
  40. package/dist/default-severity-rubric.js.map +1 -0
  41. package/dist/endor-findings.d.ts +7 -0
  42. package/dist/endor-findings.d.ts.map +1 -0
  43. package/dist/endor-findings.js +233 -0
  44. package/dist/endor-findings.js.map +1 -0
  45. package/dist/external-findings-import.d.ts +5 -0
  46. package/dist/external-findings-import.d.ts.map +1 -0
  47. package/dist/external-findings-import.js +38 -0
  48. package/dist/external-findings-import.js.map +1 -0
  49. package/dist/external-findings-local.d.ts +63 -0
  50. package/dist/external-findings-local.d.ts.map +1 -0
  51. package/dist/external-findings-local.js +337 -0
  52. package/dist/external-findings-local.js.map +1 -0
  53. package/dist/external-findings-publish.d.ts +73 -0
  54. package/dist/external-findings-publish.d.ts.map +1 -0
  55. package/dist/external-findings-publish.js +713 -0
  56. package/dist/external-findings-publish.js.map +1 -0
  57. package/dist/external-findings-read.d.ts +6 -0
  58. package/dist/external-findings-read.d.ts.map +1 -0
  59. package/dist/external-findings-read.js +88 -0
  60. package/dist/external-findings-read.js.map +1 -0
  61. package/dist/external-findings.d.ts +21 -0
  62. package/dist/external-findings.d.ts.map +1 -0
  63. package/dist/external-findings.js +2 -0
  64. package/dist/external-findings.js.map +1 -0
  65. package/dist/external-import-contract.d.ts +13 -0
  66. package/dist/external-import-contract.d.ts.map +1 -0
  67. package/dist/external-import-contract.js +254 -0
  68. package/dist/external-import-contract.js.map +1 -0
  69. package/dist/external-import-models.d.ts +362 -0
  70. package/dist/external-import-models.d.ts.map +1 -0
  71. package/dist/external-import-models.js +3 -0
  72. package/dist/external-import-models.js.map +1 -0
  73. package/dist/finding-workflow.d.ts +1 -1
  74. package/dist/finding-workflow.d.ts.map +1 -1
  75. package/dist/finding-workflow.js +2 -1
  76. package/dist/finding-workflow.js.map +1 -1
  77. package/dist/github-advisories.d.ts +386 -0
  78. package/dist/github-advisories.d.ts.map +1 -0
  79. package/dist/github-advisories.js +131 -0
  80. package/dist/github-advisories.js.map +1 -0
  81. package/dist/github-findings.d.ts +10 -0
  82. package/dist/github-findings.d.ts.map +1 -0
  83. package/dist/github-findings.js +256 -0
  84. package/dist/github-findings.js.map +1 -0
  85. package/dist/hosted-remediation-protocol.d.ts +2 -1
  86. package/dist/hosted-remediation-protocol.d.ts.map +1 -1
  87. package/dist/hosted-remediation-protocol.js +17 -11
  88. package/dist/hosted-remediation-protocol.js.map +1 -1
  89. package/dist/hosted-remediation.d.ts +4 -0
  90. package/dist/hosted-remediation.d.ts.map +1 -1
  91. package/dist/hosted-remediation.js +3 -1
  92. package/dist/hosted-remediation.js.map +1 -1
  93. package/dist/hosted-scan.d.ts +16 -0
  94. package/dist/hosted-scan.d.ts.map +1 -1
  95. package/dist/hosted-scan.js +14 -2
  96. package/dist/hosted-scan.js.map +1 -1
  97. package/dist/index.d.ts +13 -0
  98. package/dist/index.d.ts.map +1 -1
  99. package/dist/index.js +8 -0
  100. package/dist/index.js.map +1 -1
  101. package/dist/project-config-schema.d.ts +2 -0
  102. package/dist/project-config-schema.d.ts.map +1 -1
  103. package/dist/project-config-schema.js +1 -0
  104. package/dist/project-config-schema.js.map +1 -1
  105. package/dist/project-config.d.ts +1 -0
  106. package/dist/project-config.d.ts.map +1 -1
  107. package/dist/project-config.js +2 -0
  108. package/dist/project-config.js.map +1 -1
  109. package/dist/remediation.d.ts +6 -0
  110. package/dist/remediation.d.ts.map +1 -1
  111. package/dist/remediation.js +16 -5
  112. package/dist/remediation.js.map +1 -1
  113. package/dist/result.d.ts +4 -0
  114. package/dist/result.d.ts.map +1 -1
  115. package/dist/result.js +10 -0
  116. package/dist/result.js.map +1 -1
  117. package/dist/runtime.d.ts +1 -0
  118. package/dist/runtime.d.ts.map +1 -1
  119. package/dist/runtime.js +3 -1
  120. package/dist/runtime.js.map +1 -1
  121. package/dist/scan-owner-suggestions.d.ts +8 -0
  122. package/dist/scan-owner-suggestions.d.ts.map +1 -0
  123. package/dist/scan-owner-suggestions.js +33 -0
  124. package/dist/scan-owner-suggestions.js.map +1 -0
  125. package/dist/scan-settings.d.ts +1 -0
  126. package/dist/scan-settings.d.ts.map +1 -1
  127. package/dist/scan-settings.js +4 -0
  128. package/dist/scan-settings.js.map +1 -1
  129. package/dist/scanner-import.d.ts +20 -0
  130. package/dist/scanner-import.d.ts.map +1 -0
  131. package/dist/scanner-import.js +204 -0
  132. package/dist/scanner-import.js.map +1 -0
  133. package/dist/security-policy-diff.d.ts +2 -0
  134. package/dist/security-policy-diff.d.ts.map +1 -0
  135. package/dist/security-policy-diff.js +197 -0
  136. package/dist/security-policy-diff.js.map +1 -0
  137. package/dist/security-policy.d.ts +7 -3
  138. package/dist/security-policy.d.ts.map +1 -1
  139. package/dist/security-policy.js +10 -56
  140. package/dist/security-policy.js.map +1 -1
  141. package/dist/semgrep-findings.d.ts +9 -0
  142. package/dist/semgrep-findings.d.ts.map +1 -0
  143. package/dist/semgrep-findings.js +293 -0
  144. package/dist/semgrep-findings.js.map +1 -0
  145. package/dist/severity-review.d.ts +3 -0
  146. package/dist/severity-review.d.ts.map +1 -1
  147. package/dist/severity-review.js +19 -0
  148. package/dist/severity-review.js.map +1 -1
  149. package/dist/severity-store.js +7 -2
  150. package/dist/severity-store.js.map +1 -1
  151. package/dist/snyk-findings.d.ts +9 -0
  152. package/dist/snyk-findings.d.ts.map +1 -0
  153. package/dist/snyk-findings.js +349 -0
  154. package/dist/snyk-findings.js.map +1 -0
  155. package/dist/targets.d.ts +2 -2
  156. package/dist/targets.d.ts.map +1 -1
  157. package/dist/targets.js +12 -2
  158. package/dist/targets.js.map +1 -1
  159. package/dist/wiz-csv.d.ts +8 -0
  160. package/dist/wiz-csv.d.ts.map +1 -0
  161. package/dist/wiz-csv.js +116 -0
  162. package/dist/wiz-csv.js.map +1 -0
  163. package/dist/wiz-findings.d.ts +4 -0
  164. package/dist/wiz-findings.d.ts.map +1 -0
  165. package/dist/wiz-findings.js +460 -0
  166. package/dist/wiz-findings.js.map +1 -0
  167. package/docs/classify-severity-records.md +28 -10
  168. package/docs/cli.md +702 -31
  169. package/docs/hosted-remediation.md +24 -7
  170. package/docs/hosted-scans.md +12 -0
  171. package/package.json +6 -4
  172. package/schemas/external-findings.schema.json +1421 -0
  173. package/schemas/project-config.schema.json +4 -0
@@ -47,6 +47,19 @@ a required check that cannot run without repository changes is a proof gap,
47
47
  not permission to edit. Generation's ordinary skill checks and standalone
48
48
  verification are separate operations.
49
49
 
50
+ Set `verificationMode: "static"` to review attack paths, bypasses, and legitimate
51
+ behavior from source and diffs, without installing dependencies or executing
52
+ builds, tests, reproducers, or the application. Select it for both `patch` and
53
+ `verify` requests when both stages should be static. Omitted or `"standard"`
54
+ retains the existing behavior.
55
+
56
+ Static mode treats validation instructions as source-review questions. Missing
57
+ runtime tooling alone is not a blocker; material proof gaps still produce
58
+ `blocked` or `inconclusive`. Results must cite source evidence and state that
59
+ runtime checks were not performed. Hosts should retain and display the selected
60
+ mode with each attempt. This is an assessment policy; sandbox permissions remain
61
+ unchanged and do not enforce the static scope.
62
+
50
63
  The executor receives one request with a unique `requestId`, operation,
51
64
  repository/revision, identity, finding ID, prompt, model, reasoning effort,
52
65
  `sandbox` (`workspace-write` for patch, `read-only` for verify), and
@@ -88,16 +101,20 @@ finding closed. Retrying persistence must not resubmit execution.
88
101
 
89
102
  ## JSON-RPC launcher
90
103
 
91
- The SDK exports `runHostedRemediationProtocol`. An installed npm package can run it
92
- without adding any public CLI flag:
104
+ Use the public CLI to run the hosted protocol:
93
105
 
94
- ```sh
95
- node --input-type=module -e '
96
- import { runHostedRemediationProtocol } from "@openai/codex-security";
97
- process.exitCode = await runHostedRemediationProtocol(process.stdin, process.stdout);
98
- '
106
+ ```bash
107
+ codex-security patch --host
108
+ codex-security verify-fix --host
99
109
  ```
100
110
 
111
+ Use `--host` alone with either command. The `run` request supplies all settings,
112
+ and its `operation` must match the command: `patch` or `verify`, respectively.
113
+ Neither command falls back to local inference. Ordinary patching and verification
114
+ remain unchanged when `--host` is omitted.
115
+
116
+ The SDK also exports `runHostedRemediationProtocol` for in-process hosts.
117
+
101
118
  Use the existing newline-delimited host transport: send one `run` request whose
102
119
  `params` are the input above; respond to `execution.run` with the executor
103
120
  receipt. `execution.progress` notifications use `{ requestId, event }` and are
@@ -74,6 +74,18 @@ Standard scan lifecycle. Omit `scope` for the entire repository, or pass literal
74
74
  repository-relative folders/files. Model settings come from the frozen input;
75
75
  local profiles and other local scan options are not accepted.
76
76
 
77
+ Set `ownerSuggestions: true` on the input to generate the optional
78
+ `owner-suggestions.json` after sealing the base scan. The completed receipt
79
+ includes that artifact when available, or `ownerSuggestionsError` if the owner
80
+ stage fails. Owner failure or cancellation does not invalidate sealed findings.
81
+ The SDK host can pass `ownerCodex` in the options to execute read-only owner
82
+ decisions using its own inference service. Without that callback, CODEOWNERS
83
+ matches still work and findings that require inference report an owner error.
84
+ The callback receives the model and reasoning effort in `startThread`, then
85
+ the prompt, output schema, and cancellation signal in `run`.
86
+ The CLI protocol does not provide an owner inference callback. Hosted owner
87
+ enrichment never launches local Codex or selects local credentials.
88
+
77
89
  `ScanExecutor.run` receives an AbortSignal and an optional `onEvent` observer for
78
90
  `{type: "progress", progress}` or `{type: "activity", activity}` events. Progress
79
91
  uses the existing `ScanProgress` type; activity uses `ScanActivity`. Progress may
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openai/codex-security",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "description": "TypeScript SDK and CLI for Codex Security",
5
5
  "license": "Apache-2.0",
6
6
  "author": "OpenAI",
@@ -58,7 +58,7 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "@inquirer/prompts": "8.7.3",
61
- "@linear/sdk": "97.1.0",
61
+ "@linear/sdk": "97.2.0",
62
62
  "@octokit/core": "7.0.8",
63
63
  "@openai/codex": "0.163.0",
64
64
  "@openai/codex-sdk": "0.163.0",
@@ -96,7 +96,7 @@
96
96
  "prettier": "3.9.10",
97
97
  "typescript": "7.0.2"
98
98
  },
99
- "gitHead": "b2fa51576d81cda5e311e7eb89131ffb13daad8b",
99
+ "gitHead": "13dcc6fec00aaf4c23a6fa7e375ccc1726b22836",
100
100
  "scripts": {
101
101
  "audit:prod": "pnpm audit --prod --audit-level high",
102
102
  "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
@@ -110,12 +110,14 @@
110
110
  "format": "prettier --check --ignore-path .gitignore --ignore-path .prettierignore \"**/*.{cjs,mjs,js,ts,mts,tsx,json}\" \"../../.github/scripts/*.mts\" \"../../examples/custom-validation/*.mts\" \"../../plugins/codex-security/native/*.mts\" \"../../evals/{deep-reducer,secret-discovery,workflow-routing}/*.mts\" \"../../evals/triage-finding/{assertions,scripts,sastbench/assertions,sastbench/scripts}/*.mts\" \"../../evals/triage-finding/types.ts\" \"../../evals/tsconfig.json\" && node scripts/check-markdown.mjs",
111
111
  "generate:models": "node scripts/generate-models.cjs",
112
112
  "generate:models:check": "node scripts/generate-models.cjs --check",
113
+ "generate:external-import-models": "node scripts/generate-external-import-models.cjs",
114
+ "generate:external-import-models:check": "node scripts/generate-external-import-models.cjs --check",
113
115
  "lint": "tsc --noEmit",
114
116
  "test": "node --run build:plugin && bun test --timeout 30000 ./tests-ts",
115
117
  "test:ci": "node -e \"require('node:fs').mkdirSync('reports',{recursive:true})\" && pnpm run test --coverage --coverage-reporter=text --coverage-reporter=lcov --reporter=junit --reporter-outfile=reports/junit.xml",
116
118
  "test:mcp": "node --run build:plugin && pnpm --dir ../../plugins/codex-security/mcp-app run test:mcp",
117
119
  "test:mutation": "stryker run",
118
120
  "test:package": "node scripts/smoke-package.mjs",
119
- "types": "node scripts/generate-deep-defaults.mjs --check && node scripts/generate-project-config-schema.mjs --check && pnpm run generate:models:check && pnpm --dir ../../plugins/codex-security/mcp-app run typecheck && tsc --noEmit"
121
+ "types": "node scripts/generate-deep-defaults.mjs --check && node scripts/generate-project-config-schema.mjs --check && pnpm run generate:models:check && pnpm run generate:external-import-models:check && pnpm --dir ../../plugins/codex-security/mcp-app run typecheck && tsc --noEmit"
120
122
  }
121
123
  }