@openai/codex-security 0.6.0 → 0.8.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.
- package/README.md +76 -39
- package/_bundled_plugin/.mcp.json +1 -0
- package/_bundled_plugin/examples/completed-scan/findings.json +34 -34
- package/_bundled_plugin/examples/completed-scan/report.md +22 -31
- package/_bundled_plugin/examples/completed-scan/scan-manifest.json +27 -29
- package/_bundled_plugin/examples/{completed-scan → legacy-completed-scan}/coverage.json +1 -0
- package/_bundled_plugin/examples/legacy-completed-scan/findings.json +57 -0
- package/_bundled_plugin/examples/legacy-completed-scan/report.md +98 -0
- package/_bundled_plugin/examples/legacy-completed-scan/scan-manifest.json +43 -0
- package/_bundled_plugin/mcp/helpers.mjs.br.part-000 +0 -0
- package/_bundled_plugin/mcp/helpers.mjs.br.part-001 +0 -0
- package/_bundled_plugin/mcp/native/THIRD_PARTY_NOTICES.txt +1 -1
- package/_bundled_plugin/mcp/native/darwin-arm64/unix.node +0 -0
- package/_bundled_plugin/mcp/native/darwin-x64/unix.node +0 -0
- package/_bundled_plugin/mcp/native/linux-arm64-gnu/unix.node +0 -0
- package/_bundled_plugin/mcp/native/linux-arm64-musl/unix.node +0 -0
- package/_bundled_plugin/mcp/native/linux-x64-gnu/unix.node +0 -0
- package/_bundled_plugin/mcp/native/win32-arm64/windows.node +0 -0
- package/_bundled_plugin/mcp/native/win32-x64/windows.node +0 -0
- package/_bundled_plugin/mcp/server.mjs.br.part-000 +0 -0
- package/_bundled_plugin/mcp/server.mjs.br.part-001 +0 -0
- package/_bundled_plugin/mcp/server.mjs.br.part-002 +0 -0
- package/_bundled_plugin/references/access-advisory.md +11 -0
- package/_bundled_plugin/references/core-scan.md +30 -77
- package/_bundled_plugin/references/final-report.md +50 -184
- package/_bundled_plugin/references/scan-artifacts.md +5 -5
- package/_bundled_plugin/references/scan-contract.md +12 -12
- package/_bundled_plugin/references/scan-prologue.md +1 -1
- package/_bundled_plugin/references/scan-runtime.md +1 -5
- package/_bundled_plugin/references/threat-model.md +33 -41
- package/_bundled_plugin/schemas/coverage.schema.json +12 -1
- package/_bundled_plugin/schemas/scan-manifest.schema.json +37 -11
- package/_bundled_plugin/schemas/tools/deep-reducer.schema.json +38 -1
- package/_bundled_plugin/schemas/tools/scan-draft.schema.json +5 -5
- package/_bundled_plugin/scripts/deep_scan_config.py +39 -39
- package/_bundled_plugin/scripts/deep_scan_workbench.py +146 -86
- package/_bundled_plugin/scripts/finalize_scan_contract.py +249 -76
- package/_bundled_plugin/scripts/report_projection.py +49 -17
- package/_bundled_plugin/scripts/review_state.py +68 -0
- package/_bundled_plugin/scripts/threat_model_projection.py +4 -2
- package/_bundled_plugin/scripts/validate_scan_contract.py +1 -2
- package/_bundled_plugin/scripts/windows_scan_local_files.py +43 -14
- package/_bundled_plugin/scripts/workbench/retained_coverage.py +3230 -0
- package/_bundled_plugin/scripts/workbench/retained_records.py +627 -0
- package/_bundled_plugin/scripts/workbench/saved_coverage.py +651 -8
- package/_bundled_plugin/scripts/workbench/saved_outputs.py +72 -0
- package/_bundled_plugin/scripts/workbench/saved_sources.py +730 -0
- package/_bundled_plugin/scripts/workbench_cli.py +3 -0
- package/_bundled_plugin/scripts/workbench_constants.py +0 -1
- package/_bundled_plugin/scripts/workbench_coverage_receipts.py +479 -0
- package/_bundled_plugin/scripts/workbench_db.py +55 -171
- package/_bundled_plugin/scripts/workbench_feedback.py +0 -1
- package/_bundled_plugin/scripts/workbench_finding_workflows.py +51 -9
- package/_bundled_plugin/scripts/workbench_native_indexes.py +56 -44
- package/_bundled_plugin/scripts/workbench_saved_results.py +808 -2389
- package/_bundled_plugin/scripts/workbench_scan_history.py +77 -7
- package/_bundled_plugin/scripts/workbench_schema.py +1 -1
- package/_bundled_plugin/scripts/workbench_source_scopes.py +4 -1
- package/_bundled_plugin/scripts/workbench_target.py +142 -17
- package/_bundled_plugin/scripts/workbench_validation.py +9 -2
- package/_bundled_plugin/shared/workbench-history-repairs.json +21 -0
- package/_bundled_plugin/shared/workbench-migrations.json +28 -0
- package/_bundled_plugin/skills/assess-patch-risk/SKILL.md +3 -14
- package/_bundled_plugin/skills/assess-patch-risk/references/windows-validation.md +14 -0
- package/_bundled_plugin/skills/attack-path-analysis/SKILL.md +38 -103
- package/_bundled_plugin/skills/attack-path-analysis/references/attack-path-facts.md +11 -73
- package/_bundled_plugin/skills/attack-path-analysis/references/severity-policy.md +57 -116
- package/_bundled_plugin/skills/deep-security-scan/SKILL.md +28 -51
- package/_bundled_plugin/skills/define-security-policy/SKILL.md +9 -9
- package/_bundled_plugin/skills/finding-discovery/SKILL.md +26 -140
- package/_bundled_plugin/skills/fix-finding/SKILL.md +9 -28
- package/_bundled_plugin/skills/propose-security-hardening/SKILL.md +28 -218
- package/_bundled_plugin/skills/propose-security-hardening/references/proposal-format.md +29 -424
- package/_bundled_plugin/skills/publish-findings/SKILL.md +32 -24
- package/_bundled_plugin/skills/publish-findings/references/wiz-import.md +64 -0
- package/_bundled_plugin/skills/security-diff-scan/SKILL.md +12 -12
- package/_bundled_plugin/skills/security-scan/SKILL.md +29 -17
- package/_bundled_plugin/skills/security-scan/references/desktop-scan.md +11 -17
- package/_bundled_plugin/skills/security-scan/references/scan-artifacts-and-ledger.md +52 -69
- package/_bundled_plugin/skills/threat-model/SKILL.md +16 -9
- package/_bundled_plugin/skills/track-findings/SKILL.md +1 -1
- package/_bundled_plugin/skills/triage-finding/SKILL.md +5 -15
- package/_bundled_plugin/skills/triage-finding/references/ticket-intake.md +6 -6
- package/_bundled_plugin/skills/validation/SKILL.md +42 -104
- package/_bundled_plugin/skills/validation/references/validation-guidance.md +21 -106
- package/_bundled_plugin/skills/verify-fix/SKILL.md +4 -2
- package/_bundled_plugin/skills/vulnerability-writeup/SKILL.md +21 -159
- package/_bundled_plugin/skills/vulnerability-writeup/references/report-format.md +18 -60
- package/dist/api.d.ts +5 -3
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +359 -53
- package/dist/api.js.map +1 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +4 -1
- package/dist/auth.js.map +1 -1
- package/dist/cli.d.ts +2 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +696 -430
- package/dist/cli.js.map +1 -1
- package/dist/cloud-publish.d.ts.map +1 -1
- package/dist/cloud-publish.js +2 -23
- package/dist/cloud-publish.js.map +1 -1
- package/dist/component-scan.d.ts +8 -2
- package/dist/component-scan.d.ts.map +1 -1
- package/dist/component-scan.js +2 -0
- package/dist/component-scan.js.map +1 -1
- package/dist/contract.d.ts +5 -2
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +93 -45
- package/dist/contract.js.map +1 -1
- package/dist/cost.d.ts +18 -0
- package/dist/cost.d.ts.map +1 -1
- package/dist/cost.js +107 -12
- package/dist/cost.js.map +1 -1
- package/dist/coverage-presentation.d.ts +6 -0
- package/dist/coverage-presentation.d.ts.map +1 -0
- package/dist/coverage-presentation.js +34 -0
- package/dist/coverage-presentation.js.map +1 -0
- package/dist/custom-publish.js +2 -2
- package/dist/custom-publish.js.map +1 -1
- package/dist/custom-validation-prompt.js +5 -5
- package/dist/custom-validation-prompt.js.map +1 -1
- package/dist/custom-validation.d.ts.map +1 -1
- package/dist/custom-validation.js +47 -19
- package/dist/custom-validation.js.map +1 -1
- package/dist/deduplication/checkpointed-review.d.ts.map +1 -1
- package/dist/deduplication/checkpointed-review.js +3 -1
- package/dist/deduplication/checkpointed-review.js.map +1 -1
- package/dist/deduplication/codex-review.d.ts.map +1 -1
- package/dist/deduplication/codex-review.js +2 -2
- package/dist/deduplication/codex-review.js.map +1 -1
- package/dist/deduplication/deduplication-prompts.d.ts +1 -0
- package/dist/deduplication/deduplication-prompts.d.ts.map +1 -1
- package/dist/deduplication/deduplication-prompts.js +3 -0
- package/dist/deduplication/deduplication-prompts.js.map +1 -1
- package/dist/deduplication/records-protocol.d.ts.map +1 -1
- package/dist/deduplication/records-protocol.js +21 -1
- package/dist/deduplication/records-protocol.js.map +1 -1
- package/dist/deduplication/scan.d.ts.map +1 -1
- package/dist/deduplication/scan.js +9 -7
- package/dist/deduplication/scan.js.map +1 -1
- package/dist/endor-findings.d.ts +4 -3
- package/dist/endor-findings.d.ts.map +1 -1
- package/dist/endor-findings.js +16 -11
- package/dist/endor-findings.js.map +1 -1
- package/dist/external-findings-import.d.ts.map +1 -1
- package/dist/external-findings-import.js +13 -5
- package/dist/external-findings-import.js.map +1 -1
- package/dist/external-findings-local.d.ts +1 -0
- package/dist/external-findings-local.d.ts.map +1 -1
- package/dist/external-findings-local.js +14 -3
- package/dist/external-findings-local.js.map +1 -1
- package/dist/external-findings-publish.d.ts +2 -1
- package/dist/external-findings-publish.d.ts.map +1 -1
- package/dist/external-findings-publish.js +64 -28
- package/dist/external-findings-publish.js.map +1 -1
- package/dist/external-findings-read.d.ts +12 -1
- package/dist/external-findings-read.d.ts.map +1 -1
- package/dist/external-findings-read.js +25 -6
- package/dist/external-findings-read.js.map +1 -1
- package/dist/external-findings.d.ts +2 -0
- package/dist/external-findings.d.ts.map +1 -1
- package/dist/external-findings.js.map +1 -1
- package/dist/external-import-contract.d.ts +7 -1
- package/dist/external-import-contract.d.ts.map +1 -1
- package/dist/external-import-contract.js +63 -31
- package/dist/external-import-contract.js.map +1 -1
- package/dist/external-imports-feature.d.ts +6 -0
- package/dist/external-imports-feature.d.ts.map +1 -0
- package/dist/external-imports-feature.js +51 -0
- package/dist/external-imports-feature.js.map +1 -0
- package/dist/finding-workflow.d.ts +24 -5
- package/dist/finding-workflow.d.ts.map +1 -1
- package/dist/finding-workflow.js +24 -9
- package/dist/finding-workflow.js.map +1 -1
- package/dist/github-advisories.d.ts.map +1 -1
- package/dist/github-advisories.js +3 -1
- package/dist/github-advisories.js.map +1 -1
- package/dist/github-findings.d.ts +4 -3
- package/dist/github-findings.d.ts.map +1 -1
- package/dist/github-findings.js +16 -14
- package/dist/github-findings.js.map +1 -1
- package/dist/host-protocol.d.ts +1 -1
- package/dist/host-protocol.d.ts.map +1 -1
- package/dist/host-protocol.js +2 -2
- package/dist/host-protocol.js.map +1 -1
- package/dist/hosted-remediation.d.ts.map +1 -1
- package/dist/hosted-remediation.js +19 -2
- package/dist/hosted-remediation.js.map +1 -1
- package/dist/hosted-scan.d.ts +1 -1
- package/dist/hosted-scan.d.ts.map +1 -1
- package/dist/hosted-scan.js +0 -6
- package/dist/hosted-scan.js.map +1 -1
- package/dist/import-scan.js +17 -17
- package/dist/import-scan.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/knowledge-base.d.ts +1 -0
- package/dist/knowledge-base.d.ts.map +1 -1
- package/dist/knowledge-base.js +20 -8
- package/dist/knowledge-base.js.map +1 -1
- package/dist/mock-scan.d.ts +1 -2
- package/dist/mock-scan.d.ts.map +1 -1
- package/dist/mock-scan.js +12 -17
- package/dist/mock-scan.js.map +1 -1
- package/dist/models.d.ts +10 -1
- package/dist/models.d.ts.map +1 -1
- package/dist/models.js.map +1 -1
- package/dist/multiscan.d.ts.map +1 -1
- package/dist/multiscan.js +1 -6
- package/dist/multiscan.js.map +1 -1
- package/dist/native-json-findings.d.ts +30 -0
- package/dist/native-json-findings.d.ts.map +1 -0
- package/dist/native-json-findings.js +114 -0
- package/dist/native-json-findings.js.map +1 -0
- package/dist/opengrep-findings.d.ts +10 -0
- package/dist/opengrep-findings.d.ts.map +1 -0
- package/dist/opengrep-findings.js +198 -0
- package/dist/opengrep-findings.js.map +1 -0
- package/dist/owner-evidence.d.ts +2 -0
- package/dist/owner-evidence.d.ts.map +1 -1
- package/dist/owner-evidence.js +2 -1
- package/dist/owner-evidence.js.map +1 -1
- package/dist/patch-tui.d.ts.map +1 -1
- package/dist/patch-tui.js +2 -0
- package/dist/patch-tui.js.map +1 -1
- package/dist/publication.js +1 -2
- package/dist/publication.js.map +1 -1
- package/dist/publish.d.ts +2 -0
- package/dist/publish.d.ts.map +1 -1
- package/dist/publish.js +1 -1
- package/dist/publish.js.map +1 -1
- package/dist/record.d.ts +1 -0
- package/dist/record.d.ts.map +1 -1
- package/dist/record.js +10 -0
- package/dist/record.js.map +1 -1
- package/dist/remediation.d.ts +1 -25
- package/dist/remediation.d.ts.map +1 -1
- package/dist/remediation.js +3 -24
- package/dist/remediation.js.map +1 -1
- package/dist/result.d.ts +5 -3
- package/dist/result.d.ts.map +1 -1
- package/dist/result.js +9 -6
- package/dist/result.js.map +1 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +7 -7
- package/dist/runtime.js.map +1 -1
- package/dist/scan-dashboard.d.ts +5 -3
- package/dist/scan-dashboard.d.ts.map +1 -1
- package/dist/scan-dashboard.js +79 -26
- package/dist/scan-dashboard.js.map +1 -1
- package/dist/scan-history-renderer.d.ts.map +1 -1
- package/dist/scan-history-renderer.js +9 -3
- package/dist/scan-history-renderer.js.map +1 -1
- package/dist/scan-owner-suggestions.d.ts +1 -1
- package/dist/scan-owner-suggestions.d.ts.map +1 -1
- package/dist/scan-owner-suggestions.js +4 -4
- package/dist/scan-owner-suggestions.js.map +1 -1
- package/dist/scan-usage-display.d.ts +8 -0
- package/dist/scan-usage-display.d.ts.map +1 -0
- package/dist/scan-usage-display.js +46 -0
- package/dist/scan-usage-display.js.map +1 -0
- package/dist/scanner-import.d.ts +1 -1
- package/dist/scanner-import.d.ts.map +1 -1
- package/dist/scanner-import.js +7 -3
- package/dist/scanner-import.js.map +1 -1
- package/dist/security-policy.d.ts.map +1 -1
- package/dist/security-policy.js +17 -22
- package/dist/security-policy.js.map +1 -1
- package/dist/semgrep-findings.d.ts +4 -3
- package/dist/semgrep-findings.d.ts.map +1 -1
- package/dist/semgrep-findings.js +22 -89
- package/dist/semgrep-findings.js.map +1 -1
- package/dist/skill-authentication.d.ts +18 -0
- package/dist/skill-authentication.d.ts.map +1 -0
- package/dist/skill-authentication.js +82 -0
- package/dist/skill-authentication.js.map +1 -0
- package/dist/snyk-findings.d.ts +5 -4
- package/dist/snyk-findings.d.ts.map +1 -1
- package/dist/snyk-findings.js +18 -17
- package/dist/snyk-findings.js.map +1 -1
- package/dist/suggest-owners.d.ts +4 -1
- package/dist/suggest-owners.d.ts.map +1 -1
- package/dist/suggest-owners.js +53 -21
- package/dist/suggest-owners.js.map +1 -1
- package/dist/targets.d.ts.map +1 -1
- package/dist/targets.js +4 -1
- package/dist/targets.js.map +1 -1
- package/dist/wiz-csv.d.ts +2 -1
- package/dist/wiz-csv.d.ts.map +1 -1
- package/dist/wiz-csv.js +3 -3
- package/dist/wiz-csv.js.map +1 -1
- package/dist/wiz-findings.d.ts +2 -1
- package/dist/wiz-findings.d.ts.map +1 -1
- package/dist/wiz-findings.js +27 -23
- package/dist/wiz-findings.js.map +1 -1
- package/docs/classify-severity-records.md +3 -4
- package/docs/cli.md +171 -41
- package/docs/dedupe-records.md +15 -1
- package/docs/findings-service.md +119 -118
- package/docs/hosted-remediation.md +19 -17
- package/docs/hosted-scans.md +37 -11
- package/package.json +9 -9
- package/_bundled_plugin/scripts/generate_in_scope_files.py +0 -277
- package/_bundled_plugin/scripts/generate_rank_input.py +0 -350
- package/_bundled_plugin/scripts/rank_preview.py +0 -129
package/docs/findings-service.md
CHANGED
|
@@ -5,124 +5,7 @@ Deduplication reads that database directly; no local HTTP service is needed.
|
|
|
5
5
|
The CLI can also publish to and deduplicate against independently operated
|
|
6
6
|
compatible endpoints through explicit `--findings-url` settings.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
The `serve` command (including `--port`), `start:server` script,
|
|
11
|
-
`dist/server/index.js` entrypoint, `startFindingsServer` SDK export, browser
|
|
12
|
-
dashboard, and findings-service Compose deployment have been removed.
|
|
13
|
-
`HOST`, `PORT`, and `CODEX_SECURITY_FINDINGS_IMAGE` no longer configure a bundled
|
|
14
|
-
service. The dashboard storage projection is also removed.
|
|
15
|
-
|
|
16
|
-
Existing SQLite databases, migrations, saved scans, findings, and duplicate
|
|
17
|
-
groups are retained. No data migration or deletion is performed. Keep any
|
|
18
|
-
existing service volume or state directory and back it up before changing
|
|
19
|
-
deployments; local deduplication uses the database selected by
|
|
20
|
-
`CODEX_SECURITY_STATE_DIR`, not a separate service volume automatically.
|
|
21
|
-
|
|
22
|
-
`@openai/codex-security/server` continues to export `OpenAiFindingEmbedder`,
|
|
23
|
-
`SqliteFindingsStore`, and their storage types for direct storage users.
|
|
24
|
-
|
|
25
|
-
For direct embedding/storage integrations, `OpenAiFindingEmbedder` accepts a
|
|
26
|
-
static key or `() => string | Promise<string>` as its first argument. It calls
|
|
27
|
-
the callback before each HTTP batch; the caller handles token acquisition.
|
|
28
|
-
Cancellation prevents a new callback or HTTP request. Direct embedder callers
|
|
29
|
-
still await a key callback that has already started.
|
|
30
|
-
Pass `fetch` as the second argument and the full endpoint URL as the third.
|
|
31
|
-
By default, the saved-scan deduplication APIs use environment credentials. A
|
|
32
|
-
custom SDK `embedding` binding can supply an adapter with its own credentials,
|
|
33
|
-
including an `OpenAiFindingEmbedder` with a renewable key callback.
|
|
34
|
-
|
|
35
|
-
Custom publication, explicit remote deduplication, Cloud publication, the
|
|
36
|
-
plugin MCP server, and Codex app-server are unchanged.
|
|
37
|
-
|
|
38
|
-
## Direct storage helpers
|
|
39
|
-
|
|
40
|
-
Direct callers of the retired Python findings helpers can use the retained Node
|
|
41
|
-
helpers from an installed plugin directory:
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
scripts/launch_codex_security_mcp --helper list-stored-findings < request.json
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
On Windows, use `scripts\launch_codex_security_mcp.cmd` with the same arguments
|
|
48
|
-
and JSON on stdin. For example, `request.json` selects the existing database:
|
|
49
|
-
|
|
50
|
-
```json
|
|
51
|
-
{
|
|
52
|
-
"stateDirectory": "/absolute/path/to/state",
|
|
53
|
-
"payload": { "limit": 50, "offset": 0 }
|
|
54
|
-
}
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Use an absolute Windows path on Windows. The retained helper commands accept
|
|
58
|
-
these `payload` fields:
|
|
59
|
-
|
|
60
|
-
| Command | Payload |
|
|
61
|
-
| --------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
62
|
-
| `store-findings` | `entries` containing finding and embedding records; optional `repositoryId`. |
|
|
63
|
-
| `list-stored-findings` | Positive integer `limit` and non-negative integer `offset`. |
|
|
64
|
-
| `find-potential-duplicates` | `findingId` and `scope`: either `{ "repositoryId": "REPOSITORY_ID" }` or `{ "allRepositories": true }`. |
|
|
65
|
-
| `store-dedupe-groups` | `groups`, an array of finding-ID arrays. |
|
|
66
|
-
| `list-dedupe-groups` | `findingId`. |
|
|
67
|
-
|
|
68
|
-
Retained scan commands such as `workbench_db.py list-findings` keep their existing
|
|
69
|
-
interface. The dashboard projection is removed along with the browser dashboard.
|
|
70
|
-
|
|
71
|
-
## Publish a scan
|
|
72
|
-
|
|
73
|
-
Send a completed scan to an independently operated compatible endpoint:
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
codex-security publish scan --scan SCAN_ID --to custom \
|
|
77
|
-
--findings-url https://findings.example.com --json
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
`--findings-url` is required. The client appends `/v1/bulk/findings` to this
|
|
81
|
-
base URL, preserving any base path. Custom endpoints must implement that API
|
|
82
|
-
and return the stored finding IDs.
|
|
83
|
-
|
|
84
|
-
Publication sends the complete sealed findings and the manifest's
|
|
85
|
-
`scan.target.targetId` as `repositoryId`. It leaves the scan artifacts unchanged
|
|
86
|
-
and does not forward model credentials. The endpoint is responsible for storing the batch before acknowledging it.
|
|
87
|
-
|
|
88
|
-
Use `--scan` for a saved scan, `--scan-dir` for an external scan directory, or
|
|
89
|
-
the interactive picker. Custom publication accepts one scan; CSV input and
|
|
90
|
-
Linear options do not apply. Add `--dry-run` to preview the payload without an
|
|
91
|
-
HTTP request. Upload failures and incomplete receipts fail the command. Uploads
|
|
92
|
-
are not automatically retried because a lost response may have been committed.
|
|
93
|
-
|
|
94
|
-
```typescript
|
|
95
|
-
import { publishScanToCustom } from "@openai/codex-security";
|
|
96
|
-
|
|
97
|
-
const receipt = await publishScanToCustom("/path/to/completed-scan", {
|
|
98
|
-
findingsUrl: "https://findings.example.com",
|
|
99
|
-
// dryRun: true,
|
|
100
|
-
// signal: controller.signal,
|
|
101
|
-
});
|
|
102
|
-
console.log(receipt.repositoryId, receipt.findingIds);
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
## Compatible endpoint contract
|
|
106
|
-
|
|
107
|
-
The retained HTTP clients use these endpoints on the supplied base URL,
|
|
108
|
-
preserving its base path:
|
|
109
|
-
|
|
110
|
-
| Method | Path | Response |
|
|
111
|
-
| ------ | --------------------------------------- | ------------------------------------------------------------------------ |
|
|
112
|
-
| `POST` | `/v1/bulk/findings` | An array acknowledging all submitted finding IDs; order does not matter. |
|
|
113
|
-
| `GET` | `/v1/finding/{id}/potential-duplicates` | `{finding, potentialDuplicates}` containing complete finding records. |
|
|
114
|
-
| `POST` | `/v1/dedupe-groups` | A successful JSON acknowledgement, such as `{}`. |
|
|
115
|
-
|
|
116
|
-
Publication sends `{findings, repositoryId}`. Candidate requests include either
|
|
117
|
-
`repositoryId` or `allRepositories=true`. Group writes send
|
|
118
|
-
`{groups: [[findingId, ...], ...]}`; repeated membership must be idempotent for
|
|
119
|
-
workflow retries. Both POST endpoints must persist their writes before
|
|
120
|
-
acknowledging them and return a JSON body. An explicit URL selects this remote
|
|
121
|
-
contract instead of local SQLite. This package no longer implements or hosts the HTTP endpoints.
|
|
122
|
-
|
|
123
|
-
SDK findings client failures preserve the endpoint's error code and message with
|
|
124
|
-
the HTTP status. Other responses retain the HTTP-status diagnostic. Retry
|
|
125
|
-
behavior uses the HTTP status and `Retry-After`.
|
|
8
|
+
For an older service deployment or helper integration, see [compatibility](#compatibility).
|
|
126
9
|
|
|
127
10
|
## Deduplicate a scan
|
|
128
11
|
|
|
@@ -405,3 +288,121 @@ including `text-embedding-3-large`, 1,536-dimensional float vectors, and token
|
|
|
405
288
|
array inputs. Requests encode the complete finding JSON with `cl100k_base` and
|
|
406
289
|
send the API key as a bearer token. Long inputs are combined without truncation.
|
|
407
290
|
Cached compatible vectors avoid new requests.
|
|
291
|
+
|
|
292
|
+
## Publish a scan
|
|
293
|
+
|
|
294
|
+
Send a completed scan to an independently operated compatible endpoint:
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
codex-security publish scan --scan SCAN_ID --to custom \
|
|
298
|
+
--findings-url https://findings.example.com --json
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
`--findings-url` is required. The client appends `/v1/bulk/findings` to this
|
|
302
|
+
base URL, preserving any base path. Custom endpoints must implement that API
|
|
303
|
+
and return the stored finding IDs.
|
|
304
|
+
|
|
305
|
+
Publication sends the complete sealed findings and the manifest's
|
|
306
|
+
`scan.target.targetId` as `repositoryId`. It leaves the scan artifacts unchanged
|
|
307
|
+
and does not forward model credentials. The endpoint is responsible for storing the batch before acknowledging it.
|
|
308
|
+
|
|
309
|
+
Use `--scan` for a saved scan, `--scan-dir` for an external scan directory, or
|
|
310
|
+
the interactive picker. Custom publication accepts one scan; CSV input and
|
|
311
|
+
Linear options do not apply. Add `--dry-run` to preview the payload without an
|
|
312
|
+
HTTP request. Upload failures and incomplete receipts fail the command. Uploads
|
|
313
|
+
are not automatically retried because a lost response may have been committed.
|
|
314
|
+
|
|
315
|
+
```typescript
|
|
316
|
+
import { publishScanToCustom } from "@openai/codex-security";
|
|
317
|
+
|
|
318
|
+
const receipt = await publishScanToCustom("/path/to/completed-scan", {
|
|
319
|
+
findingsUrl: "https://findings.example.com",
|
|
320
|
+
// dryRun: true,
|
|
321
|
+
// signal: controller.signal,
|
|
322
|
+
});
|
|
323
|
+
console.log(receipt.repositoryId, receipt.findingIds);
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
## Compatible endpoint contract
|
|
327
|
+
|
|
328
|
+
The retained HTTP clients use these endpoints on the supplied base URL,
|
|
329
|
+
preserving its base path:
|
|
330
|
+
|
|
331
|
+
| Method | Path | Response |
|
|
332
|
+
| ------ | --------------------------------------- | ------------------------------------------------------------------------ |
|
|
333
|
+
| `POST` | `/v1/bulk/findings` | An array acknowledging all submitted finding IDs; order does not matter. |
|
|
334
|
+
| `GET` | `/v1/finding/{id}/potential-duplicates` | `{finding, potentialDuplicates}` containing complete finding records. |
|
|
335
|
+
| `POST` | `/v1/dedupe-groups` | A successful JSON acknowledgement, such as `{}`. |
|
|
336
|
+
|
|
337
|
+
Publication sends `{findings, repositoryId}`. Candidate requests include either
|
|
338
|
+
`repositoryId` or `allRepositories=true`. Group writes send
|
|
339
|
+
`{groups: [[findingId, ...], ...]}`; repeated membership must be idempotent for
|
|
340
|
+
workflow retries. Both POST endpoints must persist their writes before
|
|
341
|
+
acknowledging them and return a JSON body. An explicit URL selects this remote
|
|
342
|
+
contract instead of local SQLite. This package no longer implements or hosts the HTTP endpoints.
|
|
343
|
+
|
|
344
|
+
SDK findings client failures preserve the endpoint's error code and message with
|
|
345
|
+
the HTTP status. Other responses retain the HTTP-status diagnostic. Retry
|
|
346
|
+
behavior uses the HTTP status and `Retry-After`.
|
|
347
|
+
|
|
348
|
+
## Compatibility
|
|
349
|
+
|
|
350
|
+
### Local service removal
|
|
351
|
+
|
|
352
|
+
The `serve` command (including `--port`), `start:server` script,
|
|
353
|
+
`dist/server/index.js` entrypoint, `startFindingsServer` SDK export, browser
|
|
354
|
+
dashboard, and findings-service Compose deployment have been removed.
|
|
355
|
+
`HOST`, `PORT`, and `CODEX_SECURITY_FINDINGS_IMAGE` no longer configure a bundled
|
|
356
|
+
service. The dashboard storage projection is also removed.
|
|
357
|
+
|
|
358
|
+
Existing SQLite databases, migrations, saved scans, findings, and duplicate
|
|
359
|
+
groups are retained. No data migration or deletion is performed. Keep any
|
|
360
|
+
existing service volume or state directory and back it up before changing
|
|
361
|
+
deployments; local deduplication uses the database selected by
|
|
362
|
+
`CODEX_SECURITY_STATE_DIR`, not a separate service volume automatically.
|
|
363
|
+
|
|
364
|
+
`@openai/codex-security/server` continues to export `OpenAiFindingEmbedder`,
|
|
365
|
+
`SqliteFindingsStore`, and their storage types for direct storage users.
|
|
366
|
+
|
|
367
|
+
For direct embedding/storage integrations, `OpenAiFindingEmbedder` accepts a
|
|
368
|
+
static key or `() => string | Promise<string>` as its first argument. It calls
|
|
369
|
+
the callback before each HTTP batch; the caller handles token acquisition.
|
|
370
|
+
Cancellation prevents a new callback or HTTP request. Direct embedder callers
|
|
371
|
+
still await a key callback that has already started.
|
|
372
|
+
Pass `fetch` as the second argument and the full endpoint URL as the third.
|
|
373
|
+
By default, the saved-scan deduplication APIs use environment credentials. A
|
|
374
|
+
custom SDK `embedding` binding can supply an adapter with its own credentials,
|
|
375
|
+
including an `OpenAiFindingEmbedder` with a renewable key callback.
|
|
376
|
+
|
|
377
|
+
### Direct storage helpers
|
|
378
|
+
|
|
379
|
+
Direct callers of the retired Python findings helpers can use the retained Node
|
|
380
|
+
helpers from an installed plugin directory:
|
|
381
|
+
|
|
382
|
+
```bash
|
|
383
|
+
scripts/launch_codex_security_mcp --helper list-stored-findings < request.json
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
On Windows, use `scripts\launch_codex_security_mcp.cmd` with the same arguments
|
|
387
|
+
and JSON on stdin. For example, `request.json` selects the existing database:
|
|
388
|
+
|
|
389
|
+
```json
|
|
390
|
+
{
|
|
391
|
+
"stateDirectory": "/absolute/path/to/state",
|
|
392
|
+
"payload": { "limit": 50, "offset": 0 }
|
|
393
|
+
}
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
Use an absolute Windows path on Windows. The retained helper commands accept
|
|
397
|
+
these `payload` fields:
|
|
398
|
+
|
|
399
|
+
| Command | Payload |
|
|
400
|
+
| --------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
401
|
+
| `store-findings` | `entries` containing finding and embedding records; optional `repositoryId`. |
|
|
402
|
+
| `list-stored-findings` | Positive integer `limit` and non-negative integer `offset`. |
|
|
403
|
+
| `find-potential-duplicates` | `findingId` and `scope`: either `{ "repositoryId": "REPOSITORY_ID" }` or `{ "allRepositories": true }`. |
|
|
404
|
+
| `store-dedupe-groups` | `groups`, an array of finding-ID arrays. |
|
|
405
|
+
| `list-dedupe-groups` | `findingId`. |
|
|
406
|
+
|
|
407
|
+
Retained scan commands such as `workbench_db.py list-findings` keep their existing
|
|
408
|
+
interface.
|
|
@@ -78,22 +78,22 @@ result validation finished; it does not imply that a patch fixed the finding:
|
|
|
78
78
|
require a reason. The host must inspect the actual changes, collect the
|
|
79
79
|
canonical diff, and run separate verification.
|
|
80
80
|
- `verification` contains `id`, `status` (`fixed`, `still_vulnerable`, or
|
|
81
|
-
`inconclusive`), nonempty `evidence`,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
81
|
+
`inconclusive`), and nonempty `evidence`, the same fields used by local
|
|
82
|
+
`verify-fix`. The finding ID must match the request. A `fixed` verdict needs
|
|
83
|
+
evidence that the original exploit path is closed and legitimate behavior
|
|
84
|
+
still works. If the selected mode cannot establish that, use `inconclusive`
|
|
85
|
+
unless the evidence shows the finding is still vulnerable.
|
|
86
|
+
|
|
87
|
+
Hosted and local verification use the same verdict parser and do not require
|
|
88
|
+
`checks`. At the hosted boundary, a `fixed` verdict is rejected if a nonempty
|
|
89
|
+
`checks` array matches the SDK 0.6.0 check format and reports a `failed` or
|
|
90
|
+
`not_run` required check. Other extra fields are ignored.
|
|
91
|
+
|
|
92
|
+
When upgrading from SDK 0.6.0, remove imports of `FindingVerificationCheck`
|
|
93
|
+
and read `verification.status` and `verification.evidence`. The SDK no longer
|
|
94
|
+
returns `verification.checks`. The executor's original report, when supplied,
|
|
95
|
+
remains in `execution.finalResponse`. Invalid or contradictory verdicts return
|
|
96
|
+
`INVALID_RESULT` with the execution receipt.
|
|
97
97
|
|
|
98
98
|
The host owns durable attempts, cancellation/reconciliation, usage, artifact
|
|
99
99
|
storage and publication. No operation publishes a pull request or marks a
|
|
@@ -124,7 +124,9 @@ the final execution receipt so usage and session identity survive cancellation.
|
|
|
124
124
|
The transport emits one terminal result. Preparation failures are JSON-RPC
|
|
125
125
|
errors; a mismatched HEAD includes `error.data.reason: "revision_mismatch"`.
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
To run the deterministic installed-package smoke check, use a source checkout
|
|
128
|
+
of this repository and run the following from `sdk/typescript`. The script is
|
|
129
|
+
not included in the npm package and needs no model credentials:
|
|
128
130
|
|
|
129
131
|
```sh
|
|
130
132
|
node scripts/smoke-hosted-remediation.mjs /path/to/node_modules/@openai/codex-security
|
package/docs/hosted-scans.md
CHANGED
|
@@ -74,17 +74,43 @@ 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`
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
77
|
+
Set `ownerSuggestions: true` to record ownership evidence during the existing
|
|
78
|
+
scan execution. The scan agent may include an optional hint on each finding:
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"extensions": {
|
|
83
|
+
"ownerSuggestion": {
|
|
84
|
+
"email": "alex@example.test",
|
|
85
|
+
"commit": "0123456789012345678901234567890123456789",
|
|
86
|
+
"reason": "Maintains the affected source."
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Use an observed contributor email and a full supporting commit hash from Git
|
|
93
|
+
blame/history for the affected source. Omit the hint when ownership is unclear.
|
|
94
|
+
Hints use the scan's existing session and budget; there is no extra ownership
|
|
95
|
+
turn or model call. Security findings take priority over optional hints.
|
|
96
|
+
|
|
97
|
+
After sealing the scan, the SDK builds `owner-suggestions.json` without inference.
|
|
98
|
+
CODEOWNERS declarations take precedence. Other hints must match an observed Git
|
|
99
|
+
identity and supporting commit in the finding's evidence. Missing hints abstain;
|
|
100
|
+
invalid hints produce per-finding owner errors. Neither invalid hints nor report
|
|
101
|
+
failures invalidate sealed findings. A completed receipt includes the artifact
|
|
102
|
+
when available, or `ownerSuggestionsError` if finalization fails.
|
|
103
|
+
|
|
104
|
+
Hosts run the normal scan request and capture the optional owner report.
|
|
105
|
+
Automatic reporting uses `suggestOwnersFromScan`; it does not use the legacy
|
|
106
|
+
`ownerCodex` option or send `owner.infer` / `owner.cancel` requests.
|
|
107
|
+
|
|
108
|
+
The standalone `suggestOwners` API and `suggest-owners` command can call a
|
|
109
|
+
model under their own budget. Both paths use the same CODEOWNERS rules, Git
|
|
110
|
+
evidence, identity checks, and report format.
|
|
111
|
+
|
|
112
|
+
Report generation works after the scan reaches `maxCostUsd`. It uses the
|
|
113
|
+
hints already recorded and never starts another model call to fill gaps.
|
|
88
114
|
|
|
89
115
|
`ScanExecutor.run` receives an AbortSignal and an optional `onEvent` observer for
|
|
90
116
|
`{type: "progress", progress}` or `{type: "activity", activity}` events. Progress
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openai/codex-security",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "TypeScript SDK and CLI for Codex Security",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "OpenAI",
|
|
@@ -57,19 +57,19 @@
|
|
|
57
57
|
]
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@inquirer/prompts": "8.7.
|
|
61
|
-
"@linear/sdk": "
|
|
60
|
+
"@inquirer/prompts": "8.7.4",
|
|
61
|
+
"@linear/sdk": "98.0.0",
|
|
62
62
|
"@octokit/core": "7.0.8",
|
|
63
|
-
"@openai/codex": "0.
|
|
64
|
-
"@openai/codex-sdk": "0.
|
|
63
|
+
"@openai/codex": "0.164.0",
|
|
64
|
+
"@openai/codex-sdk": "0.164.0",
|
|
65
65
|
"ajv": "8.20.0",
|
|
66
66
|
"fflate": "0.8.3",
|
|
67
|
-
"incur": "0.7.
|
|
67
|
+
"incur": "0.7.1",
|
|
68
68
|
"ink": "8.0.0",
|
|
69
69
|
"js-tiktoken": "1.0.21",
|
|
70
70
|
"papaparse": "5.7.0",
|
|
71
71
|
"pdfjs-dist": "6.4.299",
|
|
72
|
-
"react": "19.3.
|
|
72
|
+
"react": "19.3.1",
|
|
73
73
|
"saxes": "6.0.0",
|
|
74
74
|
"semver": "7.8.5",
|
|
75
75
|
"smol-toml": "1.9.1",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"prettier": "3.9.10",
|
|
97
97
|
"typescript": "7.0.2"
|
|
98
98
|
},
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "71bd7ae0e9bc859fb8fe9bc4b590b8f8998b19aa",
|
|
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})\"",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"build:plugin": "node scripts/build-plugin.mjs",
|
|
108
108
|
"check:plugin-source": "node scripts/check-plugin-source.mjs",
|
|
109
109
|
"check:package": "node scripts/check-package.mjs",
|
|
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",
|
|
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,standard-time-budget,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
113
|
"generate:external-import-models": "node scripts/generate-external-import-models.cjs",
|