@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/intro.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
|
});
|
|
@@ -16926,145 +17137,6 @@ var SetupHandoffOffer = external_exports.object({
|
|
|
16926
17137
|
path: ["liveKeys"]
|
|
16927
17138
|
});
|
|
16928
17139
|
|
|
16929
|
-
// ../../packages/schema/src/zod/shares.ts
|
|
16930
|
-
var DestinationKind = external_exports.enum(["provider", "internal", "ip"]).meta({ id: "DestinationKind" });
|
|
16931
|
-
var Transport = external_exports.enum(["https", "http", "sftp", "grpc", "smtp"]).meta({ id: "Transport" });
|
|
16932
|
-
var DataClass = external_exports.enum(["secrets", "pii", "customer", "source", "telemetry", "logs", "metrics", "none"]).meta({ id: "DataClass" });
|
|
16933
|
-
var DATA_CLASS_ORDER = DataClass.options;
|
|
16934
|
-
var ShareTrustLevel = external_exports.enum(["recognized", "internal", "unverified", "ip"]).meta({ id: "ShareTrustLevel" });
|
|
16935
|
-
var EgressDecision = external_exports.enum(["allow", "block"]).meta({ id: "EgressDecision" });
|
|
16936
|
-
var EgressStatus = external_exports.enum(["allowed", "blocked", "review"]).meta({ id: "EgressStatus" });
|
|
16937
|
-
var ReviewReason = external_exports.enum(["raw_ip", "unverified_domain", "plaintext_transport"]).meta({ id: "ReviewReason" });
|
|
16938
|
-
var HttpMethod = external_exports.enum(["GET", "POST", "PUT", "DELETE"]).meta({ id: "HttpMethod" });
|
|
16939
|
-
var ReviewInfo = external_exports.object({
|
|
16940
|
-
needsReview: external_exports.boolean(),
|
|
16941
|
-
reasons: external_exports.array(ReviewReason)
|
|
16942
|
-
}).meta({ id: "ReviewInfo" });
|
|
16943
|
-
var DestinationNetwork = external_exports.object({
|
|
16944
|
-
port: external_exports.number().int().nullable(),
|
|
16945
|
-
geo: external_exports.string().nullable(),
|
|
16946
|
-
ptr: external_exports.string().nullable()
|
|
16947
|
-
}).meta({ id: "DestinationNetwork" });
|
|
16948
|
-
var EndpointSummary = external_exports.object({
|
|
16949
|
-
id: external_exports.string(),
|
|
16950
|
-
method: HttpMethod,
|
|
16951
|
-
transport: Transport,
|
|
16952
|
-
url: external_exports.string(),
|
|
16953
|
-
template: external_exports.boolean(),
|
|
16954
|
-
dataClass: DataClass,
|
|
16955
|
-
lastSeen: external_exports.iso.datetime(),
|
|
16956
|
-
callSiteCount: external_exports.number().int().nonnegative()
|
|
16957
|
-
}).meta({ id: "EndpointSummary" });
|
|
16958
|
-
var CallSite = external_exports.object({
|
|
16959
|
-
id: external_exports.string(),
|
|
16960
|
-
project: external_exports.string(),
|
|
16961
|
-
file: external_exports.string(),
|
|
16962
|
-
line: external_exports.number().int().nonnegative(),
|
|
16963
|
-
snippet: external_exports.string(),
|
|
16964
|
-
dynamic: external_exports.boolean(),
|
|
16965
|
-
vendored: external_exports.boolean(),
|
|
16966
|
-
/** Deep-link to the Inventory project, when the repo is governed there. */
|
|
16967
|
-
projectId: external_exports.string().nullable()
|
|
16968
|
-
}).meta({ id: "CallSite" });
|
|
16969
|
-
var EndpointWithSites = EndpointSummary.extend({
|
|
16970
|
-
sites: external_exports.array(CallSite)
|
|
16971
|
-
}).meta({ id: "EndpointWithSites" });
|
|
16972
|
-
var ShareDestinationSummary = external_exports.object({
|
|
16973
|
-
id: external_exports.string(),
|
|
16974
|
-
kind: DestinationKind,
|
|
16975
|
-
name: external_exports.string(),
|
|
16976
|
-
host: external_exports.string(),
|
|
16977
|
-
category: external_exports.string(),
|
|
16978
|
-
trust: ShareTrustLevel,
|
|
16979
|
-
/** Effective state (decision applied over the trust default). */
|
|
16980
|
-
status: EgressStatus,
|
|
16981
|
-
/** True when an egress decision override differs from the trust default. */
|
|
16982
|
-
isCustom: external_exports.boolean(),
|
|
16983
|
-
lastSeen: external_exports.iso.datetime(),
|
|
16984
|
-
endpointCount: external_exports.number().int().nonnegative(),
|
|
16985
|
-
callSiteCount: external_exports.number().int().nonnegative(),
|
|
16986
|
-
transports: external_exports.array(Transport),
|
|
16987
|
-
/** Most-sensitive first. */
|
|
16988
|
-
dataClasses: external_exports.array(DataClass),
|
|
16989
|
-
review: ReviewInfo,
|
|
16990
|
-
/** Non-provider hosts only; null for providers. */
|
|
16991
|
-
network: DestinationNetwork.nullable(),
|
|
16992
|
-
/** Embedded for inline expansion — no call sites here. */
|
|
16993
|
-
endpoints: external_exports.array(EndpointSummary)
|
|
16994
|
-
}).meta({ id: "ShareDestinationSummary" });
|
|
16995
|
-
var ShareDestinationDetail = ShareDestinationSummary.omit({
|
|
16996
|
-
endpointCount: true,
|
|
16997
|
-
callSiteCount: true,
|
|
16998
|
-
endpoints: true
|
|
16999
|
-
}).extend({
|
|
17000
|
-
/** Ownership/geo rationale; null for providers. */
|
|
17001
|
-
note: external_exports.string().nullable(),
|
|
17002
|
-
endpoints: external_exports.array(EndpointWithSites)
|
|
17003
|
-
}).meta({ id: "ShareDestinationDetail" });
|
|
17004
|
-
var ReviewDestination = external_exports.object({
|
|
17005
|
-
id: external_exports.string(),
|
|
17006
|
-
kind: DestinationKind,
|
|
17007
|
-
name: external_exports.string(),
|
|
17008
|
-
/** Registrable host — lets the strip derive the provider lettermark, as the register does. */
|
|
17009
|
-
host: external_exports.string(),
|
|
17010
|
-
trust: ShareTrustLevel,
|
|
17011
|
-
status: EgressStatus,
|
|
17012
|
-
review: ReviewInfo,
|
|
17013
|
-
topDataClass: DataClass,
|
|
17014
|
-
callSiteCount: external_exports.number().int().nonnegative(),
|
|
17015
|
-
lastSeen: external_exports.iso.datetime()
|
|
17016
|
-
}).meta({ id: "ReviewDestination" });
|
|
17017
|
-
var ShareDestinationGroup = external_exports.object({
|
|
17018
|
-
kind: DestinationKind,
|
|
17019
|
-
total: external_exports.number().int().nonnegative(),
|
|
17020
|
-
items: external_exports.array(ShareDestinationSummary)
|
|
17021
|
-
}).meta({ id: "ShareDestinationGroup" });
|
|
17022
|
-
var ListShareDestinationsResponse = external_exports.object({ groups: external_exports.array(ShareDestinationGroup) }).meta({ id: "ListShareDestinationsResponse" });
|
|
17023
|
-
var NeedsReviewResponse = external_exports.object({ items: external_exports.array(ReviewDestination) }).meta({ id: "NeedsReviewResponse" });
|
|
17024
|
-
var SharesStats = external_exports.object({
|
|
17025
|
-
destinations: external_exports.number().int().nonnegative(),
|
|
17026
|
-
endpoints: external_exports.number().int().nonnegative(),
|
|
17027
|
-
callSites: external_exports.number().int().nonnegative(),
|
|
17028
|
-
needsReview: external_exports.number().int().nonnegative(),
|
|
17029
|
-
insecure: external_exports.number().int().nonnegative(),
|
|
17030
|
-
byKind: external_exports.object({
|
|
17031
|
-
provider: external_exports.number().int().nonnegative(),
|
|
17032
|
-
internal: external_exports.number().int().nonnegative(),
|
|
17033
|
-
ip: external_exports.number().int().nonnegative()
|
|
17034
|
-
}),
|
|
17035
|
-
byTrust: external_exports.object({
|
|
17036
|
-
recognized: external_exports.number().int().nonnegative(),
|
|
17037
|
-
internal: external_exports.number().int().nonnegative(),
|
|
17038
|
-
unverified: external_exports.number().int().nonnegative(),
|
|
17039
|
-
ip: external_exports.number().int().nonnegative()
|
|
17040
|
-
})
|
|
17041
|
-
}).meta({ id: "SharesStats" });
|
|
17042
|
-
var SetEgressDecisionBody = external_exports.object({
|
|
17043
|
-
/** `null` clears the override — reverts to the trust default, isCustom false. */
|
|
17044
|
-
decision: EgressDecision.nullable()
|
|
17045
|
-
}).meta({ id: "SetEgressDecisionBody" });
|
|
17046
|
-
var SetEgressDecisionResponse = external_exports.object({ destination: ShareDestinationSummary }).meta({ id: "SetEgressDecisionResponse" });
|
|
17047
|
-
var ListShareDestinationsQuery = external_exports.object({
|
|
17048
|
-
/** Case-insensitive match over destination name/category, endpoint url, call-site project/file. */
|
|
17049
|
-
q: external_exports.string().optional(),
|
|
17050
|
-
/** Repeatable. Restrict to these DestinationKind values; absent means all kinds. */
|
|
17051
|
-
kind: external_exports.array(DestinationKind).optional(),
|
|
17052
|
-
/** Reserved for future grouping modes; only 'destination' is supported today. */
|
|
17053
|
-
groupBy: external_exports.enum(["destination"]).default("destination"),
|
|
17054
|
-
/**
|
|
17055
|
-
* When true, return a flat severity-ordered `items[]` instead of `groups`.
|
|
17056
|
-
* Uses `z.stringbool()` (NOT `z.coerce.boolean()` — `Boolean(str)` is true for
|
|
17057
|
-
* any non-empty string, so `?review=false`/`?review=0` would wrongly coerce
|
|
17058
|
-
* to `true`). `z.stringbool()` parses true/1/yes vs false/0/no correctly.
|
|
17059
|
-
*/
|
|
17060
|
-
review: external_exports.stringbool().default(false)
|
|
17061
|
-
});
|
|
17062
|
-
var ExportSharesQuery = external_exports.object({
|
|
17063
|
-
format: external_exports.enum(["csv", "json"]).default("csv"),
|
|
17064
|
-
q: external_exports.string().optional(),
|
|
17065
|
-
kind: external_exports.array(DestinationKind).optional()
|
|
17066
|
-
});
|
|
17067
|
-
|
|
17068
17140
|
// src/provenance.ts
|
|
17069
17141
|
import { execFileSync } from "child_process";
|
|
17070
17142
|
var USE_SHELL = process.platform === "win32";
|
|
@@ -17151,13 +17223,581 @@ import { readdirSync, readFileSync as readFileSync4, realpathSync, statSync as s
|
|
|
17151
17223
|
import { homedir as homedir2 } from "os";
|
|
17152
17224
|
import { basename as basename2, join as join7 } from "path";
|
|
17153
17225
|
|
|
17226
|
+
// ../../packages/detections/src/egress/registry.ts
|
|
17227
|
+
var EXTRACTOR_VERSION = "1";
|
|
17228
|
+
var PROVIDER_REGISTRY = [
|
|
17229
|
+
{
|
|
17230
|
+
id: "stripe",
|
|
17231
|
+
name: "Stripe",
|
|
17232
|
+
category: "Payments",
|
|
17233
|
+
hostSuffixes: ["stripe.com"],
|
|
17234
|
+
apiBase: "https://api.stripe.com",
|
|
17235
|
+
defaultDataClasses: ["pii", "customer"],
|
|
17236
|
+
sdks: {
|
|
17237
|
+
npm: ["stripe"],
|
|
17238
|
+
pypi: ["stripe"],
|
|
17239
|
+
go: ["github.com/stripe/stripe-go"],
|
|
17240
|
+
maven: ["com.stripe"],
|
|
17241
|
+
rubygems: ["stripe"],
|
|
17242
|
+
composer: ["stripe/stripe-php"],
|
|
17243
|
+
nuget: ["Stripe.net"]
|
|
17244
|
+
}
|
|
17245
|
+
},
|
|
17246
|
+
{
|
|
17247
|
+
id: "datadog",
|
|
17248
|
+
name: "Datadog",
|
|
17249
|
+
category: "Observability",
|
|
17250
|
+
hostSuffixes: ["datadoghq.com", "datadoghq.eu"],
|
|
17251
|
+
apiBase: "https://api.datadoghq.com",
|
|
17252
|
+
defaultDataClasses: ["telemetry", "logs", "metrics"],
|
|
17253
|
+
sdks: {
|
|
17254
|
+
npm: ["dd-trace", "@datadog/browser-logs"],
|
|
17255
|
+
pypi: ["datadog", "ddtrace"],
|
|
17256
|
+
go: ["github.com/DataDog/dd-trace-go"],
|
|
17257
|
+
maven: ["com.datadoghq"],
|
|
17258
|
+
rubygems: ["ddtrace", "dogapi"],
|
|
17259
|
+
nuget: ["Datadog.Trace"]
|
|
17260
|
+
}
|
|
17261
|
+
},
|
|
17262
|
+
{
|
|
17263
|
+
id: "newrelic",
|
|
17264
|
+
name: "New Relic",
|
|
17265
|
+
category: "Observability",
|
|
17266
|
+
hostSuffixes: ["newrelic.com", "nr-data.net"],
|
|
17267
|
+
apiBase: "https://api.newrelic.com",
|
|
17268
|
+
defaultDataClasses: ["telemetry", "logs", "metrics"],
|
|
17269
|
+
sdks: {
|
|
17270
|
+
npm: ["newrelic"],
|
|
17271
|
+
pypi: ["newrelic"],
|
|
17272
|
+
go: ["github.com/newrelic/go-agent"],
|
|
17273
|
+
maven: ["com.newrelic.agent.java"],
|
|
17274
|
+
rubygems: ["newrelic_rpm"],
|
|
17275
|
+
nuget: ["NewRelic.Agent"]
|
|
17276
|
+
}
|
|
17277
|
+
},
|
|
17278
|
+
{
|
|
17279
|
+
id: "sentry",
|
|
17280
|
+
name: "Sentry",
|
|
17281
|
+
category: "Error tracking",
|
|
17282
|
+
hostSuffixes: ["sentry.io"],
|
|
17283
|
+
apiBase: "https://sentry.io",
|
|
17284
|
+
defaultDataClasses: ["source", "telemetry"],
|
|
17285
|
+
sdks: {
|
|
17286
|
+
npm: ["@sentry/node", "@sentry/react", "@sentry/nextjs"],
|
|
17287
|
+
pypi: ["sentry-sdk"],
|
|
17288
|
+
go: ["github.com/getsentry/sentry-go"],
|
|
17289
|
+
maven: ["io.sentry"],
|
|
17290
|
+
rubygems: ["sentry-ruby"],
|
|
17291
|
+
cargo: ["sentry"],
|
|
17292
|
+
composer: ["sentry/sentry"],
|
|
17293
|
+
nuget: ["Sentry"]
|
|
17294
|
+
}
|
|
17295
|
+
},
|
|
17296
|
+
{
|
|
17297
|
+
id: "openai",
|
|
17298
|
+
name: "OpenAI",
|
|
17299
|
+
category: "LLM provider",
|
|
17300
|
+
hostSuffixes: ["openai.com"],
|
|
17301
|
+
apiBase: "https://api.openai.com",
|
|
17302
|
+
defaultDataClasses: ["pii", "source"],
|
|
17303
|
+
sdks: {
|
|
17304
|
+
npm: ["openai"],
|
|
17305
|
+
pypi: ["openai"],
|
|
17306
|
+
go: ["github.com/sashabaranov/go-openai"],
|
|
17307
|
+
maven: ["com.openai"],
|
|
17308
|
+
rubygems: ["ruby-openai"],
|
|
17309
|
+
cargo: ["async-openai"],
|
|
17310
|
+
composer: ["openai-php/client"],
|
|
17311
|
+
nuget: ["OpenAI"]
|
|
17312
|
+
}
|
|
17313
|
+
},
|
|
17314
|
+
{
|
|
17315
|
+
id: "anthropic",
|
|
17316
|
+
name: "Anthropic",
|
|
17317
|
+
category: "LLM provider",
|
|
17318
|
+
hostSuffixes: ["anthropic.com"],
|
|
17319
|
+
apiBase: "https://api.anthropic.com",
|
|
17320
|
+
defaultDataClasses: ["pii", "source"],
|
|
17321
|
+
sdks: {
|
|
17322
|
+
npm: ["@anthropic-ai/sdk"],
|
|
17323
|
+
pypi: ["anthropic"],
|
|
17324
|
+
go: ["github.com/anthropics/anthropic-sdk-go"],
|
|
17325
|
+
nuget: ["Anthropic.SDK"]
|
|
17326
|
+
}
|
|
17327
|
+
},
|
|
17328
|
+
{
|
|
17329
|
+
id: "aws",
|
|
17330
|
+
name: "Amazon Web Services",
|
|
17331
|
+
category: "Cloud platform",
|
|
17332
|
+
hostSuffixes: ["amazonaws.com"],
|
|
17333
|
+
apiBase: "https://s3.amazonaws.com",
|
|
17334
|
+
defaultDataClasses: ["secrets", "customer"],
|
|
17335
|
+
sdks: {
|
|
17336
|
+
npm: ["@aws-sdk/client-s3", "aws-sdk"],
|
|
17337
|
+
pypi: ["boto3"],
|
|
17338
|
+
go: ["github.com/aws/aws-sdk-go", "github.com/aws/aws-sdk-go-v2"],
|
|
17339
|
+
maven: ["com.amazonaws", "software.amazon.awssdk"],
|
|
17340
|
+
rubygems: ["aws-sdk-s3"],
|
|
17341
|
+
cargo: ["aws-sdk-s3"],
|
|
17342
|
+
nuget: ["AWSSDK.S3"]
|
|
17343
|
+
}
|
|
17344
|
+
},
|
|
17345
|
+
{
|
|
17346
|
+
id: "gcp",
|
|
17347
|
+
name: "Google Cloud",
|
|
17348
|
+
category: "Cloud platform",
|
|
17349
|
+
hostSuffixes: ["googleapis.com"],
|
|
17350
|
+
apiBase: "https://storage.googleapis.com",
|
|
17351
|
+
defaultDataClasses: ["customer", "logs"],
|
|
17352
|
+
sdks: {
|
|
17353
|
+
npm: ["@google-cloud/storage"],
|
|
17354
|
+
pypi: ["google-cloud-storage"],
|
|
17355
|
+
go: ["cloud.google.com/go"],
|
|
17356
|
+
maven: ["com.google.cloud"],
|
|
17357
|
+
rubygems: ["google-cloud-storage"],
|
|
17358
|
+
nuget: ["Google.Cloud.Storage.V1"]
|
|
17359
|
+
}
|
|
17360
|
+
},
|
|
17361
|
+
{
|
|
17362
|
+
id: "azure",
|
|
17363
|
+
name: "Microsoft Azure",
|
|
17364
|
+
category: "Cloud platform",
|
|
17365
|
+
hostSuffixes: ["azure.com", "windows.net"],
|
|
17366
|
+
apiBase: "https://management.azure.com",
|
|
17367
|
+
defaultDataClasses: ["customer", "logs"],
|
|
17368
|
+
sdks: {
|
|
17369
|
+
npm: ["@azure/storage-blob"],
|
|
17370
|
+
pypi: ["azure-storage-blob"],
|
|
17371
|
+
go: ["github.com/Azure/azure-sdk-for-go"],
|
|
17372
|
+
maven: ["com.azure"],
|
|
17373
|
+
rubygems: ["azure-storage-blob"],
|
|
17374
|
+
nuget: ["Azure.Storage.Blobs"]
|
|
17375
|
+
}
|
|
17376
|
+
},
|
|
17377
|
+
{
|
|
17378
|
+
id: "slack",
|
|
17379
|
+
name: "Slack",
|
|
17380
|
+
category: "Notifications",
|
|
17381
|
+
hostSuffixes: ["slack.com"],
|
|
17382
|
+
apiBase: "https://slack.com/api",
|
|
17383
|
+
defaultDataClasses: ["logs"],
|
|
17384
|
+
sdks: {
|
|
17385
|
+
npm: ["@slack/web-api"],
|
|
17386
|
+
pypi: ["slack-sdk"],
|
|
17387
|
+
go: ["github.com/slack-go/slack"],
|
|
17388
|
+
maven: ["com.slack.api"],
|
|
17389
|
+
rubygems: ["slack-ruby-client"],
|
|
17390
|
+
composer: ["slack-php/slack-api"],
|
|
17391
|
+
nuget: ["SlackNet"]
|
|
17392
|
+
}
|
|
17393
|
+
},
|
|
17394
|
+
{
|
|
17395
|
+
id: "segment",
|
|
17396
|
+
name: "Segment",
|
|
17397
|
+
category: "Analytics",
|
|
17398
|
+
hostSuffixes: ["segment.io", "segment.com"],
|
|
17399
|
+
apiBase: "https://api.segment.io",
|
|
17400
|
+
defaultDataClasses: ["customer"],
|
|
17401
|
+
sdks: {
|
|
17402
|
+
npm: ["@segment/analytics-node", "analytics-node"],
|
|
17403
|
+
pypi: ["segment-analytics-python"],
|
|
17404
|
+
go: ["github.com/segmentio/analytics-go"],
|
|
17405
|
+
maven: ["com.segment.analytics.java"],
|
|
17406
|
+
rubygems: ["analytics-ruby"],
|
|
17407
|
+
nuget: ["Analytics"]
|
|
17408
|
+
}
|
|
17409
|
+
},
|
|
17410
|
+
{
|
|
17411
|
+
id: "twilio",
|
|
17412
|
+
name: "Twilio",
|
|
17413
|
+
category: "Communications",
|
|
17414
|
+
hostSuffixes: ["twilio.com"],
|
|
17415
|
+
apiBase: "https://api.twilio.com",
|
|
17416
|
+
defaultDataClasses: ["pii", "customer"],
|
|
17417
|
+
sdks: {
|
|
17418
|
+
npm: ["twilio"],
|
|
17419
|
+
pypi: ["twilio"],
|
|
17420
|
+
go: ["github.com/twilio/twilio-go"],
|
|
17421
|
+
maven: ["com.twilio.sdk"],
|
|
17422
|
+
rubygems: ["twilio-ruby"],
|
|
17423
|
+
composer: ["twilio/sdk"],
|
|
17424
|
+
nuget: ["Twilio"]
|
|
17425
|
+
}
|
|
17426
|
+
},
|
|
17427
|
+
{
|
|
17428
|
+
id: "sendgrid",
|
|
17429
|
+
name: "SendGrid",
|
|
17430
|
+
category: "Email",
|
|
17431
|
+
hostSuffixes: ["sendgrid.com"],
|
|
17432
|
+
apiBase: "https://api.sendgrid.com",
|
|
17433
|
+
defaultDataClasses: ["pii"],
|
|
17434
|
+
sdks: {
|
|
17435
|
+
npm: ["@sendgrid/mail"],
|
|
17436
|
+
pypi: ["sendgrid"],
|
|
17437
|
+
go: ["github.com/sendgrid/sendgrid-go"],
|
|
17438
|
+
maven: ["com.sendgrid"],
|
|
17439
|
+
rubygems: ["sendgrid-ruby"],
|
|
17440
|
+
composer: ["sendgrid/sendgrid"],
|
|
17441
|
+
nuget: ["SendGrid"]
|
|
17442
|
+
}
|
|
17443
|
+
},
|
|
17444
|
+
{
|
|
17445
|
+
id: "mailgun",
|
|
17446
|
+
name: "Mailgun",
|
|
17447
|
+
category: "Email",
|
|
17448
|
+
hostSuffixes: ["mailgun.net"],
|
|
17449
|
+
apiBase: "https://api.mailgun.net",
|
|
17450
|
+
defaultDataClasses: ["pii"],
|
|
17451
|
+
sdks: {
|
|
17452
|
+
npm: ["mailgun.js"],
|
|
17453
|
+
pypi: ["mailgun"],
|
|
17454
|
+
rubygems: ["mailgun-ruby"],
|
|
17455
|
+
composer: ["mailgun/mailgun-php"],
|
|
17456
|
+
nuget: ["Mailgun"]
|
|
17457
|
+
}
|
|
17458
|
+
},
|
|
17459
|
+
{
|
|
17460
|
+
id: "mixpanel",
|
|
17461
|
+
name: "Mixpanel",
|
|
17462
|
+
category: "Analytics",
|
|
17463
|
+
hostSuffixes: ["mixpanel.com"],
|
|
17464
|
+
apiBase: "https://api.mixpanel.com",
|
|
17465
|
+
defaultDataClasses: ["customer", "telemetry"],
|
|
17466
|
+
sdks: {
|
|
17467
|
+
npm: ["mixpanel"],
|
|
17468
|
+
pypi: ["mixpanel"],
|
|
17469
|
+
rubygems: ["mixpanel-ruby"],
|
|
17470
|
+
nuget: ["Mixpanel"]
|
|
17471
|
+
}
|
|
17472
|
+
},
|
|
17473
|
+
{
|
|
17474
|
+
id: "amplitude",
|
|
17475
|
+
name: "Amplitude",
|
|
17476
|
+
category: "Analytics",
|
|
17477
|
+
hostSuffixes: ["amplitude.com"],
|
|
17478
|
+
apiBase: "https://api2.amplitude.com",
|
|
17479
|
+
defaultDataClasses: ["customer", "telemetry"],
|
|
17480
|
+
sdks: {
|
|
17481
|
+
npm: ["@amplitude/analytics-node"],
|
|
17482
|
+
pypi: ["amplitude-analytics"],
|
|
17483
|
+
nuget: ["Amplitude"]
|
|
17484
|
+
}
|
|
17485
|
+
},
|
|
17486
|
+
{
|
|
17487
|
+
id: "posthog",
|
|
17488
|
+
name: "PostHog",
|
|
17489
|
+
category: "Analytics",
|
|
17490
|
+
hostSuffixes: ["posthog.com"],
|
|
17491
|
+
apiBase: "https://us.i.posthog.com",
|
|
17492
|
+
defaultDataClasses: ["customer", "telemetry"],
|
|
17493
|
+
sdks: {
|
|
17494
|
+
npm: ["posthog-node", "posthog-js"],
|
|
17495
|
+
pypi: ["posthog"],
|
|
17496
|
+
go: ["github.com/posthog/posthog-go"],
|
|
17497
|
+
rubygems: ["posthog-ruby"],
|
|
17498
|
+
composer: ["posthog/posthog-php"],
|
|
17499
|
+
nuget: ["PostHog"]
|
|
17500
|
+
}
|
|
17501
|
+
},
|
|
17502
|
+
{
|
|
17503
|
+
id: "honeycomb",
|
|
17504
|
+
name: "Honeycomb",
|
|
17505
|
+
category: "Observability",
|
|
17506
|
+
hostSuffixes: ["honeycomb.io"],
|
|
17507
|
+
apiBase: "https://api.honeycomb.io",
|
|
17508
|
+
defaultDataClasses: ["telemetry", "metrics"],
|
|
17509
|
+
sdks: {
|
|
17510
|
+
npm: ["libhoney"],
|
|
17511
|
+
pypi: ["libhoney"],
|
|
17512
|
+
go: ["github.com/honeycombio/libhoney-go"],
|
|
17513
|
+
rubygems: ["libhoney"]
|
|
17514
|
+
}
|
|
17515
|
+
},
|
|
17516
|
+
{
|
|
17517
|
+
id: "grafana",
|
|
17518
|
+
name: "Grafana Cloud",
|
|
17519
|
+
category: "Observability",
|
|
17520
|
+
hostSuffixes: ["grafana.net"],
|
|
17521
|
+
apiBase: "https://grafana.net",
|
|
17522
|
+
defaultDataClasses: ["logs", "metrics"],
|
|
17523
|
+
sdks: {
|
|
17524
|
+
npm: ["@grafana/faro-web-sdk"]
|
|
17525
|
+
}
|
|
17526
|
+
},
|
|
17527
|
+
{
|
|
17528
|
+
id: "splunk",
|
|
17529
|
+
name: "Splunk",
|
|
17530
|
+
category: "Observability",
|
|
17531
|
+
hostSuffixes: ["splunkcloud.com", "splunk.com"],
|
|
17532
|
+
apiBase: "https://http-inputs.splunkcloud.com",
|
|
17533
|
+
defaultDataClasses: ["logs"],
|
|
17534
|
+
sdks: {
|
|
17535
|
+
npm: ["splunk-logging"],
|
|
17536
|
+
pypi: ["splunk-sdk"],
|
|
17537
|
+
maven: ["com.splunk"],
|
|
17538
|
+
nuget: ["Splunk.Logging.Common"]
|
|
17539
|
+
}
|
|
17540
|
+
},
|
|
17541
|
+
{
|
|
17542
|
+
id: "pagerduty",
|
|
17543
|
+
name: "PagerDuty",
|
|
17544
|
+
category: "Incident response",
|
|
17545
|
+
hostSuffixes: ["pagerduty.com"],
|
|
17546
|
+
apiBase: "https://api.pagerduty.com",
|
|
17547
|
+
defaultDataClasses: ["logs"],
|
|
17548
|
+
sdks: {
|
|
17549
|
+
npm: ["@pagerduty/pdjs"],
|
|
17550
|
+
pypi: ["pdpyras"],
|
|
17551
|
+
go: ["github.com/PagerDuty/go-pagerduty"],
|
|
17552
|
+
rubygems: ["pagerduty"]
|
|
17553
|
+
}
|
|
17554
|
+
},
|
|
17555
|
+
{
|
|
17556
|
+
id: "github",
|
|
17557
|
+
name: "GitHub",
|
|
17558
|
+
category: "Developer platform",
|
|
17559
|
+
hostSuffixes: ["github.com", "githubusercontent.com"],
|
|
17560
|
+
apiBase: "https://api.github.com",
|
|
17561
|
+
defaultDataClasses: ["source"],
|
|
17562
|
+
sdks: {
|
|
17563
|
+
npm: ["@octokit/rest", "octokit"],
|
|
17564
|
+
pypi: ["pygithub"],
|
|
17565
|
+
go: ["github.com/google/go-github"],
|
|
17566
|
+
maven: ["org.kohsuke.github-api"],
|
|
17567
|
+
rubygems: ["octokit"],
|
|
17568
|
+
cargo: ["octocrab"],
|
|
17569
|
+
composer: ["knplabs/github-api"],
|
|
17570
|
+
nuget: ["Octokit"]
|
|
17571
|
+
}
|
|
17572
|
+
},
|
|
17573
|
+
{
|
|
17574
|
+
id: "gitlab",
|
|
17575
|
+
name: "GitLab",
|
|
17576
|
+
category: "Developer platform",
|
|
17577
|
+
hostSuffixes: ["gitlab.com"],
|
|
17578
|
+
apiBase: "https://gitlab.com/api",
|
|
17579
|
+
defaultDataClasses: ["source"],
|
|
17580
|
+
sdks: {
|
|
17581
|
+
npm: ["@gitbeaker/rest"],
|
|
17582
|
+
pypi: ["python-gitlab"],
|
|
17583
|
+
go: ["gitlab.com/gitlab-org/api/client-go"],
|
|
17584
|
+
rubygems: ["gitlab"],
|
|
17585
|
+
nuget: ["GitLabApiClient"]
|
|
17586
|
+
}
|
|
17587
|
+
},
|
|
17588
|
+
{
|
|
17589
|
+
id: "auth0",
|
|
17590
|
+
name: "Auth0",
|
|
17591
|
+
category: "Identity",
|
|
17592
|
+
hostSuffixes: ["auth0.com"],
|
|
17593
|
+
apiBase: "https://login.auth0.com",
|
|
17594
|
+
defaultDataClasses: ["pii"],
|
|
17595
|
+
sdks: {
|
|
17596
|
+
npm: ["auth0"],
|
|
17597
|
+
pypi: ["auth0-python"],
|
|
17598
|
+
go: ["github.com/auth0/go-auth0"],
|
|
17599
|
+
maven: ["com.auth0"],
|
|
17600
|
+
rubygems: ["auth0"],
|
|
17601
|
+
composer: ["auth0/auth0-php"],
|
|
17602
|
+
nuget: ["Auth0.ManagementApi"]
|
|
17603
|
+
}
|
|
17604
|
+
},
|
|
17605
|
+
{
|
|
17606
|
+
id: "okta",
|
|
17607
|
+
name: "Okta",
|
|
17608
|
+
category: "Identity",
|
|
17609
|
+
hostSuffixes: ["okta.com", "oktapreview.com"],
|
|
17610
|
+
apiBase: "https://login.okta.com",
|
|
17611
|
+
defaultDataClasses: ["pii"],
|
|
17612
|
+
sdks: {
|
|
17613
|
+
npm: ["@okta/okta-sdk-nodejs"],
|
|
17614
|
+
pypi: ["okta"],
|
|
17615
|
+
go: ["github.com/okta/okta-sdk-golang"],
|
|
17616
|
+
maven: ["com.okta.sdk"],
|
|
17617
|
+
nuget: ["Okta.Sdk"]
|
|
17618
|
+
}
|
|
17619
|
+
},
|
|
17620
|
+
{
|
|
17621
|
+
id: "clerk",
|
|
17622
|
+
name: "Clerk",
|
|
17623
|
+
category: "Identity",
|
|
17624
|
+
hostSuffixes: ["clerk.com", "clerk.dev"],
|
|
17625
|
+
apiBase: "https://api.clerk.com",
|
|
17626
|
+
defaultDataClasses: ["pii"],
|
|
17627
|
+
sdks: {
|
|
17628
|
+
npm: ["@clerk/backend", "@clerk/nextjs"],
|
|
17629
|
+
pypi: ["clerk-backend-api"],
|
|
17630
|
+
go: ["github.com/clerk/clerk-sdk-go"]
|
|
17631
|
+
}
|
|
17632
|
+
},
|
|
17633
|
+
{
|
|
17634
|
+
id: "supabase",
|
|
17635
|
+
name: "Supabase",
|
|
17636
|
+
category: "Backend platform",
|
|
17637
|
+
hostSuffixes: ["supabase.co", "supabase.com"],
|
|
17638
|
+
apiBase: "https://api.supabase.com",
|
|
17639
|
+
defaultDataClasses: ["pii", "customer"],
|
|
17640
|
+
sdks: {
|
|
17641
|
+
npm: ["@supabase/supabase-js"],
|
|
17642
|
+
pypi: ["supabase"],
|
|
17643
|
+
cargo: ["postgrest"]
|
|
17644
|
+
}
|
|
17645
|
+
},
|
|
17646
|
+
{
|
|
17647
|
+
id: "firebase",
|
|
17648
|
+
name: "Firebase",
|
|
17649
|
+
category: "Backend platform",
|
|
17650
|
+
hostSuffixes: ["firebaseio.com", "firebase.google.com"],
|
|
17651
|
+
apiBase: "https://firebaseio.com",
|
|
17652
|
+
defaultDataClasses: ["customer"],
|
|
17653
|
+
sdks: {
|
|
17654
|
+
npm: ["firebase", "firebase-admin"],
|
|
17655
|
+
pypi: ["firebase-admin"],
|
|
17656
|
+
go: ["firebase.google.com/go"],
|
|
17657
|
+
maven: ["com.google.firebase"]
|
|
17658
|
+
}
|
|
17659
|
+
},
|
|
17660
|
+
{
|
|
17661
|
+
id: "mongodb-atlas",
|
|
17662
|
+
name: "MongoDB Atlas",
|
|
17663
|
+
category: "Database SaaS",
|
|
17664
|
+
hostSuffixes: ["mongodb.net", "mongodb.com"],
|
|
17665
|
+
apiBase: "https://cloud.mongodb.com",
|
|
17666
|
+
defaultDataClasses: ["customer"],
|
|
17667
|
+
sdks: {
|
|
17668
|
+
npm: ["mongodb"],
|
|
17669
|
+
pypi: ["pymongo"],
|
|
17670
|
+
go: ["go.mongodb.org/mongo-driver"],
|
|
17671
|
+
maven: ["org.mongodb"],
|
|
17672
|
+
rubygems: ["mongo"],
|
|
17673
|
+
cargo: ["mongodb"],
|
|
17674
|
+
nuget: ["MongoDB.Driver"]
|
|
17675
|
+
}
|
|
17676
|
+
},
|
|
17677
|
+
{
|
|
17678
|
+
id: "planetscale",
|
|
17679
|
+
name: "PlanetScale",
|
|
17680
|
+
category: "Database SaaS",
|
|
17681
|
+
hostSuffixes: ["psdb.cloud", "planetscale.com"],
|
|
17682
|
+
apiBase: "https://api.planetscale.com",
|
|
17683
|
+
defaultDataClasses: ["customer"],
|
|
17684
|
+
sdks: {
|
|
17685
|
+
npm: ["@planetscale/database"],
|
|
17686
|
+
go: ["github.com/planetscale/planetscale-go"]
|
|
17687
|
+
}
|
|
17688
|
+
},
|
|
17689
|
+
{
|
|
17690
|
+
id: "algolia",
|
|
17691
|
+
name: "Algolia",
|
|
17692
|
+
category: "Search SaaS",
|
|
17693
|
+
hostSuffixes: ["algolia.net", "algolianet.com"],
|
|
17694
|
+
apiBase: "https://algolia.net",
|
|
17695
|
+
defaultDataClasses: ["customer"],
|
|
17696
|
+
sdks: {
|
|
17697
|
+
npm: ["algoliasearch"],
|
|
17698
|
+
pypi: ["algoliasearch"],
|
|
17699
|
+
go: ["github.com/algolia/algoliasearch-client-go"],
|
|
17700
|
+
maven: ["com.algolia"],
|
|
17701
|
+
rubygems: ["algolia"],
|
|
17702
|
+
composer: ["algolia/algoliasearch-client-php"],
|
|
17703
|
+
nuget: ["Algolia.Search"]
|
|
17704
|
+
}
|
|
17705
|
+
},
|
|
17706
|
+
{
|
|
17707
|
+
id: "cloudflare",
|
|
17708
|
+
name: "Cloudflare",
|
|
17709
|
+
category: "CDN / edge",
|
|
17710
|
+
hostSuffixes: ["cloudflare.com", "workers.dev"],
|
|
17711
|
+
apiBase: "https://api.cloudflare.com",
|
|
17712
|
+
defaultDataClasses: ["logs"],
|
|
17713
|
+
sdks: {
|
|
17714
|
+
npm: ["cloudflare"],
|
|
17715
|
+
pypi: ["cloudflare"],
|
|
17716
|
+
go: ["github.com/cloudflare/cloudflare-go"],
|
|
17717
|
+
nuget: ["CloudFlare.Client"]
|
|
17718
|
+
}
|
|
17719
|
+
},
|
|
17720
|
+
{
|
|
17721
|
+
id: "huggingface",
|
|
17722
|
+
name: "Hugging Face",
|
|
17723
|
+
category: "LLM provider",
|
|
17724
|
+
hostSuffixes: ["huggingface.co"],
|
|
17725
|
+
apiBase: "https://api-inference.huggingface.co",
|
|
17726
|
+
defaultDataClasses: ["source"],
|
|
17727
|
+
sdks: {
|
|
17728
|
+
npm: ["@huggingface/inference"],
|
|
17729
|
+
pypi: ["huggingface-hub", "transformers"],
|
|
17730
|
+
rubygems: ["hugging-face"]
|
|
17731
|
+
}
|
|
17732
|
+
},
|
|
17733
|
+
{
|
|
17734
|
+
id: "cohere",
|
|
17735
|
+
name: "Cohere",
|
|
17736
|
+
category: "LLM provider",
|
|
17737
|
+
hostSuffixes: ["cohere.com", "cohere.ai"],
|
|
17738
|
+
apiBase: "https://api.cohere.com",
|
|
17739
|
+
defaultDataClasses: ["pii", "source"],
|
|
17740
|
+
sdks: {
|
|
17741
|
+
npm: ["cohere-ai"],
|
|
17742
|
+
pypi: ["cohere"],
|
|
17743
|
+
go: ["github.com/cohere-ai/cohere-go"]
|
|
17744
|
+
}
|
|
17745
|
+
},
|
|
17746
|
+
{
|
|
17747
|
+
id: "mistral",
|
|
17748
|
+
name: "Mistral AI",
|
|
17749
|
+
category: "LLM provider",
|
|
17750
|
+
hostSuffixes: ["mistral.ai"],
|
|
17751
|
+
apiBase: "https://api.mistral.ai",
|
|
17752
|
+
defaultDataClasses: ["pii", "source"],
|
|
17753
|
+
sdks: {
|
|
17754
|
+
npm: ["@mistralai/mistralai"],
|
|
17755
|
+
pypi: ["mistralai"],
|
|
17756
|
+
go: ["github.com/gage-technologies/mistral-go"]
|
|
17757
|
+
}
|
|
17758
|
+
}
|
|
17759
|
+
];
|
|
17760
|
+
var EGRESS_VERSION_MATERIAL = `${EXTRACTOR_VERSION}
|
|
17761
|
+
${JSON.stringify(PROVIDER_REGISTRY)}`;
|
|
17762
|
+
|
|
17763
|
+
// ../../packages/detections/src/egress/extract.ts
|
|
17764
|
+
var SECRET_KEY_NAMES = "api[_-]?key|apikey|private[_-]?key|access[_-]?key|access[_-]?token|token|secret|credentials?|password|passwd|pwd|authorization|sig|signature|sas|assertion";
|
|
17765
|
+
var AUTH_SCHEMES = "Bearer|Basic|Token|Digest|ApiKey|SSWS|AWS4-HMAC-SHA256";
|
|
17766
|
+
var SECRET_VALUE = new RegExp(
|
|
17767
|
+
`((?:${SECRET_KEY_NAMES})['"\`]?\\s*[:=]\\s*['"\`]?)(?!(?:${AUTH_SCHEMES})[\\s'"\`])[^\\s'"\`&]+`,
|
|
17768
|
+
"gi"
|
|
17769
|
+
);
|
|
17770
|
+
var AUTH_SCHEME_VALUE = new RegExp(
|
|
17771
|
+
`((?:${SECRET_KEY_NAMES})['"\`]?\\s*[:=]\\s*['"\`]?)(${AUTH_SCHEMES})\\s+[^\\s'"\`]+`,
|
|
17772
|
+
"gi"
|
|
17773
|
+
);
|
|
17774
|
+
var WEBHOOK_SECRET_PATHS = [
|
|
17775
|
+
{ hosts: ["hooks.slack.com"], prefix: "/services/" },
|
|
17776
|
+
{
|
|
17777
|
+
hosts: ["discord.com", "discordapp.com", "ptb.discord.com", "canary.discord.com"],
|
|
17778
|
+
prefix: "/api/webhooks/"
|
|
17779
|
+
},
|
|
17780
|
+
{ hosts: ["hooks.zapier.com"], prefix: "/hooks/" },
|
|
17781
|
+
{ hosts: ["outlook.office.com", "outlook.office365.com"], prefix: "/webhook/" }
|
|
17782
|
+
];
|
|
17783
|
+
function escapeRegExp(literal2) {
|
|
17784
|
+
return literal2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
17785
|
+
}
|
|
17786
|
+
var WEBHOOK_URL = new RegExp(
|
|
17787
|
+
`(https?://(?:${WEBHOOK_SECRET_PATHS.flatMap(
|
|
17788
|
+
(entry) => entry.hosts.map((host) => `${escapeRegExp(host)}${escapeRegExp(entry.prefix)}`)
|
|
17789
|
+
).join("|")}))[^\\s'"\`<>()[\\]{},;]+`,
|
|
17790
|
+
"gi"
|
|
17791
|
+
);
|
|
17792
|
+
|
|
17154
17793
|
// ../../packages/detections/src/escape-regexp.ts
|
|
17155
|
-
function
|
|
17794
|
+
function escapeRegExp2(value) {
|
|
17156
17795
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
17157
17796
|
}
|
|
17158
17797
|
|
|
17159
17798
|
// ../../packages/detections/src/matchers/limits.ts
|
|
17160
17799
|
var MAX_MATCHES_PER_RULE = 1e4;
|
|
17800
|
+
var MAX_REGEX_INPUT_LENGTH = 2e5;
|
|
17161
17801
|
|
|
17162
17802
|
// ../../packages/detections/src/matchers/keyword.ts
|
|
17163
17803
|
var KeywordMatcher2 = class {
|
|
@@ -17168,7 +17808,7 @@ var KeywordMatcher2 = class {
|
|
|
17168
17808
|
for (const kw of keywords) {
|
|
17169
17809
|
if (kw.length === 0) continue;
|
|
17170
17810
|
if (spans.length >= MAX_MATCHES_PER_RULE) break;
|
|
17171
|
-
const re = new RegExp(
|
|
17811
|
+
const re = new RegExp(escapeRegExp2(kw), caseSensitive ? "gu" : "giu");
|
|
17172
17812
|
let m;
|
|
17173
17813
|
while ((m = re.exec(text)) !== null) {
|
|
17174
17814
|
spans.push({ start: m.index, end: m.index + m[0].length });
|
|
@@ -17185,9 +17825,13 @@ var RegexMatcher2 = class {
|
|
|
17185
17825
|
if (rule.matcher.type !== "regex") return [];
|
|
17186
17826
|
const { pattern, flags, captureGroup } = rule.matcher;
|
|
17187
17827
|
const re = new RegExp(pattern, flags.includes("d") ? flags : `${flags}d`);
|
|
17828
|
+
const scanText2 = text.length > MAX_REGEX_INPUT_LENGTH ? text.slice(0, MAX_REGEX_INPUT_LENGTH) : text;
|
|
17188
17829
|
const spans = [];
|
|
17189
17830
|
let m;
|
|
17190
|
-
|
|
17831
|
+
const maxIterations = scanText2.length + 1;
|
|
17832
|
+
let iterations = 0;
|
|
17833
|
+
while ((m = re.exec(scanText2)) !== null) {
|
|
17834
|
+
if (++iterations > maxIterations) break;
|
|
17191
17835
|
const group = captureGroup != null ? m[captureGroup] : m[0];
|
|
17192
17836
|
if (m[0].length === 0) re.lastIndex++;
|
|
17193
17837
|
if (group && spans.length < MAX_MATCHES_PER_RULE) {
|
|
@@ -17262,6 +17906,31 @@ var CONFIG_POSTURE_RULES = [
|
|
|
17262
17906
|
}
|
|
17263
17907
|
];
|
|
17264
17908
|
|
|
17909
|
+
// ../../packages/detections/src/security/redos-probe.ts
|
|
17910
|
+
var EXPONENTIAL_UNITS = [
|
|
17911
|
+
"a",
|
|
17912
|
+
"0",
|
|
17913
|
+
" ",
|
|
17914
|
+
"x",
|
|
17915
|
+
"ab",
|
|
17916
|
+
"a.",
|
|
17917
|
+
"a-",
|
|
17918
|
+
"a_",
|
|
17919
|
+
"a@",
|
|
17920
|
+
"a/",
|
|
17921
|
+
"a:",
|
|
17922
|
+
"a=",
|
|
17923
|
+
"a;",
|
|
17924
|
+
"aA0",
|
|
17925
|
+
" "
|
|
17926
|
+
];
|
|
17927
|
+
var EXPONENTIAL_PROBES = EXPONENTIAL_UNITS.flatMap(
|
|
17928
|
+
(unit) => [23, 25].map((len) => unit.repeat(Math.ceil(len / unit.length)).slice(0, len) + "!")
|
|
17929
|
+
);
|
|
17930
|
+
var POLYNOMIAL_PROBES = ["abc-", "a.", "a ", "a=", "x", "0", "a@", "a/", "ab"].map(
|
|
17931
|
+
(unit) => unit.repeat(1e4).slice(0, 4e4) + "!"
|
|
17932
|
+
);
|
|
17933
|
+
|
|
17265
17934
|
// ../../packages/plugin-sdk/src/repo.ts
|
|
17266
17935
|
import { existsSync as existsSync3, readFileSync as readFileSync3, statSync } from "fs";
|
|
17267
17936
|
import { basename, dirname, isAbsolute, join as join6, sep as sep2 } from "path";
|
|
@@ -17279,10 +17948,14 @@ import { arch, hostname as hostname3, platform, release } from "os";
|
|
|
17279
17948
|
import { mkdirSync as mkdirSync3, readFileSync as readFileSync5, writeFileSync as writeFileSync4 } from "fs";
|
|
17280
17949
|
import { join as join8 } from "path";
|
|
17281
17950
|
|
|
17951
|
+
// ../../packages/plugin-sdk/src/paths.ts
|
|
17952
|
+
import { readdirSync as readdirSync2, realpathSync as realpathSync2 } from "fs";
|
|
17953
|
+
import { basename as basename3, dirname as dirname2, sep as sep3 } from "path";
|
|
17954
|
+
|
|
17282
17955
|
// ../../packages/plugin-sdk/src/project-files.ts
|
|
17283
17956
|
var import_ignore = __toESM(require_ignore(), 1);
|
|
17284
|
-
import { existsSync as existsSync4, readdirSync as
|
|
17285
|
-
import { basename as
|
|
17957
|
+
import { existsSync as existsSync4, readdirSync as readdirSync3, readFileSync as readFileSync6 } from "fs";
|
|
17958
|
+
import { basename as basename4, join as join9, relative, sep as sep4 } from "path";
|
|
17286
17959
|
|
|
17287
17960
|
// ../../packages/plugin-sdk/src/runtime.ts
|
|
17288
17961
|
import { randomUUID as randomUUID10 } from "crypto";
|
|
@@ -17295,7 +17968,7 @@ import { mkdirSync as mkdirSync4, statSync as statSync3, writeFileSync as writeF
|
|
|
17295
17968
|
import { join as join10 } from "path";
|
|
17296
17969
|
|
|
17297
17970
|
// src/command-registry.ts
|
|
17298
|
-
import { readdirSync as
|
|
17971
|
+
import { readdirSync as readdirSync4 } from "fs";
|
|
17299
17972
|
import { fileURLToPath } from "url";
|
|
17300
17973
|
var COMMANDS_DIR = fileURLToPath(new URL("../commands", import.meta.url));
|
|
17301
17974
|
|