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
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
const GRADE_ORDER = new Map([
|
|
2
|
+
["A", 0],
|
|
3
|
+
["B", 1],
|
|
4
|
+
["C", 2],
|
|
5
|
+
["D", 3],
|
|
6
|
+
["E", 4],
|
|
7
|
+
["F", 5],
|
|
8
|
+
]);
|
|
9
|
+
function normalizeGrade(grade) {
|
|
10
|
+
if (!grade) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
const normalized = grade.trim().toUpperCase().slice(0, 1);
|
|
14
|
+
return GRADE_ORDER.has(normalized) ? normalized : null;
|
|
15
|
+
}
|
|
16
|
+
function compareGrades(currentGrade, previousGrade) {
|
|
17
|
+
const current = normalizeGrade(currentGrade);
|
|
18
|
+
const previous = normalizeGrade(previousGrade);
|
|
19
|
+
if (!current || !previous) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return (GRADE_ORDER.get(current) ?? 0) - (GRADE_ORDER.get(previous) ?? 0);
|
|
23
|
+
}
|
|
24
|
+
function scoreRegressionSeverity(delta) {
|
|
25
|
+
if (delta <= -25) {
|
|
26
|
+
return "critical";
|
|
27
|
+
}
|
|
28
|
+
if (delta <= -10) {
|
|
29
|
+
return "warning";
|
|
30
|
+
}
|
|
31
|
+
return "info";
|
|
32
|
+
}
|
|
33
|
+
function pushEvent(events, event) {
|
|
34
|
+
events.push(event);
|
|
35
|
+
}
|
|
36
|
+
export function buildPostureRiskEventsFromDiff(diff) {
|
|
37
|
+
if (!diff) {
|
|
38
|
+
return [];
|
|
39
|
+
}
|
|
40
|
+
const events = [];
|
|
41
|
+
const scoreDelta = typeof diff.scoreDelta === "number" ? diff.scoreDelta : null;
|
|
42
|
+
if (scoreDelta !== null && scoreDelta < 0) {
|
|
43
|
+
pushEvent(events, {
|
|
44
|
+
eventType: "score_regressed",
|
|
45
|
+
severity: scoreRegressionSeverity(scoreDelta),
|
|
46
|
+
title: "Score regressed",
|
|
47
|
+
detail: `The posture score dropped by ${Math.abs(scoreDelta)} point${Math.abs(scoreDelta) === 1 ? "" : "s"}.`,
|
|
48
|
+
metadata: {
|
|
49
|
+
previousScore: diff.previousScore,
|
|
50
|
+
scoreDelta,
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
const gradeDelta = compareGrades(diff.currentGrade, diff.previousGrade);
|
|
55
|
+
if (gradeDelta !== null && gradeDelta > 0) {
|
|
56
|
+
pushEvent(events, {
|
|
57
|
+
eventType: "grade_dropped",
|
|
58
|
+
severity: gradeDelta >= 2 ? "critical" : "warning",
|
|
59
|
+
title: "Grade dropped",
|
|
60
|
+
detail: `The posture grade changed from ${diff.previousGrade} to ${diff.currentGrade}.`,
|
|
61
|
+
metadata: {
|
|
62
|
+
previousGrade: diff.previousGrade,
|
|
63
|
+
currentGrade: diff.currentGrade,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
if (diff.statusCodeDelta && diff.statusCodeDelta.from !== diff.statusCodeDelta.to) {
|
|
68
|
+
pushEvent(events, {
|
|
69
|
+
eventType: "status_code_changed",
|
|
70
|
+
severity: "info",
|
|
71
|
+
title: "HTTP status changed",
|
|
72
|
+
detail: `The HTTP status changed from ${diff.statusCodeDelta.from} to ${diff.statusCodeDelta.to}.`,
|
|
73
|
+
metadata: diff.statusCodeDelta,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
const certDelta = diff.certificateDaysRemainingDelta;
|
|
77
|
+
if (certDelta && typeof certDelta.to === "number" && certDelta.to <= 14) {
|
|
78
|
+
pushEvent(events, {
|
|
79
|
+
eventType: "certificate_expiring_soon",
|
|
80
|
+
severity: certDelta.to <= 7 ? "critical" : "warning",
|
|
81
|
+
title: "Certificate expires soon",
|
|
82
|
+
detail: `The certificate has ${certDelta.to} day${certDelta.to === 1 ? "" : "s"} remaining.`,
|
|
83
|
+
metadata: certDelta,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
else if (certDelta && typeof certDelta.delta === "number" && certDelta.delta <= -30) {
|
|
87
|
+
pushEvent(events, {
|
|
88
|
+
eventType: "certificate_window_shortened",
|
|
89
|
+
severity: "warning",
|
|
90
|
+
title: "Certificate window shortened",
|
|
91
|
+
detail: `The certificate validity window shortened by ${Math.abs(certDelta.delta)} days.`,
|
|
92
|
+
metadata: certDelta,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
const removedHeaders = diff.headerChanges.filter((change) => ["pass", "present"].includes(change.from) && change.to !== change.from);
|
|
96
|
+
if (removedHeaders.length) {
|
|
97
|
+
pushEvent(events, {
|
|
98
|
+
eventType: "security_header_regressed",
|
|
99
|
+
severity: "warning",
|
|
100
|
+
title: "Security headers regressed",
|
|
101
|
+
detail: `${removedHeaders.length} security header${removedHeaders.length === 1 ? "" : "s"} moved away from a passing state.`,
|
|
102
|
+
metadata: {
|
|
103
|
+
headers: removedHeaders,
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
if (diff.wafProviderChanges.removedProviders.length) {
|
|
108
|
+
pushEvent(events, {
|
|
109
|
+
eventType: "waf_signal_removed",
|
|
110
|
+
severity: "warning",
|
|
111
|
+
title: "WAF or edge signal disappeared",
|
|
112
|
+
detail: `Previously observed WAF or edge signals disappeared: ${diff.wafProviderChanges.removedProviders.join(", ")}.`,
|
|
113
|
+
metadata: {
|
|
114
|
+
removedProviders: diff.wafProviderChanges.removedProviders,
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
if (diff.ctPriorityHostChanges.newHosts.length) {
|
|
119
|
+
pushEvent(events, {
|
|
120
|
+
eventType: "new_ct_priority_hosts",
|
|
121
|
+
severity: "info",
|
|
122
|
+
title: "New CT hosts observed",
|
|
123
|
+
detail: `New high-priority certificate transparency hosts appeared: ${diff.ctPriorityHostChanges.newHosts.join(", ")}.`,
|
|
124
|
+
metadata: {
|
|
125
|
+
newHosts: diff.ctPriorityHostChanges.newHosts,
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
if (diff.identityProviderChange) {
|
|
130
|
+
pushEvent(events, {
|
|
131
|
+
eventType: "identity_provider_changed",
|
|
132
|
+
severity: "info",
|
|
133
|
+
title: "Identity provider changed",
|
|
134
|
+
detail: `Identity provider changed from ${diff.identityProviderChange.from ?? "none"} to ${diff.identityProviderChange.to ?? "none"}.`,
|
|
135
|
+
metadata: diff.identityProviderChange,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
if (diff.newThirdPartyProviders.length) {
|
|
139
|
+
pushEvent(events, {
|
|
140
|
+
eventType: "new_third_party_providers",
|
|
141
|
+
severity: "info",
|
|
142
|
+
title: "New third-party providers observed",
|
|
143
|
+
detail: `New third-party providers were observed: ${diff.newThirdPartyProviders.join(", ")}.`,
|
|
144
|
+
metadata: {
|
|
145
|
+
newProviders: diff.newThirdPartyProviders,
|
|
146
|
+
},
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
if (diff.newAiVendors.length) {
|
|
150
|
+
pushEvent(events, {
|
|
151
|
+
eventType: "new_ai_vendors",
|
|
152
|
+
severity: "info",
|
|
153
|
+
title: "New AI vendors observed",
|
|
154
|
+
detail: `New AI vendors were observed: ${diff.newAiVendors.join(", ")}.`,
|
|
155
|
+
metadata: {
|
|
156
|
+
newVendors: diff.newAiVendors,
|
|
157
|
+
},
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
return events;
|
|
161
|
+
}
|
|
162
|
+
export function buildPostureRiskEventsFromSnapshots(current, previous, diff) {
|
|
163
|
+
const events = buildPostureRiskEventsFromDiff(diff);
|
|
164
|
+
const previousCriticalIssues = new Set(previous.issues
|
|
165
|
+
.filter((issue) => issue.severity === "critical")
|
|
166
|
+
.map((issue) => issue.title));
|
|
167
|
+
const newCriticalIssues = current.issues
|
|
168
|
+
.filter((issue) => issue.severity === "critical" && !previousCriticalIssues.has(issue.title))
|
|
169
|
+
.map((issue) => ({
|
|
170
|
+
title: issue.title,
|
|
171
|
+
detail: issue.detail,
|
|
172
|
+
confidence: issue.confidence,
|
|
173
|
+
source: issue.source,
|
|
174
|
+
}));
|
|
175
|
+
if (newCriticalIssues.length) {
|
|
176
|
+
events.unshift({
|
|
177
|
+
eventType: "new_critical_findings",
|
|
178
|
+
severity: "critical",
|
|
179
|
+
title: "New critical findings",
|
|
180
|
+
detail: `${newCriticalIssues.length} new critical finding${newCriticalIssues.length === 1 ? "" : "s"} appeared.`,
|
|
181
|
+
metadata: {
|
|
182
|
+
issues: newCriticalIssues,
|
|
183
|
+
},
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
return events;
|
|
187
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export declare const REQUEST_TIMEOUT_MS = 12000;
|
|
2
|
+
export declare const SECONDARY_REQUEST_TIMEOUT_MS = 4000;
|
|
3
|
+
export declare const MAX_SCAN_DURATION_MS = 45000;
|
|
4
|
+
export declare const TLS_HANDSHAKE_TIMEOUT_MS = 10000;
|
|
5
|
+
export declare const DNS_LOOKUP_TIMEOUT_MS = 2500;
|
|
6
|
+
export declare const TEXT_BODY_LIMIT = 256000;
|
|
7
|
+
export declare const HTML_SIGNATURE_LIMIT = 280;
|
|
8
|
+
export declare const DISCOVERY_PATH_LIMIT = 10;
|
|
9
|
+
export declare const SUMMARY_EVIDENCE_LIMIT = 3;
|
|
10
|
+
export declare const CLIENT_EXPOSURE_EVIDENCE_LIMIT = 6;
|
|
11
|
+
export declare const LIBRARY_RISK_LOOKUP_LIMIT = 8;
|
|
12
|
+
export declare const OSV_QUERY_TIMEOUT_MS = 3000;
|
|
13
|
+
export declare const OSV_DETAIL_LOOKUP_LIMIT = 12;
|
|
14
|
+
export declare const CT_LOOKUP_TIMEOUT_MS = 1500;
|
|
15
|
+
export declare const CT_CACHE_TTL_MS: number;
|
|
16
|
+
export declare const CT_SUBDOMAIN_LIMIT = 20;
|
|
17
|
+
export declare const CT_WILDCARD_LIMIT = 5;
|
|
18
|
+
export declare const CT_SAMPLE_LIMIT = 4;
|
|
19
|
+
export declare const CT_SAMPLE_CONCURRENCY_LIMIT = 2;
|
|
20
|
+
export declare const OIDC_DISCOVERY_TIMEOUT_MS = 4000;
|
|
21
|
+
export declare const CRAWL_CONCURRENCY_LIMIT = 2;
|
|
22
|
+
export declare const CRAWL_PAGE_LIMIT = 6;
|
|
23
|
+
export declare const OSV_DETAIL_CONCURRENCY_LIMIT = 3;
|
|
24
|
+
export declare const DEEP_PASSIVE_SCAN_TIMEOUT_MS = 75000;
|
|
25
|
+
export declare const DEEP_PASSIVE_CT_SUBDOMAIN_LIMIT = 50;
|
|
26
|
+
export declare const DEEP_PASSIVE_CT_WILDCARD_LIMIT = 10;
|
|
27
|
+
export declare const DEEP_PASSIVE_CT_SAMPLE_LIMIT = 10;
|
|
28
|
+
export declare const DEEP_PASSIVE_CRAWL_PAGE_LIMIT = 10;
|
|
29
|
+
export declare const REDIRECT_LIMIT = 5;
|
|
30
|
+
export declare const CRAWL_CANDIDATES: {
|
|
31
|
+
label: string;
|
|
32
|
+
path: string;
|
|
33
|
+
}[];
|
|
34
|
+
export declare const EXPOSURE_PROBES: {
|
|
35
|
+
label: string;
|
|
36
|
+
path: string;
|
|
37
|
+
}[];
|
|
38
|
+
export declare const DEEP_PASSIVE_EXPOSURE_PROBES: {
|
|
39
|
+
label: string;
|
|
40
|
+
path: string;
|
|
41
|
+
}[];
|
|
42
|
+
export declare const API_SURFACE_PROBES: {
|
|
43
|
+
label: string;
|
|
44
|
+
path: string;
|
|
45
|
+
}[];
|
|
46
|
+
export declare const DEEP_PASSIVE_API_SURFACE_PROBES: {
|
|
47
|
+
label: string;
|
|
48
|
+
path: string;
|
|
49
|
+
}[];
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// Network and parsing limits are intentionally conservative because this package
|
|
2
|
+
// is designed for low-noise, best-effort external posture analysis rather than
|
|
3
|
+
// deep crawling or full content retrieval.
|
|
4
|
+
export const REQUEST_TIMEOUT_MS = 12_000;
|
|
5
|
+
export const SECONDARY_REQUEST_TIMEOUT_MS = 4_000;
|
|
6
|
+
export const MAX_SCAN_DURATION_MS = 45_000;
|
|
7
|
+
export const TLS_HANDSHAKE_TIMEOUT_MS = 10_000;
|
|
8
|
+
export const DNS_LOOKUP_TIMEOUT_MS = 2_500;
|
|
9
|
+
// Cap fetched text bodies so block pages or giant responses do not dominate
|
|
10
|
+
// memory use or slow downstream passive analysis.
|
|
11
|
+
export const TEXT_BODY_LIMIT = 256_000;
|
|
12
|
+
// Keep HTML signatures small because they are only used for lightweight
|
|
13
|
+
// fallback detection, not content comparison.
|
|
14
|
+
export const HTML_SIGNATURE_LIMIT = 280;
|
|
15
|
+
// Discovery and evidence limits are intentionally short to keep passive
|
|
16
|
+
// reporting readable and avoid over-claiming from noisy pages.
|
|
17
|
+
export const DISCOVERY_PATH_LIMIT = 10;
|
|
18
|
+
export const SUMMARY_EVIDENCE_LIMIT = 3;
|
|
19
|
+
export const CLIENT_EXPOSURE_EVIDENCE_LIMIT = 6;
|
|
20
|
+
export const LIBRARY_RISK_LOOKUP_LIMIT = 8;
|
|
21
|
+
export const OSV_QUERY_TIMEOUT_MS = 3_000;
|
|
22
|
+
export const OSV_DETAIL_LOOKUP_LIMIT = 12;
|
|
23
|
+
export const CT_LOOKUP_TIMEOUT_MS = 1_500;
|
|
24
|
+
export const CT_CACHE_TTL_MS = 15 * 60 * 1_000;
|
|
25
|
+
export const CT_SUBDOMAIN_LIMIT = 20;
|
|
26
|
+
export const CT_WILDCARD_LIMIT = 5;
|
|
27
|
+
export const CT_SAMPLE_LIMIT = 4;
|
|
28
|
+
export const CT_SAMPLE_CONCURRENCY_LIMIT = 2;
|
|
29
|
+
export const OIDC_DISCOVERY_TIMEOUT_MS = 4_000;
|
|
30
|
+
export const CRAWL_CONCURRENCY_LIMIT = 2;
|
|
31
|
+
export const CRAWL_PAGE_LIMIT = 6;
|
|
32
|
+
export const OSV_DETAIL_CONCURRENCY_LIMIT = 3;
|
|
33
|
+
export const DEEP_PASSIVE_SCAN_TIMEOUT_MS = 75_000;
|
|
34
|
+
export const DEEP_PASSIVE_CT_SUBDOMAIN_LIMIT = 50;
|
|
35
|
+
export const DEEP_PASSIVE_CT_WILDCARD_LIMIT = 10;
|
|
36
|
+
export const DEEP_PASSIVE_CT_SAMPLE_LIMIT = 10;
|
|
37
|
+
export const DEEP_PASSIVE_CRAWL_PAGE_LIMIT = 10;
|
|
38
|
+
// Redirect following stays shallow to reduce SSRF risk and keep scans close to
|
|
39
|
+
// normal browser behavior.
|
|
40
|
+
export const REDIRECT_LIMIT = 5;
|
|
41
|
+
export const CRAWL_CANDIDATES = [
|
|
42
|
+
{ label: "Homepage", path: "/" },
|
|
43
|
+
{ label: "Login", path: "/login" },
|
|
44
|
+
{ label: "App", path: "/app" },
|
|
45
|
+
{ label: "Dashboard", path: "/dashboard" },
|
|
46
|
+
{ label: "Admin", path: "/admin" },
|
|
47
|
+
{ label: "API root", path: "/api" },
|
|
48
|
+
];
|
|
49
|
+
export const EXPOSURE_PROBES = [
|
|
50
|
+
{ label: "Robots", path: "/robots.txt" },
|
|
51
|
+
{ label: "Sitemap", path: "/sitemap.xml" },
|
|
52
|
+
{ label: "Git metadata", path: "/.git/HEAD" },
|
|
53
|
+
{ label: "Environment file", path: "/.env" },
|
|
54
|
+
];
|
|
55
|
+
export const DEEP_PASSIVE_EXPOSURE_PROBES = [
|
|
56
|
+
...EXPOSURE_PROBES,
|
|
57
|
+
{ label: "Well-known security", path: "/.well-known/security.txt" },
|
|
58
|
+
{ label: "OpenID configuration", path: "/.well-known/openid-configuration" },
|
|
59
|
+
{ label: "OAuth metadata", path: "/.well-known/oauth-authorization-server" },
|
|
60
|
+
{ label: "Change password", path: "/.well-known/change-password" },
|
|
61
|
+
{ label: "Humans", path: "/humans.txt" },
|
|
62
|
+
{ label: "Ads", path: "/ads.txt" },
|
|
63
|
+
{ label: "Server status", path: "/server-status" },
|
|
64
|
+
{ label: "WordPress API", path: "/wp-json" },
|
|
65
|
+
];
|
|
66
|
+
export const API_SURFACE_PROBES = [
|
|
67
|
+
{ label: "API root", path: "/api" },
|
|
68
|
+
{ label: "GraphQL", path: "/graphql" },
|
|
69
|
+
{ label: "Versioned API", path: "/api/v1" },
|
|
70
|
+
];
|
|
71
|
+
export const DEEP_PASSIVE_API_SURFACE_PROBES = [
|
|
72
|
+
...API_SURFACE_PROBES,
|
|
73
|
+
{ label: "OpenAPI", path: "/openapi.json" },
|
|
74
|
+
{ label: "Swagger", path: "/swagger.json" },
|
|
75
|
+
{ label: "API docs", path: "/api-docs" },
|
|
76
|
+
{ label: "Docs", path: "/docs" },
|
|
77
|
+
{ label: "REST", path: "/rest" },
|
|
78
|
+
{ label: "RPC", path: "/rpc" },
|
|
79
|
+
];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { AnalysisResult, CertificateResult, CookieResult, RedirectHop, ScoreDriver, SecurityHeaderResult } from "./types.js";
|
|
2
|
+
export type PostureAreaKey = "edge" | "content" | "domain" | "exposure" | "api" | "trust" | "ai";
|
|
3
|
+
export interface PostureAreaScore {
|
|
4
|
+
key: PostureAreaKey;
|
|
5
|
+
label: string;
|
|
6
|
+
score: number;
|
|
7
|
+
status: "strong" | "watch" | "weak";
|
|
8
|
+
}
|
|
9
|
+
type PostureScoringInput = Omit<AnalysisResult, "executiveSummary"> & {
|
|
10
|
+
executiveSummary?: AnalysisResult["executiveSummary"];
|
|
11
|
+
};
|
|
12
|
+
export declare function gradeForScore(score: number): string;
|
|
13
|
+
export declare function scoreAnalysis({ isHttps, headerResults, certificate, cookies, redirects, limitedResponse, }: {
|
|
14
|
+
isHttps: boolean;
|
|
15
|
+
headerResults: SecurityHeaderResult[];
|
|
16
|
+
certificate: CertificateResult;
|
|
17
|
+
cookies: CookieResult[];
|
|
18
|
+
redirects: RedirectHop[];
|
|
19
|
+
limitedResponse?: boolean;
|
|
20
|
+
}): {
|
|
21
|
+
score: number;
|
|
22
|
+
grade: string;
|
|
23
|
+
};
|
|
24
|
+
export declare function getPostureAreaScores(analysis: PostureScoringInput): PostureAreaScore[];
|
|
25
|
+
export declare function getPostureScoreDrivers(analysis: PostureScoringInput): ScoreDriver[];
|
|
26
|
+
export declare function scorePostureAnalysis(analysis: PostureScoringInput): {
|
|
27
|
+
score: number;
|
|
28
|
+
grade: string;
|
|
29
|
+
scoreDrivers: ScoreDriver[];
|
|
30
|
+
};
|
|
31
|
+
export declare function summarizePostureGrade(grade: string): string;
|
|
32
|
+
export {};
|