@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external-findings-local.d.ts","sourceRoot":"","sources":["../src/external-findings-local.ts"],"names":[],"mappings":"AA2BA,OAAO,EAQL,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC9B,MAAM,wBAAwB,CAAC;AAOhC,OAAO,KAAK,EACV,uBAAuB,EAExB,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"external-findings-local.d.ts","sourceRoot":"","sources":["../src/external-findings-local.ts"],"names":[],"mappings":"AA2BA,OAAO,EAQL,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC9B,MAAM,wBAAwB,CAAC;AAOhC,OAAO,KAAK,EACV,uBAAuB,EAExB,MAAM,6BAA6B,CAAC;AAmDrC,OAAO,EAOL,YAAY,EAGb,MAAM,cAAc,CAAC;AAQtB,oFAAoF;AACpF,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,uBAAuB,CAAC;IAClC,UAAU,EAAE;QAAE,KAAK,EAAE,cAAc,CAAA;KAAE,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,iFAAiF;IACjF,UAAU,CAAC,EAAE,yBAAyB,CAAC;CACxC;AAED,MAAM,WAAW,yBAAyB;IACxC,kBAAkB,CAAC,EAAE,wBAAwB,EAAE,CAAC;IAChD,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;CAC1C;AAED,MAAM,MAAM,6BAA6B,GAAG;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,CACjE;IACE,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B,4BAA4B,CAChD,EAAE,UAAU,EAAE,EAAE,EAAE,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,EACvD,YAAY,GAAE,+BAAoC,GACjD,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAQrC"}
|
|
@@ -7,8 +7,9 @@ import { readGitRemoteNames, readHostedGitRemotes, } from "./hosted-git-remotes.
|
|
|
7
7
|
import { CodexSecurityError } from "./errors.js";
|
|
8
8
|
import { externalImportDisposition, NoPublishableFindingsError, cloneImportPreview, reportForJson, snapshotImportOptions, snapshotNormalizedFindings, snapshotSourceRepositories, } from "./external-findings.js";
|
|
9
9
|
import { cloudRepositoryUrlKey, requireSafeJsonInteger, repositoryUrlKey, validateExternalEvidence, } from "./external-import-contract.js";
|
|
10
|
-
import { EXTERNAL_FINDINGS_PROVIDERS, EXTERNAL_FINDINGS_READERS, localFindingRepositories, semgrepSarifRepositories, } from "./external-findings-read.js";
|
|
10
|
+
import { EXTERNAL_FINDINGS_PROVIDERS, EXTERNAL_FINDINGS_READERS, localFindingRepositories, semgrepSarifRepositories, LOCAL_ONLY_PROVIDERS, } from "./external-findings-read.js";
|
|
11
11
|
import { tenableReportFormat, tenableSourceRepository, } from "./tenable-findings.js";
|
|
12
|
+
import { crowdstrikeCheckout, crowdstrikeReportFormat, } from "./crowdstrike-findings.js";
|
|
12
13
|
import { guardianFindingRepository, guardianSelectionFormat, } from "./semgrep-guardian-findings.js";
|
|
13
14
|
import { hasGitMetadata, localGitProtectionRoots, commandGitProtectionRoots, } from "./local-git-metadata.js";
|
|
14
15
|
import { blackDuckReportRepositories, projectedBlackDuckRepositoryUrl, } from "./blackduck-findings.js";
|
|
@@ -492,10 +493,14 @@ export async function prepareLocalImport(input, options, dependencies, readerSou
|
|
|
492
493
|
? declaredScannerRepositoryUrl(options.sourceRepositoryUrl, options.provider, "local")
|
|
493
494
|
: undefined;
|
|
494
495
|
const current = snapshotNormalizedFindings(input, checkStoredNumber, "local", options.provider);
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
496
|
+
for (const [provider, format] of [
|
|
497
|
+
["tenable", tenableReportFormat],
|
|
498
|
+
["crowdstrike", crowdstrikeReportFormat],
|
|
499
|
+
])
|
|
500
|
+
if (options.provider !== provider &&
|
|
501
|
+
(current.report?.["format"] === format ||
|
|
502
|
+
current.findings.some((row) => row.evidence?.source_data?.["format"] === format)))
|
|
503
|
+
throw new CodexSecurityError(`Retained ${LOCAL_ONLY_PROVIDERS[provider]} evidence requires the ${provider} provider.`);
|
|
499
504
|
checkTrivyReportProvider(options.provider, current.report);
|
|
500
505
|
let dependabotSource;
|
|
501
506
|
validateFindingIds(current);
|
|
@@ -515,15 +520,28 @@ export async function prepareLocalImport(input, options, dependencies, readerSou
|
|
|
515
520
|
dependabotSource = native;
|
|
516
521
|
}
|
|
517
522
|
const context = await localContext(options.repository, dependencies);
|
|
518
|
-
|
|
519
|
-
|
|
523
|
+
// Neither report records the checkout, so check the operator's URL against its remotes.
|
|
524
|
+
const requireFetchRemote = async (source, provider) => {
|
|
520
525
|
const remotes = await hostedCheckoutRemotes(context.repository, context.options.protectedRoot, context.options.environment, dependencies.signal);
|
|
521
526
|
if (!remotes?.some((remote) => hostedRepositoryMatches(source, remote)))
|
|
522
|
-
throw new CodexSecurityError(
|
|
527
|
+
throw new CodexSecurityError(`${LOCAL_ONLY_PROVIDERS[provider]}'s source repository must match a configured Git fetch remote of the selected checkout.`);
|
|
528
|
+
};
|
|
529
|
+
if (options.provider === "tenable") {
|
|
530
|
+
const source = tenableSourceRepository(current, options.sourceRepositoryUrl, [...readerSources, ...parsedSources]);
|
|
531
|
+
await requireFetchRemote(source, "tenable");
|
|
523
532
|
return preparedLocalStorage(current, options, context, dependencies, true, {
|
|
524
533
|
sourceRepositories: [source],
|
|
525
534
|
});
|
|
526
535
|
}
|
|
536
|
+
if (options.provider === "crowdstrike") {
|
|
537
|
+
const source = await crowdstrikeCheckout(current, options.sourceRepositoryUrl, [...readerSources, ...parsedSources], context.repository);
|
|
538
|
+
// FCS scans plain directories; only a Git checkout has remotes to compare.
|
|
539
|
+
const bound = source !== undefined &&
|
|
540
|
+
(await hasGitMetadata(context.repository, dependencies.signal));
|
|
541
|
+
if (bound)
|
|
542
|
+
await requireFetchRemote(source, "crowdstrike");
|
|
543
|
+
return preparedLocalStorage(current, options, context, dependencies, bound, source ? { sourceRepositories: [source] } : {});
|
|
544
|
+
}
|
|
527
545
|
const { repository, options: workbenchOptions } = context;
|
|
528
546
|
const sources = new Map();
|
|
529
547
|
const references = [...readerSources, ...parsedSources];
|