securl 1.4.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/CHANGELOG.md +241 -0
- package/LICENSE +21 -0
- package/README.md +427 -0
- package/RELEASING.md +37 -0
- package/SECURITY.md +27 -0
- package/dist/certificate.d.ts +5 -0
- package/dist/certificate.js +92 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +674 -0
- package/dist/compromiseSignals.d.ts +10 -0
- package/dist/compromiseSignals.js +183 -0
- package/dist/cookie-analysis.d.ts +2 -0
- package/dist/cookie-analysis.js +41 -0
- package/dist/cookieAnalysis.d.ts +2 -0
- package/dist/cookieAnalysis.js +82 -0
- package/dist/ctDiscovery.d.ts +19 -0
- package/dist/ctDiscovery.js +357 -0
- package/dist/domain-security.d.ts +10 -0
- package/dist/domain-security.js +416 -0
- package/dist/header-analysis.d.ts +14 -0
- package/dist/header-analysis.js +165 -0
- package/dist/historyDiff.d.ts +4 -0
- package/dist/historyDiff.js +117 -0
- package/dist/html-extraction.d.ts +12 -0
- package/dist/html-extraction.js +279 -0
- package/dist/html-page-analysis.d.ts +38 -0
- package/dist/html-page-analysis.js +459 -0
- package/dist/htmlInsights.d.ts +23 -0
- package/dist/htmlInsights.js +460 -0
- package/dist/identityProvider.d.ts +14 -0
- package/dist/identityProvider.js +259 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +1008 -0
- package/dist/infrastructure.d.ts +9 -0
- package/dist/infrastructure.js +149 -0
- package/dist/libraryRisk.d.ts +3 -0
- package/dist/libraryRisk.js +164 -0
- package/dist/network-validation.d.ts +30 -0
- package/dist/network-validation.js +161 -0
- package/dist/network.d.ts +34 -0
- package/dist/network.js +139 -0
- package/dist/passive-intelligence.d.ts +21 -0
- package/dist/passive-intelligence.js +247 -0
- package/dist/path-discovery.d.ts +4 -0
- package/dist/path-discovery.js +50 -0
- package/dist/postureDigest.d.ts +142 -0
- package/dist/postureDigest.js +159 -0
- package/dist/postureDrift.d.ts +4 -0
- package/dist/postureDrift.js +118 -0
- package/dist/postureRemediation.d.ts +6 -0
- package/dist/postureRemediation.js +286 -0
- package/dist/redirectChain.d.ts +2 -0
- package/dist/redirectChain.js +39 -0
- package/dist/riskEvents.d.ts +3 -0
- package/dist/riskEvents.js +187 -0
- package/dist/scannerConfig.d.ts +49 -0
- package/dist/scannerConfig.js +79 -0
- package/dist/scoring.d.ts +32 -0
- package/dist/scoring.js +367 -0
- package/dist/security-txt.d.ts +4 -0
- package/dist/security-txt.js +123 -0
- package/dist/surfaceEnrichment.d.ts +44 -0
- package/dist/surfaceEnrichment.js +377 -0
- package/dist/technology-detection.d.ts +4 -0
- package/dist/technology-detection.js +93 -0
- package/dist/types.d.ts +730 -0
- package/dist/types.js +1 -0
- package/dist/utils.d.ts +7 -0
- package/dist/utils.js +66 -0
- package/dist/wafFingerprint.d.ts +5 -0
- package/dist/wafFingerprint.js +156 -0
- package/examples/risk-events.mjs +27 -0
- package/examples/scan-url.mjs +17 -0
- package/package.json +102 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,730 @@
|
|
|
1
|
+
export type Severity = "good" | "info" | "warning" | "critical";
|
|
2
|
+
export type IssueConfidence = "high" | "medium" | "low";
|
|
3
|
+
export type IssueSource = "observed" | "heuristic" | "inferred";
|
|
4
|
+
export type OwaspCategory = "A01 Broken Access Control" | "A02 Cryptographic Failures" | "A03 Injection" | "A05 Security Misconfiguration" | "A06 Vulnerable and Outdated Components" | "A07 Identification and Authentication Failures";
|
|
5
|
+
export type MitreRelevance = "Reconnaissance" | "Initial Access" | "Credential Access" | "Collection" | "Defense Evasion";
|
|
6
|
+
export interface SecurityHeaderResult {
|
|
7
|
+
key: string;
|
|
8
|
+
label: string;
|
|
9
|
+
description: string;
|
|
10
|
+
recommendation: string;
|
|
11
|
+
value: string | null;
|
|
12
|
+
status: "present" | "missing" | "warning";
|
|
13
|
+
severity: Severity;
|
|
14
|
+
summary: string;
|
|
15
|
+
}
|
|
16
|
+
export interface CookieResult {
|
|
17
|
+
name: string;
|
|
18
|
+
valuePreview: string;
|
|
19
|
+
secure: boolean;
|
|
20
|
+
httpOnly: boolean;
|
|
21
|
+
sameSite: string | null;
|
|
22
|
+
domain: string | null;
|
|
23
|
+
path: string | null;
|
|
24
|
+
expires: string | null;
|
|
25
|
+
maxAge: string | null;
|
|
26
|
+
issues: string[];
|
|
27
|
+
risk: "low" | "medium" | "high";
|
|
28
|
+
}
|
|
29
|
+
export interface CookieRecord {
|
|
30
|
+
name: string;
|
|
31
|
+
hasSecure: boolean;
|
|
32
|
+
hasHttpOnly: boolean;
|
|
33
|
+
sameSite: "Strict" | "Lax" | "None" | "missing";
|
|
34
|
+
hasHostPrefix: boolean;
|
|
35
|
+
hasSecurePrefix: boolean;
|
|
36
|
+
isSessionCookie: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface CookieAnalysisInfo {
|
|
39
|
+
cookies: CookieRecord[];
|
|
40
|
+
cookiesWithoutSecure: number;
|
|
41
|
+
cookiesWithoutHttpOnly: number;
|
|
42
|
+
cookiesWithSameSiteNone: number;
|
|
43
|
+
cookiesWithoutSameSite: number;
|
|
44
|
+
issues: string[];
|
|
45
|
+
strengths: string[];
|
|
46
|
+
}
|
|
47
|
+
export interface TechnologyResult {
|
|
48
|
+
name: string;
|
|
49
|
+
category: "server" | "frontend" | "security" | "hosting" | "network";
|
|
50
|
+
evidence: string;
|
|
51
|
+
version: string | null;
|
|
52
|
+
confidence: IssueConfidence;
|
|
53
|
+
detection: "observed" | "inferred";
|
|
54
|
+
}
|
|
55
|
+
export interface CertificateResult {
|
|
56
|
+
available: boolean;
|
|
57
|
+
valid: boolean;
|
|
58
|
+
authorized: boolean;
|
|
59
|
+
issuer: string | null;
|
|
60
|
+
subject: string | null;
|
|
61
|
+
validFrom: string | null;
|
|
62
|
+
validTo: string | null;
|
|
63
|
+
daysRemaining: number | null;
|
|
64
|
+
protocol: string | null;
|
|
65
|
+
cipher: string | null;
|
|
66
|
+
fingerprint: string | null;
|
|
67
|
+
subjectAltName: string[];
|
|
68
|
+
issues: string[];
|
|
69
|
+
}
|
|
70
|
+
export interface RedirectHop {
|
|
71
|
+
url: string;
|
|
72
|
+
status: number;
|
|
73
|
+
statusCode: number;
|
|
74
|
+
location: string | null;
|
|
75
|
+
isHttps: boolean;
|
|
76
|
+
secure: boolean;
|
|
77
|
+
}
|
|
78
|
+
export interface RedirectChainInfo {
|
|
79
|
+
hops: RedirectHop[];
|
|
80
|
+
finalUrl: string;
|
|
81
|
+
totalHops: number;
|
|
82
|
+
hasMixedRedirect: boolean;
|
|
83
|
+
isLongChain: boolean;
|
|
84
|
+
crossesDomain: boolean;
|
|
85
|
+
issues: string[];
|
|
86
|
+
strengths: string[];
|
|
87
|
+
}
|
|
88
|
+
export interface ScanIssue {
|
|
89
|
+
severity: Exclude<Severity, "good">;
|
|
90
|
+
area: "transport" | "headers" | "certificate" | "cookies";
|
|
91
|
+
title: string;
|
|
92
|
+
detail: string;
|
|
93
|
+
confidence: IssueConfidence;
|
|
94
|
+
source: IssueSource;
|
|
95
|
+
owasp: OwaspCategory[];
|
|
96
|
+
mitre: MitreRelevance[];
|
|
97
|
+
evidence?: ScanEvidenceReference[];
|
|
98
|
+
}
|
|
99
|
+
export interface RemediationSnippet {
|
|
100
|
+
platform: "nginx" | "apache" | "cloudflare" | "vercel" | "netlify";
|
|
101
|
+
title: string;
|
|
102
|
+
description: string;
|
|
103
|
+
filename: string;
|
|
104
|
+
snippet: string;
|
|
105
|
+
}
|
|
106
|
+
export type ScanEvidenceKind = "header" | "tls" | "cookie" | "redirect" | "dns" | "html" | "probe" | "public_record" | "score_driver";
|
|
107
|
+
export interface ScanEvidenceReference {
|
|
108
|
+
kind: ScanEvidenceKind;
|
|
109
|
+
label: string;
|
|
110
|
+
observed: string | null;
|
|
111
|
+
expected?: string;
|
|
112
|
+
url?: string;
|
|
113
|
+
source?: ScoreDriver["source"] | IssueSource | "derived";
|
|
114
|
+
}
|
|
115
|
+
export type RemediationOwner = "app" | "edge" | "dns" | "identity" | "third_party";
|
|
116
|
+
export type RemediationEffort = "low" | "medium" | "high";
|
|
117
|
+
export type RemediationImpact = "low" | "medium" | "high";
|
|
118
|
+
export interface RemediationPlanItem {
|
|
119
|
+
id: string;
|
|
120
|
+
priority: number;
|
|
121
|
+
title: string;
|
|
122
|
+
detail: string;
|
|
123
|
+
owner: RemediationOwner;
|
|
124
|
+
effort: RemediationEffort;
|
|
125
|
+
impact: RemediationImpact;
|
|
126
|
+
action: string;
|
|
127
|
+
verify: string;
|
|
128
|
+
scoreImpact: number | null;
|
|
129
|
+
relatedFindings: string[];
|
|
130
|
+
evidence: ScanEvidenceReference[];
|
|
131
|
+
}
|
|
132
|
+
export interface RemediationPlan {
|
|
133
|
+
generatedAt: string;
|
|
134
|
+
summary: string;
|
|
135
|
+
totalActions: number;
|
|
136
|
+
highImpactActions: number;
|
|
137
|
+
quickWins: number;
|
|
138
|
+
items: RemediationPlanItem[];
|
|
139
|
+
}
|
|
140
|
+
export interface CrawlPageResult {
|
|
141
|
+
label: string;
|
|
142
|
+
path: string;
|
|
143
|
+
finalUrl: string;
|
|
144
|
+
sameOrigin: boolean;
|
|
145
|
+
statusCode: number;
|
|
146
|
+
responseTimeMs: number;
|
|
147
|
+
score: number;
|
|
148
|
+
grade: string;
|
|
149
|
+
missingHeaders: string[];
|
|
150
|
+
warningHeaders: string[];
|
|
151
|
+
issueCount: number;
|
|
152
|
+
}
|
|
153
|
+
export interface CrawlSummary {
|
|
154
|
+
pages: CrawlPageResult[];
|
|
155
|
+
weakestPage: string | null;
|
|
156
|
+
strongestPage: string | null;
|
|
157
|
+
inconsistentHeaders: string[];
|
|
158
|
+
discoverySources: string[];
|
|
159
|
+
}
|
|
160
|
+
export interface HistorySnapshot {
|
|
161
|
+
finalUrl: string;
|
|
162
|
+
host: string;
|
|
163
|
+
scannedAt: string;
|
|
164
|
+
score: number;
|
|
165
|
+
grade: string;
|
|
166
|
+
statusCode: number;
|
|
167
|
+
responseTimeMs: number;
|
|
168
|
+
certificateDaysRemaining: number | null;
|
|
169
|
+
thirdPartyProviders: string[];
|
|
170
|
+
aiVendors: string[];
|
|
171
|
+
identityProvider: string | null;
|
|
172
|
+
wafProviders: string[];
|
|
173
|
+
ctPriorityHosts: string[];
|
|
174
|
+
headers: Pick<SecurityHeaderResult, "label" | "status" | "value">[];
|
|
175
|
+
issues: Pick<ScanIssue, "severity" | "title" | "detail" | "confidence" | "source">[];
|
|
176
|
+
}
|
|
177
|
+
export interface HistoryDiff {
|
|
178
|
+
previousScore: number | null;
|
|
179
|
+
scoreDelta: number | null;
|
|
180
|
+
previousGrade: string | null;
|
|
181
|
+
currentGrade: string | null;
|
|
182
|
+
statusCodeDelta: {
|
|
183
|
+
from: number | null;
|
|
184
|
+
to: number | null;
|
|
185
|
+
} | null;
|
|
186
|
+
certificateDaysRemainingDelta: {
|
|
187
|
+
from: number | null;
|
|
188
|
+
to: number | null;
|
|
189
|
+
delta: number | null;
|
|
190
|
+
} | null;
|
|
191
|
+
newIssues: string[];
|
|
192
|
+
resolvedIssues: string[];
|
|
193
|
+
headerChanges: Array<{
|
|
194
|
+
label: string;
|
|
195
|
+
from: string;
|
|
196
|
+
to: string;
|
|
197
|
+
}>;
|
|
198
|
+
newThirdPartyProviders: string[];
|
|
199
|
+
removedThirdPartyProviders: string[];
|
|
200
|
+
newAiVendors: string[];
|
|
201
|
+
removedAiVendors: string[];
|
|
202
|
+
identityProviderChange: {
|
|
203
|
+
from: string | null;
|
|
204
|
+
to: string | null;
|
|
205
|
+
} | null;
|
|
206
|
+
wafProviderChanges: {
|
|
207
|
+
newProviders: string[];
|
|
208
|
+
removedProviders: string[];
|
|
209
|
+
};
|
|
210
|
+
ctPriorityHostChanges: {
|
|
211
|
+
newHosts: string[];
|
|
212
|
+
removedHosts: string[];
|
|
213
|
+
};
|
|
214
|
+
summary: string[];
|
|
215
|
+
}
|
|
216
|
+
export type PostureRiskEventSeverity = "info" | "warning" | "critical";
|
|
217
|
+
export interface PostureRiskEvent {
|
|
218
|
+
eventType: string;
|
|
219
|
+
severity: PostureRiskEventSeverity;
|
|
220
|
+
title: string;
|
|
221
|
+
detail: string;
|
|
222
|
+
metadata: Record<string, unknown>;
|
|
223
|
+
}
|
|
224
|
+
export type PostureDriftDirection = "improved" | "regressed" | "changed" | "unchanged";
|
|
225
|
+
export type PostureDriftSeverity = "none" | PostureRiskEventSeverity;
|
|
226
|
+
export type PostureDriftArea = "score" | "grade" | "status" | "certificate" | "headers" | "findings" | "third_party" | "ai" | "identity" | "waf" | "ct";
|
|
227
|
+
export interface PostureDriftSnapshotSummary {
|
|
228
|
+
finalUrl: string;
|
|
229
|
+
host: string;
|
|
230
|
+
scannedAt: string;
|
|
231
|
+
score: number;
|
|
232
|
+
grade: string;
|
|
233
|
+
statusCode: number;
|
|
234
|
+
}
|
|
235
|
+
export interface PostureDriftSummary {
|
|
236
|
+
direction: PostureDriftDirection;
|
|
237
|
+
severity: PostureDriftSeverity;
|
|
238
|
+
scoreDelta: number | null;
|
|
239
|
+
gradeChanged: boolean;
|
|
240
|
+
hasRegression: boolean;
|
|
241
|
+
hasImprovement: boolean;
|
|
242
|
+
eventCounts: Record<PostureRiskEventSeverity, number>;
|
|
243
|
+
changedAreas: PostureDriftArea[];
|
|
244
|
+
topEvents: PostureRiskEvent[];
|
|
245
|
+
summary: string[];
|
|
246
|
+
}
|
|
247
|
+
export interface PostureDriftReport {
|
|
248
|
+
current: PostureDriftSnapshotSummary;
|
|
249
|
+
previous: PostureDriftSnapshotSummary;
|
|
250
|
+
diff: HistoryDiff;
|
|
251
|
+
riskEvents: PostureRiskEvent[];
|
|
252
|
+
summary: PostureDriftSummary;
|
|
253
|
+
}
|
|
254
|
+
export type SecurityTxtStatus = "present_valid" | "present_expired" | "present_incomplete" | "missing";
|
|
255
|
+
export interface SecurityTxtInfo {
|
|
256
|
+
status: SecurityTxtStatus;
|
|
257
|
+
url: string | null;
|
|
258
|
+
contact: string[];
|
|
259
|
+
expires: string | null;
|
|
260
|
+
isExpired: boolean;
|
|
261
|
+
policy: string | null;
|
|
262
|
+
acknowledgments: string | null;
|
|
263
|
+
encryption: string[];
|
|
264
|
+
hiring: string[];
|
|
265
|
+
preferredLanguages: string | null;
|
|
266
|
+
canonical: string[];
|
|
267
|
+
raw: string | null;
|
|
268
|
+
issues: string[];
|
|
269
|
+
strengths: string[];
|
|
270
|
+
}
|
|
271
|
+
export interface DomainSecurityInfo {
|
|
272
|
+
host: string;
|
|
273
|
+
mxRecords: string[];
|
|
274
|
+
nsRecords: string[];
|
|
275
|
+
caaRecords: string[];
|
|
276
|
+
dnssec: {
|
|
277
|
+
enabled: boolean;
|
|
278
|
+
dsRecords: string[];
|
|
279
|
+
status: "signed" | "not_signed" | "unknown";
|
|
280
|
+
};
|
|
281
|
+
spf: string | null;
|
|
282
|
+
dmarc: string | null;
|
|
283
|
+
emailPolicy: {
|
|
284
|
+
spf: {
|
|
285
|
+
status: "strong" | "watch" | "weak" | "missing";
|
|
286
|
+
allMechanism: "-all" | "~all" | "?all" | "+all" | null;
|
|
287
|
+
dnsLookupMechanisms: number;
|
|
288
|
+
summary: string;
|
|
289
|
+
};
|
|
290
|
+
dmarc: {
|
|
291
|
+
status: "strong" | "watch" | "weak" | "missing";
|
|
292
|
+
policy: "reject" | "quarantine" | "none" | null;
|
|
293
|
+
subdomainPolicy: "reject" | "quarantine" | "none" | null;
|
|
294
|
+
pct: number | null;
|
|
295
|
+
reporting: boolean;
|
|
296
|
+
summary: string;
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
mtaSts: {
|
|
300
|
+
dns: string | null;
|
|
301
|
+
policyUrl: string | null;
|
|
302
|
+
policy: string | null;
|
|
303
|
+
};
|
|
304
|
+
spfDetail?: {
|
|
305
|
+
hasPlusAll: boolean;
|
|
306
|
+
hasTildeAll: boolean;
|
|
307
|
+
hasMinusAll: boolean;
|
|
308
|
+
hasQuestionAll: boolean;
|
|
309
|
+
includeCount: number;
|
|
310
|
+
exceedsLookupLimit: boolean;
|
|
311
|
+
isOverlyPermissive: boolean;
|
|
312
|
+
};
|
|
313
|
+
dkim?: {
|
|
314
|
+
discovered: Array<{
|
|
315
|
+
selector: string;
|
|
316
|
+
record: string;
|
|
317
|
+
}>;
|
|
318
|
+
selectors: string[];
|
|
319
|
+
count: number;
|
|
320
|
+
summary: string;
|
|
321
|
+
};
|
|
322
|
+
tlsRpt?: {
|
|
323
|
+
dns: string | null;
|
|
324
|
+
reporting: boolean;
|
|
325
|
+
summary: string;
|
|
326
|
+
};
|
|
327
|
+
bimi?: {
|
|
328
|
+
dns: string | null;
|
|
329
|
+
selector: string;
|
|
330
|
+
status: "present" | "missing";
|
|
331
|
+
summary: string;
|
|
332
|
+
};
|
|
333
|
+
emailDeliverabilityScore?: {
|
|
334
|
+
score: number;
|
|
335
|
+
grade: "A" | "B" | "C" | "D" | "F";
|
|
336
|
+
breakdown: Record<string, number>;
|
|
337
|
+
};
|
|
338
|
+
issues: string[];
|
|
339
|
+
strengths: string[];
|
|
340
|
+
}
|
|
341
|
+
export interface IdentityProviderInfo {
|
|
342
|
+
detected: boolean;
|
|
343
|
+
provider: string | null;
|
|
344
|
+
protocol: "oidc" | "oauth" | "saml" | "mixed" | "unknown" | null;
|
|
345
|
+
redirectOrigins: string[];
|
|
346
|
+
authHostCandidates: string[];
|
|
347
|
+
loginPaths: string[];
|
|
348
|
+
openIdConfigurationUrl: string | null;
|
|
349
|
+
wellKnownEndpoints: string[];
|
|
350
|
+
issuer: string | null;
|
|
351
|
+
authorizationEndpoint: string | null;
|
|
352
|
+
tokenEndpoint: string | null;
|
|
353
|
+
endSessionEndpoint: string | null;
|
|
354
|
+
redirectUriSignals: string[];
|
|
355
|
+
tenantBrand: string | null;
|
|
356
|
+
tenantRegion: string | null;
|
|
357
|
+
tenantSignals: string[];
|
|
358
|
+
issues: string[];
|
|
359
|
+
strengths: string[];
|
|
360
|
+
}
|
|
361
|
+
export interface CtDiscoveredHost {
|
|
362
|
+
host: string;
|
|
363
|
+
category: "auth" | "app" | "api" | "admin" | "cdn" | "static" | "other";
|
|
364
|
+
priority: "high" | "medium" | "low";
|
|
365
|
+
evidence: string;
|
|
366
|
+
}
|
|
367
|
+
export interface CtHostObservation {
|
|
368
|
+
host: string;
|
|
369
|
+
category: CtDiscoveredHost["category"];
|
|
370
|
+
priority: CtDiscoveredHost["priority"];
|
|
371
|
+
reachable: boolean;
|
|
372
|
+
finalUrl: string | null;
|
|
373
|
+
statusCode: number;
|
|
374
|
+
responseKind: "html" | "json" | "redirect" | "other" | "unknown";
|
|
375
|
+
identityProvider: string | null;
|
|
376
|
+
edgeProvider: string | null;
|
|
377
|
+
cnameTargets: string[];
|
|
378
|
+
suspectedTakeover: {
|
|
379
|
+
provider: string;
|
|
380
|
+
confidence: IssueConfidence;
|
|
381
|
+
evidence: string;
|
|
382
|
+
} | null;
|
|
383
|
+
note: string;
|
|
384
|
+
}
|
|
385
|
+
export interface CtDiscoveryInfo {
|
|
386
|
+
queriedDomain: string;
|
|
387
|
+
sourceUrl: string;
|
|
388
|
+
subdomains: string[];
|
|
389
|
+
wildcardEntries: string[];
|
|
390
|
+
prioritizedHosts: CtDiscoveredHost[];
|
|
391
|
+
sampledHosts: CtHostObservation[];
|
|
392
|
+
coverageSummary: string;
|
|
393
|
+
issues: string[];
|
|
394
|
+
strengths: string[];
|
|
395
|
+
}
|
|
396
|
+
export interface WafFingerprint {
|
|
397
|
+
name: string;
|
|
398
|
+
confidence: IssueConfidence;
|
|
399
|
+
detection: "observed" | "inferred";
|
|
400
|
+
evidence: string;
|
|
401
|
+
}
|
|
402
|
+
export interface WafFingerprintInfo {
|
|
403
|
+
detected: boolean;
|
|
404
|
+
providers: WafFingerprint[];
|
|
405
|
+
edgeSignals: string[];
|
|
406
|
+
issues: string[];
|
|
407
|
+
strengths: string[];
|
|
408
|
+
summary: string;
|
|
409
|
+
}
|
|
410
|
+
export interface HtmlFormInfo {
|
|
411
|
+
action: string | null;
|
|
412
|
+
resolvedAction: string;
|
|
413
|
+
actionHost: string | null;
|
|
414
|
+
method: string;
|
|
415
|
+
insecureSubmission: boolean;
|
|
416
|
+
hasPasswordField: boolean;
|
|
417
|
+
offOriginSubmission: boolean;
|
|
418
|
+
}
|
|
419
|
+
export interface PassiveLeakSignal {
|
|
420
|
+
category: "source_map" | "client_config" | "public_token" | "version_leak";
|
|
421
|
+
severity: "info" | "warning";
|
|
422
|
+
title: string;
|
|
423
|
+
detail: string;
|
|
424
|
+
evidence: string[];
|
|
425
|
+
}
|
|
426
|
+
export interface ClientExposureSignal {
|
|
427
|
+
category: "api_endpoint" | "config" | "service" | "environment";
|
|
428
|
+
severity: "info" | "warning";
|
|
429
|
+
title: string;
|
|
430
|
+
detail: string;
|
|
431
|
+
evidence: string[];
|
|
432
|
+
}
|
|
433
|
+
export interface LibraryFingerprint {
|
|
434
|
+
packageName: string;
|
|
435
|
+
version: string;
|
|
436
|
+
sourceUrl: string;
|
|
437
|
+
confidence: IssueConfidence;
|
|
438
|
+
evidence: string;
|
|
439
|
+
}
|
|
440
|
+
export interface LibraryVulnerability {
|
|
441
|
+
id: string;
|
|
442
|
+
summary: string;
|
|
443
|
+
severity: "low" | "moderate" | "high" | "critical" | "unknown";
|
|
444
|
+
aliases: string[];
|
|
445
|
+
referenceUrl: string | null;
|
|
446
|
+
}
|
|
447
|
+
export interface LibraryRiskSignal {
|
|
448
|
+
packageName: string;
|
|
449
|
+
version: string;
|
|
450
|
+
confidence: IssueConfidence;
|
|
451
|
+
sourceUrl: string;
|
|
452
|
+
evidence: string;
|
|
453
|
+
vulnerabilities: LibraryVulnerability[];
|
|
454
|
+
}
|
|
455
|
+
export interface SriCoverageInfo {
|
|
456
|
+
externalScripts: number;
|
|
457
|
+
externalStylesheets: number;
|
|
458
|
+
scriptsWithSri: number;
|
|
459
|
+
stylesheetsWithSri: number;
|
|
460
|
+
coveragePercent: number;
|
|
461
|
+
issues: string[];
|
|
462
|
+
strengths: string[];
|
|
463
|
+
}
|
|
464
|
+
export interface FrameworkVersionLeak {
|
|
465
|
+
framework: string;
|
|
466
|
+
versionHint: string | null;
|
|
467
|
+
evidence: string;
|
|
468
|
+
risk: "low" | "medium" | "high";
|
|
469
|
+
}
|
|
470
|
+
export interface SuspiciousScriptSignal {
|
|
471
|
+
category: "obfuscation" | "dynamic_loader" | "suspicious_host";
|
|
472
|
+
severity: "info" | "warning";
|
|
473
|
+
title: string;
|
|
474
|
+
detail: string;
|
|
475
|
+
evidence: string[];
|
|
476
|
+
}
|
|
477
|
+
export interface HtmlSecurityInfo {
|
|
478
|
+
fetched: boolean;
|
|
479
|
+
pageUrl: string | null;
|
|
480
|
+
pageTitle: string | null;
|
|
481
|
+
metaGenerator: string | null;
|
|
482
|
+
forms: HtmlFormInfo[];
|
|
483
|
+
sameSiteHosts: string[];
|
|
484
|
+
externalScriptDomains: string[];
|
|
485
|
+
externalStylesheetDomains: string[];
|
|
486
|
+
insecureResourceUrls: string[];
|
|
487
|
+
inlineScriptCount: number;
|
|
488
|
+
inlineStyleCount: number;
|
|
489
|
+
missingSriScriptUrls: string[];
|
|
490
|
+
sriCoverage: SriCoverageInfo;
|
|
491
|
+
firstPartyPaths: string[];
|
|
492
|
+
passiveLeakSignals: PassiveLeakSignal[];
|
|
493
|
+
clientExposureSignals: ClientExposureSignal[];
|
|
494
|
+
libraryFingerprints: LibraryFingerprint[];
|
|
495
|
+
libraryRiskSignals: LibraryRiskSignal[];
|
|
496
|
+
frameworkVersionLeaks: FrameworkVersionLeak[];
|
|
497
|
+
suspiciousScriptSignals: SuspiciousScriptSignal[];
|
|
498
|
+
detectedTechnologies: TechnologyResult[];
|
|
499
|
+
aiSurface: AiSurfaceInfo;
|
|
500
|
+
issues: string[];
|
|
501
|
+
strengths: string[];
|
|
502
|
+
}
|
|
503
|
+
export interface AiSurfaceInfo {
|
|
504
|
+
detected: boolean;
|
|
505
|
+
assistantVisible: boolean;
|
|
506
|
+
aiPageSignals: string[];
|
|
507
|
+
vendors: Array<{
|
|
508
|
+
name: string;
|
|
509
|
+
evidence: string;
|
|
510
|
+
category: "ai_vendor" | "support_automation" | "assistant_ui";
|
|
511
|
+
confidence: IssueConfidence;
|
|
512
|
+
}>;
|
|
513
|
+
discoveredPaths: string[];
|
|
514
|
+
disclosures: string[];
|
|
515
|
+
privacySignals: string[];
|
|
516
|
+
governanceSignals: string[];
|
|
517
|
+
issues: string[];
|
|
518
|
+
strengths: string[];
|
|
519
|
+
}
|
|
520
|
+
export interface ThirdPartyProvider {
|
|
521
|
+
domain: string;
|
|
522
|
+
name: string;
|
|
523
|
+
category: "analytics" | "consent" | "support" | "ai" | "session_replay" | "payments" | "social" | "ads" | "cdn" | "security" | "other";
|
|
524
|
+
risk: "low" | "medium" | "high";
|
|
525
|
+
evidence: string;
|
|
526
|
+
}
|
|
527
|
+
export interface ThirdPartyTrustInfo {
|
|
528
|
+
totalProviders: number;
|
|
529
|
+
highRiskProviders: number;
|
|
530
|
+
providers: ThirdPartyProvider[];
|
|
531
|
+
issues: string[];
|
|
532
|
+
strengths: string[];
|
|
533
|
+
summary: string;
|
|
534
|
+
}
|
|
535
|
+
export interface InfrastructureSignal {
|
|
536
|
+
provider: string;
|
|
537
|
+
category: "cloud" | "cdn" | "edge" | "paas" | "hosting";
|
|
538
|
+
confidence: IssueConfidence;
|
|
539
|
+
source: "dns" | "reverse_dns" | "headers" | "technology";
|
|
540
|
+
evidence: string;
|
|
541
|
+
}
|
|
542
|
+
export interface InfrastructureInfo {
|
|
543
|
+
host: string;
|
|
544
|
+
addresses: string[];
|
|
545
|
+
cnameTargets: string[];
|
|
546
|
+
reverseDns: string[];
|
|
547
|
+
providers: InfrastructureSignal[];
|
|
548
|
+
protocol?: {
|
|
549
|
+
http: "HTTP/1.1" | "HTTP/2" | "HTTP/3" | "unknown";
|
|
550
|
+
http3Advertised: boolean;
|
|
551
|
+
altSvc: string | null;
|
|
552
|
+
};
|
|
553
|
+
waf?: {
|
|
554
|
+
detected: boolean;
|
|
555
|
+
provider: string | null;
|
|
556
|
+
confidence: IssueConfidence;
|
|
557
|
+
evidence: string;
|
|
558
|
+
};
|
|
559
|
+
issues: string[];
|
|
560
|
+
strengths: string[];
|
|
561
|
+
summary: string;
|
|
562
|
+
}
|
|
563
|
+
export interface PassiveIntelligenceSignal {
|
|
564
|
+
category: "technology" | "infrastructure" | "telemetry" | "third_party" | "trust" | "email" | "exposure" | "ai";
|
|
565
|
+
title: string;
|
|
566
|
+
summary: string;
|
|
567
|
+
confidence: IssueConfidence;
|
|
568
|
+
source: "headers" | "dns" | "html" | "asset" | "public_record" | "derived";
|
|
569
|
+
risk: "positive" | "neutral" | "watch" | "attention";
|
|
570
|
+
evidence: string[];
|
|
571
|
+
action: string | null;
|
|
572
|
+
}
|
|
573
|
+
export interface PassiveIntelligenceInfo {
|
|
574
|
+
postureRead: string;
|
|
575
|
+
stackSummary: string;
|
|
576
|
+
telemetrySummary: string;
|
|
577
|
+
trustSummary: string;
|
|
578
|
+
collectionBoundary: string;
|
|
579
|
+
signals: PassiveIntelligenceSignal[];
|
|
580
|
+
issues: string[];
|
|
581
|
+
strengths: string[];
|
|
582
|
+
}
|
|
583
|
+
export interface CompromiseIndicator {
|
|
584
|
+
category: "credential_collection" | "script_anomaly" | "supply_chain" | "infrastructure" | "exposure" | "reputation";
|
|
585
|
+
severity: "info" | "watch" | "warning" | "critical";
|
|
586
|
+
title: string;
|
|
587
|
+
detail: string;
|
|
588
|
+
confidence: IssueConfidence;
|
|
589
|
+
source: "html" | "asset" | "dns" | "ct" | "public_record" | "reputation" | "derived";
|
|
590
|
+
evidence: string[];
|
|
591
|
+
action: string | null;
|
|
592
|
+
}
|
|
593
|
+
export interface ReputationCheckSummary {
|
|
594
|
+
provider: "google_safe_browsing" | "google_web_risk" | "urlhaus" | "virustotal";
|
|
595
|
+
status: "not_configured" | "not_checked" | "clean" | "flagged" | "error";
|
|
596
|
+
summary: string;
|
|
597
|
+
}
|
|
598
|
+
export interface CompromiseSignalsInfo {
|
|
599
|
+
posture: "no_public_ioc" | "review_recommended" | "suspicious" | "reputation_flagged" | "not_assessed";
|
|
600
|
+
summary: string;
|
|
601
|
+
indicators: CompromiseIndicator[];
|
|
602
|
+
reputationChecks: ReputationCheckSummary[];
|
|
603
|
+
issues: string[];
|
|
604
|
+
strengths: string[];
|
|
605
|
+
collectionBoundary: string;
|
|
606
|
+
}
|
|
607
|
+
export interface ExecutiveSummaryInfo {
|
|
608
|
+
overview: string;
|
|
609
|
+
mainRisk: string;
|
|
610
|
+
posture: "strong" | "mixed" | "weak";
|
|
611
|
+
takeaways: string[];
|
|
612
|
+
}
|
|
613
|
+
export interface ScoreDriver {
|
|
614
|
+
areaKey: "edge" | "content" | "domain" | "exposure" | "api" | "trust" | "ai" | "overall";
|
|
615
|
+
areaLabel: string;
|
|
616
|
+
impact: number;
|
|
617
|
+
label: string;
|
|
618
|
+
detail: string;
|
|
619
|
+
source: "headers" | "tls" | "cookies" | "dns" | "html" | "public_record" | "third_party" | "ai" | "availability" | "breadth" | "assessment_limit";
|
|
620
|
+
}
|
|
621
|
+
export interface AssessmentLimitation {
|
|
622
|
+
limited: boolean;
|
|
623
|
+
kind: "blocked_edge_response" | "auth_required" | "rate_limited" | "service_unavailable" | "other" | null;
|
|
624
|
+
title: string | null;
|
|
625
|
+
detail: string | null;
|
|
626
|
+
}
|
|
627
|
+
export interface ScanTimingInfo {
|
|
628
|
+
totalMs: number;
|
|
629
|
+
coreMs: number;
|
|
630
|
+
enrichmentMs: number;
|
|
631
|
+
timedOut: boolean;
|
|
632
|
+
timeoutMs: number | null;
|
|
633
|
+
}
|
|
634
|
+
export interface ExposureProbe {
|
|
635
|
+
label: string;
|
|
636
|
+
path: string;
|
|
637
|
+
statusCode: number;
|
|
638
|
+
finalUrl: string;
|
|
639
|
+
finding: "safe" | "interesting" | "blocked" | "exposed" | "error";
|
|
640
|
+
detail: string;
|
|
641
|
+
}
|
|
642
|
+
export interface ExposureSummary {
|
|
643
|
+
probes: ExposureProbe[];
|
|
644
|
+
issues: string[];
|
|
645
|
+
strengths: string[];
|
|
646
|
+
}
|
|
647
|
+
export interface CorsSecurityInfo {
|
|
648
|
+
allowedOrigin: string | null;
|
|
649
|
+
allowCredentials: string | null;
|
|
650
|
+
allowMethods: string[];
|
|
651
|
+
allowHeaders: string[];
|
|
652
|
+
allowPrivateNetwork: string | null;
|
|
653
|
+
vary: string | null;
|
|
654
|
+
optionsStatus: number;
|
|
655
|
+
issues: string[];
|
|
656
|
+
strengths: string[];
|
|
657
|
+
}
|
|
658
|
+
export interface ApiSurfaceProbe {
|
|
659
|
+
label: string;
|
|
660
|
+
path: string;
|
|
661
|
+
statusCode: number;
|
|
662
|
+
finalUrl: string;
|
|
663
|
+
classification: "absent" | "public" | "restricted" | "interesting" | "fallback" | "error";
|
|
664
|
+
contentType: string | null;
|
|
665
|
+
detail: string;
|
|
666
|
+
}
|
|
667
|
+
export interface ApiSurfaceInfo {
|
|
668
|
+
probes: ApiSurfaceProbe[];
|
|
669
|
+
issues: string[];
|
|
670
|
+
strengths: string[];
|
|
671
|
+
}
|
|
672
|
+
export interface PublicSignalsInfo {
|
|
673
|
+
hstsPreload: {
|
|
674
|
+
status: "preloaded" | "pending" | "eligible" | "not_preloaded" | "unknown";
|
|
675
|
+
summary: string;
|
|
676
|
+
sourceUrl: string;
|
|
677
|
+
};
|
|
678
|
+
issues: string[];
|
|
679
|
+
strengths: string[];
|
|
680
|
+
}
|
|
681
|
+
export interface AnalysisResult {
|
|
682
|
+
inputUrl: string;
|
|
683
|
+
normalizedUrl: string;
|
|
684
|
+
finalUrl: string;
|
|
685
|
+
host: string;
|
|
686
|
+
scannedAt: string;
|
|
687
|
+
responseTimeMs: number;
|
|
688
|
+
statusCode: number;
|
|
689
|
+
score: number;
|
|
690
|
+
grade: string;
|
|
691
|
+
summary: string;
|
|
692
|
+
headers: SecurityHeaderResult[];
|
|
693
|
+
rawHeaders: Record<string, string>;
|
|
694
|
+
cookies: CookieResult[];
|
|
695
|
+
cookieAnalysis: CookieAnalysisInfo | null;
|
|
696
|
+
technologies: TechnologyResult[];
|
|
697
|
+
certificate: CertificateResult;
|
|
698
|
+
redirects: RedirectHop[];
|
|
699
|
+
redirectChain: RedirectChainInfo;
|
|
700
|
+
issues: ScanIssue[];
|
|
701
|
+
strengths: string[];
|
|
702
|
+
remediation: RemediationSnippet[];
|
|
703
|
+
remediationPlan?: RemediationPlan;
|
|
704
|
+
crawl: CrawlSummary;
|
|
705
|
+
securityTxt: SecurityTxtInfo;
|
|
706
|
+
domainSecurity: DomainSecurityInfo;
|
|
707
|
+
identityProvider: IdentityProviderInfo;
|
|
708
|
+
ctDiscovery: CtDiscoveryInfo;
|
|
709
|
+
htmlSecurity: HtmlSecurityInfo;
|
|
710
|
+
aiSurface: AiSurfaceInfo;
|
|
711
|
+
thirdPartyTrust: ThirdPartyTrustInfo;
|
|
712
|
+
infrastructure: InfrastructureInfo;
|
|
713
|
+
passiveIntelligence: PassiveIntelligenceInfo;
|
|
714
|
+
compromiseSignals: CompromiseSignalsInfo;
|
|
715
|
+
executiveSummary: ExecutiveSummaryInfo;
|
|
716
|
+
scoreDrivers?: ScoreDriver[];
|
|
717
|
+
assessmentLimitation: AssessmentLimitation;
|
|
718
|
+
exposure: ExposureSummary;
|
|
719
|
+
corsSecurity: CorsSecurityInfo;
|
|
720
|
+
apiSurface: ApiSurfaceInfo;
|
|
721
|
+
publicSignals: PublicSignalsInfo;
|
|
722
|
+
wafFingerprint: WafFingerprintInfo;
|
|
723
|
+
scanTiming?: ScanTimingInfo;
|
|
724
|
+
}
|
|
725
|
+
export interface AnalyzeTargetOptions {
|
|
726
|
+
includeCertificate?: boolean;
|
|
727
|
+
maxScanDurationMs?: number;
|
|
728
|
+
requestTimeoutMs?: number;
|
|
729
|
+
scanMode?: "standard" | "quiet" | "deep-passive";
|
|
730
|
+
}
|