@openai/codex-security 0.1.12 → 0.1.13

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 (45) hide show
  1. package/README.md +145 -16
  2. package/_bundled_plugin/scripts/workbench_cli.py +4 -0
  3. package/_bundled_plugin/scripts/workbench_db.py +258 -0
  4. package/_bundled_plugin/scripts/workbench_scan_usage.py +26 -0
  5. package/_bundled_plugin/scripts/workbench_schema.py +40 -0
  6. package/dist/api.d.ts.map +1 -1
  7. package/dist/api.js +16 -3
  8. package/dist/api.js.map +1 -1
  9. package/dist/bulk-scan-discovery.d.ts +5 -1
  10. package/dist/bulk-scan-discovery.d.ts.map +1 -1
  11. package/dist/bulk-scan-discovery.js +24 -7
  12. package/dist/bulk-scan-discovery.js.map +1 -1
  13. package/dist/cli.d.ts +3 -0
  14. package/dist/cli.d.ts.map +1 -1
  15. package/dist/cli.js +576 -18
  16. package/dist/cli.js.map +1 -1
  17. package/dist/contract.d.ts +12 -0
  18. package/dist/contract.d.ts.map +1 -1
  19. package/dist/contract.js +30 -2
  20. package/dist/contract.js.map +1 -1
  21. package/dist/index.d.ts +2 -0
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +1 -0
  24. package/dist/index.js.map +1 -1
  25. package/dist/publication-events.d.ts +16 -0
  26. package/dist/publication-events.d.ts.map +1 -0
  27. package/dist/publication-events.js +141 -0
  28. package/dist/publication-events.js.map +1 -0
  29. package/dist/publication-store.d.ts +5 -0
  30. package/dist/publication-store.d.ts.map +1 -0
  31. package/dist/publication-store.js +102 -0
  32. package/dist/publication-store.js.map +1 -0
  33. package/dist/publication.d.ts +27 -0
  34. package/dist/publication.d.ts.map +1 -0
  35. package/dist/publication.js +207 -0
  36. package/dist/publication.js.map +1 -0
  37. package/dist/publish.d.ts +77 -0
  38. package/dist/publish.d.ts.map +1 -0
  39. package/dist/publish.js +748 -0
  40. package/dist/publish.js.map +1 -0
  41. package/dist/scan-dashboard.d.ts +2 -0
  42. package/dist/scan-dashboard.d.ts.map +1 -1
  43. package/dist/scan-dashboard.js +25 -8
  44. package/dist/scan-dashboard.js.map +1 -1
  45. package/package.json +3 -2
package/dist/api.js CHANGED
@@ -389,7 +389,7 @@ export class CodexSecurity {
389
389
  }
390
390
  activeScan = { id: scanId, options: workbenchOptions };
391
391
  checkOpen();
392
- const basePrompt = scanPrompt(normalized, mode, skillName, scanId, runtime.configPath !== undefined, knowledgeBase !== null, options.scanPrompt);
392
+ const basePrompt = scanPrompt(normalized, mode, skillName, scanId, runtime.configPath !== undefined, knowledgeBase !== null, options.scanPrompt, options.maxCostUsd !== undefined);
393
393
  checkOpen();
394
394
  const feedback = await workbench({
395
395
  ...workbenchOptions,
@@ -466,7 +466,10 @@ export class CodexSecurity {
466
466
  ...runtimePaths,
467
467
  };
468
468
  const sdkCodexConfig = { ...sessionConfig };
469
+ // Projects and permissions already live in generated TOML files; the SDK
470
+ // cannot safely encode their path and selector keys as dotted overrides.
469
471
  delete sdkCodexConfig["projects"];
472
+ delete sdkCodexConfig["permissions"];
470
473
  const configuredResponsesMetadata = isRecord(sdkCodexConfig["responses_api_metadata"])
471
474
  ? sdkCodexConfig["responses_api_metadata"]
472
475
  : {};
@@ -1427,7 +1430,7 @@ function trustedAccessWarning(status, authentication) {
1427
1430
  const action = apiOrganization ? "your organization's access" : "your access";
1428
1431
  return `Some cybersecurity requests or findings may be refused because ${access} could not be verified. Check ${action} or apply at ${applicationUrl}.`;
1429
1432
  }
1430
- function scanPrompt(target, mode, skillName, scanId, hasConfigPath = false, hasKnowledgeBase = false, additionalPrompt) {
1433
+ function scanPrompt(target, mode, skillName, scanId, hasConfigPath = false, hasKnowledgeBase = false, additionalPrompt, enforceCostLimit = false) {
1431
1434
  const python = `${process.platform === "win32" ? "& " : ""}${shellEnvironmentReference("PYTHON")}`;
1432
1435
  return [
1433
1436
  `Use the installed $codex-security:${skillName} skill at ${shellEnvironmentReference("CODEX_SECURITY_PLUGIN_ROOT", `/skills/${skillName}/SKILL.md`)}.`,
@@ -1488,7 +1491,17 @@ function scanPrompt(target, mode, skillName, scanId, hasConfigPath = false, hasK
1488
1491
  : []),
1489
1492
  "Runtime paths are environment-backed; keep them quoted in POSIX shells and use the corresponding $env: names in PowerShell. Do not copy or reparse their values.",
1490
1493
  targetInstruction(target, python),
1491
- "Write the complete canonical scan-manifest.json, findings.json, and coverage.json, but do not finalize or seal them; the SDK workbench owns authoritative metadata, finalization, report generation, and sealing.",
1494
+ ...(skillName === "security-scan" || enforceCostLimit
1495
+ ? [
1496
+ "Write the complete canonical scan-manifest.json, findings.json, and coverage.json, but do not finalize or seal them; the SDK workbench owns authoritative metadata, finalization, report generation, and sealing.",
1497
+ ]
1498
+ : skillName === "deep-security-scan"
1499
+ ? [
1500
+ "The Deep Scan coordinator already wrote the canonical scan artifacts. Call complete_codex_security_scan exactly once without submitting another semantic draft; the workbench owns authoritative metadata, finalization, report generation, and sealing.",
1501
+ ]
1502
+ : [
1503
+ "Use record_codex_security_scan_draft and complete_codex_security_scan as directed by the selected skill; the workbench owns authoritative metadata, finalization, report generation, and sealing.",
1504
+ ]),
1492
1505
  ...(additionalPrompt?.trim()
1493
1506
  ? ["Additional scan instructions:", additionalPrompt]
1494
1507
  : []),