@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/intro.js
CHANGED
|
@@ -8142,7 +8142,8 @@ var Span = object({
|
|
|
8142
8142
|
var MAX_VARIABLE_NAME_LENGTH = 128;
|
|
8143
8143
|
var VariableName = string2().max(MAX_VARIABLE_NAME_LENGTH);
|
|
8144
8144
|
var Finding = object({
|
|
8145
|
-
|
|
8145
|
+
// A random UUID or a content-addressed sha256 hex digest, depending on the writer.
|
|
8146
|
+
id: string2(),
|
|
8146
8147
|
eventId: guid2(),
|
|
8147
8148
|
ruleId: string2(),
|
|
8148
8149
|
category: DetectionCategory,
|
|
@@ -8570,8 +8571,11 @@ var EventKind = _enum(["prompt", "response", "code_change", "tool_use"]).meta({
|
|
|
8570
8571
|
var CAPTURE_EVENT_TYPES_SQL = EventKind.options.map((k) => `'${k}'`).join(",");
|
|
8571
8572
|
var SIGHTING_TOKEN_PATTERN = /\[\[aka:fp:v[1-9][0-9]{0,15}\.[A-Za-z0-9_-]{43}\]\]/;
|
|
8572
8573
|
var SIGHTING_TOKEN_ANCHORED = new RegExp(`^${SIGHTING_TOKEN_PATTERN.source}$`);
|
|
8574
|
+
var SIGHTING_ALIASES_MAX = 4;
|
|
8575
|
+
var SightingAliases = array(string2().regex(SIGHTING_TOKEN_ANCHORED)).min(1).max(SIGHTING_ALIASES_MAX);
|
|
8573
8576
|
var CaptureSighting = object({
|
|
8574
8577
|
token: string2().regex(SIGHTING_TOKEN_ANCHORED),
|
|
8578
|
+
aliases: SightingAliases.optional(),
|
|
8575
8579
|
ruleId: string2().min(1),
|
|
8576
8580
|
category: DetectionCategory
|
|
8577
8581
|
}).meta({ id: "CaptureSighting" });
|
|
@@ -10011,6 +10015,7 @@ var EgressCredentialRef = discriminatedUnion("kind", [
|
|
|
10011
10015
|
object({
|
|
10012
10016
|
kind: literal("literal"),
|
|
10013
10017
|
token: string2().regex(SIGHTING_TOKEN_ANCHORED),
|
|
10018
|
+
aliases: SightingAliases.optional(),
|
|
10014
10019
|
ruleId: string2().min(1).max(256)
|
|
10015
10020
|
}).strict(),
|
|
10016
10021
|
object({ kind: literal("variable"), variableName: VariableName.min(1) }).strict()
|
|
@@ -10381,7 +10386,8 @@ var sightingKeyMaterial = string2().regex(SIGHTING_KEY_MATERIAL, "must be the ba
|
|
|
10381
10386
|
var sightingKeyVersion = number2().int().min(1);
|
|
10382
10387
|
var SightingKeyVersion = object({
|
|
10383
10388
|
keyVersion: sightingKeyVersion,
|
|
10384
|
-
key: sightingKeyMaterial
|
|
10389
|
+
key: sightingKeyMaterial,
|
|
10390
|
+
acceptedUntil: iso_exports.datetime({ offset: true }).optional().catch(void 0)
|
|
10385
10391
|
});
|
|
10386
10392
|
var SightingKeyResponse = object({
|
|
10387
10393
|
keyVersion: sightingKeyVersion,
|
|
@@ -10398,7 +10404,8 @@ var SightingKeyResponse = object({
|
|
|
10398
10404
|
var StoredSightingKeys = SightingKeyResponse.and(
|
|
10399
10405
|
object({
|
|
10400
10406
|
fetchedAtMs: number2().int().nonnegative(),
|
|
10401
|
-
endpointFingerprint: string2().regex(/^[0-9a-f]{64}$/)
|
|
10407
|
+
endpointFingerprint: string2().regex(/^[0-9a-f]{64}$/),
|
|
10408
|
+
previousFirstSeenAtMs: record(string2().regex(/^[1-9][0-9]*$/), number2().int().nonnegative()).optional()
|
|
10402
10409
|
})
|
|
10403
10410
|
);
|
|
10404
10411
|
var CREDENTIAL_SIGHTINGS_BATCH_MAX = 500;
|
|
@@ -10413,6 +10420,7 @@ var SightingProject = object({
|
|
|
10413
10420
|
}).strict().meta({ id: "SightingProject" });
|
|
10414
10421
|
var CredentialSighting = object({
|
|
10415
10422
|
token: string2().regex(SIGHTING_TOKEN_ANCHORED),
|
|
10423
|
+
aliases: SightingAliases.optional(),
|
|
10416
10424
|
ruleId: printable(256).min(1),
|
|
10417
10425
|
category: literal("secret"),
|
|
10418
10426
|
variableName: VariableName.min(1).optional(),
|
|
@@ -10550,6 +10558,10 @@ var Policy = object({
|
|
|
10550
10558
|
var RedactFallback = BuiltinPolicyId.extract(["monitor", "warn", "block"]).meta({
|
|
10551
10559
|
id: "RedactFallback"
|
|
10552
10560
|
});
|
|
10561
|
+
var ModelPolicy = object({
|
|
10562
|
+
mode: literal("allowlist"),
|
|
10563
|
+
approved: array(string2().min(1).max(512)).max(1e3)
|
|
10564
|
+
}).meta({ id: "ModelPolicy" });
|
|
10553
10565
|
var PolicyBundle = object({
|
|
10554
10566
|
version: string2(),
|
|
10555
10567
|
policies: array(Policy),
|
|
@@ -10600,6 +10612,9 @@ var PolicyBundle = object({
|
|
|
10600
10612
|
// control plane), so no name resolution stands between the decision and the
|
|
10601
10613
|
// comparison.
|
|
10602
10614
|
prohibitedModels: array(string2()).optional(),
|
|
10615
|
+
// Optional so an older backend, and an older on-disk cache, still parses; absent leaves every
|
|
10616
|
+
// model approved.
|
|
10617
|
+
modelPolicy: ModelPolicy.optional(),
|
|
10603
10618
|
// What a resolved `redact` becomes on a field the host cannot rewrite, as
|
|
10604
10619
|
// the ORGANIZATION would have it. Merged raise-only against the device's own
|
|
10605
10620
|
// `WorkspaceSettings.redactFallback` (see strongerRedactFallback below), so
|
|
@@ -10617,7 +10632,8 @@ var POLICY_BUNDLE_SHAPE_ID = [
|
|
|
10617
10632
|
...Object.keys(PolicyBundle.shape),
|
|
10618
10633
|
...Object.keys(Policy.shape).map((key) => `policies.${key}`),
|
|
10619
10634
|
...PolicyTarget.options.flatMap((member) => "shape" in member ? Object.keys(member.shape) : []).map((key) => `policies.target.${key}`),
|
|
10620
|
-
...Object.keys(ExceptionBundleEntry.shape).map((key) => `exceptions.${key}`)
|
|
10635
|
+
...Object.keys(ExceptionBundleEntry.shape).map((key) => `exceptions.${key}`),
|
|
10636
|
+
...Object.keys(ModelPolicy.shape).map((key) => `modelPolicy.${key}`)
|
|
10621
10637
|
].sort().join(",");
|
|
10622
10638
|
var OBSERVE_ONLY_CATEGORIES = ["config"];
|
|
10623
10639
|
var ENFORCEABLE_CATEGORIES = DetectionCategory.options.filter((c) => !OBSERVE_ONLY_CATEGORIES.includes(c));
|
|
@@ -10978,7 +10994,7 @@ var DetectedWebAccounts = object({
|
|
|
10978
10994
|
var DetectedWebAccountsEnvelope = DetectedWebAccounts.extend({ accounts: array(unknown()) });
|
|
10979
10995
|
|
|
10980
10996
|
// ../../packages/schema/src/zod/local.ts
|
|
10981
|
-
var WORKSPACE_SETTINGS_SPEC_VERSION =
|
|
10997
|
+
var WORKSPACE_SETTINGS_SPEC_VERSION = 11;
|
|
10982
10998
|
var RunMode = _enum(["standalone", "attached"]);
|
|
10983
10999
|
var ControlPlaneConnection = object({
|
|
10984
11000
|
endpoint: string2().min(1),
|
|
@@ -11080,6 +11096,15 @@ var BodyRetention = object({
|
|
|
11080
11096
|
// candidate set that is already bounded by "delivered, or never owed".
|
|
11081
11097
|
retainDays: number2().int().min(1).max(3650).default(BODY_RETENTION_DEFAULT_DAYS)
|
|
11082
11098
|
}).meta({ id: "BodyRetention" });
|
|
11099
|
+
var MAX_PROTECTED_PATH_ENTRIES = 256;
|
|
11100
|
+
var MAX_PROTECTED_PATH_ENTRY_CHARS = 1024;
|
|
11101
|
+
var ProtectedPathEntry = string2().trim().min(1).max(MAX_PROTECTED_PATH_ENTRY_CHARS);
|
|
11102
|
+
var ProtectedPaths = array(unknown()).transform(
|
|
11103
|
+
(entries) => entries.flatMap((entry) => {
|
|
11104
|
+
const parsed = ProtectedPathEntry.safeParse(entry);
|
|
11105
|
+
return parsed.success ? [parsed.data] : [];
|
|
11106
|
+
}).slice(0, MAX_PROTECTED_PATH_ENTRIES)
|
|
11107
|
+
);
|
|
11083
11108
|
var WorkspaceSettings = object({
|
|
11084
11109
|
specVersion: number2().int().positive().default(WORKSPACE_SETTINGS_SPEC_VERSION),
|
|
11085
11110
|
runMode: RunMode.default("standalone"),
|
|
@@ -11170,7 +11195,18 @@ var WorkspaceSettings = object({
|
|
|
11170
11195
|
bodyRetention: BodyRetention.default({
|
|
11171
11196
|
enabled: false,
|
|
11172
11197
|
retainDays: BODY_RETENTION_DEFAULT_DAYS
|
|
11173
|
-
})
|
|
11198
|
+
}),
|
|
11199
|
+
// Folders and file name globs whose files a tool call may not touch
|
|
11200
|
+
// unflagged: a Read, Grep, Glob or Bash naming one becomes a finding under
|
|
11201
|
+
// the command-risk pack's policy. Absent means none are protected, and
|
|
11202
|
+
// protectedPathsOf is the one reader.
|
|
11203
|
+
//
|
|
11204
|
+
// A bad entry is dropped on its own (see ProtectedPaths); `.catch(undefined)`
|
|
11205
|
+
// reads a value that is not a list at all as no list. A settings.json that
|
|
11206
|
+
// fails this schema reads as the unonboarded defaults, and the next save
|
|
11207
|
+
// writes those back over it, so a malformed value must not cost every other
|
|
11208
|
+
// setting. Not a ManagedSettingKey.
|
|
11209
|
+
protectedPaths: ProtectedPaths.optional().catch(void 0)
|
|
11174
11210
|
});
|
|
11175
11211
|
|
|
11176
11212
|
// ../../packages/schema/src/zod/agent-scope.ts
|
|
@@ -11334,6 +11370,9 @@ var ConfigInventoryAck = object({
|
|
|
11334
11370
|
accepted: number2().int().nonnegative()
|
|
11335
11371
|
});
|
|
11336
11372
|
|
|
11373
|
+
// ../../packages/schema/src/zod/credential-status.ts
|
|
11374
|
+
var CredentialStatus = _enum(["rotation_overdue", "exposed"]).meta({ id: "CredentialStatus" });
|
|
11375
|
+
|
|
11337
11376
|
// ../../packages/schema/src/zod/registry.ts
|
|
11338
11377
|
var Namespace = string2().regex(/^[a-z][a-z0-9-]*$/);
|
|
11339
11378
|
var PackId = string2().regex(/^[a-z][a-z0-9-]*$/);
|