@akasecurity/ai-tc-antigravity 0.9.20 → 0.9.21
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/package.json +7 -7
- package/plugin.json +1 -1
- package/scripts/apply-suppressions.js +307 -44
- package/scripts/backfill.js +545 -159
- package/scripts/content-retention.js +120 -30
- package/scripts/fail-open-count.js +71 -21
- package/scripts/filescan.js +586 -194
- package/scripts/firstrun.js +443 -135
- package/scripts/history-sync.js +382 -67
- package/scripts/intro.js +45 -6
- package/scripts/onboard.js +307 -44
- package/scripts/post-tool-use.js +91 -29
- package/scripts/pre-invocation.js +612 -213
- package/scripts/pre-tool-use.js +561 -165
- package/scripts/query.js +443 -135
- package/scripts/reconcile.js +458 -138
- package/scripts/remediate.js +540 -156
- package/scripts/scan-worker.js +57 -8
- package/scripts/start-light.js +57 -8
- package/scripts/stop.js +91 -29
- package/scripts/sync.js +832 -199
- package/skills/setup/SKILL.md +1 -0
package/scripts/scan-worker.js
CHANGED
|
@@ -8089,7 +8089,8 @@ var Span = object({
|
|
|
8089
8089
|
var MAX_VARIABLE_NAME_LENGTH = 128;
|
|
8090
8090
|
var VariableName = string2().max(MAX_VARIABLE_NAME_LENGTH);
|
|
8091
8091
|
var Finding = object({
|
|
8092
|
-
|
|
8092
|
+
// A random UUID or a content-addressed sha256 hex digest, depending on the writer.
|
|
8093
|
+
id: string2(),
|
|
8093
8094
|
eventId: guid2(),
|
|
8094
8095
|
ruleId: string2(),
|
|
8095
8096
|
category: DetectionCategory,
|
|
@@ -8517,8 +8518,11 @@ var EventKind = _enum(["prompt", "response", "code_change", "tool_use"]).meta({
|
|
|
8517
8518
|
var CAPTURE_EVENT_TYPES_SQL = EventKind.options.map((k) => `'${k}'`).join(",");
|
|
8518
8519
|
var SIGHTING_TOKEN_PATTERN = /\[\[aka:fp:v[1-9][0-9]{0,15}\.[A-Za-z0-9_-]{43}\]\]/;
|
|
8519
8520
|
var SIGHTING_TOKEN_ANCHORED = new RegExp(`^${SIGHTING_TOKEN_PATTERN.source}$`);
|
|
8521
|
+
var SIGHTING_ALIASES_MAX = 4;
|
|
8522
|
+
var SightingAliases = array(string2().regex(SIGHTING_TOKEN_ANCHORED)).min(1).max(SIGHTING_ALIASES_MAX);
|
|
8520
8523
|
var CaptureSighting = object({
|
|
8521
8524
|
token: string2().regex(SIGHTING_TOKEN_ANCHORED),
|
|
8525
|
+
aliases: SightingAliases.optional(),
|
|
8522
8526
|
ruleId: string2().min(1),
|
|
8523
8527
|
category: DetectionCategory
|
|
8524
8528
|
}).meta({ id: "CaptureSighting" });
|
|
@@ -9958,6 +9962,7 @@ var EgressCredentialRef = discriminatedUnion("kind", [
|
|
|
9958
9962
|
object({
|
|
9959
9963
|
kind: literal("literal"),
|
|
9960
9964
|
token: string2().regex(SIGHTING_TOKEN_ANCHORED),
|
|
9965
|
+
aliases: SightingAliases.optional(),
|
|
9961
9966
|
ruleId: string2().min(1).max(256)
|
|
9962
9967
|
}).strict(),
|
|
9963
9968
|
object({ kind: literal("variable"), variableName: VariableName.min(1) }).strict()
|
|
@@ -10328,7 +10333,8 @@ var sightingKeyMaterial = string2().regex(SIGHTING_KEY_MATERIAL, "must be the ba
|
|
|
10328
10333
|
var sightingKeyVersion = number2().int().min(1);
|
|
10329
10334
|
var SightingKeyVersion = object({
|
|
10330
10335
|
keyVersion: sightingKeyVersion,
|
|
10331
|
-
key: sightingKeyMaterial
|
|
10336
|
+
key: sightingKeyMaterial,
|
|
10337
|
+
acceptedUntil: iso_exports.datetime({ offset: true }).optional().catch(void 0)
|
|
10332
10338
|
});
|
|
10333
10339
|
var SightingKeyResponse = object({
|
|
10334
10340
|
keyVersion: sightingKeyVersion,
|
|
@@ -10345,7 +10351,8 @@ var SightingKeyResponse = object({
|
|
|
10345
10351
|
var StoredSightingKeys = SightingKeyResponse.and(
|
|
10346
10352
|
object({
|
|
10347
10353
|
fetchedAtMs: number2().int().nonnegative(),
|
|
10348
|
-
endpointFingerprint: string2().regex(/^[0-9a-f]{64}$/)
|
|
10354
|
+
endpointFingerprint: string2().regex(/^[0-9a-f]{64}$/),
|
|
10355
|
+
previousFirstSeenAtMs: record(string2().regex(/^[1-9][0-9]*$/), number2().int().nonnegative()).optional()
|
|
10349
10356
|
})
|
|
10350
10357
|
);
|
|
10351
10358
|
var CREDENTIAL_SIGHTINGS_BATCH_MAX = 500;
|
|
@@ -10360,6 +10367,7 @@ var SightingProject = object({
|
|
|
10360
10367
|
}).strict().meta({ id: "SightingProject" });
|
|
10361
10368
|
var CredentialSighting = object({
|
|
10362
10369
|
token: string2().regex(SIGHTING_TOKEN_ANCHORED),
|
|
10370
|
+
aliases: SightingAliases.optional(),
|
|
10363
10371
|
ruleId: printable(256).min(1),
|
|
10364
10372
|
category: literal("secret"),
|
|
10365
10373
|
variableName: VariableName.min(1).optional(),
|
|
@@ -10497,6 +10505,10 @@ var Policy = object({
|
|
|
10497
10505
|
var RedactFallback = BuiltinPolicyId.extract(["monitor", "warn", "block"]).meta({
|
|
10498
10506
|
id: "RedactFallback"
|
|
10499
10507
|
});
|
|
10508
|
+
var ModelPolicy = object({
|
|
10509
|
+
mode: literal("allowlist"),
|
|
10510
|
+
approved: array(string2().min(1).max(512)).max(1e3)
|
|
10511
|
+
}).meta({ id: "ModelPolicy" });
|
|
10500
10512
|
var PolicyBundle = object({
|
|
10501
10513
|
version: string2(),
|
|
10502
10514
|
policies: array(Policy),
|
|
@@ -10547,6 +10559,9 @@ var PolicyBundle = object({
|
|
|
10547
10559
|
// control plane), so no name resolution stands between the decision and the
|
|
10548
10560
|
// comparison.
|
|
10549
10561
|
prohibitedModels: array(string2()).optional(),
|
|
10562
|
+
// Optional so an older backend, and an older on-disk cache, still parses; absent leaves every
|
|
10563
|
+
// model approved.
|
|
10564
|
+
modelPolicy: ModelPolicy.optional(),
|
|
10550
10565
|
// What a resolved `redact` becomes on a field the host cannot rewrite, as
|
|
10551
10566
|
// the ORGANIZATION would have it. Merged raise-only against the device's own
|
|
10552
10567
|
// `WorkspaceSettings.redactFallback` (see strongerRedactFallback below), so
|
|
@@ -10564,7 +10579,8 @@ var POLICY_BUNDLE_SHAPE_ID = [
|
|
|
10564
10579
|
...Object.keys(PolicyBundle.shape),
|
|
10565
10580
|
...Object.keys(Policy.shape).map((key) => `policies.${key}`),
|
|
10566
10581
|
...PolicyTarget.options.flatMap((member) => "shape" in member ? Object.keys(member.shape) : []).map((key) => `policies.target.${key}`),
|
|
10567
|
-
...Object.keys(ExceptionBundleEntry.shape).map((key) => `exceptions.${key}`)
|
|
10582
|
+
...Object.keys(ExceptionBundleEntry.shape).map((key) => `exceptions.${key}`),
|
|
10583
|
+
...Object.keys(ModelPolicy.shape).map((key) => `modelPolicy.${key}`)
|
|
10568
10584
|
].sort().join(",");
|
|
10569
10585
|
var OBSERVE_ONLY_CATEGORIES = ["config"];
|
|
10570
10586
|
var ENFORCEABLE_CATEGORIES = DetectionCategory.options.filter((c) => !OBSERVE_ONLY_CATEGORIES.includes(c));
|
|
@@ -10925,7 +10941,7 @@ var DetectedWebAccounts = object({
|
|
|
10925
10941
|
var DetectedWebAccountsEnvelope = DetectedWebAccounts.extend({ accounts: array(unknown()) });
|
|
10926
10942
|
|
|
10927
10943
|
// ../../packages/schema/src/zod/local.ts
|
|
10928
|
-
var WORKSPACE_SETTINGS_SPEC_VERSION =
|
|
10944
|
+
var WORKSPACE_SETTINGS_SPEC_VERSION = 11;
|
|
10929
10945
|
var RunMode = _enum(["standalone", "attached"]);
|
|
10930
10946
|
var ControlPlaneConnection = object({
|
|
10931
10947
|
endpoint: string2().min(1),
|
|
@@ -11027,6 +11043,15 @@ var BodyRetention = object({
|
|
|
11027
11043
|
// candidate set that is already bounded by "delivered, or never owed".
|
|
11028
11044
|
retainDays: number2().int().min(1).max(3650).default(BODY_RETENTION_DEFAULT_DAYS)
|
|
11029
11045
|
}).meta({ id: "BodyRetention" });
|
|
11046
|
+
var MAX_PROTECTED_PATH_ENTRIES = 256;
|
|
11047
|
+
var MAX_PROTECTED_PATH_ENTRY_CHARS = 1024;
|
|
11048
|
+
var ProtectedPathEntry = string2().trim().min(1).max(MAX_PROTECTED_PATH_ENTRY_CHARS);
|
|
11049
|
+
var ProtectedPaths = array(unknown()).transform(
|
|
11050
|
+
(entries) => entries.flatMap((entry) => {
|
|
11051
|
+
const parsed = ProtectedPathEntry.safeParse(entry);
|
|
11052
|
+
return parsed.success ? [parsed.data] : [];
|
|
11053
|
+
}).slice(0, MAX_PROTECTED_PATH_ENTRIES)
|
|
11054
|
+
);
|
|
11030
11055
|
var WorkspaceSettings = object({
|
|
11031
11056
|
specVersion: number2().int().positive().default(WORKSPACE_SETTINGS_SPEC_VERSION),
|
|
11032
11057
|
runMode: RunMode.default("standalone"),
|
|
@@ -11117,7 +11142,18 @@ var WorkspaceSettings = object({
|
|
|
11117
11142
|
bodyRetention: BodyRetention.default({
|
|
11118
11143
|
enabled: false,
|
|
11119
11144
|
retainDays: BODY_RETENTION_DEFAULT_DAYS
|
|
11120
|
-
})
|
|
11145
|
+
}),
|
|
11146
|
+
// Folders and file name globs whose files a tool call may not touch
|
|
11147
|
+
// unflagged: a Read, Grep, Glob or Bash naming one becomes a finding under
|
|
11148
|
+
// the command-risk pack's policy. Absent means none are protected, and
|
|
11149
|
+
// protectedPathsOf is the one reader.
|
|
11150
|
+
//
|
|
11151
|
+
// A bad entry is dropped on its own (see ProtectedPaths); `.catch(undefined)`
|
|
11152
|
+
// reads a value that is not a list at all as no list. A settings.json that
|
|
11153
|
+
// fails this schema reads as the unonboarded defaults, and the next save
|
|
11154
|
+
// writes those back over it, so a malformed value must not cost every other
|
|
11155
|
+
// setting. Not a ManagedSettingKey.
|
|
11156
|
+
protectedPaths: ProtectedPaths.optional().catch(void 0)
|
|
11121
11157
|
});
|
|
11122
11158
|
|
|
11123
11159
|
// ../../packages/schema/src/zod/agent-scope.ts
|
|
@@ -11281,6 +11317,9 @@ var ConfigInventoryAck = object({
|
|
|
11281
11317
|
accepted: number2().int().nonnegative()
|
|
11282
11318
|
});
|
|
11283
11319
|
|
|
11320
|
+
// ../../packages/schema/src/zod/credential-status.ts
|
|
11321
|
+
var CredentialStatus = _enum(["rotation_overdue", "exposed"]).meta({ id: "CredentialStatus" });
|
|
11322
|
+
|
|
11284
11323
|
// ../../packages/schema/src/zod/registry.ts
|
|
11285
11324
|
var Namespace = string2().regex(/^[a-z][a-z0-9-]*$/);
|
|
11286
11325
|
var PackId = string2().regex(/^[a-z][a-z0-9-]*$/);
|
|
@@ -13621,7 +13660,7 @@ function scanText(text, ruleset2, context) {
|
|
|
13621
13660
|
var SHIELDED_SOURCE = `${POINTER_TOKEN_PATTERN.source}|${SIGHTING_TOKEN_PATTERN.source}`;
|
|
13622
13661
|
|
|
13623
13662
|
// ../../packages/detections/src/posture/config-posture.ts
|
|
13624
|
-
var RULE_VERSION = "
|
|
13663
|
+
var RULE_VERSION = "2";
|
|
13625
13664
|
var KNOWN_TOOLS = /* @__PURE__ */ new Set([
|
|
13626
13665
|
"prettier",
|
|
13627
13666
|
"eslint",
|
|
@@ -13635,6 +13674,13 @@ var KNOWN_TOOLS = /* @__PURE__ */ new Set([
|
|
|
13635
13674
|
"npm",
|
|
13636
13675
|
"pnpm",
|
|
13637
13676
|
"yarn",
|
|
13677
|
+
"bun",
|
|
13678
|
+
"bunx",
|
|
13679
|
+
"deno",
|
|
13680
|
+
"python3",
|
|
13681
|
+
"uv",
|
|
13682
|
+
"bash",
|
|
13683
|
+
"sh",
|
|
13638
13684
|
"make",
|
|
13639
13685
|
"git",
|
|
13640
13686
|
"jq",
|
|
@@ -13661,7 +13707,7 @@ var CONFIG_POSTURE_RULES = [
|
|
|
13661
13707
|
name: "Unknown hook \u2014 not attributable to a plugin or known tool",
|
|
13662
13708
|
category: "config",
|
|
13663
13709
|
// medium, not high: with a deliberately tiny allowlist this v1 heuristic
|
|
13664
|
-
// fires on ordinary
|
|
13710
|
+
// fires on ordinary hooks it cannot attribute, such as compound commands
|
|
13665
13711
|
// (cd … && tool); 'high' is reserved for egress, which is genuinely
|
|
13666
13712
|
// dangerous. Revisit when the known-hooks registry replaces the allowlist.
|
|
13667
13713
|
severity: "medium",
|
|
@@ -13835,6 +13881,7 @@ function worstProbeMs(rule, now = wallClock, corroborate) {
|
|
|
13835
13881
|
}
|
|
13836
13882
|
var CPU_CORROBORATION_SHARE = 0.2;
|
|
13837
13883
|
var CORROBORATION_FLOOR_MS = BUDGET_MS * CPU_CORROBORATION_SHARE;
|
|
13884
|
+
var MAX_GROWTH_RATIO = 3;
|
|
13838
13885
|
function repeatTo(unit, length) {
|
|
13839
13886
|
return unit.repeat(Math.ceil(length / unit.length)).slice(0, length);
|
|
13840
13887
|
}
|
|
@@ -13871,6 +13918,8 @@ var GROWTH_CORPORA = [
|
|
|
13871
13918
|
build: (length) => repeatTo(unit, length)
|
|
13872
13919
|
}))
|
|
13873
13920
|
];
|
|
13921
|
+
var QUADRATIC_GROWTH = 4;
|
|
13922
|
+
var SAMPLED_GROWTH = MAX_GROWTH_RATIO ** 2 / QUADRATIC_GROWTH;
|
|
13874
13923
|
function checkRuleTiming(rule, corroborate) {
|
|
13875
13924
|
const { ms, probe, corroboratedMs } = worstProbeMs(rule, wallClock, corroborate);
|
|
13876
13925
|
const work = corroboratedMs ?? 0;
|
package/scripts/start-light.js
CHANGED
|
@@ -8086,7 +8086,8 @@ var Span = object({
|
|
|
8086
8086
|
var MAX_VARIABLE_NAME_LENGTH = 128;
|
|
8087
8087
|
var VariableName = string2().max(MAX_VARIABLE_NAME_LENGTH);
|
|
8088
8088
|
var Finding = object({
|
|
8089
|
-
|
|
8089
|
+
// A random UUID or a content-addressed sha256 hex digest, depending on the writer.
|
|
8090
|
+
id: string2(),
|
|
8090
8091
|
eventId: guid2(),
|
|
8091
8092
|
ruleId: string2(),
|
|
8092
8093
|
category: DetectionCategory,
|
|
@@ -8514,8 +8515,11 @@ var EventKind = _enum(["prompt", "response", "code_change", "tool_use"]).meta({
|
|
|
8514
8515
|
var CAPTURE_EVENT_TYPES_SQL = EventKind.options.map((k) => `'${k}'`).join(",");
|
|
8515
8516
|
var SIGHTING_TOKEN_PATTERN = /\[\[aka:fp:v[1-9][0-9]{0,15}\.[A-Za-z0-9_-]{43}\]\]/;
|
|
8516
8517
|
var SIGHTING_TOKEN_ANCHORED = new RegExp(`^${SIGHTING_TOKEN_PATTERN.source}$`);
|
|
8518
|
+
var SIGHTING_ALIASES_MAX = 4;
|
|
8519
|
+
var SightingAliases = array(string2().regex(SIGHTING_TOKEN_ANCHORED)).min(1).max(SIGHTING_ALIASES_MAX);
|
|
8517
8520
|
var CaptureSighting = object({
|
|
8518
8521
|
token: string2().regex(SIGHTING_TOKEN_ANCHORED),
|
|
8522
|
+
aliases: SightingAliases.optional(),
|
|
8519
8523
|
ruleId: string2().min(1),
|
|
8520
8524
|
category: DetectionCategory
|
|
8521
8525
|
}).meta({ id: "CaptureSighting" });
|
|
@@ -9955,6 +9959,7 @@ var EgressCredentialRef = discriminatedUnion("kind", [
|
|
|
9955
9959
|
object({
|
|
9956
9960
|
kind: literal("literal"),
|
|
9957
9961
|
token: string2().regex(SIGHTING_TOKEN_ANCHORED),
|
|
9962
|
+
aliases: SightingAliases.optional(),
|
|
9958
9963
|
ruleId: string2().min(1).max(256)
|
|
9959
9964
|
}).strict(),
|
|
9960
9965
|
object({ kind: literal("variable"), variableName: VariableName.min(1) }).strict()
|
|
@@ -10325,7 +10330,8 @@ var sightingKeyMaterial = string2().regex(SIGHTING_KEY_MATERIAL, "must be the ba
|
|
|
10325
10330
|
var sightingKeyVersion = number2().int().min(1);
|
|
10326
10331
|
var SightingKeyVersion = object({
|
|
10327
10332
|
keyVersion: sightingKeyVersion,
|
|
10328
|
-
key: sightingKeyMaterial
|
|
10333
|
+
key: sightingKeyMaterial,
|
|
10334
|
+
acceptedUntil: iso_exports.datetime({ offset: true }).optional().catch(void 0)
|
|
10329
10335
|
});
|
|
10330
10336
|
var SightingKeyResponse = object({
|
|
10331
10337
|
keyVersion: sightingKeyVersion,
|
|
@@ -10342,7 +10348,8 @@ var SightingKeyResponse = object({
|
|
|
10342
10348
|
var StoredSightingKeys = SightingKeyResponse.and(
|
|
10343
10349
|
object({
|
|
10344
10350
|
fetchedAtMs: number2().int().nonnegative(),
|
|
10345
|
-
endpointFingerprint: string2().regex(/^[0-9a-f]{64}$/)
|
|
10351
|
+
endpointFingerprint: string2().regex(/^[0-9a-f]{64}$/),
|
|
10352
|
+
previousFirstSeenAtMs: record(string2().regex(/^[1-9][0-9]*$/), number2().int().nonnegative()).optional()
|
|
10346
10353
|
})
|
|
10347
10354
|
);
|
|
10348
10355
|
var CREDENTIAL_SIGHTINGS_BATCH_MAX = 500;
|
|
@@ -10357,6 +10364,7 @@ var SightingProject = object({
|
|
|
10357
10364
|
}).strict().meta({ id: "SightingProject" });
|
|
10358
10365
|
var CredentialSighting = object({
|
|
10359
10366
|
token: string2().regex(SIGHTING_TOKEN_ANCHORED),
|
|
10367
|
+
aliases: SightingAliases.optional(),
|
|
10360
10368
|
ruleId: printable(256).min(1),
|
|
10361
10369
|
category: literal("secret"),
|
|
10362
10370
|
variableName: VariableName.min(1).optional(),
|
|
@@ -10494,6 +10502,10 @@ var Policy = object({
|
|
|
10494
10502
|
var RedactFallback = BuiltinPolicyId.extract(["monitor", "warn", "block"]).meta({
|
|
10495
10503
|
id: "RedactFallback"
|
|
10496
10504
|
});
|
|
10505
|
+
var ModelPolicy = object({
|
|
10506
|
+
mode: literal("allowlist"),
|
|
10507
|
+
approved: array(string2().min(1).max(512)).max(1e3)
|
|
10508
|
+
}).meta({ id: "ModelPolicy" });
|
|
10497
10509
|
var PolicyBundle = object({
|
|
10498
10510
|
version: string2(),
|
|
10499
10511
|
policies: array(Policy),
|
|
@@ -10544,6 +10556,9 @@ var PolicyBundle = object({
|
|
|
10544
10556
|
// control plane), so no name resolution stands between the decision and the
|
|
10545
10557
|
// comparison.
|
|
10546
10558
|
prohibitedModels: array(string2()).optional(),
|
|
10559
|
+
// Optional so an older backend, and an older on-disk cache, still parses; absent leaves every
|
|
10560
|
+
// model approved.
|
|
10561
|
+
modelPolicy: ModelPolicy.optional(),
|
|
10547
10562
|
// What a resolved `redact` becomes on a field the host cannot rewrite, as
|
|
10548
10563
|
// the ORGANIZATION would have it. Merged raise-only against the device's own
|
|
10549
10564
|
// `WorkspaceSettings.redactFallback` (see strongerRedactFallback below), so
|
|
@@ -10561,7 +10576,8 @@ var POLICY_BUNDLE_SHAPE_ID = [
|
|
|
10561
10576
|
...Object.keys(PolicyBundle.shape),
|
|
10562
10577
|
...Object.keys(Policy.shape).map((key) => `policies.${key}`),
|
|
10563
10578
|
...PolicyTarget.options.flatMap((member) => "shape" in member ? Object.keys(member.shape) : []).map((key) => `policies.target.${key}`),
|
|
10564
|
-
...Object.keys(ExceptionBundleEntry.shape).map((key) => `exceptions.${key}`)
|
|
10579
|
+
...Object.keys(ExceptionBundleEntry.shape).map((key) => `exceptions.${key}`),
|
|
10580
|
+
...Object.keys(ModelPolicy.shape).map((key) => `modelPolicy.${key}`)
|
|
10565
10581
|
].sort().join(",");
|
|
10566
10582
|
var OBSERVE_ONLY_CATEGORIES = ["config"];
|
|
10567
10583
|
var ENFORCEABLE_CATEGORIES = DetectionCategory.options.filter((c) => !OBSERVE_ONLY_CATEGORIES.includes(c));
|
|
@@ -10927,7 +10943,7 @@ var DetectedWebAccounts = object({
|
|
|
10927
10943
|
var DetectedWebAccountsEnvelope = DetectedWebAccounts.extend({ accounts: array(unknown()) });
|
|
10928
10944
|
|
|
10929
10945
|
// ../../packages/schema/src/zod/local.ts
|
|
10930
|
-
var WORKSPACE_SETTINGS_SPEC_VERSION =
|
|
10946
|
+
var WORKSPACE_SETTINGS_SPEC_VERSION = 11;
|
|
10931
10947
|
var RunMode = _enum(["standalone", "attached"]);
|
|
10932
10948
|
var ControlPlaneConnection = object({
|
|
10933
10949
|
endpoint: string2().min(1),
|
|
@@ -11029,6 +11045,15 @@ var BodyRetention = object({
|
|
|
11029
11045
|
// candidate set that is already bounded by "delivered, or never owed".
|
|
11030
11046
|
retainDays: number2().int().min(1).max(3650).default(BODY_RETENTION_DEFAULT_DAYS)
|
|
11031
11047
|
}).meta({ id: "BodyRetention" });
|
|
11048
|
+
var MAX_PROTECTED_PATH_ENTRIES = 256;
|
|
11049
|
+
var MAX_PROTECTED_PATH_ENTRY_CHARS = 1024;
|
|
11050
|
+
var ProtectedPathEntry = string2().trim().min(1).max(MAX_PROTECTED_PATH_ENTRY_CHARS);
|
|
11051
|
+
var ProtectedPaths = array(unknown()).transform(
|
|
11052
|
+
(entries) => entries.flatMap((entry) => {
|
|
11053
|
+
const parsed = ProtectedPathEntry.safeParse(entry);
|
|
11054
|
+
return parsed.success ? [parsed.data] : [];
|
|
11055
|
+
}).slice(0, MAX_PROTECTED_PATH_ENTRIES)
|
|
11056
|
+
);
|
|
11032
11057
|
var WorkspaceSettings = object({
|
|
11033
11058
|
specVersion: number2().int().positive().default(WORKSPACE_SETTINGS_SPEC_VERSION),
|
|
11034
11059
|
runMode: RunMode.default("standalone"),
|
|
@@ -11119,7 +11144,18 @@ var WorkspaceSettings = object({
|
|
|
11119
11144
|
bodyRetention: BodyRetention.default({
|
|
11120
11145
|
enabled: false,
|
|
11121
11146
|
retainDays: BODY_RETENTION_DEFAULT_DAYS
|
|
11122
|
-
})
|
|
11147
|
+
}),
|
|
11148
|
+
// Folders and file name globs whose files a tool call may not touch
|
|
11149
|
+
// unflagged: a Read, Grep, Glob or Bash naming one becomes a finding under
|
|
11150
|
+
// the command-risk pack's policy. Absent means none are protected, and
|
|
11151
|
+
// protectedPathsOf is the one reader.
|
|
11152
|
+
//
|
|
11153
|
+
// A bad entry is dropped on its own (see ProtectedPaths); `.catch(undefined)`
|
|
11154
|
+
// reads a value that is not a list at all as no list. A settings.json that
|
|
11155
|
+
// fails this schema reads as the unonboarded defaults, and the next save
|
|
11156
|
+
// writes those back over it, so a malformed value must not cost every other
|
|
11157
|
+
// setting. Not a ManagedSettingKey.
|
|
11158
|
+
protectedPaths: ProtectedPaths.optional().catch(void 0)
|
|
11123
11159
|
});
|
|
11124
11160
|
|
|
11125
11161
|
// ../../packages/schema/src/zod/agent-scope.ts
|
|
@@ -11283,6 +11319,9 @@ var ConfigInventoryAck = object({
|
|
|
11283
11319
|
accepted: number2().int().nonnegative()
|
|
11284
11320
|
});
|
|
11285
11321
|
|
|
11322
|
+
// ../../packages/schema/src/zod/credential-status.ts
|
|
11323
|
+
var CredentialStatus = _enum(["rotation_overdue", "exposed"]).meta({ id: "CredentialStatus" });
|
|
11324
|
+
|
|
11286
11325
|
// ../../packages/schema/src/zod/registry.ts
|
|
11287
11326
|
var Namespace = string2().regex(/^[a-z][a-z0-9-]*$/);
|
|
11288
11327
|
var PackId = string2().regex(/^[a-z][a-z0-9-]*$/);
|
|
@@ -12942,7 +12981,7 @@ var regexMatcher = new RegexMatcher2();
|
|
|
12942
12981
|
var SHIELDED_SOURCE = `${POINTER_TOKEN_PATTERN.source}|${SIGHTING_TOKEN_PATTERN.source}`;
|
|
12943
12982
|
|
|
12944
12983
|
// ../../packages/detections/src/posture/config-posture.ts
|
|
12945
|
-
var RULE_VERSION = "
|
|
12984
|
+
var RULE_VERSION = "2";
|
|
12946
12985
|
var KNOWN_TOOLS = /* @__PURE__ */ new Set([
|
|
12947
12986
|
"prettier",
|
|
12948
12987
|
"eslint",
|
|
@@ -12956,6 +12995,13 @@ var KNOWN_TOOLS = /* @__PURE__ */ new Set([
|
|
|
12956
12995
|
"npm",
|
|
12957
12996
|
"pnpm",
|
|
12958
12997
|
"yarn",
|
|
12998
|
+
"bun",
|
|
12999
|
+
"bunx",
|
|
13000
|
+
"deno",
|
|
13001
|
+
"python3",
|
|
13002
|
+
"uv",
|
|
13003
|
+
"bash",
|
|
13004
|
+
"sh",
|
|
12959
13005
|
"make",
|
|
12960
13006
|
"git",
|
|
12961
13007
|
"jq",
|
|
@@ -12982,7 +13028,7 @@ var CONFIG_POSTURE_RULES = [
|
|
|
12982
13028
|
name: "Unknown hook \u2014 not attributable to a plugin or known tool",
|
|
12983
13029
|
category: "config",
|
|
12984
13030
|
// medium, not high: with a deliberately tiny allowlist this v1 heuristic
|
|
12985
|
-
// fires on ordinary
|
|
13031
|
+
// fires on ordinary hooks it cannot attribute, such as compound commands
|
|
12986
13032
|
// (cd … && tool); 'high' is reserved for egress, which is genuinely
|
|
12987
13033
|
// dangerous. Revisit when the known-hooks registry replaces the allowlist.
|
|
12988
13034
|
severity: "medium",
|
|
@@ -13075,6 +13121,7 @@ var POLYNOMIAL_PROBES = ["abc-", "a.", "a ", "a=", "x", "0", "a@", "a/", "ab"].m
|
|
|
13075
13121
|
);
|
|
13076
13122
|
var CPU_CORROBORATION_SHARE = 0.2;
|
|
13077
13123
|
var CORROBORATION_FLOOR_MS = BUDGET_MS * CPU_CORROBORATION_SHARE;
|
|
13124
|
+
var MAX_GROWTH_RATIO = 3;
|
|
13078
13125
|
function repeatTo(unit, length) {
|
|
13079
13126
|
return unit.repeat(Math.ceil(length / unit.length)).slice(0, length);
|
|
13080
13127
|
}
|
|
@@ -13111,6 +13158,8 @@ var GROWTH_CORPORA = [
|
|
|
13111
13158
|
build: (length) => repeatTo(unit, length)
|
|
13112
13159
|
}))
|
|
13113
13160
|
];
|
|
13161
|
+
var QUADRATIC_GROWTH = 4;
|
|
13162
|
+
var SAMPLED_GROWTH = MAX_GROWTH_RATIO ** 2 / QUADRATIC_GROWTH;
|
|
13114
13163
|
|
|
13115
13164
|
// ../../packages/detections/src/variable-name.ts
|
|
13116
13165
|
var VARIABLE_NAME_LOOKBEHIND = MAX_VARIABLE_NAME_LENGTH + 64;
|