@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/start-light.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), {
|
|
@@ -16510,6 +16512,212 @@ var ImportDetectionRequest = external_exports.object({
|
|
|
16510
16512
|
})
|
|
16511
16513
|
}).meta({ id: "ImportDetectionRequest" });
|
|
16512
16514
|
|
|
16515
|
+
// ../../packages/schema/src/zod/shares.ts
|
|
16516
|
+
var DestinationKind = external_exports.enum(["provider", "internal", "external", "ip"]).meta({ id: "DestinationKind" });
|
|
16517
|
+
var Transport = external_exports.enum(["https", "http", "sftp", "grpc", "smtp", "ws", "wss"]).meta({ id: "Transport" });
|
|
16518
|
+
var DataClass = external_exports.enum(["secrets", "pii", "customer", "source", "telemetry", "logs", "metrics", "none"]).meta({ id: "DataClass" });
|
|
16519
|
+
var DATA_CLASS_ORDER = DataClass.options;
|
|
16520
|
+
var ShareTrustLevel = external_exports.enum(["recognized", "internal", "unverified", "ip"]).meta({ id: "ShareTrustLevel" });
|
|
16521
|
+
var EgressDecision = external_exports.enum(["allow", "block"]).meta({ id: "EgressDecision" });
|
|
16522
|
+
var EgressStatus = external_exports.enum(["allowed", "blocked", "review"]).meta({ id: "EgressStatus" });
|
|
16523
|
+
var ReviewReason = external_exports.enum(["raw_ip", "unverified_domain", "plaintext_transport"]).meta({ id: "ReviewReason" });
|
|
16524
|
+
var HttpMethod = external_exports.enum(["GET", "POST", "PUT", "DELETE", "SDK", "REF"]).meta({ id: "HttpMethod" });
|
|
16525
|
+
var ReviewInfo = external_exports.object({
|
|
16526
|
+
needsReview: external_exports.boolean(),
|
|
16527
|
+
reasons: external_exports.array(ReviewReason)
|
|
16528
|
+
}).meta({ id: "ReviewInfo" });
|
|
16529
|
+
var DestinationNetwork = external_exports.object({
|
|
16530
|
+
port: external_exports.number().int().nullable(),
|
|
16531
|
+
geo: external_exports.string().nullable(),
|
|
16532
|
+
ptr: external_exports.string().nullable()
|
|
16533
|
+
}).meta({ id: "DestinationNetwork" });
|
|
16534
|
+
var EndpointSummary = external_exports.object({
|
|
16535
|
+
id: external_exports.string(),
|
|
16536
|
+
method: HttpMethod,
|
|
16537
|
+
transport: Transport,
|
|
16538
|
+
url: external_exports.string(),
|
|
16539
|
+
template: external_exports.boolean(),
|
|
16540
|
+
dataClass: DataClass,
|
|
16541
|
+
lastSeen: external_exports.iso.datetime(),
|
|
16542
|
+
callSiteCount: external_exports.number().int().nonnegative()
|
|
16543
|
+
}).meta({ id: "EndpointSummary" });
|
|
16544
|
+
var CallSite = external_exports.object({
|
|
16545
|
+
id: external_exports.string(),
|
|
16546
|
+
project: external_exports.string(),
|
|
16547
|
+
file: external_exports.string(),
|
|
16548
|
+
line: external_exports.number().int().nonnegative(),
|
|
16549
|
+
snippet: external_exports.string(),
|
|
16550
|
+
dynamic: external_exports.boolean(),
|
|
16551
|
+
vendored: external_exports.boolean(),
|
|
16552
|
+
/** Deep-link to the Inventory project, when the repo is governed there. */
|
|
16553
|
+
projectId: external_exports.string().nullable()
|
|
16554
|
+
}).meta({ id: "CallSite" });
|
|
16555
|
+
var EndpointWithSites = EndpointSummary.extend({
|
|
16556
|
+
sites: external_exports.array(CallSite)
|
|
16557
|
+
}).meta({ id: "EndpointWithSites" });
|
|
16558
|
+
var ShareDestinationSummary = external_exports.object({
|
|
16559
|
+
id: external_exports.string(),
|
|
16560
|
+
kind: DestinationKind,
|
|
16561
|
+
name: external_exports.string(),
|
|
16562
|
+
host: external_exports.string(),
|
|
16563
|
+
category: external_exports.string(),
|
|
16564
|
+
trust: ShareTrustLevel,
|
|
16565
|
+
/** Effective state (decision applied over the trust default). */
|
|
16566
|
+
status: EgressStatus,
|
|
16567
|
+
/** True when an egress decision override differs from the trust default. */
|
|
16568
|
+
isCustom: external_exports.boolean(),
|
|
16569
|
+
lastSeen: external_exports.iso.datetime(),
|
|
16570
|
+
endpointCount: external_exports.number().int().nonnegative(),
|
|
16571
|
+
callSiteCount: external_exports.number().int().nonnegative(),
|
|
16572
|
+
transports: external_exports.array(Transport),
|
|
16573
|
+
/** Most-sensitive first. */
|
|
16574
|
+
dataClasses: external_exports.array(DataClass),
|
|
16575
|
+
review: ReviewInfo,
|
|
16576
|
+
/** Non-provider hosts only; null for providers. */
|
|
16577
|
+
network: DestinationNetwork.nullable(),
|
|
16578
|
+
/** Embedded for inline expansion — no call sites here. */
|
|
16579
|
+
endpoints: external_exports.array(EndpointSummary)
|
|
16580
|
+
}).meta({ id: "ShareDestinationSummary" });
|
|
16581
|
+
var ShareDestinationDetail = ShareDestinationSummary.omit({
|
|
16582
|
+
endpointCount: true,
|
|
16583
|
+
callSiteCount: true,
|
|
16584
|
+
endpoints: true
|
|
16585
|
+
}).extend({
|
|
16586
|
+
/** Ownership/geo rationale; null for providers. */
|
|
16587
|
+
note: external_exports.string().nullable(),
|
|
16588
|
+
endpoints: external_exports.array(EndpointWithSites)
|
|
16589
|
+
}).meta({ id: "ShareDestinationDetail" });
|
|
16590
|
+
var ReviewDestination = external_exports.object({
|
|
16591
|
+
id: external_exports.string(),
|
|
16592
|
+
kind: DestinationKind,
|
|
16593
|
+
name: external_exports.string(),
|
|
16594
|
+
/** Registrable host — lets the strip derive the provider lettermark, as the register does. */
|
|
16595
|
+
host: external_exports.string(),
|
|
16596
|
+
trust: ShareTrustLevel,
|
|
16597
|
+
status: EgressStatus,
|
|
16598
|
+
review: ReviewInfo,
|
|
16599
|
+
topDataClass: DataClass,
|
|
16600
|
+
callSiteCount: external_exports.number().int().nonnegative(),
|
|
16601
|
+
lastSeen: external_exports.iso.datetime()
|
|
16602
|
+
}).meta({ id: "ReviewDestination" });
|
|
16603
|
+
var ShareDestinationGroup = external_exports.object({
|
|
16604
|
+
kind: DestinationKind,
|
|
16605
|
+
total: external_exports.number().int().nonnegative(),
|
|
16606
|
+
items: external_exports.array(ShareDestinationSummary)
|
|
16607
|
+
}).meta({ id: "ShareDestinationGroup" });
|
|
16608
|
+
var ListShareDestinationsResponse = external_exports.object({ groups: external_exports.array(ShareDestinationGroup) }).meta({ id: "ListShareDestinationsResponse" });
|
|
16609
|
+
var NeedsReviewResponse = external_exports.object({ items: external_exports.array(ReviewDestination) }).meta({ id: "NeedsReviewResponse" });
|
|
16610
|
+
var SharesStats = external_exports.object({
|
|
16611
|
+
destinations: external_exports.number().int().nonnegative(),
|
|
16612
|
+
endpoints: external_exports.number().int().nonnegative(),
|
|
16613
|
+
callSites: external_exports.number().int().nonnegative(),
|
|
16614
|
+
needsReview: external_exports.number().int().nonnegative(),
|
|
16615
|
+
insecure: external_exports.number().int().nonnegative(),
|
|
16616
|
+
byKind: external_exports.object({
|
|
16617
|
+
provider: external_exports.number().int().nonnegative(),
|
|
16618
|
+
internal: external_exports.number().int().nonnegative(),
|
|
16619
|
+
external: external_exports.number().int().nonnegative(),
|
|
16620
|
+
ip: external_exports.number().int().nonnegative()
|
|
16621
|
+
}),
|
|
16622
|
+
byTrust: external_exports.object({
|
|
16623
|
+
recognized: external_exports.number().int().nonnegative(),
|
|
16624
|
+
internal: external_exports.number().int().nonnegative(),
|
|
16625
|
+
unverified: external_exports.number().int().nonnegative(),
|
|
16626
|
+
ip: external_exports.number().int().nonnegative()
|
|
16627
|
+
})
|
|
16628
|
+
}).meta({ id: "SharesStats" });
|
|
16629
|
+
var SetEgressDecisionBody = external_exports.object({
|
|
16630
|
+
/** `null` clears the override — reverts to the trust default, isCustom false. */
|
|
16631
|
+
decision: EgressDecision.nullable()
|
|
16632
|
+
}).meta({ id: "SetEgressDecisionBody" });
|
|
16633
|
+
var SetEgressDecisionResponse = external_exports.object({ destination: ShareDestinationSummary }).meta({ id: "SetEgressDecisionResponse" });
|
|
16634
|
+
var ListShareDestinationsQuery = external_exports.object({
|
|
16635
|
+
/** Case-insensitive match over destination name/category, endpoint url, call-site project/file. */
|
|
16636
|
+
q: external_exports.string().optional(),
|
|
16637
|
+
/** Repeatable. Restrict to these DestinationKind values; absent means all kinds. */
|
|
16638
|
+
kind: external_exports.array(DestinationKind).optional(),
|
|
16639
|
+
/** Reserved for future grouping modes; only 'destination' is supported today. */
|
|
16640
|
+
groupBy: external_exports.enum(["destination"]).default("destination"),
|
|
16641
|
+
/**
|
|
16642
|
+
* When true, return a flat severity-ordered `items[]` instead of `groups`.
|
|
16643
|
+
* Uses `z.stringbool()` (NOT `z.coerce.boolean()` — `Boolean(str)` is true for
|
|
16644
|
+
* any non-empty string, so `?review=false`/`?review=0` would wrongly coerce
|
|
16645
|
+
* to `true`). `z.stringbool()` parses true/1/yes vs false/0/no correctly.
|
|
16646
|
+
*/
|
|
16647
|
+
review: external_exports.stringbool().default(false)
|
|
16648
|
+
});
|
|
16649
|
+
var ExportSharesQuery = external_exports.object({
|
|
16650
|
+
format: external_exports.enum(["csv", "json"]).default("csv"),
|
|
16651
|
+
q: external_exports.string().optional(),
|
|
16652
|
+
kind: external_exports.array(DestinationKind).optional()
|
|
16653
|
+
});
|
|
16654
|
+
|
|
16655
|
+
// ../../packages/schema/src/zod/egress-extraction.ts
|
|
16656
|
+
var EgressEcosystem = external_exports.enum(["npm", "pypi", "go", "maven", "rubygems", "cargo", "composer", "nuget"]).meta({ id: "EgressEcosystem" });
|
|
16657
|
+
var ProviderRegistryEntry = external_exports.object({
|
|
16658
|
+
id: external_exports.string(),
|
|
16659
|
+
name: external_exports.string(),
|
|
16660
|
+
category: external_exports.string(),
|
|
16661
|
+
/** Suffix-matched: 'stripe.com' matches api.stripe.com, never evilstripe.com. */
|
|
16662
|
+
hostSuffixes: external_exports.array(external_exports.string()).min(1),
|
|
16663
|
+
/** Canonical API base URL recorded for manifest-derived (method 'SDK') endpoints. */
|
|
16664
|
+
apiBase: external_exports.string(),
|
|
16665
|
+
/** Most-sensitive first; index 0 becomes the endpoint dataClass. */
|
|
16666
|
+
defaultDataClasses: external_exports.array(DataClass).min(1),
|
|
16667
|
+
/** SDK identifiers per ecosystem ('go' prefix-matched by path, 'maven' by group-id prefix). */
|
|
16668
|
+
sdks: external_exports.partialRecord(EgressEcosystem, external_exports.array(external_exports.string()))
|
|
16669
|
+
}).meta({ id: "ProviderRegistryEntry" });
|
|
16670
|
+
var EgressCallSiteHit = external_exports.object({
|
|
16671
|
+
file: external_exports.string(),
|
|
16672
|
+
line: external_exports.number().int().positive(),
|
|
16673
|
+
snippet: external_exports.string(),
|
|
16674
|
+
dynamic: external_exports.boolean(),
|
|
16675
|
+
vendored: external_exports.boolean()
|
|
16676
|
+
}).meta({ id: "EgressCallSiteHit" });
|
|
16677
|
+
var ResolvedEgressHit = external_exports.object({
|
|
16678
|
+
host: external_exports.string(),
|
|
16679
|
+
kind: DestinationKind,
|
|
16680
|
+
name: external_exports.string(),
|
|
16681
|
+
category: external_exports.string(),
|
|
16682
|
+
trust: ShareTrustLevel,
|
|
16683
|
+
network: DestinationNetwork.nullable(),
|
|
16684
|
+
method: HttpMethod,
|
|
16685
|
+
transport: Transport,
|
|
16686
|
+
url: external_exports.string(),
|
|
16687
|
+
template: external_exports.boolean(),
|
|
16688
|
+
dataClass: DataClass,
|
|
16689
|
+
site: EgressCallSiteHit
|
|
16690
|
+
}).meta({ id: "ResolvedEgressHit" });
|
|
16691
|
+
var EgressReconcile = external_exports.discriminatedUnion("mode", [
|
|
16692
|
+
external_exports.object({ mode: external_exports.literal("walk"), walkedPrefix: external_exports.string() }),
|
|
16693
|
+
external_exports.object({
|
|
16694
|
+
mode: external_exports.literal("ledger"),
|
|
16695
|
+
scannedFiles: external_exports.array(external_exports.string()),
|
|
16696
|
+
deletedFiles: external_exports.array(external_exports.string())
|
|
16697
|
+
})
|
|
16698
|
+
]).meta({ id: "EgressReconcile" });
|
|
16699
|
+
var RecordProjectEgressInput = external_exports.object({
|
|
16700
|
+
/** Stable reconcile key: 'git:<repo identity>' or 'path:<abs root>' (non-git). */
|
|
16701
|
+
projectKey: external_exports.string().min(1),
|
|
16702
|
+
/** Display name only — never keys reconciliation. */
|
|
16703
|
+
project: external_exports.string(),
|
|
16704
|
+
projectId: external_exports.string().nullable(),
|
|
16705
|
+
reconcile: EgressReconcile,
|
|
16706
|
+
hits: external_exports.array(ResolvedEgressHit)
|
|
16707
|
+
}).meta({ id: "RecordProjectEgressInput" });
|
|
16708
|
+
var EgressWriteSummary = external_exports.object({
|
|
16709
|
+
destinations: external_exports.number().int().nonnegative(),
|
|
16710
|
+
endpoints: external_exports.number().int().nonnegative(),
|
|
16711
|
+
callSites: external_exports.number().int().nonnegative(),
|
|
16712
|
+
truncated: external_exports.boolean(),
|
|
16713
|
+
/**
|
|
16714
|
+
* Files the cap dropped whole. Their stored rows were left untouched, so a
|
|
16715
|
+
* ledger-keeping caller must withhold their ledger entries and read them
|
|
16716
|
+
* again next scan.
|
|
16717
|
+
*/
|
|
16718
|
+
droppedFiles: external_exports.array(external_exports.string()).default([])
|
|
16719
|
+
}).meta({ id: "EgressWriteSummary" });
|
|
16720
|
+
|
|
16513
16721
|
// ../../packages/schema/src/zod/installed-pack.ts
|
|
16514
16722
|
var InstalledPack = external_exports.object({
|
|
16515
16723
|
id: external_exports.guid(),
|
|
@@ -16541,7 +16749,7 @@ var PatchInstalledPackRequest = external_exports.object({
|
|
|
16541
16749
|
}).meta({ id: "PatchInstalledPackRequest" });
|
|
16542
16750
|
|
|
16543
16751
|
// ../../packages/schema/src/zod/local.ts
|
|
16544
|
-
var WORKSPACE_SETTINGS_SPEC_VERSION =
|
|
16752
|
+
var WORKSPACE_SETTINGS_SPEC_VERSION = 3;
|
|
16545
16753
|
var RunMode = external_exports.enum(["standalone"]);
|
|
16546
16754
|
var SimpleDetectionPolicy = external_exports.enum(["redact", "warn"]);
|
|
16547
16755
|
var HistoricalAccess = external_exports.enum(["full", "session-only"]);
|
|
@@ -16556,6 +16764,9 @@ var WorkspaceSettings = external_exports.object({
|
|
|
16556
16764
|
policy: SimpleDetectionPolicy.default("redact"),
|
|
16557
16765
|
// Consent for scanning pre-install surfaces; opt-in (see HistoricalAccess).
|
|
16558
16766
|
historicalAccess: HistoricalAccess.default("session-only"),
|
|
16767
|
+
// In-place egress extraction on the scan paths; disable to stop all Data
|
|
16768
|
+
// Shares writes.
|
|
16769
|
+
dataSharesInPlace: external_exports.boolean().default(true),
|
|
16559
16770
|
// Absent until /aka:setup completes; its presence is what "onboarded" means.
|
|
16560
16771
|
onboardedAt: external_exports.iso.datetime().optional()
|
|
16561
16772
|
});
|
|
@@ -16932,145 +17143,6 @@ var SetupHandoffOffer = external_exports.object({
|
|
|
16932
17143
|
path: ["liveKeys"]
|
|
16933
17144
|
});
|
|
16934
17145
|
|
|
16935
|
-
// ../../packages/schema/src/zod/shares.ts
|
|
16936
|
-
var DestinationKind = external_exports.enum(["provider", "internal", "ip"]).meta({ id: "DestinationKind" });
|
|
16937
|
-
var Transport = external_exports.enum(["https", "http", "sftp", "grpc", "smtp"]).meta({ id: "Transport" });
|
|
16938
|
-
var DataClass = external_exports.enum(["secrets", "pii", "customer", "source", "telemetry", "logs", "metrics", "none"]).meta({ id: "DataClass" });
|
|
16939
|
-
var DATA_CLASS_ORDER = DataClass.options;
|
|
16940
|
-
var ShareTrustLevel = external_exports.enum(["recognized", "internal", "unverified", "ip"]).meta({ id: "ShareTrustLevel" });
|
|
16941
|
-
var EgressDecision = external_exports.enum(["allow", "block"]).meta({ id: "EgressDecision" });
|
|
16942
|
-
var EgressStatus = external_exports.enum(["allowed", "blocked", "review"]).meta({ id: "EgressStatus" });
|
|
16943
|
-
var ReviewReason = external_exports.enum(["raw_ip", "unverified_domain", "plaintext_transport"]).meta({ id: "ReviewReason" });
|
|
16944
|
-
var HttpMethod = external_exports.enum(["GET", "POST", "PUT", "DELETE"]).meta({ id: "HttpMethod" });
|
|
16945
|
-
var ReviewInfo = external_exports.object({
|
|
16946
|
-
needsReview: external_exports.boolean(),
|
|
16947
|
-
reasons: external_exports.array(ReviewReason)
|
|
16948
|
-
}).meta({ id: "ReviewInfo" });
|
|
16949
|
-
var DestinationNetwork = external_exports.object({
|
|
16950
|
-
port: external_exports.number().int().nullable(),
|
|
16951
|
-
geo: external_exports.string().nullable(),
|
|
16952
|
-
ptr: external_exports.string().nullable()
|
|
16953
|
-
}).meta({ id: "DestinationNetwork" });
|
|
16954
|
-
var EndpointSummary = external_exports.object({
|
|
16955
|
-
id: external_exports.string(),
|
|
16956
|
-
method: HttpMethod,
|
|
16957
|
-
transport: Transport,
|
|
16958
|
-
url: external_exports.string(),
|
|
16959
|
-
template: external_exports.boolean(),
|
|
16960
|
-
dataClass: DataClass,
|
|
16961
|
-
lastSeen: external_exports.iso.datetime(),
|
|
16962
|
-
callSiteCount: external_exports.number().int().nonnegative()
|
|
16963
|
-
}).meta({ id: "EndpointSummary" });
|
|
16964
|
-
var CallSite = external_exports.object({
|
|
16965
|
-
id: external_exports.string(),
|
|
16966
|
-
project: external_exports.string(),
|
|
16967
|
-
file: external_exports.string(),
|
|
16968
|
-
line: external_exports.number().int().nonnegative(),
|
|
16969
|
-
snippet: external_exports.string(),
|
|
16970
|
-
dynamic: external_exports.boolean(),
|
|
16971
|
-
vendored: external_exports.boolean(),
|
|
16972
|
-
/** Deep-link to the Inventory project, when the repo is governed there. */
|
|
16973
|
-
projectId: external_exports.string().nullable()
|
|
16974
|
-
}).meta({ id: "CallSite" });
|
|
16975
|
-
var EndpointWithSites = EndpointSummary.extend({
|
|
16976
|
-
sites: external_exports.array(CallSite)
|
|
16977
|
-
}).meta({ id: "EndpointWithSites" });
|
|
16978
|
-
var ShareDestinationSummary = external_exports.object({
|
|
16979
|
-
id: external_exports.string(),
|
|
16980
|
-
kind: DestinationKind,
|
|
16981
|
-
name: external_exports.string(),
|
|
16982
|
-
host: external_exports.string(),
|
|
16983
|
-
category: external_exports.string(),
|
|
16984
|
-
trust: ShareTrustLevel,
|
|
16985
|
-
/** Effective state (decision applied over the trust default). */
|
|
16986
|
-
status: EgressStatus,
|
|
16987
|
-
/** True when an egress decision override differs from the trust default. */
|
|
16988
|
-
isCustom: external_exports.boolean(),
|
|
16989
|
-
lastSeen: external_exports.iso.datetime(),
|
|
16990
|
-
endpointCount: external_exports.number().int().nonnegative(),
|
|
16991
|
-
callSiteCount: external_exports.number().int().nonnegative(),
|
|
16992
|
-
transports: external_exports.array(Transport),
|
|
16993
|
-
/** Most-sensitive first. */
|
|
16994
|
-
dataClasses: external_exports.array(DataClass),
|
|
16995
|
-
review: ReviewInfo,
|
|
16996
|
-
/** Non-provider hosts only; null for providers. */
|
|
16997
|
-
network: DestinationNetwork.nullable(),
|
|
16998
|
-
/** Embedded for inline expansion — no call sites here. */
|
|
16999
|
-
endpoints: external_exports.array(EndpointSummary)
|
|
17000
|
-
}).meta({ id: "ShareDestinationSummary" });
|
|
17001
|
-
var ShareDestinationDetail = ShareDestinationSummary.omit({
|
|
17002
|
-
endpointCount: true,
|
|
17003
|
-
callSiteCount: true,
|
|
17004
|
-
endpoints: true
|
|
17005
|
-
}).extend({
|
|
17006
|
-
/** Ownership/geo rationale; null for providers. */
|
|
17007
|
-
note: external_exports.string().nullable(),
|
|
17008
|
-
endpoints: external_exports.array(EndpointWithSites)
|
|
17009
|
-
}).meta({ id: "ShareDestinationDetail" });
|
|
17010
|
-
var ReviewDestination = external_exports.object({
|
|
17011
|
-
id: external_exports.string(),
|
|
17012
|
-
kind: DestinationKind,
|
|
17013
|
-
name: external_exports.string(),
|
|
17014
|
-
/** Registrable host — lets the strip derive the provider lettermark, as the register does. */
|
|
17015
|
-
host: external_exports.string(),
|
|
17016
|
-
trust: ShareTrustLevel,
|
|
17017
|
-
status: EgressStatus,
|
|
17018
|
-
review: ReviewInfo,
|
|
17019
|
-
topDataClass: DataClass,
|
|
17020
|
-
callSiteCount: external_exports.number().int().nonnegative(),
|
|
17021
|
-
lastSeen: external_exports.iso.datetime()
|
|
17022
|
-
}).meta({ id: "ReviewDestination" });
|
|
17023
|
-
var ShareDestinationGroup = external_exports.object({
|
|
17024
|
-
kind: DestinationKind,
|
|
17025
|
-
total: external_exports.number().int().nonnegative(),
|
|
17026
|
-
items: external_exports.array(ShareDestinationSummary)
|
|
17027
|
-
}).meta({ id: "ShareDestinationGroup" });
|
|
17028
|
-
var ListShareDestinationsResponse = external_exports.object({ groups: external_exports.array(ShareDestinationGroup) }).meta({ id: "ListShareDestinationsResponse" });
|
|
17029
|
-
var NeedsReviewResponse = external_exports.object({ items: external_exports.array(ReviewDestination) }).meta({ id: "NeedsReviewResponse" });
|
|
17030
|
-
var SharesStats = external_exports.object({
|
|
17031
|
-
destinations: external_exports.number().int().nonnegative(),
|
|
17032
|
-
endpoints: external_exports.number().int().nonnegative(),
|
|
17033
|
-
callSites: external_exports.number().int().nonnegative(),
|
|
17034
|
-
needsReview: external_exports.number().int().nonnegative(),
|
|
17035
|
-
insecure: external_exports.number().int().nonnegative(),
|
|
17036
|
-
byKind: external_exports.object({
|
|
17037
|
-
provider: external_exports.number().int().nonnegative(),
|
|
17038
|
-
internal: external_exports.number().int().nonnegative(),
|
|
17039
|
-
ip: external_exports.number().int().nonnegative()
|
|
17040
|
-
}),
|
|
17041
|
-
byTrust: external_exports.object({
|
|
17042
|
-
recognized: external_exports.number().int().nonnegative(),
|
|
17043
|
-
internal: external_exports.number().int().nonnegative(),
|
|
17044
|
-
unverified: external_exports.number().int().nonnegative(),
|
|
17045
|
-
ip: external_exports.number().int().nonnegative()
|
|
17046
|
-
})
|
|
17047
|
-
}).meta({ id: "SharesStats" });
|
|
17048
|
-
var SetEgressDecisionBody = external_exports.object({
|
|
17049
|
-
/** `null` clears the override — reverts to the trust default, isCustom false. */
|
|
17050
|
-
decision: EgressDecision.nullable()
|
|
17051
|
-
}).meta({ id: "SetEgressDecisionBody" });
|
|
17052
|
-
var SetEgressDecisionResponse = external_exports.object({ destination: ShareDestinationSummary }).meta({ id: "SetEgressDecisionResponse" });
|
|
17053
|
-
var ListShareDestinationsQuery = external_exports.object({
|
|
17054
|
-
/** Case-insensitive match over destination name/category, endpoint url, call-site project/file. */
|
|
17055
|
-
q: external_exports.string().optional(),
|
|
17056
|
-
/** Repeatable. Restrict to these DestinationKind values; absent means all kinds. */
|
|
17057
|
-
kind: external_exports.array(DestinationKind).optional(),
|
|
17058
|
-
/** Reserved for future grouping modes; only 'destination' is supported today. */
|
|
17059
|
-
groupBy: external_exports.enum(["destination"]).default("destination"),
|
|
17060
|
-
/**
|
|
17061
|
-
* When true, return a flat severity-ordered `items[]` instead of `groups`.
|
|
17062
|
-
* Uses `z.stringbool()` (NOT `z.coerce.boolean()` — `Boolean(str)` is true for
|
|
17063
|
-
* any non-empty string, so `?review=false`/`?review=0` would wrongly coerce
|
|
17064
|
-
* to `true`). `z.stringbool()` parses true/1/yes vs false/0/no correctly.
|
|
17065
|
-
*/
|
|
17066
|
-
review: external_exports.stringbool().default(false)
|
|
17067
|
-
});
|
|
17068
|
-
var ExportSharesQuery = external_exports.object({
|
|
17069
|
-
format: external_exports.enum(["csv", "json"]).default("csv"),
|
|
17070
|
-
q: external_exports.string().optional(),
|
|
17071
|
-
kind: external_exports.array(DestinationKind).optional()
|
|
17072
|
-
});
|
|
17073
|
-
|
|
17074
17146
|
// ../../packages/persistence/src/ids.ts
|
|
17075
17147
|
import { createHash } from "crypto";
|
|
17076
17148
|
|
|
@@ -17147,13 +17219,581 @@ import { readdirSync, readFileSync as readFileSync4, realpathSync, statSync as s
|
|
|
17147
17219
|
import { homedir as homedir2 } from "os";
|
|
17148
17220
|
import { basename as basename2, join as join7 } from "path";
|
|
17149
17221
|
|
|
17222
|
+
// ../../packages/detections/src/egress/registry.ts
|
|
17223
|
+
var EXTRACTOR_VERSION = "1";
|
|
17224
|
+
var PROVIDER_REGISTRY = [
|
|
17225
|
+
{
|
|
17226
|
+
id: "stripe",
|
|
17227
|
+
name: "Stripe",
|
|
17228
|
+
category: "Payments",
|
|
17229
|
+
hostSuffixes: ["stripe.com"],
|
|
17230
|
+
apiBase: "https://api.stripe.com",
|
|
17231
|
+
defaultDataClasses: ["pii", "customer"],
|
|
17232
|
+
sdks: {
|
|
17233
|
+
npm: ["stripe"],
|
|
17234
|
+
pypi: ["stripe"],
|
|
17235
|
+
go: ["github.com/stripe/stripe-go"],
|
|
17236
|
+
maven: ["com.stripe"],
|
|
17237
|
+
rubygems: ["stripe"],
|
|
17238
|
+
composer: ["stripe/stripe-php"],
|
|
17239
|
+
nuget: ["Stripe.net"]
|
|
17240
|
+
}
|
|
17241
|
+
},
|
|
17242
|
+
{
|
|
17243
|
+
id: "datadog",
|
|
17244
|
+
name: "Datadog",
|
|
17245
|
+
category: "Observability",
|
|
17246
|
+
hostSuffixes: ["datadoghq.com", "datadoghq.eu"],
|
|
17247
|
+
apiBase: "https://api.datadoghq.com",
|
|
17248
|
+
defaultDataClasses: ["telemetry", "logs", "metrics"],
|
|
17249
|
+
sdks: {
|
|
17250
|
+
npm: ["dd-trace", "@datadog/browser-logs"],
|
|
17251
|
+
pypi: ["datadog", "ddtrace"],
|
|
17252
|
+
go: ["github.com/DataDog/dd-trace-go"],
|
|
17253
|
+
maven: ["com.datadoghq"],
|
|
17254
|
+
rubygems: ["ddtrace", "dogapi"],
|
|
17255
|
+
nuget: ["Datadog.Trace"]
|
|
17256
|
+
}
|
|
17257
|
+
},
|
|
17258
|
+
{
|
|
17259
|
+
id: "newrelic",
|
|
17260
|
+
name: "New Relic",
|
|
17261
|
+
category: "Observability",
|
|
17262
|
+
hostSuffixes: ["newrelic.com", "nr-data.net"],
|
|
17263
|
+
apiBase: "https://api.newrelic.com",
|
|
17264
|
+
defaultDataClasses: ["telemetry", "logs", "metrics"],
|
|
17265
|
+
sdks: {
|
|
17266
|
+
npm: ["newrelic"],
|
|
17267
|
+
pypi: ["newrelic"],
|
|
17268
|
+
go: ["github.com/newrelic/go-agent"],
|
|
17269
|
+
maven: ["com.newrelic.agent.java"],
|
|
17270
|
+
rubygems: ["newrelic_rpm"],
|
|
17271
|
+
nuget: ["NewRelic.Agent"]
|
|
17272
|
+
}
|
|
17273
|
+
},
|
|
17274
|
+
{
|
|
17275
|
+
id: "sentry",
|
|
17276
|
+
name: "Sentry",
|
|
17277
|
+
category: "Error tracking",
|
|
17278
|
+
hostSuffixes: ["sentry.io"],
|
|
17279
|
+
apiBase: "https://sentry.io",
|
|
17280
|
+
defaultDataClasses: ["source", "telemetry"],
|
|
17281
|
+
sdks: {
|
|
17282
|
+
npm: ["@sentry/node", "@sentry/react", "@sentry/nextjs"],
|
|
17283
|
+
pypi: ["sentry-sdk"],
|
|
17284
|
+
go: ["github.com/getsentry/sentry-go"],
|
|
17285
|
+
maven: ["io.sentry"],
|
|
17286
|
+
rubygems: ["sentry-ruby"],
|
|
17287
|
+
cargo: ["sentry"],
|
|
17288
|
+
composer: ["sentry/sentry"],
|
|
17289
|
+
nuget: ["Sentry"]
|
|
17290
|
+
}
|
|
17291
|
+
},
|
|
17292
|
+
{
|
|
17293
|
+
id: "openai",
|
|
17294
|
+
name: "OpenAI",
|
|
17295
|
+
category: "LLM provider",
|
|
17296
|
+
hostSuffixes: ["openai.com"],
|
|
17297
|
+
apiBase: "https://api.openai.com",
|
|
17298
|
+
defaultDataClasses: ["pii", "source"],
|
|
17299
|
+
sdks: {
|
|
17300
|
+
npm: ["openai"],
|
|
17301
|
+
pypi: ["openai"],
|
|
17302
|
+
go: ["github.com/sashabaranov/go-openai"],
|
|
17303
|
+
maven: ["com.openai"],
|
|
17304
|
+
rubygems: ["ruby-openai"],
|
|
17305
|
+
cargo: ["async-openai"],
|
|
17306
|
+
composer: ["openai-php/client"],
|
|
17307
|
+
nuget: ["OpenAI"]
|
|
17308
|
+
}
|
|
17309
|
+
},
|
|
17310
|
+
{
|
|
17311
|
+
id: "anthropic",
|
|
17312
|
+
name: "Anthropic",
|
|
17313
|
+
category: "LLM provider",
|
|
17314
|
+
hostSuffixes: ["anthropic.com"],
|
|
17315
|
+
apiBase: "https://api.anthropic.com",
|
|
17316
|
+
defaultDataClasses: ["pii", "source"],
|
|
17317
|
+
sdks: {
|
|
17318
|
+
npm: ["@anthropic-ai/sdk"],
|
|
17319
|
+
pypi: ["anthropic"],
|
|
17320
|
+
go: ["github.com/anthropics/anthropic-sdk-go"],
|
|
17321
|
+
nuget: ["Anthropic.SDK"]
|
|
17322
|
+
}
|
|
17323
|
+
},
|
|
17324
|
+
{
|
|
17325
|
+
id: "aws",
|
|
17326
|
+
name: "Amazon Web Services",
|
|
17327
|
+
category: "Cloud platform",
|
|
17328
|
+
hostSuffixes: ["amazonaws.com"],
|
|
17329
|
+
apiBase: "https://s3.amazonaws.com",
|
|
17330
|
+
defaultDataClasses: ["secrets", "customer"],
|
|
17331
|
+
sdks: {
|
|
17332
|
+
npm: ["@aws-sdk/client-s3", "aws-sdk"],
|
|
17333
|
+
pypi: ["boto3"],
|
|
17334
|
+
go: ["github.com/aws/aws-sdk-go", "github.com/aws/aws-sdk-go-v2"],
|
|
17335
|
+
maven: ["com.amazonaws", "software.amazon.awssdk"],
|
|
17336
|
+
rubygems: ["aws-sdk-s3"],
|
|
17337
|
+
cargo: ["aws-sdk-s3"],
|
|
17338
|
+
nuget: ["AWSSDK.S3"]
|
|
17339
|
+
}
|
|
17340
|
+
},
|
|
17341
|
+
{
|
|
17342
|
+
id: "gcp",
|
|
17343
|
+
name: "Google Cloud",
|
|
17344
|
+
category: "Cloud platform",
|
|
17345
|
+
hostSuffixes: ["googleapis.com"],
|
|
17346
|
+
apiBase: "https://storage.googleapis.com",
|
|
17347
|
+
defaultDataClasses: ["customer", "logs"],
|
|
17348
|
+
sdks: {
|
|
17349
|
+
npm: ["@google-cloud/storage"],
|
|
17350
|
+
pypi: ["google-cloud-storage"],
|
|
17351
|
+
go: ["cloud.google.com/go"],
|
|
17352
|
+
maven: ["com.google.cloud"],
|
|
17353
|
+
rubygems: ["google-cloud-storage"],
|
|
17354
|
+
nuget: ["Google.Cloud.Storage.V1"]
|
|
17355
|
+
}
|
|
17356
|
+
},
|
|
17357
|
+
{
|
|
17358
|
+
id: "azure",
|
|
17359
|
+
name: "Microsoft Azure",
|
|
17360
|
+
category: "Cloud platform",
|
|
17361
|
+
hostSuffixes: ["azure.com", "windows.net"],
|
|
17362
|
+
apiBase: "https://management.azure.com",
|
|
17363
|
+
defaultDataClasses: ["customer", "logs"],
|
|
17364
|
+
sdks: {
|
|
17365
|
+
npm: ["@azure/storage-blob"],
|
|
17366
|
+
pypi: ["azure-storage-blob"],
|
|
17367
|
+
go: ["github.com/Azure/azure-sdk-for-go"],
|
|
17368
|
+
maven: ["com.azure"],
|
|
17369
|
+
rubygems: ["azure-storage-blob"],
|
|
17370
|
+
nuget: ["Azure.Storage.Blobs"]
|
|
17371
|
+
}
|
|
17372
|
+
},
|
|
17373
|
+
{
|
|
17374
|
+
id: "slack",
|
|
17375
|
+
name: "Slack",
|
|
17376
|
+
category: "Notifications",
|
|
17377
|
+
hostSuffixes: ["slack.com"],
|
|
17378
|
+
apiBase: "https://slack.com/api",
|
|
17379
|
+
defaultDataClasses: ["logs"],
|
|
17380
|
+
sdks: {
|
|
17381
|
+
npm: ["@slack/web-api"],
|
|
17382
|
+
pypi: ["slack-sdk"],
|
|
17383
|
+
go: ["github.com/slack-go/slack"],
|
|
17384
|
+
maven: ["com.slack.api"],
|
|
17385
|
+
rubygems: ["slack-ruby-client"],
|
|
17386
|
+
composer: ["slack-php/slack-api"],
|
|
17387
|
+
nuget: ["SlackNet"]
|
|
17388
|
+
}
|
|
17389
|
+
},
|
|
17390
|
+
{
|
|
17391
|
+
id: "segment",
|
|
17392
|
+
name: "Segment",
|
|
17393
|
+
category: "Analytics",
|
|
17394
|
+
hostSuffixes: ["segment.io", "segment.com"],
|
|
17395
|
+
apiBase: "https://api.segment.io",
|
|
17396
|
+
defaultDataClasses: ["customer"],
|
|
17397
|
+
sdks: {
|
|
17398
|
+
npm: ["@segment/analytics-node", "analytics-node"],
|
|
17399
|
+
pypi: ["segment-analytics-python"],
|
|
17400
|
+
go: ["github.com/segmentio/analytics-go"],
|
|
17401
|
+
maven: ["com.segment.analytics.java"],
|
|
17402
|
+
rubygems: ["analytics-ruby"],
|
|
17403
|
+
nuget: ["Analytics"]
|
|
17404
|
+
}
|
|
17405
|
+
},
|
|
17406
|
+
{
|
|
17407
|
+
id: "twilio",
|
|
17408
|
+
name: "Twilio",
|
|
17409
|
+
category: "Communications",
|
|
17410
|
+
hostSuffixes: ["twilio.com"],
|
|
17411
|
+
apiBase: "https://api.twilio.com",
|
|
17412
|
+
defaultDataClasses: ["pii", "customer"],
|
|
17413
|
+
sdks: {
|
|
17414
|
+
npm: ["twilio"],
|
|
17415
|
+
pypi: ["twilio"],
|
|
17416
|
+
go: ["github.com/twilio/twilio-go"],
|
|
17417
|
+
maven: ["com.twilio.sdk"],
|
|
17418
|
+
rubygems: ["twilio-ruby"],
|
|
17419
|
+
composer: ["twilio/sdk"],
|
|
17420
|
+
nuget: ["Twilio"]
|
|
17421
|
+
}
|
|
17422
|
+
},
|
|
17423
|
+
{
|
|
17424
|
+
id: "sendgrid",
|
|
17425
|
+
name: "SendGrid",
|
|
17426
|
+
category: "Email",
|
|
17427
|
+
hostSuffixes: ["sendgrid.com"],
|
|
17428
|
+
apiBase: "https://api.sendgrid.com",
|
|
17429
|
+
defaultDataClasses: ["pii"],
|
|
17430
|
+
sdks: {
|
|
17431
|
+
npm: ["@sendgrid/mail"],
|
|
17432
|
+
pypi: ["sendgrid"],
|
|
17433
|
+
go: ["github.com/sendgrid/sendgrid-go"],
|
|
17434
|
+
maven: ["com.sendgrid"],
|
|
17435
|
+
rubygems: ["sendgrid-ruby"],
|
|
17436
|
+
composer: ["sendgrid/sendgrid"],
|
|
17437
|
+
nuget: ["SendGrid"]
|
|
17438
|
+
}
|
|
17439
|
+
},
|
|
17440
|
+
{
|
|
17441
|
+
id: "mailgun",
|
|
17442
|
+
name: "Mailgun",
|
|
17443
|
+
category: "Email",
|
|
17444
|
+
hostSuffixes: ["mailgun.net"],
|
|
17445
|
+
apiBase: "https://api.mailgun.net",
|
|
17446
|
+
defaultDataClasses: ["pii"],
|
|
17447
|
+
sdks: {
|
|
17448
|
+
npm: ["mailgun.js"],
|
|
17449
|
+
pypi: ["mailgun"],
|
|
17450
|
+
rubygems: ["mailgun-ruby"],
|
|
17451
|
+
composer: ["mailgun/mailgun-php"],
|
|
17452
|
+
nuget: ["Mailgun"]
|
|
17453
|
+
}
|
|
17454
|
+
},
|
|
17455
|
+
{
|
|
17456
|
+
id: "mixpanel",
|
|
17457
|
+
name: "Mixpanel",
|
|
17458
|
+
category: "Analytics",
|
|
17459
|
+
hostSuffixes: ["mixpanel.com"],
|
|
17460
|
+
apiBase: "https://api.mixpanel.com",
|
|
17461
|
+
defaultDataClasses: ["customer", "telemetry"],
|
|
17462
|
+
sdks: {
|
|
17463
|
+
npm: ["mixpanel"],
|
|
17464
|
+
pypi: ["mixpanel"],
|
|
17465
|
+
rubygems: ["mixpanel-ruby"],
|
|
17466
|
+
nuget: ["Mixpanel"]
|
|
17467
|
+
}
|
|
17468
|
+
},
|
|
17469
|
+
{
|
|
17470
|
+
id: "amplitude",
|
|
17471
|
+
name: "Amplitude",
|
|
17472
|
+
category: "Analytics",
|
|
17473
|
+
hostSuffixes: ["amplitude.com"],
|
|
17474
|
+
apiBase: "https://api2.amplitude.com",
|
|
17475
|
+
defaultDataClasses: ["customer", "telemetry"],
|
|
17476
|
+
sdks: {
|
|
17477
|
+
npm: ["@amplitude/analytics-node"],
|
|
17478
|
+
pypi: ["amplitude-analytics"],
|
|
17479
|
+
nuget: ["Amplitude"]
|
|
17480
|
+
}
|
|
17481
|
+
},
|
|
17482
|
+
{
|
|
17483
|
+
id: "posthog",
|
|
17484
|
+
name: "PostHog",
|
|
17485
|
+
category: "Analytics",
|
|
17486
|
+
hostSuffixes: ["posthog.com"],
|
|
17487
|
+
apiBase: "https://us.i.posthog.com",
|
|
17488
|
+
defaultDataClasses: ["customer", "telemetry"],
|
|
17489
|
+
sdks: {
|
|
17490
|
+
npm: ["posthog-node", "posthog-js"],
|
|
17491
|
+
pypi: ["posthog"],
|
|
17492
|
+
go: ["github.com/posthog/posthog-go"],
|
|
17493
|
+
rubygems: ["posthog-ruby"],
|
|
17494
|
+
composer: ["posthog/posthog-php"],
|
|
17495
|
+
nuget: ["PostHog"]
|
|
17496
|
+
}
|
|
17497
|
+
},
|
|
17498
|
+
{
|
|
17499
|
+
id: "honeycomb",
|
|
17500
|
+
name: "Honeycomb",
|
|
17501
|
+
category: "Observability",
|
|
17502
|
+
hostSuffixes: ["honeycomb.io"],
|
|
17503
|
+
apiBase: "https://api.honeycomb.io",
|
|
17504
|
+
defaultDataClasses: ["telemetry", "metrics"],
|
|
17505
|
+
sdks: {
|
|
17506
|
+
npm: ["libhoney"],
|
|
17507
|
+
pypi: ["libhoney"],
|
|
17508
|
+
go: ["github.com/honeycombio/libhoney-go"],
|
|
17509
|
+
rubygems: ["libhoney"]
|
|
17510
|
+
}
|
|
17511
|
+
},
|
|
17512
|
+
{
|
|
17513
|
+
id: "grafana",
|
|
17514
|
+
name: "Grafana Cloud",
|
|
17515
|
+
category: "Observability",
|
|
17516
|
+
hostSuffixes: ["grafana.net"],
|
|
17517
|
+
apiBase: "https://grafana.net",
|
|
17518
|
+
defaultDataClasses: ["logs", "metrics"],
|
|
17519
|
+
sdks: {
|
|
17520
|
+
npm: ["@grafana/faro-web-sdk"]
|
|
17521
|
+
}
|
|
17522
|
+
},
|
|
17523
|
+
{
|
|
17524
|
+
id: "splunk",
|
|
17525
|
+
name: "Splunk",
|
|
17526
|
+
category: "Observability",
|
|
17527
|
+
hostSuffixes: ["splunkcloud.com", "splunk.com"],
|
|
17528
|
+
apiBase: "https://http-inputs.splunkcloud.com",
|
|
17529
|
+
defaultDataClasses: ["logs"],
|
|
17530
|
+
sdks: {
|
|
17531
|
+
npm: ["splunk-logging"],
|
|
17532
|
+
pypi: ["splunk-sdk"],
|
|
17533
|
+
maven: ["com.splunk"],
|
|
17534
|
+
nuget: ["Splunk.Logging.Common"]
|
|
17535
|
+
}
|
|
17536
|
+
},
|
|
17537
|
+
{
|
|
17538
|
+
id: "pagerduty",
|
|
17539
|
+
name: "PagerDuty",
|
|
17540
|
+
category: "Incident response",
|
|
17541
|
+
hostSuffixes: ["pagerduty.com"],
|
|
17542
|
+
apiBase: "https://api.pagerduty.com",
|
|
17543
|
+
defaultDataClasses: ["logs"],
|
|
17544
|
+
sdks: {
|
|
17545
|
+
npm: ["@pagerduty/pdjs"],
|
|
17546
|
+
pypi: ["pdpyras"],
|
|
17547
|
+
go: ["github.com/PagerDuty/go-pagerduty"],
|
|
17548
|
+
rubygems: ["pagerduty"]
|
|
17549
|
+
}
|
|
17550
|
+
},
|
|
17551
|
+
{
|
|
17552
|
+
id: "github",
|
|
17553
|
+
name: "GitHub",
|
|
17554
|
+
category: "Developer platform",
|
|
17555
|
+
hostSuffixes: ["github.com", "githubusercontent.com"],
|
|
17556
|
+
apiBase: "https://api.github.com",
|
|
17557
|
+
defaultDataClasses: ["source"],
|
|
17558
|
+
sdks: {
|
|
17559
|
+
npm: ["@octokit/rest", "octokit"],
|
|
17560
|
+
pypi: ["pygithub"],
|
|
17561
|
+
go: ["github.com/google/go-github"],
|
|
17562
|
+
maven: ["org.kohsuke.github-api"],
|
|
17563
|
+
rubygems: ["octokit"],
|
|
17564
|
+
cargo: ["octocrab"],
|
|
17565
|
+
composer: ["knplabs/github-api"],
|
|
17566
|
+
nuget: ["Octokit"]
|
|
17567
|
+
}
|
|
17568
|
+
},
|
|
17569
|
+
{
|
|
17570
|
+
id: "gitlab",
|
|
17571
|
+
name: "GitLab",
|
|
17572
|
+
category: "Developer platform",
|
|
17573
|
+
hostSuffixes: ["gitlab.com"],
|
|
17574
|
+
apiBase: "https://gitlab.com/api",
|
|
17575
|
+
defaultDataClasses: ["source"],
|
|
17576
|
+
sdks: {
|
|
17577
|
+
npm: ["@gitbeaker/rest"],
|
|
17578
|
+
pypi: ["python-gitlab"],
|
|
17579
|
+
go: ["gitlab.com/gitlab-org/api/client-go"],
|
|
17580
|
+
rubygems: ["gitlab"],
|
|
17581
|
+
nuget: ["GitLabApiClient"]
|
|
17582
|
+
}
|
|
17583
|
+
},
|
|
17584
|
+
{
|
|
17585
|
+
id: "auth0",
|
|
17586
|
+
name: "Auth0",
|
|
17587
|
+
category: "Identity",
|
|
17588
|
+
hostSuffixes: ["auth0.com"],
|
|
17589
|
+
apiBase: "https://login.auth0.com",
|
|
17590
|
+
defaultDataClasses: ["pii"],
|
|
17591
|
+
sdks: {
|
|
17592
|
+
npm: ["auth0"],
|
|
17593
|
+
pypi: ["auth0-python"],
|
|
17594
|
+
go: ["github.com/auth0/go-auth0"],
|
|
17595
|
+
maven: ["com.auth0"],
|
|
17596
|
+
rubygems: ["auth0"],
|
|
17597
|
+
composer: ["auth0/auth0-php"],
|
|
17598
|
+
nuget: ["Auth0.ManagementApi"]
|
|
17599
|
+
}
|
|
17600
|
+
},
|
|
17601
|
+
{
|
|
17602
|
+
id: "okta",
|
|
17603
|
+
name: "Okta",
|
|
17604
|
+
category: "Identity",
|
|
17605
|
+
hostSuffixes: ["okta.com", "oktapreview.com"],
|
|
17606
|
+
apiBase: "https://login.okta.com",
|
|
17607
|
+
defaultDataClasses: ["pii"],
|
|
17608
|
+
sdks: {
|
|
17609
|
+
npm: ["@okta/okta-sdk-nodejs"],
|
|
17610
|
+
pypi: ["okta"],
|
|
17611
|
+
go: ["github.com/okta/okta-sdk-golang"],
|
|
17612
|
+
maven: ["com.okta.sdk"],
|
|
17613
|
+
nuget: ["Okta.Sdk"]
|
|
17614
|
+
}
|
|
17615
|
+
},
|
|
17616
|
+
{
|
|
17617
|
+
id: "clerk",
|
|
17618
|
+
name: "Clerk",
|
|
17619
|
+
category: "Identity",
|
|
17620
|
+
hostSuffixes: ["clerk.com", "clerk.dev"],
|
|
17621
|
+
apiBase: "https://api.clerk.com",
|
|
17622
|
+
defaultDataClasses: ["pii"],
|
|
17623
|
+
sdks: {
|
|
17624
|
+
npm: ["@clerk/backend", "@clerk/nextjs"],
|
|
17625
|
+
pypi: ["clerk-backend-api"],
|
|
17626
|
+
go: ["github.com/clerk/clerk-sdk-go"]
|
|
17627
|
+
}
|
|
17628
|
+
},
|
|
17629
|
+
{
|
|
17630
|
+
id: "supabase",
|
|
17631
|
+
name: "Supabase",
|
|
17632
|
+
category: "Backend platform",
|
|
17633
|
+
hostSuffixes: ["supabase.co", "supabase.com"],
|
|
17634
|
+
apiBase: "https://api.supabase.com",
|
|
17635
|
+
defaultDataClasses: ["pii", "customer"],
|
|
17636
|
+
sdks: {
|
|
17637
|
+
npm: ["@supabase/supabase-js"],
|
|
17638
|
+
pypi: ["supabase"],
|
|
17639
|
+
cargo: ["postgrest"]
|
|
17640
|
+
}
|
|
17641
|
+
},
|
|
17642
|
+
{
|
|
17643
|
+
id: "firebase",
|
|
17644
|
+
name: "Firebase",
|
|
17645
|
+
category: "Backend platform",
|
|
17646
|
+
hostSuffixes: ["firebaseio.com", "firebase.google.com"],
|
|
17647
|
+
apiBase: "https://firebaseio.com",
|
|
17648
|
+
defaultDataClasses: ["customer"],
|
|
17649
|
+
sdks: {
|
|
17650
|
+
npm: ["firebase", "firebase-admin"],
|
|
17651
|
+
pypi: ["firebase-admin"],
|
|
17652
|
+
go: ["firebase.google.com/go"],
|
|
17653
|
+
maven: ["com.google.firebase"]
|
|
17654
|
+
}
|
|
17655
|
+
},
|
|
17656
|
+
{
|
|
17657
|
+
id: "mongodb-atlas",
|
|
17658
|
+
name: "MongoDB Atlas",
|
|
17659
|
+
category: "Database SaaS",
|
|
17660
|
+
hostSuffixes: ["mongodb.net", "mongodb.com"],
|
|
17661
|
+
apiBase: "https://cloud.mongodb.com",
|
|
17662
|
+
defaultDataClasses: ["customer"],
|
|
17663
|
+
sdks: {
|
|
17664
|
+
npm: ["mongodb"],
|
|
17665
|
+
pypi: ["pymongo"],
|
|
17666
|
+
go: ["go.mongodb.org/mongo-driver"],
|
|
17667
|
+
maven: ["org.mongodb"],
|
|
17668
|
+
rubygems: ["mongo"],
|
|
17669
|
+
cargo: ["mongodb"],
|
|
17670
|
+
nuget: ["MongoDB.Driver"]
|
|
17671
|
+
}
|
|
17672
|
+
},
|
|
17673
|
+
{
|
|
17674
|
+
id: "planetscale",
|
|
17675
|
+
name: "PlanetScale",
|
|
17676
|
+
category: "Database SaaS",
|
|
17677
|
+
hostSuffixes: ["psdb.cloud", "planetscale.com"],
|
|
17678
|
+
apiBase: "https://api.planetscale.com",
|
|
17679
|
+
defaultDataClasses: ["customer"],
|
|
17680
|
+
sdks: {
|
|
17681
|
+
npm: ["@planetscale/database"],
|
|
17682
|
+
go: ["github.com/planetscale/planetscale-go"]
|
|
17683
|
+
}
|
|
17684
|
+
},
|
|
17685
|
+
{
|
|
17686
|
+
id: "algolia",
|
|
17687
|
+
name: "Algolia",
|
|
17688
|
+
category: "Search SaaS",
|
|
17689
|
+
hostSuffixes: ["algolia.net", "algolianet.com"],
|
|
17690
|
+
apiBase: "https://algolia.net",
|
|
17691
|
+
defaultDataClasses: ["customer"],
|
|
17692
|
+
sdks: {
|
|
17693
|
+
npm: ["algoliasearch"],
|
|
17694
|
+
pypi: ["algoliasearch"],
|
|
17695
|
+
go: ["github.com/algolia/algoliasearch-client-go"],
|
|
17696
|
+
maven: ["com.algolia"],
|
|
17697
|
+
rubygems: ["algolia"],
|
|
17698
|
+
composer: ["algolia/algoliasearch-client-php"],
|
|
17699
|
+
nuget: ["Algolia.Search"]
|
|
17700
|
+
}
|
|
17701
|
+
},
|
|
17702
|
+
{
|
|
17703
|
+
id: "cloudflare",
|
|
17704
|
+
name: "Cloudflare",
|
|
17705
|
+
category: "CDN / edge",
|
|
17706
|
+
hostSuffixes: ["cloudflare.com", "workers.dev"],
|
|
17707
|
+
apiBase: "https://api.cloudflare.com",
|
|
17708
|
+
defaultDataClasses: ["logs"],
|
|
17709
|
+
sdks: {
|
|
17710
|
+
npm: ["cloudflare"],
|
|
17711
|
+
pypi: ["cloudflare"],
|
|
17712
|
+
go: ["github.com/cloudflare/cloudflare-go"],
|
|
17713
|
+
nuget: ["CloudFlare.Client"]
|
|
17714
|
+
}
|
|
17715
|
+
},
|
|
17716
|
+
{
|
|
17717
|
+
id: "huggingface",
|
|
17718
|
+
name: "Hugging Face",
|
|
17719
|
+
category: "LLM provider",
|
|
17720
|
+
hostSuffixes: ["huggingface.co"],
|
|
17721
|
+
apiBase: "https://api-inference.huggingface.co",
|
|
17722
|
+
defaultDataClasses: ["source"],
|
|
17723
|
+
sdks: {
|
|
17724
|
+
npm: ["@huggingface/inference"],
|
|
17725
|
+
pypi: ["huggingface-hub", "transformers"],
|
|
17726
|
+
rubygems: ["hugging-face"]
|
|
17727
|
+
}
|
|
17728
|
+
},
|
|
17729
|
+
{
|
|
17730
|
+
id: "cohere",
|
|
17731
|
+
name: "Cohere",
|
|
17732
|
+
category: "LLM provider",
|
|
17733
|
+
hostSuffixes: ["cohere.com", "cohere.ai"],
|
|
17734
|
+
apiBase: "https://api.cohere.com",
|
|
17735
|
+
defaultDataClasses: ["pii", "source"],
|
|
17736
|
+
sdks: {
|
|
17737
|
+
npm: ["cohere-ai"],
|
|
17738
|
+
pypi: ["cohere"],
|
|
17739
|
+
go: ["github.com/cohere-ai/cohere-go"]
|
|
17740
|
+
}
|
|
17741
|
+
},
|
|
17742
|
+
{
|
|
17743
|
+
id: "mistral",
|
|
17744
|
+
name: "Mistral AI",
|
|
17745
|
+
category: "LLM provider",
|
|
17746
|
+
hostSuffixes: ["mistral.ai"],
|
|
17747
|
+
apiBase: "https://api.mistral.ai",
|
|
17748
|
+
defaultDataClasses: ["pii", "source"],
|
|
17749
|
+
sdks: {
|
|
17750
|
+
npm: ["@mistralai/mistralai"],
|
|
17751
|
+
pypi: ["mistralai"],
|
|
17752
|
+
go: ["github.com/gage-technologies/mistral-go"]
|
|
17753
|
+
}
|
|
17754
|
+
}
|
|
17755
|
+
];
|
|
17756
|
+
var EGRESS_VERSION_MATERIAL = `${EXTRACTOR_VERSION}
|
|
17757
|
+
${JSON.stringify(PROVIDER_REGISTRY)}`;
|
|
17758
|
+
|
|
17759
|
+
// ../../packages/detections/src/egress/extract.ts
|
|
17760
|
+
var SECRET_KEY_NAMES = "api[_-]?key|apikey|private[_-]?key|access[_-]?key|access[_-]?token|token|secret|credentials?|password|passwd|pwd|authorization|sig|signature|sas|assertion";
|
|
17761
|
+
var AUTH_SCHEMES = "Bearer|Basic|Token|Digest|ApiKey|SSWS|AWS4-HMAC-SHA256";
|
|
17762
|
+
var SECRET_VALUE = new RegExp(
|
|
17763
|
+
`((?:${SECRET_KEY_NAMES})['"\`]?\\s*[:=]\\s*['"\`]?)(?!(?:${AUTH_SCHEMES})[\\s'"\`])[^\\s'"\`&]+`,
|
|
17764
|
+
"gi"
|
|
17765
|
+
);
|
|
17766
|
+
var AUTH_SCHEME_VALUE = new RegExp(
|
|
17767
|
+
`((?:${SECRET_KEY_NAMES})['"\`]?\\s*[:=]\\s*['"\`]?)(${AUTH_SCHEMES})\\s+[^\\s'"\`]+`,
|
|
17768
|
+
"gi"
|
|
17769
|
+
);
|
|
17770
|
+
var WEBHOOK_SECRET_PATHS = [
|
|
17771
|
+
{ hosts: ["hooks.slack.com"], prefix: "/services/" },
|
|
17772
|
+
{
|
|
17773
|
+
hosts: ["discord.com", "discordapp.com", "ptb.discord.com", "canary.discord.com"],
|
|
17774
|
+
prefix: "/api/webhooks/"
|
|
17775
|
+
},
|
|
17776
|
+
{ hosts: ["hooks.zapier.com"], prefix: "/hooks/" },
|
|
17777
|
+
{ hosts: ["outlook.office.com", "outlook.office365.com"], prefix: "/webhook/" }
|
|
17778
|
+
];
|
|
17779
|
+
function escapeRegExp(literal2) {
|
|
17780
|
+
return literal2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
17781
|
+
}
|
|
17782
|
+
var WEBHOOK_URL = new RegExp(
|
|
17783
|
+
`(https?://(?:${WEBHOOK_SECRET_PATHS.flatMap(
|
|
17784
|
+
(entry) => entry.hosts.map((host) => `${escapeRegExp(host)}${escapeRegExp(entry.prefix)}`)
|
|
17785
|
+
).join("|")}))[^\\s'"\`<>()[\\]{},;]+`,
|
|
17786
|
+
"gi"
|
|
17787
|
+
);
|
|
17788
|
+
|
|
17150
17789
|
// ../../packages/detections/src/escape-regexp.ts
|
|
17151
|
-
function
|
|
17790
|
+
function escapeRegExp2(value) {
|
|
17152
17791
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
17153
17792
|
}
|
|
17154
17793
|
|
|
17155
17794
|
// ../../packages/detections/src/matchers/limits.ts
|
|
17156
17795
|
var MAX_MATCHES_PER_RULE = 1e4;
|
|
17796
|
+
var MAX_REGEX_INPUT_LENGTH = 2e5;
|
|
17157
17797
|
|
|
17158
17798
|
// ../../packages/detections/src/matchers/keyword.ts
|
|
17159
17799
|
var KeywordMatcher2 = class {
|
|
@@ -17164,7 +17804,7 @@ var KeywordMatcher2 = class {
|
|
|
17164
17804
|
for (const kw of keywords) {
|
|
17165
17805
|
if (kw.length === 0) continue;
|
|
17166
17806
|
if (spans.length >= MAX_MATCHES_PER_RULE) break;
|
|
17167
|
-
const re = new RegExp(
|
|
17807
|
+
const re = new RegExp(escapeRegExp2(kw), caseSensitive ? "gu" : "giu");
|
|
17168
17808
|
let m;
|
|
17169
17809
|
while ((m = re.exec(text)) !== null) {
|
|
17170
17810
|
spans.push({ start: m.index, end: m.index + m[0].length });
|
|
@@ -17181,9 +17821,13 @@ var RegexMatcher2 = class {
|
|
|
17181
17821
|
if (rule.matcher.type !== "regex") return [];
|
|
17182
17822
|
const { pattern, flags, captureGroup } = rule.matcher;
|
|
17183
17823
|
const re = new RegExp(pattern, flags.includes("d") ? flags : `${flags}d`);
|
|
17824
|
+
const scanText2 = text.length > MAX_REGEX_INPUT_LENGTH ? text.slice(0, MAX_REGEX_INPUT_LENGTH) : text;
|
|
17184
17825
|
const spans = [];
|
|
17185
17826
|
let m;
|
|
17186
|
-
|
|
17827
|
+
const maxIterations = scanText2.length + 1;
|
|
17828
|
+
let iterations = 0;
|
|
17829
|
+
while ((m = re.exec(scanText2)) !== null) {
|
|
17830
|
+
if (++iterations > maxIterations) break;
|
|
17187
17831
|
const group = captureGroup != null ? m[captureGroup] : m[0];
|
|
17188
17832
|
if (m[0].length === 0) re.lastIndex++;
|
|
17189
17833
|
if (group && spans.length < MAX_MATCHES_PER_RULE) {
|
|
@@ -17258,6 +17902,31 @@ var CONFIG_POSTURE_RULES = [
|
|
|
17258
17902
|
}
|
|
17259
17903
|
];
|
|
17260
17904
|
|
|
17905
|
+
// ../../packages/detections/src/security/redos-probe.ts
|
|
17906
|
+
var EXPONENTIAL_UNITS = [
|
|
17907
|
+
"a",
|
|
17908
|
+
"0",
|
|
17909
|
+
" ",
|
|
17910
|
+
"x",
|
|
17911
|
+
"ab",
|
|
17912
|
+
"a.",
|
|
17913
|
+
"a-",
|
|
17914
|
+
"a_",
|
|
17915
|
+
"a@",
|
|
17916
|
+
"a/",
|
|
17917
|
+
"a:",
|
|
17918
|
+
"a=",
|
|
17919
|
+
"a;",
|
|
17920
|
+
"aA0",
|
|
17921
|
+
" "
|
|
17922
|
+
];
|
|
17923
|
+
var EXPONENTIAL_PROBES = EXPONENTIAL_UNITS.flatMap(
|
|
17924
|
+
(unit) => [23, 25].map((len) => unit.repeat(Math.ceil(len / unit.length)).slice(0, len) + "!")
|
|
17925
|
+
);
|
|
17926
|
+
var POLYNOMIAL_PROBES = ["abc-", "a.", "a ", "a=", "x", "0", "a@", "a/", "ab"].map(
|
|
17927
|
+
(unit) => unit.repeat(1e4).slice(0, 4e4) + "!"
|
|
17928
|
+
);
|
|
17929
|
+
|
|
17261
17930
|
// ../../packages/plugin-sdk/src/repo.ts
|
|
17262
17931
|
import { existsSync as existsSync3, readFileSync as readFileSync3, statSync } from "fs";
|
|
17263
17932
|
import { basename, dirname, isAbsolute, join as join6, sep as sep2 } from "path";
|
|
@@ -17275,10 +17944,14 @@ import { arch, hostname as hostname3, platform, release } from "os";
|
|
|
17275
17944
|
import { mkdirSync as mkdirSync3, readFileSync as readFileSync5, writeFileSync as writeFileSync4 } from "fs";
|
|
17276
17945
|
import { join as join8 } from "path";
|
|
17277
17946
|
|
|
17947
|
+
// ../../packages/plugin-sdk/src/paths.ts
|
|
17948
|
+
import { readdirSync as readdirSync2, realpathSync as realpathSync2 } from "fs";
|
|
17949
|
+
import { basename as basename3, dirname as dirname2, sep as sep3 } from "path";
|
|
17950
|
+
|
|
17278
17951
|
// ../../packages/plugin-sdk/src/project-files.ts
|
|
17279
17952
|
var import_ignore = __toESM(require_ignore(), 1);
|
|
17280
|
-
import { existsSync as existsSync4, readdirSync as
|
|
17281
|
-
import { basename as
|
|
17953
|
+
import { existsSync as existsSync4, readdirSync as readdirSync3, readFileSync as readFileSync6 } from "fs";
|
|
17954
|
+
import { basename as basename4, join as join9, relative, sep as sep4 } from "path";
|
|
17282
17955
|
|
|
17283
17956
|
// ../../packages/plugin-sdk/src/runtime.ts
|
|
17284
17957
|
import { randomUUID as randomUUID10 } from "crypto";
|
|
@@ -17383,8 +18056,8 @@ function table(headers, rows, opts = {}) {
|
|
|
17383
18056
|
const widths = headers.map(
|
|
17384
18057
|
(h, i) => Math.max(visibleLength(h), ...rows.map((r) => visibleLength(r[i] ?? "")))
|
|
17385
18058
|
);
|
|
17386
|
-
const
|
|
17387
|
-
const fmt = (cells) => cells.map((cell, i) => padEnd(cell, widths[i] ?? 0)).join(
|
|
18059
|
+
const sep5 = " ".repeat(gap);
|
|
18060
|
+
const fmt = (cells) => cells.map((cell, i) => padEnd(cell, widths[i] ?? 0)).join(sep5);
|
|
17388
18061
|
const headerLine = fmt(headers.map((h) => h.toUpperCase()));
|
|
17389
18062
|
if (opts.rowSep === true) {
|
|
17390
18063
|
const fullWidth = widths.reduce((n, w) => n + w, 0) + gap * Math.max(0, widths.length - 1);
|
|
@@ -17396,7 +18069,7 @@ function table(headers, rows, opts = {}) {
|
|
|
17396
18069
|
});
|
|
17397
18070
|
return [headerLine, rule, ...body].join("\n");
|
|
17398
18071
|
}
|
|
17399
|
-
const ruleLine = widths.map((w) => "\u2500".repeat(w)).join(
|
|
18072
|
+
const ruleLine = widths.map((w) => "\u2500".repeat(w)).join(sep5);
|
|
17400
18073
|
return [headerLine, ruleLine, ...rows.map(fmt)].join("\n");
|
|
17401
18074
|
}
|
|
17402
18075
|
function fenced(body) {
|
|
@@ -17409,7 +18082,7 @@ function show(body) {
|
|
|
17409
18082
|
}
|
|
17410
18083
|
|
|
17411
18084
|
// src/command-registry.ts
|
|
17412
|
-
import { readdirSync as
|
|
18085
|
+
import { readdirSync as readdirSync4 } from "fs";
|
|
17413
18086
|
import { fileURLToPath } from "url";
|
|
17414
18087
|
var COMMANDS_DIR = fileURLToPath(new URL("../commands", import.meta.url));
|
|
17415
18088
|
|