@openai/codex-security 0.10.0 → 0.10.1
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/_bundled_plugin/.mcp.json +1 -0
- package/_bundled_plugin/mcp/helpers.mjs.br +0 -0
- 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/win32-arm64/windows.node +0 -0
- package/_bundled_plugin/mcp/native/win32-x64/windows.node +0 -0
- package/_bundled_plugin/mcp/server.mjs.br +0 -0
- package/_bundled_plugin/references/access-advisory.md +1 -1
- package/_bundled_plugin/references/threat-model.md +1 -0
- package/_bundled_plugin/scripts/deep_scan_workbench.py +1 -0
- package/_bundled_plugin/scripts/finalize_scan_contract.py +18 -6
- package/_bundled_plugin/scripts/launch_codex_security_mcp.cmd +2 -0
- package/_bundled_plugin/scripts/workbench_db.py +16 -54
- package/_bundled_plugin/scripts/workbench_scan_history.py +23 -28
- package/_bundled_plugin/scripts/workbench_scan_start.py +65 -2
- package/_bundled_plugin/scripts/workbench_source_scopes.py +8 -0
- package/_bundled_plugin/scripts/workbench_target.py +17 -3
- package/_bundled_plugin/shared/workbench-history-repairs.json +5 -1
- package/_bundled_plugin/skills/attack-path-analysis/SKILL.md +4 -2
- package/_bundled_plugin/skills/attack-path-analysis/references/severity-policy.md +2 -2
- package/_bundled_plugin/skills/publish-findings/SKILL.md +3 -1
- package/dist/api.d.ts +1 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +23 -4
- package/dist/api.js.map +1 -1
- package/dist/classify-severity-diagnostics.d.ts +10 -0
- package/dist/classify-severity-diagnostics.d.ts.map +1 -0
- package/dist/classify-severity-diagnostics.js +57 -0
- package/dist/classify-severity-diagnostics.js.map +1 -0
- package/dist/classify-severity-records.d.ts +4 -0
- package/dist/classify-severity-records.d.ts.map +1 -1
- package/dist/classify-severity-records.js +35 -8
- package/dist/classify-severity-records.js.map +1 -1
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +99 -11
- package/dist/cli.js.map +1 -1
- package/dist/component-plan.d.ts.map +1 -1
- package/dist/component-plan.js +3 -3
- package/dist/component-plan.js.map +1 -1
- package/dist/continuum-aws.d.ts +6 -0
- package/dist/continuum-aws.d.ts.map +1 -0
- package/dist/continuum-aws.js +202 -0
- package/dist/continuum-aws.js.map +1 -0
- package/dist/continuum-collector.d.ts +44 -0
- package/dist/continuum-collector.d.ts.map +1 -0
- package/dist/continuum-collector.js +266 -0
- package/dist/continuum-collector.js.map +1 -0
- package/dist/continuum-findings.d.ts +31 -2
- package/dist/continuum-findings.d.ts.map +1 -1
- package/dist/continuum-findings.js +440 -64
- package/dist/continuum-findings.js.map +1 -1
- package/dist/contract.d.ts +1 -0
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +3 -0
- package/dist/contract.js.map +1 -1
- package/dist/crowdstrike-findings.d.ts +7 -0
- package/dist/crowdstrike-findings.d.ts.map +1 -0
- package/dist/crowdstrike-findings.js +210 -0
- package/dist/crowdstrike-findings.js.map +1 -0
- package/dist/external-findings-local.d.ts.map +1 -1
- package/dist/external-findings-local.js +26 -8
- package/dist/external-findings-local.js.map +1 -1
- package/dist/external-findings-publish.d.ts.map +1 -1
- package/dist/external-findings-publish.js +5 -1
- package/dist/external-findings-publish.js.map +1 -1
- package/dist/external-findings-read.d.ts +10 -2
- package/dist/external-findings-read.d.ts.map +1 -1
- package/dist/external-findings-read.js +26 -3
- package/dist/external-findings-read.js.map +1 -1
- package/dist/external-import-contract.d.ts +3 -0
- package/dist/external-import-contract.d.ts.map +1 -1
- package/dist/external-import-contract.js +6 -1
- package/dist/external-import-contract.js.map +1 -1
- package/dist/host-protocol.d.ts +6 -0
- package/dist/host-protocol.d.ts.map +1 -1
- package/dist/host-protocol.js +11 -1
- package/dist/host-protocol.js.map +1 -1
- package/dist/host-records-protocol.d.ts +2 -0
- package/dist/host-records-protocol.d.ts.map +1 -1
- package/dist/host-records-protocol.js +4 -0
- package/dist/host-records-protocol.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/multiscan.d.ts.map +1 -1
- package/dist/multiscan.js +4 -2
- package/dist/multiscan.js.map +1 -1
- package/dist/project-config-schema.d.ts +2 -0
- package/dist/project-config-schema.d.ts.map +1 -1
- package/dist/project-config-schema.js +1 -0
- package/dist/project-config-schema.js.map +1 -1
- package/dist/project-config.d.ts +1 -0
- package/dist/project-config.d.ts.map +1 -1
- package/dist/project-config.js +3 -0
- package/dist/project-config.js.map +1 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +4 -0
- package/dist/runtime.js.map +1 -1
- package/dist/scan-comparison.d.ts +20 -2
- package/dist/scan-comparison.d.ts.map +1 -1
- package/dist/scan-comparison.js +20 -3
- package/dist/scan-comparison.js.map +1 -1
- package/dist/scan-settings.d.ts +1 -0
- package/dist/scan-settings.d.ts.map +1 -1
- package/dist/scan-settings.js +1 -0
- package/dist/scan-settings.js.map +1 -1
- package/dist/severity-review.d.ts.map +1 -1
- package/dist/severity-review.js +1 -0
- package/dist/severity-review.js.map +1 -1
- package/dist/stored-finding-projection.d.ts.map +1 -1
- package/dist/stored-finding-projection.js +30 -5
- package/dist/stored-finding-projection.js.map +1 -1
- package/dist/targets.d.ts +2 -0
- package/dist/targets.d.ts.map +1 -1
- package/dist/targets.js +27 -0
- package/dist/targets.js.map +1 -1
- package/dist/trusted-executable.d.ts +1 -0
- package/dist/trusted-executable.d.ts.map +1 -1
- package/dist/trusted-executable.js +11 -3
- package/dist/trusted-executable.js.map +1 -1
- package/dist/value.js +3 -1
- package/dist/value.js.map +1 -1
- package/docs/classify-severity-records.md +30 -0
- package/docs/cli.md +164 -18
- package/docs/sdk.md +23 -8
- package/package.json +7 -2
- package/schemas/project-config.schema.json +5 -0
- package/_bundled_plugin/skills/publish-findings/scripts/collect_continuum.py +0 -224
package/dist/api.js
CHANGED
|
@@ -61,7 +61,7 @@ import { SCAN_MODES } from "./scan-modes.js";
|
|
|
61
61
|
import { readSavedScanLifecycle } from "./saved-scan-bootstrap.js";
|
|
62
62
|
import { bundledCodexSdkEnvironment, definedEnvironment, } from "./codex-sdk-environment.js";
|
|
63
63
|
import { canonicalConfigPath, acquireCodexSecurityCredentialHomeLock, acquireScanExecutionLock, withCredentialHomeLock, writeCredentialHomeConfig, bootstrapPlugin, bundledPluginRoot, cleanupSdkDirectory, codexSecurityCredentialAllowsAmbientImport, credentialHomeUsesFileStorage, codexSecurityCredentialHome, codexSecurityHasStoredFileCredentials, checkScanStorage, codexSecurityStateDirectory, codexExecutableReadPaths, copyPluginTree, createIsolatedHome, logoutCredentialHome, executablePathForSpawn, expandHome, importAmbientAuth, prepareCodexSecurityCredentialHome, preserveCodexSecurityPluginRegistration, pluginExecutionEnvironment, SDK_NODE_SEARCH_PATH, sdkNodeSearchPath, environmentWithGit, pluginMetadata, planOutputArchive, prepareScanArtifactRestorer, prepareOutputDir, prepareScanRegistrationOutput, preparePersistentOutputRoot, prepareWindowsScanPluginZip, probeCodexSandbox, requireModelSafeOutputDir, requireOutputOutsideRepositories, requireOutputOutsideRepository, requirePrivateCredentialHome, preparePolicyOutputDirectory, resolveCodexCommand, resolvePluginPath, resolvePluginSource, resolvePluginPython, resolveScanOutputPath, runWorkbench, setCodexSecurityCredentialLogout, validateOutputDir, } from "./runtime.js";
|
|
64
|
-
import { enclosingGitWorktreeRoot, normalizeRepository, normalizeTarget, nullIfMissingFile, gitMarkerRoot, repositoryRevision, resolveRepositoryPath, validatedGitEnvironment, validateCommittedDiffCheckout, validateMode, } from "./targets.js";
|
|
64
|
+
import { enclosingGitWorktreeRoot, normalizeRepository, normalizeTarget, normalizeExcludedPaths, nullIfMissingFile, gitMarkerRoot, repositoryRevision, resolveRepositoryPath, validatedGitEnvironment, validateCommittedDiffCheckout, validateMode, } from "./targets.js";
|
|
65
65
|
import { startHeadDriftMonitor } from "./target-drift.js";
|
|
66
66
|
import { campaignExecutable, inspectTrustedExecutable, isWithin, } from "./trusted-executable.js";
|
|
67
67
|
const DEEP_SCAN_CONFIG_PATH_ENVIRONMENT = "CODEX_SECURITY_DEEP_SCAN_CONFIG_PATH";
|
|
@@ -904,6 +904,9 @@ export class CodexSecurity {
|
|
|
904
904
|
return {
|
|
905
905
|
repository: inputs.repository,
|
|
906
906
|
target: inputs.target,
|
|
907
|
+
...(inputs.excludePaths?.length
|
|
908
|
+
? { excludePaths: inputs.excludePaths }
|
|
909
|
+
: {}),
|
|
907
910
|
mode: inputs.mode,
|
|
908
911
|
...inputs.deepScanConfiguration?.settings,
|
|
909
912
|
...(inputs.deepScanConfiguration === undefined
|
|
@@ -1279,7 +1282,7 @@ export class CodexSecurity {
|
|
|
1279
1282
|
outputDir: await prepareScanOutputDir(options, preparedInputs.protectedRoots),
|
|
1280
1283
|
};
|
|
1281
1284
|
const { repository: repo, target: normalized, mode, outputDir: requestedOutput, protectedRoot, stateDirectory, deepScanConfiguration, prompts, } = inputs;
|
|
1282
|
-
options = { ...options, ...prompts };
|
|
1285
|
+
options = { ...options, ...prompts, excludePaths: inputs.excludePaths };
|
|
1283
1286
|
checkOpen();
|
|
1284
1287
|
let temporaryRoot;
|
|
1285
1288
|
if (requestedOutput === null ||
|
|
@@ -1440,6 +1443,7 @@ export class CodexSecurity {
|
|
|
1440
1443
|
target: normalized,
|
|
1441
1444
|
mode,
|
|
1442
1445
|
pluginVersion: runtime.plugin.version,
|
|
1446
|
+
excludePaths: options.excludePaths,
|
|
1443
1447
|
};
|
|
1444
1448
|
const { model } = scanModelConfiguration(effectiveConfig);
|
|
1445
1449
|
validateScanCostLimit(options.maxCostUsd, model, pricingContext);
|
|
@@ -1738,7 +1742,9 @@ export class CodexSecurity {
|
|
|
1738
1742
|
typeof resumeThreadId !== "string" ||
|
|
1739
1743
|
!resumeThreadId ||
|
|
1740
1744
|
JSON.stringify(savedRecipe["target"]) !==
|
|
1741
|
-
JSON.stringify(recipe["target"])
|
|
1745
|
+
JSON.stringify(recipe["target"]) ||
|
|
1746
|
+
JSON.stringify(savedRecipe["excludePaths"] ?? []) !==
|
|
1747
|
+
JSON.stringify(recipe["excludePaths"] ?? [])) {
|
|
1742
1748
|
throw new CodexSecurityError("The workbench returned mismatched scan resume context.");
|
|
1743
1749
|
}
|
|
1744
1750
|
const originalStart = savedRecipe["timeBudgetStartedAt"] ?? registration["startedAt"];
|
|
@@ -2066,6 +2072,8 @@ export class CodexSecurity {
|
|
|
2066
2072
|
let prompt = scopeFileCount === null
|
|
2067
2073
|
? basePrompt
|
|
2068
2074
|
: `${basePrompt}\nThe SDK's current in-scope file-count estimate is ${scopeFileCount}; use it for scan progress unless exact scoped-source enumeration establishes a different total before review begins.`;
|
|
2075
|
+
if (options.excludePaths?.length)
|
|
2076
|
+
prompt += `\nExclude these literal repository-relative paths and all their descendants from review: ${jsonForPrompt(options.excludePaths)}. Exclusions take precedence over requested paths. Pass the same exclusions to every reviewer and worker. You may read excluded files as supporting context, but the affected operation must be in scope. Do not report findings located only in excluded paths. Inventory helpers apply the host-supplied exclusions automatically.`;
|
|
2069
2077
|
if (standard &&
|
|
2070
2078
|
modelProvider !== "amazon-bedrock" &&
|
|
2071
2079
|
authentication.method === "stored_credentials") {
|
|
@@ -2127,6 +2135,7 @@ export class CodexSecurity {
|
|
|
2127
2135
|
CODEX_SECURITY_TARGET_ID: targetId,
|
|
2128
2136
|
CODEX_SECURITY_TARGET_DISPLAY_NAME: basename(repo),
|
|
2129
2137
|
CODEX_SECURITY_TARGET_KIND: targetKind,
|
|
2138
|
+
CODEX_SECURITY_EXCLUDE_PATHS: JSON.stringify(options.excludePaths ?? []),
|
|
2130
2139
|
...(targetRevision === null
|
|
2131
2140
|
? {}
|
|
2132
2141
|
: { CODEX_SECURITY_TARGET_REVISION: targetRevision }),
|
|
@@ -3538,7 +3547,11 @@ export class CodexSecurity {
|
|
|
3538
3547
|
...(options.signal ? [options.signal] : []),
|
|
3539
3548
|
]);
|
|
3540
3549
|
const local = await this.#prepareLocalInputs(repository, options, signal);
|
|
3541
|
-
options = {
|
|
3550
|
+
options = {
|
|
3551
|
+
...options,
|
|
3552
|
+
...local.prompts,
|
|
3553
|
+
excludePaths: local.excludePaths,
|
|
3554
|
+
};
|
|
3542
3555
|
const temporaryRoot = await realpath(tmpdir());
|
|
3543
3556
|
requireOutputOutsideRepository(local.protectedRoot, temporaryRoot, "temporary");
|
|
3544
3557
|
const workspace = await mkdtemp(join(temporaryRoot, "codex-security-mock-"));
|
|
@@ -3673,6 +3686,7 @@ export class CodexSecurity {
|
|
|
3673
3686
|
target: local.target,
|
|
3674
3687
|
mode: local.mode,
|
|
3675
3688
|
pluginVersion: plugin.version,
|
|
3689
|
+
excludePaths: options.excludePaths,
|
|
3676
3690
|
}, signal, true, python, local.protectedRoot);
|
|
3677
3691
|
// Stable fixture identities are indexed by complete-scan without model matching.
|
|
3678
3692
|
result.repositoryFindings = (await listRepositoryFindings((args) => workbench(workbenchOptions, args), targetId));
|
|
@@ -3736,6 +3750,7 @@ export class CodexSecurity {
|
|
|
3736
3750
|
const requestedTarget = options.target ?? "repository";
|
|
3737
3751
|
validatedGitEnvironment(this.#dependencies.environment);
|
|
3738
3752
|
const normalized = await normalizeTarget(repo, requestedTarget, signal);
|
|
3753
|
+
const excludePaths = normalizeExcludedPaths(options.excludePaths);
|
|
3739
3754
|
throwIfAborted(signal);
|
|
3740
3755
|
const mode = options.mode ?? DEFAULT_SCAN_MODE;
|
|
3741
3756
|
validateMode(normalized, mode);
|
|
@@ -3761,6 +3776,7 @@ export class CodexSecurity {
|
|
|
3761
3776
|
return {
|
|
3762
3777
|
repository: repo,
|
|
3763
3778
|
target: normalized,
|
|
3779
|
+
...(excludePaths.length ? { excludePaths } : {}),
|
|
3764
3780
|
mode,
|
|
3765
3781
|
outputDir: requestedOutput,
|
|
3766
3782
|
protectedRoot,
|
|
@@ -4330,6 +4346,9 @@ async function targetInstruction(target, pluginRoot, hosted) {
|
|
|
4330
4346
|
}
|
|
4331
4347
|
function scanRecipe({ repository, target, mode, repositoryRevision, pluginVersion, config, options, knowledgeBasePaths, deepScan, }) {
|
|
4332
4348
|
const optionalSettings = {
|
|
4349
|
+
excludePaths: options.excludePaths?.length
|
|
4350
|
+
? options.excludePaths
|
|
4351
|
+
: undefined,
|
|
4333
4352
|
ownerSuggestions: options.ownerSuggestions,
|
|
4334
4353
|
auth: options.auth,
|
|
4335
4354
|
cyberAccessProgram: options.cyberAccessProgram,
|