@akasecurity/ai-tc-codex 0.9.21 → 0.9.23
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 +377 -33
- package/scripts/backfill.js +576 -92
- package/scripts/content-retention.js +138 -37
- package/scripts/filescan.js +637 -136
- package/scripts/firstrun.js +536 -84
- package/scripts/history-sync.js +468 -62
- package/scripts/intro.js +47 -6
- package/scripts/onboard.js +351 -26
- package/scripts/post-tool-use.js +608 -97
- package/scripts/pre-tool-use.js +655 -96
- package/scripts/query.js +535 -83
- package/scripts/reconcile.js +541 -88
- package/scripts/remediate.js +587 -99
- package/scripts/scan-worker.js +89 -14
- package/scripts/session-start.js +607 -142
- package/scripts/start-light.js +47 -6
- package/scripts/stop.js +542 -90
- package/scripts/sync.js +643 -142
- package/scripts/user-prompt-submit.js +582 -98
package/scripts/intro.js
CHANGED
|
@@ -8579,6 +8579,12 @@ var CaptureSighting = object({
|
|
|
8579
8579
|
ruleId: string2().min(1),
|
|
8580
8580
|
category: DetectionCategory
|
|
8581
8581
|
}).meta({ id: "CaptureSighting" });
|
|
8582
|
+
var REVIEW_VALUES_MAX = 16;
|
|
8583
|
+
var REVIEW_VALUE_MAX_CHARS = 1024;
|
|
8584
|
+
var ReviewValue = object({
|
|
8585
|
+
ruleId: string2().min(1).max(256),
|
|
8586
|
+
value: string2().min(1).max(REVIEW_VALUE_MAX_CHARS)
|
|
8587
|
+
}).meta({ id: "ReviewValue" });
|
|
8582
8588
|
var EventMetadata = object({
|
|
8583
8589
|
sessionId: string2().optional(),
|
|
8584
8590
|
repo: string2().optional(),
|
|
@@ -8686,7 +8692,14 @@ var EventMetadata = object({
|
|
|
8686
8692
|
scanIncomplete: _enum(["timeout", "unavailable"]).optional(),
|
|
8687
8693
|
// The sighting tokens in `content`, one entry per distinct token and rule.
|
|
8688
8694
|
// Set only on a forwarded capture; the locally stored copy holds the values.
|
|
8689
|
-
sightings: array(CaptureSighting).optional()
|
|
8695
|
+
sightings: array(CaptureSighting).optional(),
|
|
8696
|
+
// The length of the text this capture was cut from, when its content holds only the first
|
|
8697
|
+
// part of it. Absent when the content is the whole text.
|
|
8698
|
+
contentTruncatedFrom: number2().int().nonnegative().optional(),
|
|
8699
|
+
// The raw value of each finding in this capture, for review by the deployment. Set only on
|
|
8700
|
+
// a forwarded capture from a repository the organization's capture settings name; the
|
|
8701
|
+
// locally stored copy never carries it.
|
|
8702
|
+
reviewValues: array(ReviewValue).max(REVIEW_VALUES_MAX).optional()
|
|
8690
8703
|
}).meta({ id: "EventMetadata" });
|
|
8691
8704
|
var Event = object({
|
|
8692
8705
|
id: guid2(),
|
|
@@ -9677,7 +9690,7 @@ var McpTool = object({
|
|
|
9677
9690
|
signature: string2(),
|
|
9678
9691
|
description: string2(),
|
|
9679
9692
|
write: boolean2(),
|
|
9680
|
-
/**
|
|
9693
|
+
/** What makes the tool dangerous; null when nothing does. */
|
|
9681
9694
|
risk: string2().nullable()
|
|
9682
9695
|
}).meta({ id: "McpTool" });
|
|
9683
9696
|
var AssetFindingRef = object({
|
|
@@ -9724,8 +9737,9 @@ var ProjectSensitiveData = object({ items: array(SensitiveDataClass) }).meta({ i
|
|
|
9724
9737
|
var ListProjectsResponse = object({ items: array(ProjectSummary) }).meta({ id: "ListProjectsResponse" });
|
|
9725
9738
|
var InventoryStats = object({
|
|
9726
9739
|
/**
|
|
9727
|
-
* Assets with a flag
|
|
9728
|
-
*
|
|
9740
|
+
* Assets with a flag or with an `ATTENTION_TRUST_LEVELS` effective trust,
|
|
9741
|
+
* plus projects with a finding in the last `PROJECT_FINDINGS_WINDOW_DAYS`
|
|
9742
|
+
* days (drives the attention header chip). An asset counts once.
|
|
9729
9743
|
*/
|
|
9730
9744
|
attention: number2().int().nonnegative(),
|
|
9731
9745
|
byType: object({
|
|
@@ -10248,6 +10262,10 @@ var EgressIngestHit = object({
|
|
|
10248
10262
|
*/
|
|
10249
10263
|
credentialRefs: EgressCredentialRefs.optional()
|
|
10250
10264
|
}).meta({ id: "EgressIngestHit" });
|
|
10265
|
+
var SUPERSEDED_PROJECT_KEYS_MAX = 4;
|
|
10266
|
+
var SupersededProjectKeys = array(
|
|
10267
|
+
string2().regex(/^[0-9a-f]{64}$/, "a superseded key must be a 64-character lowercase hex digest")
|
|
10268
|
+
).max(SUPERSEDED_PROJECT_KEYS_MAX);
|
|
10251
10269
|
var EgressIngestRequest = object({
|
|
10252
10270
|
/**
|
|
10253
10271
|
* Hash digest of the local `projectKey`, never the plaintext.
|
|
@@ -10260,6 +10278,7 @@ var EgressIngestRequest = object({
|
|
|
10260
10278
|
* that still has the plaintext to not send.
|
|
10261
10279
|
*/
|
|
10262
10280
|
projectKey: string2().regex(/^[0-9a-f]{64}$/, "projectKey must be a 64-character lowercase hex digest"),
|
|
10281
|
+
supersededProjectKeys: SupersededProjectKeys.optional(),
|
|
10263
10282
|
/** Display name only — never keys reconciliation. */
|
|
10264
10283
|
project: string2(),
|
|
10265
10284
|
reconcile: EgressReconcile,
|
|
@@ -10369,6 +10388,10 @@ var DeviceCommand = object({
|
|
|
10369
10388
|
expiresAt: printable(64).min(1)
|
|
10370
10389
|
}).strict();
|
|
10371
10390
|
var DeviceCommandPollResponse = object({ command: DeviceCommand.nullable() });
|
|
10391
|
+
var SessionHoldResponse = object({
|
|
10392
|
+
held: boolean2(),
|
|
10393
|
+
reason: printable(500).optional()
|
|
10394
|
+
});
|
|
10372
10395
|
var DeviceCommandFailureReason = _enum(["scan_failed", "no_projects", "expired"]);
|
|
10373
10396
|
var DeviceCommandAckBody = discriminatedUnion("outcome", [
|
|
10374
10397
|
object({
|
|
@@ -10431,7 +10454,9 @@ var CredentialSighting = object({
|
|
|
10431
10454
|
}).strict().meta({ id: "CredentialSighting" });
|
|
10432
10455
|
var CredentialSightingsRequest = object({
|
|
10433
10456
|
sightings: array(CredentialSighting).min(1).max(CREDENTIAL_SIGHTINGS_BATCH_MAX),
|
|
10434
|
-
scanId: uuid2().optional()
|
|
10457
|
+
scanId: uuid2().optional(),
|
|
10458
|
+
/** The earlier digests of the one project every sighting in the request names. */
|
|
10459
|
+
supersededProjectKeys: SupersededProjectKeys.optional()
|
|
10435
10460
|
}).strict().meta({ id: "CredentialSightingsRequest" });
|
|
10436
10461
|
var CredentialSightingsAck = object({
|
|
10437
10462
|
accepted: number2().int().nonnegative()
|
|
@@ -10562,6 +10587,18 @@ var ModelPolicy = object({
|
|
|
10562
10587
|
mode: literal("allowlist"),
|
|
10563
10588
|
approved: array(string2().min(1).max(512)).max(1e3)
|
|
10564
10589
|
}).meta({ id: "ModelPolicy" });
|
|
10590
|
+
var TOOL_OUTPUT_FORWARD_MIN_CHARS = 2;
|
|
10591
|
+
var TOOL_OUTPUT_FORWARD_MAX_CHARS = 65536;
|
|
10592
|
+
var CAPTURE_REPOS_MAX = 1e3;
|
|
10593
|
+
var CaptureRepos = array(string2().min(1).max(512)).max(CAPTURE_REPOS_MAX);
|
|
10594
|
+
var CaptureSettings = object({
|
|
10595
|
+
toolOutput: object({
|
|
10596
|
+
maxChars: number2().int().min(TOOL_OUTPUT_FORWARD_MIN_CHARS).max(TOOL_OUTPUT_FORWARD_MAX_CHARS),
|
|
10597
|
+
repos: CaptureRepos.optional()
|
|
10598
|
+
}).optional(),
|
|
10599
|
+
reviewValueRepos: CaptureRepos.optional(),
|
|
10600
|
+
sessionHold: boolean2().optional()
|
|
10601
|
+
}).meta({ id: "CaptureSettings" });
|
|
10565
10602
|
var PolicyBundle = object({
|
|
10566
10603
|
version: string2(),
|
|
10567
10604
|
policies: array(Policy),
|
|
@@ -10625,6 +10662,9 @@ var PolicyBundle = object({
|
|
|
10625
10662
|
// absent leaves the device's own setting in force, which is the behaviour
|
|
10626
10663
|
// that predates the field and the safe direction to default.
|
|
10627
10664
|
redactFallback: RedactFallback.optional(),
|
|
10665
|
+
// Optional so an older backend, and an older on-disk cache, still parses; absent sends what
|
|
10666
|
+
// the machine sent before the field existed.
|
|
10667
|
+
capture: CaptureSettings.optional(),
|
|
10628
10668
|
customKeywords: array(string2()),
|
|
10629
10669
|
fetchedAt: iso_exports.datetime()
|
|
10630
10670
|
}).meta({ id: "PolicyBundle" });
|
|
@@ -10633,7 +10673,8 @@ var POLICY_BUNDLE_SHAPE_ID = [
|
|
|
10633
10673
|
...Object.keys(Policy.shape).map((key) => `policies.${key}`),
|
|
10634
10674
|
...PolicyTarget.options.flatMap((member) => "shape" in member ? Object.keys(member.shape) : []).map((key) => `policies.target.${key}`),
|
|
10635
10675
|
...Object.keys(ExceptionBundleEntry.shape).map((key) => `exceptions.${key}`),
|
|
10636
|
-
...Object.keys(ModelPolicy.shape).map((key) => `modelPolicy.${key}`)
|
|
10676
|
+
...Object.keys(ModelPolicy.shape).map((key) => `modelPolicy.${key}`),
|
|
10677
|
+
...Object.keys(CaptureSettings.shape).map((key) => `capture.${key}`)
|
|
10637
10678
|
].sort().join(",");
|
|
10638
10679
|
var OBSERVE_ONLY_CATEGORIES = ["config"];
|
|
10639
10680
|
var ENFORCEABLE_CATEGORIES = DetectionCategory.options.filter((c) => !OBSERVE_ONLY_CATEGORIES.includes(c));
|