@akasecurity/ai-tc-codex 0.9.21 → 0.9.22
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/.codex-plugin/plugin.json +1 -1
- package/package.json +2 -2
- package/scripts/apply-suppressions.js +289 -21
- package/scripts/backfill.js +473 -76
- package/scripts/content-retention.js +101 -37
- package/scripts/filescan.js +489 -87
- package/scripts/firstrun.js +436 -69
- package/scripts/history-sync.js +368 -47
- package/scripts/intro.js +47 -6
- package/scripts/onboard.js +289 -21
- package/scripts/post-tool-use.js +505 -81
- package/scripts/pre-tool-use.js +552 -80
- package/scripts/query.js +435 -68
- package/scripts/reconcile.js +440 -73
- package/scripts/remediate.js +477 -80
- package/scripts/scan-worker.js +47 -6
- package/scripts/session-start.js +461 -94
- package/scripts/start-light.js +47 -6
- package/scripts/stop.js +442 -75
- package/scripts/sync.js +495 -93
- package/scripts/user-prompt-submit.js +479 -82
package/scripts/scan-worker.js
CHANGED
|
@@ -8526,6 +8526,12 @@ var CaptureSighting = object({
|
|
|
8526
8526
|
ruleId: string2().min(1),
|
|
8527
8527
|
category: DetectionCategory
|
|
8528
8528
|
}).meta({ id: "CaptureSighting" });
|
|
8529
|
+
var REVIEW_VALUES_MAX = 16;
|
|
8530
|
+
var REVIEW_VALUE_MAX_CHARS = 1024;
|
|
8531
|
+
var ReviewValue = object({
|
|
8532
|
+
ruleId: string2().min(1).max(256),
|
|
8533
|
+
value: string2().min(1).max(REVIEW_VALUE_MAX_CHARS)
|
|
8534
|
+
}).meta({ id: "ReviewValue" });
|
|
8529
8535
|
var EventMetadata = object({
|
|
8530
8536
|
sessionId: string2().optional(),
|
|
8531
8537
|
repo: string2().optional(),
|
|
@@ -8633,7 +8639,14 @@ var EventMetadata = object({
|
|
|
8633
8639
|
scanIncomplete: _enum(["timeout", "unavailable"]).optional(),
|
|
8634
8640
|
// The sighting tokens in `content`, one entry per distinct token and rule.
|
|
8635
8641
|
// Set only on a forwarded capture; the locally stored copy holds the values.
|
|
8636
|
-
sightings: array(CaptureSighting).optional()
|
|
8642
|
+
sightings: array(CaptureSighting).optional(),
|
|
8643
|
+
// The length of the text this capture was cut from, when its content holds only the first
|
|
8644
|
+
// part of it. Absent when the content is the whole text.
|
|
8645
|
+
contentTruncatedFrom: number2().int().nonnegative().optional(),
|
|
8646
|
+
// The raw value of each finding in this capture, for review by the deployment. Set only on
|
|
8647
|
+
// a forwarded capture from a repository the organization's capture settings name; the
|
|
8648
|
+
// locally stored copy never carries it.
|
|
8649
|
+
reviewValues: array(ReviewValue).max(REVIEW_VALUES_MAX).optional()
|
|
8637
8650
|
}).meta({ id: "EventMetadata" });
|
|
8638
8651
|
var Event = object({
|
|
8639
8652
|
id: guid2(),
|
|
@@ -9624,7 +9637,7 @@ var McpTool = object({
|
|
|
9624
9637
|
signature: string2(),
|
|
9625
9638
|
description: string2(),
|
|
9626
9639
|
write: boolean2(),
|
|
9627
|
-
/**
|
|
9640
|
+
/** What makes the tool dangerous; null when nothing does. */
|
|
9628
9641
|
risk: string2().nullable()
|
|
9629
9642
|
}).meta({ id: "McpTool" });
|
|
9630
9643
|
var AssetFindingRef = object({
|
|
@@ -9671,8 +9684,9 @@ var ProjectSensitiveData = object({ items: array(SensitiveDataClass) }).meta({ i
|
|
|
9671
9684
|
var ListProjectsResponse = object({ items: array(ProjectSummary) }).meta({ id: "ListProjectsResponse" });
|
|
9672
9685
|
var InventoryStats = object({
|
|
9673
9686
|
/**
|
|
9674
|
-
* Assets with a flag
|
|
9675
|
-
*
|
|
9687
|
+
* Assets with a flag or with an `ATTENTION_TRUST_LEVELS` effective trust,
|
|
9688
|
+
* plus projects with a finding in the last `PROJECT_FINDINGS_WINDOW_DAYS`
|
|
9689
|
+
* days (drives the attention header chip). An asset counts once.
|
|
9676
9690
|
*/
|
|
9677
9691
|
attention: number2().int().nonnegative(),
|
|
9678
9692
|
byType: object({
|
|
@@ -10195,6 +10209,10 @@ var EgressIngestHit = object({
|
|
|
10195
10209
|
*/
|
|
10196
10210
|
credentialRefs: EgressCredentialRefs.optional()
|
|
10197
10211
|
}).meta({ id: "EgressIngestHit" });
|
|
10212
|
+
var SUPERSEDED_PROJECT_KEYS_MAX = 4;
|
|
10213
|
+
var SupersededProjectKeys = array(
|
|
10214
|
+
string2().regex(/^[0-9a-f]{64}$/, "a superseded key must be a 64-character lowercase hex digest")
|
|
10215
|
+
).max(SUPERSEDED_PROJECT_KEYS_MAX);
|
|
10198
10216
|
var EgressIngestRequest = object({
|
|
10199
10217
|
/**
|
|
10200
10218
|
* Hash digest of the local `projectKey`, never the plaintext.
|
|
@@ -10207,6 +10225,7 @@ var EgressIngestRequest = object({
|
|
|
10207
10225
|
* that still has the plaintext to not send.
|
|
10208
10226
|
*/
|
|
10209
10227
|
projectKey: string2().regex(/^[0-9a-f]{64}$/, "projectKey must be a 64-character lowercase hex digest"),
|
|
10228
|
+
supersededProjectKeys: SupersededProjectKeys.optional(),
|
|
10210
10229
|
/** Display name only — never keys reconciliation. */
|
|
10211
10230
|
project: string2(),
|
|
10212
10231
|
reconcile: EgressReconcile,
|
|
@@ -10316,6 +10335,10 @@ var DeviceCommand = object({
|
|
|
10316
10335
|
expiresAt: printable(64).min(1)
|
|
10317
10336
|
}).strict();
|
|
10318
10337
|
var DeviceCommandPollResponse = object({ command: DeviceCommand.nullable() });
|
|
10338
|
+
var SessionHoldResponse = object({
|
|
10339
|
+
held: boolean2(),
|
|
10340
|
+
reason: printable(500).optional()
|
|
10341
|
+
});
|
|
10319
10342
|
var DeviceCommandFailureReason = _enum(["scan_failed", "no_projects", "expired"]);
|
|
10320
10343
|
var DeviceCommandAckBody = discriminatedUnion("outcome", [
|
|
10321
10344
|
object({
|
|
@@ -10378,7 +10401,9 @@ var CredentialSighting = object({
|
|
|
10378
10401
|
}).strict().meta({ id: "CredentialSighting" });
|
|
10379
10402
|
var CredentialSightingsRequest = object({
|
|
10380
10403
|
sightings: array(CredentialSighting).min(1).max(CREDENTIAL_SIGHTINGS_BATCH_MAX),
|
|
10381
|
-
scanId: uuid2().optional()
|
|
10404
|
+
scanId: uuid2().optional(),
|
|
10405
|
+
/** The earlier digests of the one project every sighting in the request names. */
|
|
10406
|
+
supersededProjectKeys: SupersededProjectKeys.optional()
|
|
10382
10407
|
}).strict().meta({ id: "CredentialSightingsRequest" });
|
|
10383
10408
|
var CredentialSightingsAck = object({
|
|
10384
10409
|
accepted: number2().int().nonnegative()
|
|
@@ -10509,6 +10534,18 @@ var ModelPolicy = object({
|
|
|
10509
10534
|
mode: literal("allowlist"),
|
|
10510
10535
|
approved: array(string2().min(1).max(512)).max(1e3)
|
|
10511
10536
|
}).meta({ id: "ModelPolicy" });
|
|
10537
|
+
var TOOL_OUTPUT_FORWARD_MIN_CHARS = 2;
|
|
10538
|
+
var TOOL_OUTPUT_FORWARD_MAX_CHARS = 65536;
|
|
10539
|
+
var CAPTURE_REPOS_MAX = 1e3;
|
|
10540
|
+
var CaptureRepos = array(string2().min(1).max(512)).max(CAPTURE_REPOS_MAX);
|
|
10541
|
+
var CaptureSettings = object({
|
|
10542
|
+
toolOutput: object({
|
|
10543
|
+
maxChars: number2().int().min(TOOL_OUTPUT_FORWARD_MIN_CHARS).max(TOOL_OUTPUT_FORWARD_MAX_CHARS),
|
|
10544
|
+
repos: CaptureRepos.optional()
|
|
10545
|
+
}).optional(),
|
|
10546
|
+
reviewValueRepos: CaptureRepos.optional(),
|
|
10547
|
+
sessionHold: boolean2().optional()
|
|
10548
|
+
}).meta({ id: "CaptureSettings" });
|
|
10512
10549
|
var PolicyBundle = object({
|
|
10513
10550
|
version: string2(),
|
|
10514
10551
|
policies: array(Policy),
|
|
@@ -10572,6 +10609,9 @@ var PolicyBundle = object({
|
|
|
10572
10609
|
// absent leaves the device's own setting in force, which is the behaviour
|
|
10573
10610
|
// that predates the field and the safe direction to default.
|
|
10574
10611
|
redactFallback: RedactFallback.optional(),
|
|
10612
|
+
// Optional so an older backend, and an older on-disk cache, still parses; absent sends what
|
|
10613
|
+
// the machine sent before the field existed.
|
|
10614
|
+
capture: CaptureSettings.optional(),
|
|
10575
10615
|
customKeywords: array(string2()),
|
|
10576
10616
|
fetchedAt: iso_exports.datetime()
|
|
10577
10617
|
}).meta({ id: "PolicyBundle" });
|
|
@@ -10580,7 +10620,8 @@ var POLICY_BUNDLE_SHAPE_ID = [
|
|
|
10580
10620
|
...Object.keys(Policy.shape).map((key) => `policies.${key}`),
|
|
10581
10621
|
...PolicyTarget.options.flatMap((member) => "shape" in member ? Object.keys(member.shape) : []).map((key) => `policies.target.${key}`),
|
|
10582
10622
|
...Object.keys(ExceptionBundleEntry.shape).map((key) => `exceptions.${key}`),
|
|
10583
|
-
...Object.keys(ModelPolicy.shape).map((key) => `modelPolicy.${key}`)
|
|
10623
|
+
...Object.keys(ModelPolicy.shape).map((key) => `modelPolicy.${key}`),
|
|
10624
|
+
...Object.keys(CaptureSettings.shape).map((key) => `capture.${key}`)
|
|
10584
10625
|
].sort().join(",");
|
|
10585
10626
|
var OBSERVE_ONLY_CATEGORIES = ["config"];
|
|
10586
10627
|
var ENFORCEABLE_CATEGORIES = DetectionCategory.options.filter((c) => !OBSERVE_ONLY_CATEGORIES.includes(c));
|