@akasecurity/ai-tc-claude-code 0.9.0 → 0.9.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/.claude-plugin/plugin.json +1 -1
- package/commands/setup.md +11 -10
- package/package.json +4 -4
- package/scripts/apply-suppressions.js +1235 -181
- package/scripts/backfill.js +1385 -174
- package/scripts/filescan.js +2641 -333
- package/scripts/firstrun.js +1241 -174
- package/scripts/intro.js +820 -147
- package/scripts/onboard.js +1224 -170
- package/scripts/post-tool-use.js +1405 -179
- package/scripts/pre-tool-use.js +1405 -179
- package/scripts/query.js +1242 -175
- package/scripts/reconcile.js +1238 -171
- package/scripts/remediate.js +1390 -179
- package/scripts/session-start.js +1263 -186
- package/scripts/start-light.js +823 -150
- package/scripts/statusline.js +1255 -178
- package/scripts/stop.js +837 -154
- package/scripts/user-prompt-submit.js +1405 -179
package/scripts/stop.js
CHANGED
|
@@ -15996,6 +15996,7 @@ var ExceptionBundleEntry = DetectionException.pick({
|
|
|
15996
15996
|
|
|
15997
15997
|
// ../../packages/schema/src/zod/rule.ts
|
|
15998
15998
|
var MatcherType = external_exports.enum(["keyword", "regex", "validator"]).meta({ id: "MatcherType" });
|
|
15999
|
+
var RuleProbeVerdict = external_exports.enum(["safe", "quarantined"]).meta({ id: "RuleProbeVerdict" });
|
|
15999
16000
|
var KeywordMatcher = external_exports.object({
|
|
16000
16001
|
type: external_exports.literal("keyword"),
|
|
16001
16002
|
// An empty keyword matches at every position, yielding one zero-length span
|
|
@@ -16020,9 +16021,10 @@ function matchesEmptyString(pattern, flags) {
|
|
|
16020
16021
|
return false;
|
|
16021
16022
|
}
|
|
16022
16023
|
}
|
|
16024
|
+
var MAX_PATTERN_LENGTH = 2e3;
|
|
16023
16025
|
var RegexMatcher = external_exports.object({
|
|
16024
16026
|
type: external_exports.literal("regex"),
|
|
16025
|
-
pattern: external_exports.string(),
|
|
16027
|
+
pattern: external_exports.string().min(1).max(MAX_PATTERN_LENGTH),
|
|
16026
16028
|
flags: external_exports.string().default("gi"),
|
|
16027
16029
|
captureGroup: external_exports.number().int().nonnegative().optional()
|
|
16028
16030
|
}).refine((v) => isValidRegex(v.pattern, v.flags), {
|
|
@@ -16504,6 +16506,212 @@ var ImportDetectionRequest = external_exports.object({
|
|
|
16504
16506
|
})
|
|
16505
16507
|
}).meta({ id: "ImportDetectionRequest" });
|
|
16506
16508
|
|
|
16509
|
+
// ../../packages/schema/src/zod/shares.ts
|
|
16510
|
+
var DestinationKind = external_exports.enum(["provider", "internal", "external", "ip"]).meta({ id: "DestinationKind" });
|
|
16511
|
+
var Transport = external_exports.enum(["https", "http", "sftp", "grpc", "smtp", "ws", "wss"]).meta({ id: "Transport" });
|
|
16512
|
+
var DataClass = external_exports.enum(["secrets", "pii", "customer", "source", "telemetry", "logs", "metrics", "none"]).meta({ id: "DataClass" });
|
|
16513
|
+
var DATA_CLASS_ORDER = DataClass.options;
|
|
16514
|
+
var ShareTrustLevel = external_exports.enum(["recognized", "internal", "unverified", "ip"]).meta({ id: "ShareTrustLevel" });
|
|
16515
|
+
var EgressDecision = external_exports.enum(["allow", "block"]).meta({ id: "EgressDecision" });
|
|
16516
|
+
var EgressStatus = external_exports.enum(["allowed", "blocked", "review"]).meta({ id: "EgressStatus" });
|
|
16517
|
+
var ReviewReason = external_exports.enum(["raw_ip", "unverified_domain", "plaintext_transport"]).meta({ id: "ReviewReason" });
|
|
16518
|
+
var HttpMethod = external_exports.enum(["GET", "POST", "PUT", "DELETE", "SDK", "REF"]).meta({ id: "HttpMethod" });
|
|
16519
|
+
var ReviewInfo = external_exports.object({
|
|
16520
|
+
needsReview: external_exports.boolean(),
|
|
16521
|
+
reasons: external_exports.array(ReviewReason)
|
|
16522
|
+
}).meta({ id: "ReviewInfo" });
|
|
16523
|
+
var DestinationNetwork = external_exports.object({
|
|
16524
|
+
port: external_exports.number().int().nullable(),
|
|
16525
|
+
geo: external_exports.string().nullable(),
|
|
16526
|
+
ptr: external_exports.string().nullable()
|
|
16527
|
+
}).meta({ id: "DestinationNetwork" });
|
|
16528
|
+
var EndpointSummary = external_exports.object({
|
|
16529
|
+
id: external_exports.string(),
|
|
16530
|
+
method: HttpMethod,
|
|
16531
|
+
transport: Transport,
|
|
16532
|
+
url: external_exports.string(),
|
|
16533
|
+
template: external_exports.boolean(),
|
|
16534
|
+
dataClass: DataClass,
|
|
16535
|
+
lastSeen: external_exports.iso.datetime(),
|
|
16536
|
+
callSiteCount: external_exports.number().int().nonnegative()
|
|
16537
|
+
}).meta({ id: "EndpointSummary" });
|
|
16538
|
+
var CallSite = external_exports.object({
|
|
16539
|
+
id: external_exports.string(),
|
|
16540
|
+
project: external_exports.string(),
|
|
16541
|
+
file: external_exports.string(),
|
|
16542
|
+
line: external_exports.number().int().nonnegative(),
|
|
16543
|
+
snippet: external_exports.string(),
|
|
16544
|
+
dynamic: external_exports.boolean(),
|
|
16545
|
+
vendored: external_exports.boolean(),
|
|
16546
|
+
/** Deep-link to the Inventory project, when the repo is governed there. */
|
|
16547
|
+
projectId: external_exports.string().nullable()
|
|
16548
|
+
}).meta({ id: "CallSite" });
|
|
16549
|
+
var EndpointWithSites = EndpointSummary.extend({
|
|
16550
|
+
sites: external_exports.array(CallSite)
|
|
16551
|
+
}).meta({ id: "EndpointWithSites" });
|
|
16552
|
+
var ShareDestinationSummary = external_exports.object({
|
|
16553
|
+
id: external_exports.string(),
|
|
16554
|
+
kind: DestinationKind,
|
|
16555
|
+
name: external_exports.string(),
|
|
16556
|
+
host: external_exports.string(),
|
|
16557
|
+
category: external_exports.string(),
|
|
16558
|
+
trust: ShareTrustLevel,
|
|
16559
|
+
/** Effective state (decision applied over the trust default). */
|
|
16560
|
+
status: EgressStatus,
|
|
16561
|
+
/** True when an egress decision override differs from the trust default. */
|
|
16562
|
+
isCustom: external_exports.boolean(),
|
|
16563
|
+
lastSeen: external_exports.iso.datetime(),
|
|
16564
|
+
endpointCount: external_exports.number().int().nonnegative(),
|
|
16565
|
+
callSiteCount: external_exports.number().int().nonnegative(),
|
|
16566
|
+
transports: external_exports.array(Transport),
|
|
16567
|
+
/** Most-sensitive first. */
|
|
16568
|
+
dataClasses: external_exports.array(DataClass),
|
|
16569
|
+
review: ReviewInfo,
|
|
16570
|
+
/** Non-provider hosts only; null for providers. */
|
|
16571
|
+
network: DestinationNetwork.nullable(),
|
|
16572
|
+
/** Embedded for inline expansion — no call sites here. */
|
|
16573
|
+
endpoints: external_exports.array(EndpointSummary)
|
|
16574
|
+
}).meta({ id: "ShareDestinationSummary" });
|
|
16575
|
+
var ShareDestinationDetail = ShareDestinationSummary.omit({
|
|
16576
|
+
endpointCount: true,
|
|
16577
|
+
callSiteCount: true,
|
|
16578
|
+
endpoints: true
|
|
16579
|
+
}).extend({
|
|
16580
|
+
/** Ownership/geo rationale; null for providers. */
|
|
16581
|
+
note: external_exports.string().nullable(),
|
|
16582
|
+
endpoints: external_exports.array(EndpointWithSites)
|
|
16583
|
+
}).meta({ id: "ShareDestinationDetail" });
|
|
16584
|
+
var ReviewDestination = external_exports.object({
|
|
16585
|
+
id: external_exports.string(),
|
|
16586
|
+
kind: DestinationKind,
|
|
16587
|
+
name: external_exports.string(),
|
|
16588
|
+
/** Registrable host — lets the strip derive the provider lettermark, as the register does. */
|
|
16589
|
+
host: external_exports.string(),
|
|
16590
|
+
trust: ShareTrustLevel,
|
|
16591
|
+
status: EgressStatus,
|
|
16592
|
+
review: ReviewInfo,
|
|
16593
|
+
topDataClass: DataClass,
|
|
16594
|
+
callSiteCount: external_exports.number().int().nonnegative(),
|
|
16595
|
+
lastSeen: external_exports.iso.datetime()
|
|
16596
|
+
}).meta({ id: "ReviewDestination" });
|
|
16597
|
+
var ShareDestinationGroup = external_exports.object({
|
|
16598
|
+
kind: DestinationKind,
|
|
16599
|
+
total: external_exports.number().int().nonnegative(),
|
|
16600
|
+
items: external_exports.array(ShareDestinationSummary)
|
|
16601
|
+
}).meta({ id: "ShareDestinationGroup" });
|
|
16602
|
+
var ListShareDestinationsResponse = external_exports.object({ groups: external_exports.array(ShareDestinationGroup) }).meta({ id: "ListShareDestinationsResponse" });
|
|
16603
|
+
var NeedsReviewResponse = external_exports.object({ items: external_exports.array(ReviewDestination) }).meta({ id: "NeedsReviewResponse" });
|
|
16604
|
+
var SharesStats = external_exports.object({
|
|
16605
|
+
destinations: external_exports.number().int().nonnegative(),
|
|
16606
|
+
endpoints: external_exports.number().int().nonnegative(),
|
|
16607
|
+
callSites: external_exports.number().int().nonnegative(),
|
|
16608
|
+
needsReview: external_exports.number().int().nonnegative(),
|
|
16609
|
+
insecure: external_exports.number().int().nonnegative(),
|
|
16610
|
+
byKind: external_exports.object({
|
|
16611
|
+
provider: external_exports.number().int().nonnegative(),
|
|
16612
|
+
internal: external_exports.number().int().nonnegative(),
|
|
16613
|
+
external: external_exports.number().int().nonnegative(),
|
|
16614
|
+
ip: external_exports.number().int().nonnegative()
|
|
16615
|
+
}),
|
|
16616
|
+
byTrust: external_exports.object({
|
|
16617
|
+
recognized: external_exports.number().int().nonnegative(),
|
|
16618
|
+
internal: external_exports.number().int().nonnegative(),
|
|
16619
|
+
unverified: external_exports.number().int().nonnegative(),
|
|
16620
|
+
ip: external_exports.number().int().nonnegative()
|
|
16621
|
+
})
|
|
16622
|
+
}).meta({ id: "SharesStats" });
|
|
16623
|
+
var SetEgressDecisionBody = external_exports.object({
|
|
16624
|
+
/** `null` clears the override — reverts to the trust default, isCustom false. */
|
|
16625
|
+
decision: EgressDecision.nullable()
|
|
16626
|
+
}).meta({ id: "SetEgressDecisionBody" });
|
|
16627
|
+
var SetEgressDecisionResponse = external_exports.object({ destination: ShareDestinationSummary }).meta({ id: "SetEgressDecisionResponse" });
|
|
16628
|
+
var ListShareDestinationsQuery = external_exports.object({
|
|
16629
|
+
/** Case-insensitive match over destination name/category, endpoint url, call-site project/file. */
|
|
16630
|
+
q: external_exports.string().optional(),
|
|
16631
|
+
/** Repeatable. Restrict to these DestinationKind values; absent means all kinds. */
|
|
16632
|
+
kind: external_exports.array(DestinationKind).optional(),
|
|
16633
|
+
/** Reserved for future grouping modes; only 'destination' is supported today. */
|
|
16634
|
+
groupBy: external_exports.enum(["destination"]).default("destination"),
|
|
16635
|
+
/**
|
|
16636
|
+
* When true, return a flat severity-ordered `items[]` instead of `groups`.
|
|
16637
|
+
* Uses `z.stringbool()` (NOT `z.coerce.boolean()` — `Boolean(str)` is true for
|
|
16638
|
+
* any non-empty string, so `?review=false`/`?review=0` would wrongly coerce
|
|
16639
|
+
* to `true`). `z.stringbool()` parses true/1/yes vs false/0/no correctly.
|
|
16640
|
+
*/
|
|
16641
|
+
review: external_exports.stringbool().default(false)
|
|
16642
|
+
});
|
|
16643
|
+
var ExportSharesQuery = external_exports.object({
|
|
16644
|
+
format: external_exports.enum(["csv", "json"]).default("csv"),
|
|
16645
|
+
q: external_exports.string().optional(),
|
|
16646
|
+
kind: external_exports.array(DestinationKind).optional()
|
|
16647
|
+
});
|
|
16648
|
+
|
|
16649
|
+
// ../../packages/schema/src/zod/egress-extraction.ts
|
|
16650
|
+
var EgressEcosystem = external_exports.enum(["npm", "pypi", "go", "maven", "rubygems", "cargo", "composer", "nuget"]).meta({ id: "EgressEcosystem" });
|
|
16651
|
+
var ProviderRegistryEntry = external_exports.object({
|
|
16652
|
+
id: external_exports.string(),
|
|
16653
|
+
name: external_exports.string(),
|
|
16654
|
+
category: external_exports.string(),
|
|
16655
|
+
/** Suffix-matched: 'stripe.com' matches api.stripe.com, never evilstripe.com. */
|
|
16656
|
+
hostSuffixes: external_exports.array(external_exports.string()).min(1),
|
|
16657
|
+
/** Canonical API base URL recorded for manifest-derived (method 'SDK') endpoints. */
|
|
16658
|
+
apiBase: external_exports.string(),
|
|
16659
|
+
/** Most-sensitive first; index 0 becomes the endpoint dataClass. */
|
|
16660
|
+
defaultDataClasses: external_exports.array(DataClass).min(1),
|
|
16661
|
+
/** SDK identifiers per ecosystem ('go' prefix-matched by path, 'maven' by group-id prefix). */
|
|
16662
|
+
sdks: external_exports.partialRecord(EgressEcosystem, external_exports.array(external_exports.string()))
|
|
16663
|
+
}).meta({ id: "ProviderRegistryEntry" });
|
|
16664
|
+
var EgressCallSiteHit = external_exports.object({
|
|
16665
|
+
file: external_exports.string(),
|
|
16666
|
+
line: external_exports.number().int().positive(),
|
|
16667
|
+
snippet: external_exports.string(),
|
|
16668
|
+
dynamic: external_exports.boolean(),
|
|
16669
|
+
vendored: external_exports.boolean()
|
|
16670
|
+
}).meta({ id: "EgressCallSiteHit" });
|
|
16671
|
+
var ResolvedEgressHit = external_exports.object({
|
|
16672
|
+
host: external_exports.string(),
|
|
16673
|
+
kind: DestinationKind,
|
|
16674
|
+
name: external_exports.string(),
|
|
16675
|
+
category: external_exports.string(),
|
|
16676
|
+
trust: ShareTrustLevel,
|
|
16677
|
+
network: DestinationNetwork.nullable(),
|
|
16678
|
+
method: HttpMethod,
|
|
16679
|
+
transport: Transport,
|
|
16680
|
+
url: external_exports.string(),
|
|
16681
|
+
template: external_exports.boolean(),
|
|
16682
|
+
dataClass: DataClass,
|
|
16683
|
+
site: EgressCallSiteHit
|
|
16684
|
+
}).meta({ id: "ResolvedEgressHit" });
|
|
16685
|
+
var EgressReconcile = external_exports.discriminatedUnion("mode", [
|
|
16686
|
+
external_exports.object({ mode: external_exports.literal("walk"), walkedPrefix: external_exports.string() }),
|
|
16687
|
+
external_exports.object({
|
|
16688
|
+
mode: external_exports.literal("ledger"),
|
|
16689
|
+
scannedFiles: external_exports.array(external_exports.string()),
|
|
16690
|
+
deletedFiles: external_exports.array(external_exports.string())
|
|
16691
|
+
})
|
|
16692
|
+
]).meta({ id: "EgressReconcile" });
|
|
16693
|
+
var RecordProjectEgressInput = external_exports.object({
|
|
16694
|
+
/** Stable reconcile key: 'git:<repo identity>' or 'path:<abs root>' (non-git). */
|
|
16695
|
+
projectKey: external_exports.string().min(1),
|
|
16696
|
+
/** Display name only — never keys reconciliation. */
|
|
16697
|
+
project: external_exports.string(),
|
|
16698
|
+
projectId: external_exports.string().nullable(),
|
|
16699
|
+
reconcile: EgressReconcile,
|
|
16700
|
+
hits: external_exports.array(ResolvedEgressHit)
|
|
16701
|
+
}).meta({ id: "RecordProjectEgressInput" });
|
|
16702
|
+
var EgressWriteSummary = external_exports.object({
|
|
16703
|
+
destinations: external_exports.number().int().nonnegative(),
|
|
16704
|
+
endpoints: external_exports.number().int().nonnegative(),
|
|
16705
|
+
callSites: external_exports.number().int().nonnegative(),
|
|
16706
|
+
truncated: external_exports.boolean(),
|
|
16707
|
+
/**
|
|
16708
|
+
* Files the cap dropped whole. Their stored rows were left untouched, so a
|
|
16709
|
+
* ledger-keeping caller must withhold their ledger entries and read them
|
|
16710
|
+
* again next scan.
|
|
16711
|
+
*/
|
|
16712
|
+
droppedFiles: external_exports.array(external_exports.string()).default([])
|
|
16713
|
+
}).meta({ id: "EgressWriteSummary" });
|
|
16714
|
+
|
|
16507
16715
|
// ../../packages/schema/src/zod/installed-pack.ts
|
|
16508
16716
|
var InstalledPack = external_exports.object({
|
|
16509
16717
|
id: external_exports.guid(),
|
|
@@ -16535,7 +16743,7 @@ var PatchInstalledPackRequest = external_exports.object({
|
|
|
16535
16743
|
}).meta({ id: "PatchInstalledPackRequest" });
|
|
16536
16744
|
|
|
16537
16745
|
// ../../packages/schema/src/zod/local.ts
|
|
16538
|
-
var WORKSPACE_SETTINGS_SPEC_VERSION =
|
|
16746
|
+
var WORKSPACE_SETTINGS_SPEC_VERSION = 3;
|
|
16539
16747
|
var RunMode = external_exports.enum(["standalone"]);
|
|
16540
16748
|
var SimpleDetectionPolicy = external_exports.enum(["redact", "warn"]);
|
|
16541
16749
|
var HistoricalAccess = external_exports.enum(["full", "session-only"]);
|
|
@@ -16550,6 +16758,9 @@ var WorkspaceSettings = external_exports.object({
|
|
|
16550
16758
|
policy: SimpleDetectionPolicy.default("redact"),
|
|
16551
16759
|
// Consent for scanning pre-install surfaces; opt-in (see HistoricalAccess).
|
|
16552
16760
|
historicalAccess: HistoricalAccess.default("session-only"),
|
|
16761
|
+
// In-place egress extraction on the scan paths; disable to stop all Data
|
|
16762
|
+
// Shares writes.
|
|
16763
|
+
dataSharesInPlace: external_exports.boolean().default(true),
|
|
16553
16764
|
// Absent until /aka:setup completes; its presence is what "onboarded" means.
|
|
16554
16765
|
onboardedAt: external_exports.iso.datetime().optional()
|
|
16555
16766
|
});
|
|
@@ -16929,145 +17140,6 @@ var SetupHandoffOffer = external_exports.object({
|
|
|
16929
17140
|
path: ["liveKeys"]
|
|
16930
17141
|
});
|
|
16931
17142
|
|
|
16932
|
-
// ../../packages/schema/src/zod/shares.ts
|
|
16933
|
-
var DestinationKind = external_exports.enum(["provider", "internal", "ip"]).meta({ id: "DestinationKind" });
|
|
16934
|
-
var Transport = external_exports.enum(["https", "http", "sftp", "grpc", "smtp"]).meta({ id: "Transport" });
|
|
16935
|
-
var DataClass = external_exports.enum(["secrets", "pii", "customer", "source", "telemetry", "logs", "metrics", "none"]).meta({ id: "DataClass" });
|
|
16936
|
-
var DATA_CLASS_ORDER = DataClass.options;
|
|
16937
|
-
var ShareTrustLevel = external_exports.enum(["recognized", "internal", "unverified", "ip"]).meta({ id: "ShareTrustLevel" });
|
|
16938
|
-
var EgressDecision = external_exports.enum(["allow", "block"]).meta({ id: "EgressDecision" });
|
|
16939
|
-
var EgressStatus = external_exports.enum(["allowed", "blocked", "review"]).meta({ id: "EgressStatus" });
|
|
16940
|
-
var ReviewReason = external_exports.enum(["raw_ip", "unverified_domain", "plaintext_transport"]).meta({ id: "ReviewReason" });
|
|
16941
|
-
var HttpMethod = external_exports.enum(["GET", "POST", "PUT", "DELETE"]).meta({ id: "HttpMethod" });
|
|
16942
|
-
var ReviewInfo = external_exports.object({
|
|
16943
|
-
needsReview: external_exports.boolean(),
|
|
16944
|
-
reasons: external_exports.array(ReviewReason)
|
|
16945
|
-
}).meta({ id: "ReviewInfo" });
|
|
16946
|
-
var DestinationNetwork = external_exports.object({
|
|
16947
|
-
port: external_exports.number().int().nullable(),
|
|
16948
|
-
geo: external_exports.string().nullable(),
|
|
16949
|
-
ptr: external_exports.string().nullable()
|
|
16950
|
-
}).meta({ id: "DestinationNetwork" });
|
|
16951
|
-
var EndpointSummary = external_exports.object({
|
|
16952
|
-
id: external_exports.string(),
|
|
16953
|
-
method: HttpMethod,
|
|
16954
|
-
transport: Transport,
|
|
16955
|
-
url: external_exports.string(),
|
|
16956
|
-
template: external_exports.boolean(),
|
|
16957
|
-
dataClass: DataClass,
|
|
16958
|
-
lastSeen: external_exports.iso.datetime(),
|
|
16959
|
-
callSiteCount: external_exports.number().int().nonnegative()
|
|
16960
|
-
}).meta({ id: "EndpointSummary" });
|
|
16961
|
-
var CallSite = external_exports.object({
|
|
16962
|
-
id: external_exports.string(),
|
|
16963
|
-
project: external_exports.string(),
|
|
16964
|
-
file: external_exports.string(),
|
|
16965
|
-
line: external_exports.number().int().nonnegative(),
|
|
16966
|
-
snippet: external_exports.string(),
|
|
16967
|
-
dynamic: external_exports.boolean(),
|
|
16968
|
-
vendored: external_exports.boolean(),
|
|
16969
|
-
/** Deep-link to the Inventory project, when the repo is governed there. */
|
|
16970
|
-
projectId: external_exports.string().nullable()
|
|
16971
|
-
}).meta({ id: "CallSite" });
|
|
16972
|
-
var EndpointWithSites = EndpointSummary.extend({
|
|
16973
|
-
sites: external_exports.array(CallSite)
|
|
16974
|
-
}).meta({ id: "EndpointWithSites" });
|
|
16975
|
-
var ShareDestinationSummary = external_exports.object({
|
|
16976
|
-
id: external_exports.string(),
|
|
16977
|
-
kind: DestinationKind,
|
|
16978
|
-
name: external_exports.string(),
|
|
16979
|
-
host: external_exports.string(),
|
|
16980
|
-
category: external_exports.string(),
|
|
16981
|
-
trust: ShareTrustLevel,
|
|
16982
|
-
/** Effective state (decision applied over the trust default). */
|
|
16983
|
-
status: EgressStatus,
|
|
16984
|
-
/** True when an egress decision override differs from the trust default. */
|
|
16985
|
-
isCustom: external_exports.boolean(),
|
|
16986
|
-
lastSeen: external_exports.iso.datetime(),
|
|
16987
|
-
endpointCount: external_exports.number().int().nonnegative(),
|
|
16988
|
-
callSiteCount: external_exports.number().int().nonnegative(),
|
|
16989
|
-
transports: external_exports.array(Transport),
|
|
16990
|
-
/** Most-sensitive first. */
|
|
16991
|
-
dataClasses: external_exports.array(DataClass),
|
|
16992
|
-
review: ReviewInfo,
|
|
16993
|
-
/** Non-provider hosts only; null for providers. */
|
|
16994
|
-
network: DestinationNetwork.nullable(),
|
|
16995
|
-
/** Embedded for inline expansion — no call sites here. */
|
|
16996
|
-
endpoints: external_exports.array(EndpointSummary)
|
|
16997
|
-
}).meta({ id: "ShareDestinationSummary" });
|
|
16998
|
-
var ShareDestinationDetail = ShareDestinationSummary.omit({
|
|
16999
|
-
endpointCount: true,
|
|
17000
|
-
callSiteCount: true,
|
|
17001
|
-
endpoints: true
|
|
17002
|
-
}).extend({
|
|
17003
|
-
/** Ownership/geo rationale; null for providers. */
|
|
17004
|
-
note: external_exports.string().nullable(),
|
|
17005
|
-
endpoints: external_exports.array(EndpointWithSites)
|
|
17006
|
-
}).meta({ id: "ShareDestinationDetail" });
|
|
17007
|
-
var ReviewDestination = external_exports.object({
|
|
17008
|
-
id: external_exports.string(),
|
|
17009
|
-
kind: DestinationKind,
|
|
17010
|
-
name: external_exports.string(),
|
|
17011
|
-
/** Registrable host — lets the strip derive the provider lettermark, as the register does. */
|
|
17012
|
-
host: external_exports.string(),
|
|
17013
|
-
trust: ShareTrustLevel,
|
|
17014
|
-
status: EgressStatus,
|
|
17015
|
-
review: ReviewInfo,
|
|
17016
|
-
topDataClass: DataClass,
|
|
17017
|
-
callSiteCount: external_exports.number().int().nonnegative(),
|
|
17018
|
-
lastSeen: external_exports.iso.datetime()
|
|
17019
|
-
}).meta({ id: "ReviewDestination" });
|
|
17020
|
-
var ShareDestinationGroup = external_exports.object({
|
|
17021
|
-
kind: DestinationKind,
|
|
17022
|
-
total: external_exports.number().int().nonnegative(),
|
|
17023
|
-
items: external_exports.array(ShareDestinationSummary)
|
|
17024
|
-
}).meta({ id: "ShareDestinationGroup" });
|
|
17025
|
-
var ListShareDestinationsResponse = external_exports.object({ groups: external_exports.array(ShareDestinationGroup) }).meta({ id: "ListShareDestinationsResponse" });
|
|
17026
|
-
var NeedsReviewResponse = external_exports.object({ items: external_exports.array(ReviewDestination) }).meta({ id: "NeedsReviewResponse" });
|
|
17027
|
-
var SharesStats = external_exports.object({
|
|
17028
|
-
destinations: external_exports.number().int().nonnegative(),
|
|
17029
|
-
endpoints: external_exports.number().int().nonnegative(),
|
|
17030
|
-
callSites: external_exports.number().int().nonnegative(),
|
|
17031
|
-
needsReview: external_exports.number().int().nonnegative(),
|
|
17032
|
-
insecure: external_exports.number().int().nonnegative(),
|
|
17033
|
-
byKind: external_exports.object({
|
|
17034
|
-
provider: external_exports.number().int().nonnegative(),
|
|
17035
|
-
internal: external_exports.number().int().nonnegative(),
|
|
17036
|
-
ip: external_exports.number().int().nonnegative()
|
|
17037
|
-
}),
|
|
17038
|
-
byTrust: external_exports.object({
|
|
17039
|
-
recognized: external_exports.number().int().nonnegative(),
|
|
17040
|
-
internal: external_exports.number().int().nonnegative(),
|
|
17041
|
-
unverified: external_exports.number().int().nonnegative(),
|
|
17042
|
-
ip: external_exports.number().int().nonnegative()
|
|
17043
|
-
})
|
|
17044
|
-
}).meta({ id: "SharesStats" });
|
|
17045
|
-
var SetEgressDecisionBody = external_exports.object({
|
|
17046
|
-
/** `null` clears the override — reverts to the trust default, isCustom false. */
|
|
17047
|
-
decision: EgressDecision.nullable()
|
|
17048
|
-
}).meta({ id: "SetEgressDecisionBody" });
|
|
17049
|
-
var SetEgressDecisionResponse = external_exports.object({ destination: ShareDestinationSummary }).meta({ id: "SetEgressDecisionResponse" });
|
|
17050
|
-
var ListShareDestinationsQuery = external_exports.object({
|
|
17051
|
-
/** Case-insensitive match over destination name/category, endpoint url, call-site project/file. */
|
|
17052
|
-
q: external_exports.string().optional(),
|
|
17053
|
-
/** Repeatable. Restrict to these DestinationKind values; absent means all kinds. */
|
|
17054
|
-
kind: external_exports.array(DestinationKind).optional(),
|
|
17055
|
-
/** Reserved for future grouping modes; only 'destination' is supported today. */
|
|
17056
|
-
groupBy: external_exports.enum(["destination"]).default("destination"),
|
|
17057
|
-
/**
|
|
17058
|
-
* When true, return a flat severity-ordered `items[]` instead of `groups`.
|
|
17059
|
-
* Uses `z.stringbool()` (NOT `z.coerce.boolean()` — `Boolean(str)` is true for
|
|
17060
|
-
* any non-empty string, so `?review=false`/`?review=0` would wrongly coerce
|
|
17061
|
-
* to `true`). `z.stringbool()` parses true/1/yes vs false/0/no correctly.
|
|
17062
|
-
*/
|
|
17063
|
-
review: external_exports.stringbool().default(false)
|
|
17064
|
-
});
|
|
17065
|
-
var ExportSharesQuery = external_exports.object({
|
|
17066
|
-
format: external_exports.enum(["csv", "json"]).default("csv"),
|
|
17067
|
-
q: external_exports.string().optional(),
|
|
17068
|
-
kind: external_exports.array(DestinationKind).optional()
|
|
17069
|
-
});
|
|
17070
|
-
|
|
17071
17143
|
// ../../packages/persistence/src/ids.ts
|
|
17072
17144
|
import { createHash } from "crypto";
|
|
17073
17145
|
|
|
@@ -17255,13 +17327,581 @@ import { readdirSync, readFileSync as readFileSync4, realpathSync, statSync as s
|
|
|
17255
17327
|
import { homedir as homedir2 } from "os";
|
|
17256
17328
|
import { basename as basename2, join as join7 } from "path";
|
|
17257
17329
|
|
|
17330
|
+
// ../../packages/detections/src/egress/registry.ts
|
|
17331
|
+
var EXTRACTOR_VERSION = "1";
|
|
17332
|
+
var PROVIDER_REGISTRY = [
|
|
17333
|
+
{
|
|
17334
|
+
id: "stripe",
|
|
17335
|
+
name: "Stripe",
|
|
17336
|
+
category: "Payments",
|
|
17337
|
+
hostSuffixes: ["stripe.com"],
|
|
17338
|
+
apiBase: "https://api.stripe.com",
|
|
17339
|
+
defaultDataClasses: ["pii", "customer"],
|
|
17340
|
+
sdks: {
|
|
17341
|
+
npm: ["stripe"],
|
|
17342
|
+
pypi: ["stripe"],
|
|
17343
|
+
go: ["github.com/stripe/stripe-go"],
|
|
17344
|
+
maven: ["com.stripe"],
|
|
17345
|
+
rubygems: ["stripe"],
|
|
17346
|
+
composer: ["stripe/stripe-php"],
|
|
17347
|
+
nuget: ["Stripe.net"]
|
|
17348
|
+
}
|
|
17349
|
+
},
|
|
17350
|
+
{
|
|
17351
|
+
id: "datadog",
|
|
17352
|
+
name: "Datadog",
|
|
17353
|
+
category: "Observability",
|
|
17354
|
+
hostSuffixes: ["datadoghq.com", "datadoghq.eu"],
|
|
17355
|
+
apiBase: "https://api.datadoghq.com",
|
|
17356
|
+
defaultDataClasses: ["telemetry", "logs", "metrics"],
|
|
17357
|
+
sdks: {
|
|
17358
|
+
npm: ["dd-trace", "@datadog/browser-logs"],
|
|
17359
|
+
pypi: ["datadog", "ddtrace"],
|
|
17360
|
+
go: ["github.com/DataDog/dd-trace-go"],
|
|
17361
|
+
maven: ["com.datadoghq"],
|
|
17362
|
+
rubygems: ["ddtrace", "dogapi"],
|
|
17363
|
+
nuget: ["Datadog.Trace"]
|
|
17364
|
+
}
|
|
17365
|
+
},
|
|
17366
|
+
{
|
|
17367
|
+
id: "newrelic",
|
|
17368
|
+
name: "New Relic",
|
|
17369
|
+
category: "Observability",
|
|
17370
|
+
hostSuffixes: ["newrelic.com", "nr-data.net"],
|
|
17371
|
+
apiBase: "https://api.newrelic.com",
|
|
17372
|
+
defaultDataClasses: ["telemetry", "logs", "metrics"],
|
|
17373
|
+
sdks: {
|
|
17374
|
+
npm: ["newrelic"],
|
|
17375
|
+
pypi: ["newrelic"],
|
|
17376
|
+
go: ["github.com/newrelic/go-agent"],
|
|
17377
|
+
maven: ["com.newrelic.agent.java"],
|
|
17378
|
+
rubygems: ["newrelic_rpm"],
|
|
17379
|
+
nuget: ["NewRelic.Agent"]
|
|
17380
|
+
}
|
|
17381
|
+
},
|
|
17382
|
+
{
|
|
17383
|
+
id: "sentry",
|
|
17384
|
+
name: "Sentry",
|
|
17385
|
+
category: "Error tracking",
|
|
17386
|
+
hostSuffixes: ["sentry.io"],
|
|
17387
|
+
apiBase: "https://sentry.io",
|
|
17388
|
+
defaultDataClasses: ["source", "telemetry"],
|
|
17389
|
+
sdks: {
|
|
17390
|
+
npm: ["@sentry/node", "@sentry/react", "@sentry/nextjs"],
|
|
17391
|
+
pypi: ["sentry-sdk"],
|
|
17392
|
+
go: ["github.com/getsentry/sentry-go"],
|
|
17393
|
+
maven: ["io.sentry"],
|
|
17394
|
+
rubygems: ["sentry-ruby"],
|
|
17395
|
+
cargo: ["sentry"],
|
|
17396
|
+
composer: ["sentry/sentry"],
|
|
17397
|
+
nuget: ["Sentry"]
|
|
17398
|
+
}
|
|
17399
|
+
},
|
|
17400
|
+
{
|
|
17401
|
+
id: "openai",
|
|
17402
|
+
name: "OpenAI",
|
|
17403
|
+
category: "LLM provider",
|
|
17404
|
+
hostSuffixes: ["openai.com"],
|
|
17405
|
+
apiBase: "https://api.openai.com",
|
|
17406
|
+
defaultDataClasses: ["pii", "source"],
|
|
17407
|
+
sdks: {
|
|
17408
|
+
npm: ["openai"],
|
|
17409
|
+
pypi: ["openai"],
|
|
17410
|
+
go: ["github.com/sashabaranov/go-openai"],
|
|
17411
|
+
maven: ["com.openai"],
|
|
17412
|
+
rubygems: ["ruby-openai"],
|
|
17413
|
+
cargo: ["async-openai"],
|
|
17414
|
+
composer: ["openai-php/client"],
|
|
17415
|
+
nuget: ["OpenAI"]
|
|
17416
|
+
}
|
|
17417
|
+
},
|
|
17418
|
+
{
|
|
17419
|
+
id: "anthropic",
|
|
17420
|
+
name: "Anthropic",
|
|
17421
|
+
category: "LLM provider",
|
|
17422
|
+
hostSuffixes: ["anthropic.com"],
|
|
17423
|
+
apiBase: "https://api.anthropic.com",
|
|
17424
|
+
defaultDataClasses: ["pii", "source"],
|
|
17425
|
+
sdks: {
|
|
17426
|
+
npm: ["@anthropic-ai/sdk"],
|
|
17427
|
+
pypi: ["anthropic"],
|
|
17428
|
+
go: ["github.com/anthropics/anthropic-sdk-go"],
|
|
17429
|
+
nuget: ["Anthropic.SDK"]
|
|
17430
|
+
}
|
|
17431
|
+
},
|
|
17432
|
+
{
|
|
17433
|
+
id: "aws",
|
|
17434
|
+
name: "Amazon Web Services",
|
|
17435
|
+
category: "Cloud platform",
|
|
17436
|
+
hostSuffixes: ["amazonaws.com"],
|
|
17437
|
+
apiBase: "https://s3.amazonaws.com",
|
|
17438
|
+
defaultDataClasses: ["secrets", "customer"],
|
|
17439
|
+
sdks: {
|
|
17440
|
+
npm: ["@aws-sdk/client-s3", "aws-sdk"],
|
|
17441
|
+
pypi: ["boto3"],
|
|
17442
|
+
go: ["github.com/aws/aws-sdk-go", "github.com/aws/aws-sdk-go-v2"],
|
|
17443
|
+
maven: ["com.amazonaws", "software.amazon.awssdk"],
|
|
17444
|
+
rubygems: ["aws-sdk-s3"],
|
|
17445
|
+
cargo: ["aws-sdk-s3"],
|
|
17446
|
+
nuget: ["AWSSDK.S3"]
|
|
17447
|
+
}
|
|
17448
|
+
},
|
|
17449
|
+
{
|
|
17450
|
+
id: "gcp",
|
|
17451
|
+
name: "Google Cloud",
|
|
17452
|
+
category: "Cloud platform",
|
|
17453
|
+
hostSuffixes: ["googleapis.com"],
|
|
17454
|
+
apiBase: "https://storage.googleapis.com",
|
|
17455
|
+
defaultDataClasses: ["customer", "logs"],
|
|
17456
|
+
sdks: {
|
|
17457
|
+
npm: ["@google-cloud/storage"],
|
|
17458
|
+
pypi: ["google-cloud-storage"],
|
|
17459
|
+
go: ["cloud.google.com/go"],
|
|
17460
|
+
maven: ["com.google.cloud"],
|
|
17461
|
+
rubygems: ["google-cloud-storage"],
|
|
17462
|
+
nuget: ["Google.Cloud.Storage.V1"]
|
|
17463
|
+
}
|
|
17464
|
+
},
|
|
17465
|
+
{
|
|
17466
|
+
id: "azure",
|
|
17467
|
+
name: "Microsoft Azure",
|
|
17468
|
+
category: "Cloud platform",
|
|
17469
|
+
hostSuffixes: ["azure.com", "windows.net"],
|
|
17470
|
+
apiBase: "https://management.azure.com",
|
|
17471
|
+
defaultDataClasses: ["customer", "logs"],
|
|
17472
|
+
sdks: {
|
|
17473
|
+
npm: ["@azure/storage-blob"],
|
|
17474
|
+
pypi: ["azure-storage-blob"],
|
|
17475
|
+
go: ["github.com/Azure/azure-sdk-for-go"],
|
|
17476
|
+
maven: ["com.azure"],
|
|
17477
|
+
rubygems: ["azure-storage-blob"],
|
|
17478
|
+
nuget: ["Azure.Storage.Blobs"]
|
|
17479
|
+
}
|
|
17480
|
+
},
|
|
17481
|
+
{
|
|
17482
|
+
id: "slack",
|
|
17483
|
+
name: "Slack",
|
|
17484
|
+
category: "Notifications",
|
|
17485
|
+
hostSuffixes: ["slack.com"],
|
|
17486
|
+
apiBase: "https://slack.com/api",
|
|
17487
|
+
defaultDataClasses: ["logs"],
|
|
17488
|
+
sdks: {
|
|
17489
|
+
npm: ["@slack/web-api"],
|
|
17490
|
+
pypi: ["slack-sdk"],
|
|
17491
|
+
go: ["github.com/slack-go/slack"],
|
|
17492
|
+
maven: ["com.slack.api"],
|
|
17493
|
+
rubygems: ["slack-ruby-client"],
|
|
17494
|
+
composer: ["slack-php/slack-api"],
|
|
17495
|
+
nuget: ["SlackNet"]
|
|
17496
|
+
}
|
|
17497
|
+
},
|
|
17498
|
+
{
|
|
17499
|
+
id: "segment",
|
|
17500
|
+
name: "Segment",
|
|
17501
|
+
category: "Analytics",
|
|
17502
|
+
hostSuffixes: ["segment.io", "segment.com"],
|
|
17503
|
+
apiBase: "https://api.segment.io",
|
|
17504
|
+
defaultDataClasses: ["customer"],
|
|
17505
|
+
sdks: {
|
|
17506
|
+
npm: ["@segment/analytics-node", "analytics-node"],
|
|
17507
|
+
pypi: ["segment-analytics-python"],
|
|
17508
|
+
go: ["github.com/segmentio/analytics-go"],
|
|
17509
|
+
maven: ["com.segment.analytics.java"],
|
|
17510
|
+
rubygems: ["analytics-ruby"],
|
|
17511
|
+
nuget: ["Analytics"]
|
|
17512
|
+
}
|
|
17513
|
+
},
|
|
17514
|
+
{
|
|
17515
|
+
id: "twilio",
|
|
17516
|
+
name: "Twilio",
|
|
17517
|
+
category: "Communications",
|
|
17518
|
+
hostSuffixes: ["twilio.com"],
|
|
17519
|
+
apiBase: "https://api.twilio.com",
|
|
17520
|
+
defaultDataClasses: ["pii", "customer"],
|
|
17521
|
+
sdks: {
|
|
17522
|
+
npm: ["twilio"],
|
|
17523
|
+
pypi: ["twilio"],
|
|
17524
|
+
go: ["github.com/twilio/twilio-go"],
|
|
17525
|
+
maven: ["com.twilio.sdk"],
|
|
17526
|
+
rubygems: ["twilio-ruby"],
|
|
17527
|
+
composer: ["twilio/sdk"],
|
|
17528
|
+
nuget: ["Twilio"]
|
|
17529
|
+
}
|
|
17530
|
+
},
|
|
17531
|
+
{
|
|
17532
|
+
id: "sendgrid",
|
|
17533
|
+
name: "SendGrid",
|
|
17534
|
+
category: "Email",
|
|
17535
|
+
hostSuffixes: ["sendgrid.com"],
|
|
17536
|
+
apiBase: "https://api.sendgrid.com",
|
|
17537
|
+
defaultDataClasses: ["pii"],
|
|
17538
|
+
sdks: {
|
|
17539
|
+
npm: ["@sendgrid/mail"],
|
|
17540
|
+
pypi: ["sendgrid"],
|
|
17541
|
+
go: ["github.com/sendgrid/sendgrid-go"],
|
|
17542
|
+
maven: ["com.sendgrid"],
|
|
17543
|
+
rubygems: ["sendgrid-ruby"],
|
|
17544
|
+
composer: ["sendgrid/sendgrid"],
|
|
17545
|
+
nuget: ["SendGrid"]
|
|
17546
|
+
}
|
|
17547
|
+
},
|
|
17548
|
+
{
|
|
17549
|
+
id: "mailgun",
|
|
17550
|
+
name: "Mailgun",
|
|
17551
|
+
category: "Email",
|
|
17552
|
+
hostSuffixes: ["mailgun.net"],
|
|
17553
|
+
apiBase: "https://api.mailgun.net",
|
|
17554
|
+
defaultDataClasses: ["pii"],
|
|
17555
|
+
sdks: {
|
|
17556
|
+
npm: ["mailgun.js"],
|
|
17557
|
+
pypi: ["mailgun"],
|
|
17558
|
+
rubygems: ["mailgun-ruby"],
|
|
17559
|
+
composer: ["mailgun/mailgun-php"],
|
|
17560
|
+
nuget: ["Mailgun"]
|
|
17561
|
+
}
|
|
17562
|
+
},
|
|
17563
|
+
{
|
|
17564
|
+
id: "mixpanel",
|
|
17565
|
+
name: "Mixpanel",
|
|
17566
|
+
category: "Analytics",
|
|
17567
|
+
hostSuffixes: ["mixpanel.com"],
|
|
17568
|
+
apiBase: "https://api.mixpanel.com",
|
|
17569
|
+
defaultDataClasses: ["customer", "telemetry"],
|
|
17570
|
+
sdks: {
|
|
17571
|
+
npm: ["mixpanel"],
|
|
17572
|
+
pypi: ["mixpanel"],
|
|
17573
|
+
rubygems: ["mixpanel-ruby"],
|
|
17574
|
+
nuget: ["Mixpanel"]
|
|
17575
|
+
}
|
|
17576
|
+
},
|
|
17577
|
+
{
|
|
17578
|
+
id: "amplitude",
|
|
17579
|
+
name: "Amplitude",
|
|
17580
|
+
category: "Analytics",
|
|
17581
|
+
hostSuffixes: ["amplitude.com"],
|
|
17582
|
+
apiBase: "https://api2.amplitude.com",
|
|
17583
|
+
defaultDataClasses: ["customer", "telemetry"],
|
|
17584
|
+
sdks: {
|
|
17585
|
+
npm: ["@amplitude/analytics-node"],
|
|
17586
|
+
pypi: ["amplitude-analytics"],
|
|
17587
|
+
nuget: ["Amplitude"]
|
|
17588
|
+
}
|
|
17589
|
+
},
|
|
17590
|
+
{
|
|
17591
|
+
id: "posthog",
|
|
17592
|
+
name: "PostHog",
|
|
17593
|
+
category: "Analytics",
|
|
17594
|
+
hostSuffixes: ["posthog.com"],
|
|
17595
|
+
apiBase: "https://us.i.posthog.com",
|
|
17596
|
+
defaultDataClasses: ["customer", "telemetry"],
|
|
17597
|
+
sdks: {
|
|
17598
|
+
npm: ["posthog-node", "posthog-js"],
|
|
17599
|
+
pypi: ["posthog"],
|
|
17600
|
+
go: ["github.com/posthog/posthog-go"],
|
|
17601
|
+
rubygems: ["posthog-ruby"],
|
|
17602
|
+
composer: ["posthog/posthog-php"],
|
|
17603
|
+
nuget: ["PostHog"]
|
|
17604
|
+
}
|
|
17605
|
+
},
|
|
17606
|
+
{
|
|
17607
|
+
id: "honeycomb",
|
|
17608
|
+
name: "Honeycomb",
|
|
17609
|
+
category: "Observability",
|
|
17610
|
+
hostSuffixes: ["honeycomb.io"],
|
|
17611
|
+
apiBase: "https://api.honeycomb.io",
|
|
17612
|
+
defaultDataClasses: ["telemetry", "metrics"],
|
|
17613
|
+
sdks: {
|
|
17614
|
+
npm: ["libhoney"],
|
|
17615
|
+
pypi: ["libhoney"],
|
|
17616
|
+
go: ["github.com/honeycombio/libhoney-go"],
|
|
17617
|
+
rubygems: ["libhoney"]
|
|
17618
|
+
}
|
|
17619
|
+
},
|
|
17620
|
+
{
|
|
17621
|
+
id: "grafana",
|
|
17622
|
+
name: "Grafana Cloud",
|
|
17623
|
+
category: "Observability",
|
|
17624
|
+
hostSuffixes: ["grafana.net"],
|
|
17625
|
+
apiBase: "https://grafana.net",
|
|
17626
|
+
defaultDataClasses: ["logs", "metrics"],
|
|
17627
|
+
sdks: {
|
|
17628
|
+
npm: ["@grafana/faro-web-sdk"]
|
|
17629
|
+
}
|
|
17630
|
+
},
|
|
17631
|
+
{
|
|
17632
|
+
id: "splunk",
|
|
17633
|
+
name: "Splunk",
|
|
17634
|
+
category: "Observability",
|
|
17635
|
+
hostSuffixes: ["splunkcloud.com", "splunk.com"],
|
|
17636
|
+
apiBase: "https://http-inputs.splunkcloud.com",
|
|
17637
|
+
defaultDataClasses: ["logs"],
|
|
17638
|
+
sdks: {
|
|
17639
|
+
npm: ["splunk-logging"],
|
|
17640
|
+
pypi: ["splunk-sdk"],
|
|
17641
|
+
maven: ["com.splunk"],
|
|
17642
|
+
nuget: ["Splunk.Logging.Common"]
|
|
17643
|
+
}
|
|
17644
|
+
},
|
|
17645
|
+
{
|
|
17646
|
+
id: "pagerduty",
|
|
17647
|
+
name: "PagerDuty",
|
|
17648
|
+
category: "Incident response",
|
|
17649
|
+
hostSuffixes: ["pagerduty.com"],
|
|
17650
|
+
apiBase: "https://api.pagerduty.com",
|
|
17651
|
+
defaultDataClasses: ["logs"],
|
|
17652
|
+
sdks: {
|
|
17653
|
+
npm: ["@pagerduty/pdjs"],
|
|
17654
|
+
pypi: ["pdpyras"],
|
|
17655
|
+
go: ["github.com/PagerDuty/go-pagerduty"],
|
|
17656
|
+
rubygems: ["pagerduty"]
|
|
17657
|
+
}
|
|
17658
|
+
},
|
|
17659
|
+
{
|
|
17660
|
+
id: "github",
|
|
17661
|
+
name: "GitHub",
|
|
17662
|
+
category: "Developer platform",
|
|
17663
|
+
hostSuffixes: ["github.com", "githubusercontent.com"],
|
|
17664
|
+
apiBase: "https://api.github.com",
|
|
17665
|
+
defaultDataClasses: ["source"],
|
|
17666
|
+
sdks: {
|
|
17667
|
+
npm: ["@octokit/rest", "octokit"],
|
|
17668
|
+
pypi: ["pygithub"],
|
|
17669
|
+
go: ["github.com/google/go-github"],
|
|
17670
|
+
maven: ["org.kohsuke.github-api"],
|
|
17671
|
+
rubygems: ["octokit"],
|
|
17672
|
+
cargo: ["octocrab"],
|
|
17673
|
+
composer: ["knplabs/github-api"],
|
|
17674
|
+
nuget: ["Octokit"]
|
|
17675
|
+
}
|
|
17676
|
+
},
|
|
17677
|
+
{
|
|
17678
|
+
id: "gitlab",
|
|
17679
|
+
name: "GitLab",
|
|
17680
|
+
category: "Developer platform",
|
|
17681
|
+
hostSuffixes: ["gitlab.com"],
|
|
17682
|
+
apiBase: "https://gitlab.com/api",
|
|
17683
|
+
defaultDataClasses: ["source"],
|
|
17684
|
+
sdks: {
|
|
17685
|
+
npm: ["@gitbeaker/rest"],
|
|
17686
|
+
pypi: ["python-gitlab"],
|
|
17687
|
+
go: ["gitlab.com/gitlab-org/api/client-go"],
|
|
17688
|
+
rubygems: ["gitlab"],
|
|
17689
|
+
nuget: ["GitLabApiClient"]
|
|
17690
|
+
}
|
|
17691
|
+
},
|
|
17692
|
+
{
|
|
17693
|
+
id: "auth0",
|
|
17694
|
+
name: "Auth0",
|
|
17695
|
+
category: "Identity",
|
|
17696
|
+
hostSuffixes: ["auth0.com"],
|
|
17697
|
+
apiBase: "https://login.auth0.com",
|
|
17698
|
+
defaultDataClasses: ["pii"],
|
|
17699
|
+
sdks: {
|
|
17700
|
+
npm: ["auth0"],
|
|
17701
|
+
pypi: ["auth0-python"],
|
|
17702
|
+
go: ["github.com/auth0/go-auth0"],
|
|
17703
|
+
maven: ["com.auth0"],
|
|
17704
|
+
rubygems: ["auth0"],
|
|
17705
|
+
composer: ["auth0/auth0-php"],
|
|
17706
|
+
nuget: ["Auth0.ManagementApi"]
|
|
17707
|
+
}
|
|
17708
|
+
},
|
|
17709
|
+
{
|
|
17710
|
+
id: "okta",
|
|
17711
|
+
name: "Okta",
|
|
17712
|
+
category: "Identity",
|
|
17713
|
+
hostSuffixes: ["okta.com", "oktapreview.com"],
|
|
17714
|
+
apiBase: "https://login.okta.com",
|
|
17715
|
+
defaultDataClasses: ["pii"],
|
|
17716
|
+
sdks: {
|
|
17717
|
+
npm: ["@okta/okta-sdk-nodejs"],
|
|
17718
|
+
pypi: ["okta"],
|
|
17719
|
+
go: ["github.com/okta/okta-sdk-golang"],
|
|
17720
|
+
maven: ["com.okta.sdk"],
|
|
17721
|
+
nuget: ["Okta.Sdk"]
|
|
17722
|
+
}
|
|
17723
|
+
},
|
|
17724
|
+
{
|
|
17725
|
+
id: "clerk",
|
|
17726
|
+
name: "Clerk",
|
|
17727
|
+
category: "Identity",
|
|
17728
|
+
hostSuffixes: ["clerk.com", "clerk.dev"],
|
|
17729
|
+
apiBase: "https://api.clerk.com",
|
|
17730
|
+
defaultDataClasses: ["pii"],
|
|
17731
|
+
sdks: {
|
|
17732
|
+
npm: ["@clerk/backend", "@clerk/nextjs"],
|
|
17733
|
+
pypi: ["clerk-backend-api"],
|
|
17734
|
+
go: ["github.com/clerk/clerk-sdk-go"]
|
|
17735
|
+
}
|
|
17736
|
+
},
|
|
17737
|
+
{
|
|
17738
|
+
id: "supabase",
|
|
17739
|
+
name: "Supabase",
|
|
17740
|
+
category: "Backend platform",
|
|
17741
|
+
hostSuffixes: ["supabase.co", "supabase.com"],
|
|
17742
|
+
apiBase: "https://api.supabase.com",
|
|
17743
|
+
defaultDataClasses: ["pii", "customer"],
|
|
17744
|
+
sdks: {
|
|
17745
|
+
npm: ["@supabase/supabase-js"],
|
|
17746
|
+
pypi: ["supabase"],
|
|
17747
|
+
cargo: ["postgrest"]
|
|
17748
|
+
}
|
|
17749
|
+
},
|
|
17750
|
+
{
|
|
17751
|
+
id: "firebase",
|
|
17752
|
+
name: "Firebase",
|
|
17753
|
+
category: "Backend platform",
|
|
17754
|
+
hostSuffixes: ["firebaseio.com", "firebase.google.com"],
|
|
17755
|
+
apiBase: "https://firebaseio.com",
|
|
17756
|
+
defaultDataClasses: ["customer"],
|
|
17757
|
+
sdks: {
|
|
17758
|
+
npm: ["firebase", "firebase-admin"],
|
|
17759
|
+
pypi: ["firebase-admin"],
|
|
17760
|
+
go: ["firebase.google.com/go"],
|
|
17761
|
+
maven: ["com.google.firebase"]
|
|
17762
|
+
}
|
|
17763
|
+
},
|
|
17764
|
+
{
|
|
17765
|
+
id: "mongodb-atlas",
|
|
17766
|
+
name: "MongoDB Atlas",
|
|
17767
|
+
category: "Database SaaS",
|
|
17768
|
+
hostSuffixes: ["mongodb.net", "mongodb.com"],
|
|
17769
|
+
apiBase: "https://cloud.mongodb.com",
|
|
17770
|
+
defaultDataClasses: ["customer"],
|
|
17771
|
+
sdks: {
|
|
17772
|
+
npm: ["mongodb"],
|
|
17773
|
+
pypi: ["pymongo"],
|
|
17774
|
+
go: ["go.mongodb.org/mongo-driver"],
|
|
17775
|
+
maven: ["org.mongodb"],
|
|
17776
|
+
rubygems: ["mongo"],
|
|
17777
|
+
cargo: ["mongodb"],
|
|
17778
|
+
nuget: ["MongoDB.Driver"]
|
|
17779
|
+
}
|
|
17780
|
+
},
|
|
17781
|
+
{
|
|
17782
|
+
id: "planetscale",
|
|
17783
|
+
name: "PlanetScale",
|
|
17784
|
+
category: "Database SaaS",
|
|
17785
|
+
hostSuffixes: ["psdb.cloud", "planetscale.com"],
|
|
17786
|
+
apiBase: "https://api.planetscale.com",
|
|
17787
|
+
defaultDataClasses: ["customer"],
|
|
17788
|
+
sdks: {
|
|
17789
|
+
npm: ["@planetscale/database"],
|
|
17790
|
+
go: ["github.com/planetscale/planetscale-go"]
|
|
17791
|
+
}
|
|
17792
|
+
},
|
|
17793
|
+
{
|
|
17794
|
+
id: "algolia",
|
|
17795
|
+
name: "Algolia",
|
|
17796
|
+
category: "Search SaaS",
|
|
17797
|
+
hostSuffixes: ["algolia.net", "algolianet.com"],
|
|
17798
|
+
apiBase: "https://algolia.net",
|
|
17799
|
+
defaultDataClasses: ["customer"],
|
|
17800
|
+
sdks: {
|
|
17801
|
+
npm: ["algoliasearch"],
|
|
17802
|
+
pypi: ["algoliasearch"],
|
|
17803
|
+
go: ["github.com/algolia/algoliasearch-client-go"],
|
|
17804
|
+
maven: ["com.algolia"],
|
|
17805
|
+
rubygems: ["algolia"],
|
|
17806
|
+
composer: ["algolia/algoliasearch-client-php"],
|
|
17807
|
+
nuget: ["Algolia.Search"]
|
|
17808
|
+
}
|
|
17809
|
+
},
|
|
17810
|
+
{
|
|
17811
|
+
id: "cloudflare",
|
|
17812
|
+
name: "Cloudflare",
|
|
17813
|
+
category: "CDN / edge",
|
|
17814
|
+
hostSuffixes: ["cloudflare.com", "workers.dev"],
|
|
17815
|
+
apiBase: "https://api.cloudflare.com",
|
|
17816
|
+
defaultDataClasses: ["logs"],
|
|
17817
|
+
sdks: {
|
|
17818
|
+
npm: ["cloudflare"],
|
|
17819
|
+
pypi: ["cloudflare"],
|
|
17820
|
+
go: ["github.com/cloudflare/cloudflare-go"],
|
|
17821
|
+
nuget: ["CloudFlare.Client"]
|
|
17822
|
+
}
|
|
17823
|
+
},
|
|
17824
|
+
{
|
|
17825
|
+
id: "huggingface",
|
|
17826
|
+
name: "Hugging Face",
|
|
17827
|
+
category: "LLM provider",
|
|
17828
|
+
hostSuffixes: ["huggingface.co"],
|
|
17829
|
+
apiBase: "https://api-inference.huggingface.co",
|
|
17830
|
+
defaultDataClasses: ["source"],
|
|
17831
|
+
sdks: {
|
|
17832
|
+
npm: ["@huggingface/inference"],
|
|
17833
|
+
pypi: ["huggingface-hub", "transformers"],
|
|
17834
|
+
rubygems: ["hugging-face"]
|
|
17835
|
+
}
|
|
17836
|
+
},
|
|
17837
|
+
{
|
|
17838
|
+
id: "cohere",
|
|
17839
|
+
name: "Cohere",
|
|
17840
|
+
category: "LLM provider",
|
|
17841
|
+
hostSuffixes: ["cohere.com", "cohere.ai"],
|
|
17842
|
+
apiBase: "https://api.cohere.com",
|
|
17843
|
+
defaultDataClasses: ["pii", "source"],
|
|
17844
|
+
sdks: {
|
|
17845
|
+
npm: ["cohere-ai"],
|
|
17846
|
+
pypi: ["cohere"],
|
|
17847
|
+
go: ["github.com/cohere-ai/cohere-go"]
|
|
17848
|
+
}
|
|
17849
|
+
},
|
|
17850
|
+
{
|
|
17851
|
+
id: "mistral",
|
|
17852
|
+
name: "Mistral AI",
|
|
17853
|
+
category: "LLM provider",
|
|
17854
|
+
hostSuffixes: ["mistral.ai"],
|
|
17855
|
+
apiBase: "https://api.mistral.ai",
|
|
17856
|
+
defaultDataClasses: ["pii", "source"],
|
|
17857
|
+
sdks: {
|
|
17858
|
+
npm: ["@mistralai/mistralai"],
|
|
17859
|
+
pypi: ["mistralai"],
|
|
17860
|
+
go: ["github.com/gage-technologies/mistral-go"]
|
|
17861
|
+
}
|
|
17862
|
+
}
|
|
17863
|
+
];
|
|
17864
|
+
var EGRESS_VERSION_MATERIAL = `${EXTRACTOR_VERSION}
|
|
17865
|
+
${JSON.stringify(PROVIDER_REGISTRY)}`;
|
|
17866
|
+
|
|
17867
|
+
// ../../packages/detections/src/egress/extract.ts
|
|
17868
|
+
var SECRET_KEY_NAMES = "api[_-]?key|apikey|private[_-]?key|access[_-]?key|access[_-]?token|token|secret|credentials?|password|passwd|pwd|authorization|sig|signature|sas|assertion";
|
|
17869
|
+
var AUTH_SCHEMES = "Bearer|Basic|Token|Digest|ApiKey|SSWS|AWS4-HMAC-SHA256";
|
|
17870
|
+
var SECRET_VALUE = new RegExp(
|
|
17871
|
+
`((?:${SECRET_KEY_NAMES})['"\`]?\\s*[:=]\\s*['"\`]?)(?!(?:${AUTH_SCHEMES})[\\s'"\`])[^\\s'"\`&]+`,
|
|
17872
|
+
"gi"
|
|
17873
|
+
);
|
|
17874
|
+
var AUTH_SCHEME_VALUE = new RegExp(
|
|
17875
|
+
`((?:${SECRET_KEY_NAMES})['"\`]?\\s*[:=]\\s*['"\`]?)(${AUTH_SCHEMES})\\s+[^\\s'"\`]+`,
|
|
17876
|
+
"gi"
|
|
17877
|
+
);
|
|
17878
|
+
var WEBHOOK_SECRET_PATHS = [
|
|
17879
|
+
{ hosts: ["hooks.slack.com"], prefix: "/services/" },
|
|
17880
|
+
{
|
|
17881
|
+
hosts: ["discord.com", "discordapp.com", "ptb.discord.com", "canary.discord.com"],
|
|
17882
|
+
prefix: "/api/webhooks/"
|
|
17883
|
+
},
|
|
17884
|
+
{ hosts: ["hooks.zapier.com"], prefix: "/hooks/" },
|
|
17885
|
+
{ hosts: ["outlook.office.com", "outlook.office365.com"], prefix: "/webhook/" }
|
|
17886
|
+
];
|
|
17887
|
+
function escapeRegExp(literal2) {
|
|
17888
|
+
return literal2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
17889
|
+
}
|
|
17890
|
+
var WEBHOOK_URL = new RegExp(
|
|
17891
|
+
`(https?://(?:${WEBHOOK_SECRET_PATHS.flatMap(
|
|
17892
|
+
(entry) => entry.hosts.map((host) => `${escapeRegExp(host)}${escapeRegExp(entry.prefix)}`)
|
|
17893
|
+
).join("|")}))[^\\s'"\`<>()[\\]{},;]+`,
|
|
17894
|
+
"gi"
|
|
17895
|
+
);
|
|
17896
|
+
|
|
17258
17897
|
// ../../packages/detections/src/escape-regexp.ts
|
|
17259
|
-
function
|
|
17898
|
+
function escapeRegExp2(value) {
|
|
17260
17899
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
17261
17900
|
}
|
|
17262
17901
|
|
|
17263
17902
|
// ../../packages/detections/src/matchers/limits.ts
|
|
17264
17903
|
var MAX_MATCHES_PER_RULE = 1e4;
|
|
17904
|
+
var MAX_REGEX_INPUT_LENGTH = 2e5;
|
|
17265
17905
|
|
|
17266
17906
|
// ../../packages/detections/src/matchers/keyword.ts
|
|
17267
17907
|
var KeywordMatcher2 = class {
|
|
@@ -17272,7 +17912,7 @@ var KeywordMatcher2 = class {
|
|
|
17272
17912
|
for (const kw of keywords) {
|
|
17273
17913
|
if (kw.length === 0) continue;
|
|
17274
17914
|
if (spans.length >= MAX_MATCHES_PER_RULE) break;
|
|
17275
|
-
const re = new RegExp(
|
|
17915
|
+
const re = new RegExp(escapeRegExp2(kw), caseSensitive ? "gu" : "giu");
|
|
17276
17916
|
let m;
|
|
17277
17917
|
while ((m = re.exec(text)) !== null) {
|
|
17278
17918
|
spans.push({ start: m.index, end: m.index + m[0].length });
|
|
@@ -17289,9 +17929,13 @@ var RegexMatcher2 = class {
|
|
|
17289
17929
|
if (rule.matcher.type !== "regex") return [];
|
|
17290
17930
|
const { pattern, flags, captureGroup } = rule.matcher;
|
|
17291
17931
|
const re = new RegExp(pattern, flags.includes("d") ? flags : `${flags}d`);
|
|
17932
|
+
const scanText2 = text.length > MAX_REGEX_INPUT_LENGTH ? text.slice(0, MAX_REGEX_INPUT_LENGTH) : text;
|
|
17292
17933
|
const spans = [];
|
|
17293
17934
|
let m;
|
|
17294
|
-
|
|
17935
|
+
const maxIterations = scanText2.length + 1;
|
|
17936
|
+
let iterations = 0;
|
|
17937
|
+
while ((m = re.exec(scanText2)) !== null) {
|
|
17938
|
+
if (++iterations > maxIterations) break;
|
|
17295
17939
|
const group = captureGroup != null ? m[captureGroup] : m[0];
|
|
17296
17940
|
if (m[0].length === 0) re.lastIndex++;
|
|
17297
17941
|
if (group && spans.length < MAX_MATCHES_PER_RULE) {
|
|
@@ -17366,6 +18010,31 @@ var CONFIG_POSTURE_RULES = [
|
|
|
17366
18010
|
}
|
|
17367
18011
|
];
|
|
17368
18012
|
|
|
18013
|
+
// ../../packages/detections/src/security/redos-probe.ts
|
|
18014
|
+
var EXPONENTIAL_UNITS = [
|
|
18015
|
+
"a",
|
|
18016
|
+
"0",
|
|
18017
|
+
" ",
|
|
18018
|
+
"x",
|
|
18019
|
+
"ab",
|
|
18020
|
+
"a.",
|
|
18021
|
+
"a-",
|
|
18022
|
+
"a_",
|
|
18023
|
+
"a@",
|
|
18024
|
+
"a/",
|
|
18025
|
+
"a:",
|
|
18026
|
+
"a=",
|
|
18027
|
+
"a;",
|
|
18028
|
+
"aA0",
|
|
18029
|
+
" "
|
|
18030
|
+
];
|
|
18031
|
+
var EXPONENTIAL_PROBES = EXPONENTIAL_UNITS.flatMap(
|
|
18032
|
+
(unit) => [23, 25].map((len) => unit.repeat(Math.ceil(len / unit.length)).slice(0, len) + "!")
|
|
18033
|
+
);
|
|
18034
|
+
var POLYNOMIAL_PROBES = ["abc-", "a.", "a ", "a=", "x", "0", "a@", "a/", "ab"].map(
|
|
18035
|
+
(unit) => unit.repeat(1e4).slice(0, 4e4) + "!"
|
|
18036
|
+
);
|
|
18037
|
+
|
|
17369
18038
|
// ../../packages/plugin-sdk/src/repo.ts
|
|
17370
18039
|
import { existsSync as existsSync3, readFileSync as readFileSync3, statSync } from "fs";
|
|
17371
18040
|
import { basename, dirname, isAbsolute, join as join6, sep as sep2 } from "path";
|
|
@@ -17383,10 +18052,14 @@ import { arch, hostname as hostname3, platform, release } from "os";
|
|
|
17383
18052
|
import { mkdirSync as mkdirSync3, readFileSync as readFileSync5, writeFileSync as writeFileSync4 } from "fs";
|
|
17384
18053
|
import { join as join8 } from "path";
|
|
17385
18054
|
|
|
18055
|
+
// ../../packages/plugin-sdk/src/paths.ts
|
|
18056
|
+
import { readdirSync as readdirSync2, realpathSync as realpathSync2 } from "fs";
|
|
18057
|
+
import { basename as basename3, dirname as dirname2, sep as sep3 } from "path";
|
|
18058
|
+
|
|
17386
18059
|
// ../../packages/plugin-sdk/src/project-files.ts
|
|
17387
18060
|
var import_ignore = __toESM(require_ignore(), 1);
|
|
17388
|
-
import { existsSync as existsSync4, readdirSync as
|
|
17389
|
-
import { basename as
|
|
18061
|
+
import { existsSync as existsSync4, readdirSync as readdirSync3, readFileSync as readFileSync6 } from "fs";
|
|
18062
|
+
import { basename as basename4, join as join9, relative, sep as sep4 } from "path";
|
|
17390
18063
|
|
|
17391
18064
|
// ../../packages/plugin-sdk/src/runtime.ts
|
|
17392
18065
|
import { randomUUID as randomUUID10 } from "crypto";
|
|
@@ -17413,7 +18086,7 @@ function throttled(dataDir2, markerName, windowMs) {
|
|
|
17413
18086
|
|
|
17414
18087
|
// src/history/reconcile-trigger.ts
|
|
17415
18088
|
import { spawn } from "child_process";
|
|
17416
|
-
import { dirname as
|
|
18089
|
+
import { dirname as dirname3, join as join12 } from "path";
|
|
17417
18090
|
import { fileURLToPath } from "url";
|
|
17418
18091
|
|
|
17419
18092
|
// src/history/tail.ts
|
|
@@ -17443,7 +18116,7 @@ function triggerReconcile(dataDir2, sessionId, transcriptPath) {
|
|
|
17443
18116
|
try {
|
|
17444
18117
|
const marker = `${RECONCILE_MARKER_PREFIX}-${safeSessionId(sessionId)}`;
|
|
17445
18118
|
if (throttled(dataDir2, marker, RECONCILE_THROTTLE_MS)) return;
|
|
17446
|
-
const here =
|
|
18119
|
+
const here = dirname3(fileURLToPath(import.meta.url));
|
|
17447
18120
|
const child = spawn(process.execPath, [join12(here, "reconcile.js"), sessionId, transcriptPath], {
|
|
17448
18121
|
detached: true,
|
|
17449
18122
|
stdio: "ignore"
|
|
@@ -17457,13 +18130,23 @@ function triggerReconcile(dataDir2, sessionId, transcriptPath) {
|
|
|
17457
18130
|
async function readStdin() {
|
|
17458
18131
|
return new Promise((resolve) => {
|
|
17459
18132
|
let data = "";
|
|
17460
|
-
|
|
17461
|
-
|
|
17462
|
-
|
|
17463
|
-
|
|
17464
|
-
|
|
18133
|
+
let settled = false;
|
|
18134
|
+
const finish = () => {
|
|
18135
|
+
if (settled) return;
|
|
18136
|
+
settled = true;
|
|
18137
|
+
clearTimeout(timer);
|
|
18138
|
+
process.stdin.removeListener("data", onData);
|
|
18139
|
+
process.stdin.removeListener("end", finish);
|
|
17465
18140
|
resolve(data);
|
|
17466
|
-
}
|
|
18141
|
+
};
|
|
18142
|
+
const onData = (chunk) => {
|
|
18143
|
+
data += chunk;
|
|
18144
|
+
};
|
|
18145
|
+
const timer = setTimeout(finish, 5e3);
|
|
18146
|
+
process.stdin.setEncoding("utf8");
|
|
18147
|
+
process.stdin.on("data", onData);
|
|
18148
|
+
process.stdin.on("end", finish);
|
|
18149
|
+
process.stdin.on("error", finish);
|
|
17467
18150
|
});
|
|
17468
18151
|
}
|
|
17469
18152
|
function parseJson(raw) {
|