@cclabsnz/sf-audit 1.0.1 → 1.1.0
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/README.md +75 -0
- package/lib/api/ToolingClientImpl.js +5 -2
- package/lib/chains/AttackChain.d.ts +20 -0
- package/lib/chains/AttackChain.js +2 -0
- package/lib/chains/Capability.d.ts +7 -0
- package/lib/chains/Capability.js +11 -0
- package/lib/chains/CapabilityRegistry.d.ts +18 -0
- package/lib/chains/CapabilityRegistry.js +53 -0
- package/lib/chains/ChainEngine.d.ts +13 -0
- package/lib/chains/ChainEngine.js +137 -0
- package/lib/chains/namedChains.d.ts +14 -0
- package/lib/chains/namedChains.js +99 -0
- package/lib/checks/CheckEngine.js +33 -5
- package/lib/checks/impl/AnonymousApexAuditCheck.d.ts +10 -0
- package/lib/checks/impl/AnonymousApexAuditCheck.js +106 -0
- package/lib/checks/impl/ApexCrudFLSCheck.d.ts +11 -0
- package/lib/checks/impl/ApexCrudFLSCheck.js +98 -0
- package/lib/checks/impl/ApexLoggingCheck.d.ts +11 -0
- package/lib/checks/impl/ApexLoggingCheck.js +124 -0
- package/lib/checks/impl/ApexRestEndpointCheck.d.ts +11 -0
- package/lib/checks/impl/ApexRestEndpointCheck.js +94 -0
- package/lib/checks/impl/ApexSharingCheck.js +29 -0
- package/lib/checks/impl/ApiClientPermissionCheck.d.ts +10 -0
- package/lib/checks/impl/ApiClientPermissionCheck.js +59 -0
- package/lib/checks/impl/AuditTrailCheck.js +29 -0
- package/lib/checks/impl/CertificateExpiryCheck.d.ts +10 -0
- package/lib/checks/impl/CertificateExpiryCheck.js +123 -0
- package/lib/checks/impl/CodeSecurityCheck.d.ts +2 -1
- package/lib/checks/impl/CodeSecurityCheck.js +46 -6
- package/lib/checks/impl/ConnectedAppInactivityCheck.d.ts +11 -0
- package/lib/checks/impl/ConnectedAppInactivityCheck.js +86 -0
- package/lib/checks/impl/ConnectedAppScopeCheck.d.ts +10 -0
- package/lib/checks/impl/ConnectedAppScopeCheck.js +125 -0
- package/lib/checks/impl/ConnectedAppsCheck.d.ts +1 -0
- package/lib/checks/impl/ConnectedAppsCheck.js +37 -2
- package/lib/checks/impl/ContentLinksCheck.d.ts +10 -0
- package/lib/checks/impl/ContentLinksCheck.js +115 -0
- package/lib/checks/impl/CorsAllowlistCheck.d.ts +10 -0
- package/lib/checks/impl/CorsAllowlistCheck.js +80 -0
- package/lib/checks/impl/CspTrustedSitesCheck.d.ts +10 -0
- package/lib/checks/impl/CspTrustedSitesCheck.js +55 -0
- package/lib/checks/impl/CustomLabelsCredentialCheck.d.ts +10 -0
- package/lib/checks/impl/CustomLabelsCredentialCheck.js +97 -0
- package/lib/checks/impl/DataClassificationCheck.d.ts +10 -0
- package/lib/checks/impl/DataClassificationCheck.js +112 -0
- package/lib/checks/impl/DebugLogAccessCheck.d.ts +10 -0
- package/lib/checks/impl/DebugLogAccessCheck.js +81 -0
- package/lib/checks/impl/DeploymentIdentityCheck.d.ts +11 -0
- package/lib/checks/impl/DeploymentIdentityCheck.js +144 -0
- package/lib/checks/impl/EnhancedDomainsCheck.d.ts +10 -0
- package/lib/checks/impl/EnhancedDomainsCheck.js +84 -0
- package/lib/checks/impl/EscalationPermsCheck.d.ts +10 -0
- package/lib/checks/impl/EscalationPermsCheck.js +77 -0
- package/lib/checks/impl/EventMonitoringCheck.d.ts +11 -0
- package/lib/checks/impl/EventMonitoringCheck.js +84 -0
- package/lib/checks/impl/ExperienceCloudSiteCheck.d.ts +10 -0
- package/lib/checks/impl/ExperienceCloudSiteCheck.js +91 -0
- package/lib/checks/impl/FailedLoginCheck.d.ts +10 -0
- package/lib/checks/impl/FailedLoginCheck.js +122 -0
- package/lib/checks/impl/FieldHistoryTrackingCheck.d.ts +10 -0
- package/lib/checks/impl/FieldHistoryTrackingCheck.js +70 -0
- package/lib/checks/impl/FieldLevelSecurityCheck.js +28 -18
- package/lib/checks/impl/GuestExecutableApexCheck.d.ts +11 -0
- package/lib/checks/impl/GuestExecutableApexCheck.js +93 -0
- package/lib/checks/impl/GuestUserAccessCheck.js +74 -66
- package/lib/checks/impl/HardcodedCredentialsCheck.js +2 -2
- package/lib/checks/impl/HighAssuranceSessionCheck.d.ts +10 -0
- package/lib/checks/impl/HighAssuranceSessionCheck.js +103 -0
- package/lib/checks/impl/InactiveUsersCheck.js +38 -19
- package/lib/checks/impl/InstalledPackagesCheck.d.ts +10 -0
- package/lib/checks/impl/InstalledPackagesCheck.js +94 -0
- package/lib/checks/impl/IntegrationUsersCheck.d.ts +10 -0
- package/lib/checks/impl/IntegrationUsersCheck.js +108 -0
- package/lib/checks/impl/InternalUserMfaCheck.d.ts +10 -0
- package/lib/checks/impl/InternalUserMfaCheck.js +81 -0
- package/lib/checks/impl/IpRestrictionsCheck.js +86 -23
- package/lib/checks/impl/LegacyApiVersionCheck.d.ts +10 -0
- package/lib/checks/impl/LegacyApiVersionCheck.js +91 -0
- package/lib/checks/impl/MfaEnforcementCheck.d.ts +10 -0
- package/lib/checks/impl/MfaEnforcementCheck.js +76 -0
- package/lib/checks/impl/MfaMethodStrengthCheck.d.ts +11 -0
- package/lib/checks/impl/MfaMethodStrengthCheck.js +116 -0
- package/lib/checks/impl/MfaRegistrationCheck.d.ts +11 -0
- package/lib/checks/impl/MfaRegistrationCheck.js +95 -0
- package/lib/checks/impl/MyDomainLoginPolicyCheck.d.ts +10 -0
- package/lib/checks/impl/MyDomainLoginPolicyCheck.js +105 -0
- package/lib/checks/impl/NamedCredentialsCheck.js +37 -2
- package/lib/checks/impl/PermissionsCheck.js +67 -14
- package/lib/checks/impl/PublicGroupSharingCheck.js +20 -9
- package/lib/checks/impl/ReleaseUpdatesCheck.d.ts +10 -0
- package/lib/checks/impl/ReleaseUpdatesCheck.js +106 -0
- package/lib/checks/impl/ReportFolderAccessCheck.d.ts +10 -0
- package/lib/checks/impl/ReportFolderAccessCheck.js +54 -0
- package/lib/checks/impl/ScheduledApexCheck.d.ts +1 -0
- package/lib/checks/impl/ScheduledApexCheck.js +3 -0
- package/lib/checks/impl/SharingModelCheck.d.ts +1 -1
- package/lib/checks/impl/SharingModelCheck.js +103 -32
- package/lib/checks/impl/SiemIntegrationCheck.d.ts +11 -0
- package/lib/checks/impl/SiemIntegrationCheck.js +102 -0
- package/lib/checks/impl/SsoEnforcementCheck.d.ts +10 -0
- package/lib/checks/impl/SsoEnforcementCheck.js +90 -0
- package/lib/checks/impl/StandardProfilesCheck.d.ts +10 -0
- package/lib/checks/impl/StandardProfilesCheck.js +68 -0
- package/lib/checks/impl/TransactionSecurityPolicyCheck.d.ts +10 -0
- package/lib/checks/impl/TransactionSecurityPolicyCheck.js +62 -0
- package/lib/checks/impl/TrustedIPRangesCheck.d.ts +10 -0
- package/lib/checks/impl/TrustedIPRangesCheck.js +106 -0
- package/lib/checks/impl/UsersAndAdminsCheck.js +50 -20
- package/lib/checks/impl/VisualforceXssCheck.d.ts +11 -0
- package/lib/checks/impl/VisualforceXssCheck.js +150 -0
- package/lib/checks/registry.js +97 -12
- package/lib/commands/audit/diff.d.ts +17 -0
- package/lib/commands/audit/diff.js +76 -0
- package/lib/commands/audit/history.d.ts +15 -0
- package/lib/commands/audit/history.js +59 -0
- package/lib/commands/audit/security.js +6 -6
- package/lib/context/AuditCache.d.ts +20 -0
- package/lib/context/AuditContext.d.ts +0 -2
- package/lib/findings/AuditResult.d.ts +3 -0
- package/lib/findings/ComplianceMapping.d.ts +3 -0
- package/lib/findings/ComplianceMapping.js +75 -0
- package/lib/findings/Finding.d.ts +20 -0
- package/lib/findings/loadScoringConfig.js +9 -2
- package/lib/findings/scoring.d.ts +2 -1
- package/lib/findings/scoring.js +20 -7
- package/lib/history/AuditDiff.d.ts +26 -0
- package/lib/history/AuditDiff.js +2 -0
- package/lib/history/DiffEngine.d.ts +4 -0
- package/lib/history/DiffEngine.js +61 -0
- package/lib/history/HistoryStore.d.ts +11 -0
- package/lib/history/HistoryStore.js +56 -0
- package/lib/history/metricMeta.d.ts +9 -0
- package/lib/history/metricMeta.js +28 -0
- package/lib/index.d.ts +7 -1
- package/lib/index.js +2 -1
- package/lib/lib/wire.d.ts +1 -2
- package/lib/lib/wire.js +1 -2
- package/lib/renderers/DiffHtmlRenderer.d.ts +8 -0
- package/lib/renderers/DiffHtmlRenderer.js +164 -0
- package/lib/renderers/DiffJsonRenderer.d.ts +8 -0
- package/lib/renderers/DiffJsonRenderer.js +8 -0
- package/lib/renderers/DiffRenderer.d.ts +7 -0
- package/lib/renderers/DiffRenderer.js +2 -0
- package/lib/renderers/HistoryRenderer.d.ts +6 -0
- package/lib/renderers/HistoryRenderer.js +140 -0
- package/lib/renderers/HtmlRenderer.d.ts +1 -0
- package/lib/renderers/HtmlRenderer.js +354 -54
- package/lib/renderers/MarkdownRenderer.js +34 -1
- package/package.json +3 -3
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// Thresholds for brute-force / credential stuffing detection (7-day window)
|
|
2
|
+
const BRUTE_FORCE_PER_USER = 20; // >20 failures for one user = targeted attack
|
|
3
|
+
const BULK_THRESHOLD_PER_USER = 50; // >50 = highly likely automated attack
|
|
4
|
+
const ORG_TOTAL_HIGH = 500; // org-wide failures indicating broad credential stuffing
|
|
5
|
+
export class FailedLoginCheck {
|
|
6
|
+
id = 'failed-login-detection';
|
|
7
|
+
name = 'Failed Login Detection';
|
|
8
|
+
category = 'Threat Detection';
|
|
9
|
+
description = 'Analyses LoginHistory to detect brute-force and credential stuffing patterns from the last 7 days';
|
|
10
|
+
async run(ctx) {
|
|
11
|
+
const findings = [];
|
|
12
|
+
const baseUrl = ctx.orgInfo.instanceUrl;
|
|
13
|
+
const setupUrl = `${baseUrl}/lightning/setup/LoginHistory/home`;
|
|
14
|
+
// Query 1: total failed logins in last 7 days
|
|
15
|
+
let totalFailures = 0;
|
|
16
|
+
try {
|
|
17
|
+
const countResult = await ctx.soql.query(`SELECT COUNT() FROM LoginHistory WHERE IsSuccess = false AND LoginTime > LAST_N_DAYS:7`);
|
|
18
|
+
totalFailures = countResult.totalSize;
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
findings.push({
|
|
22
|
+
id: 'failed-login-inaccessible',
|
|
23
|
+
category: this.category,
|
|
24
|
+
riskLevel: 'INFO',
|
|
25
|
+
inconclusive: true,
|
|
26
|
+
title: 'LoginHistory could not be queried — failed login analysis skipped',
|
|
27
|
+
detail: 'The LoginHistory SOQL query was not accessible. This may indicate the audit user lacks "View All Users" or event monitoring access.',
|
|
28
|
+
remediation: 'Grant "View All Users" to the audit user. For event-level access, enable Event Monitoring.',
|
|
29
|
+
});
|
|
30
|
+
return { findings };
|
|
31
|
+
}
|
|
32
|
+
if (totalFailures === 0) {
|
|
33
|
+
findings.push({
|
|
34
|
+
id: 'failed-login-none',
|
|
35
|
+
category: this.category,
|
|
36
|
+
riskLevel: 'LOW',
|
|
37
|
+
passed: true,
|
|
38
|
+
title: 'No failed logins in the last 7 days',
|
|
39
|
+
detail: 'No failed login attempts were recorded in the last 7 days.',
|
|
40
|
+
remediation: 'Continue monitoring LoginHistory. Configure Transaction Security Policies to alert on anomalous login patterns.',
|
|
41
|
+
});
|
|
42
|
+
return { findings };
|
|
43
|
+
}
|
|
44
|
+
// Query 2: per-user aggregation to detect targeted brute force
|
|
45
|
+
let perUserCounts = [];
|
|
46
|
+
try {
|
|
47
|
+
const aggResult = await ctx.soql.query(`SELECT Username, COUNT(Id)
|
|
48
|
+
FROM LoginHistory
|
|
49
|
+
WHERE IsSuccess = false AND LoginTime > LAST_N_DAYS:7
|
|
50
|
+
GROUP BY Username
|
|
51
|
+
ORDER BY COUNT(Id) DESC
|
|
52
|
+
LIMIT 50`);
|
|
53
|
+
perUserCounts = aggResult.records;
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
// Per-user breakdown unavailable — still emit org-level finding
|
|
57
|
+
}
|
|
58
|
+
const bruteForceTargets = perUserCounts.filter((r) => r.expr0 >= BRUTE_FORCE_PER_USER);
|
|
59
|
+
const heavyTargets = bruteForceTargets.filter((r) => r.expr0 >= BULK_THRESHOLD_PER_USER);
|
|
60
|
+
if (heavyTargets.length > 0) {
|
|
61
|
+
findings.push({
|
|
62
|
+
id: 'failed-login-heavy-brute-force',
|
|
63
|
+
category: this.category,
|
|
64
|
+
riskLevel: 'CRITICAL',
|
|
65
|
+
title: `${heavyTargets.length} account(s) under heavy brute-force attack (50+ failures in 7 days)`,
|
|
66
|
+
detail: `${heavyTargets.length} user account(s) have received 50 or more failed login attempts in the last 7 days. This volume is consistent with automated credential stuffing or targeted brute-force attacks. A successful compromise of any of these accounts gives the attacker full access to that user's Salesforce data and permissions. Automated attacks often use credential lists from third-party data breaches.`,
|
|
67
|
+
remediation: 'Immediately review these accounts: (1) Reset credentials; (2) Force MFA; (3) Check for concurrent successful logins from unexpected locations; (4) Enable Transaction Security Policies to block logins after N failures; (5) Restrict login access by IP if the user has a known IP range.',
|
|
68
|
+
affectedItems: heavyTargets.map((r) => ({
|
|
69
|
+
label: r.Username,
|
|
70
|
+
url: setupUrl,
|
|
71
|
+
note: `${r.expr0} failed attempts in 7 days — likely automated attack`,
|
|
72
|
+
})),
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
if (bruteForceTargets.length > heavyTargets.length) {
|
|
76
|
+
const remaining = bruteForceTargets.filter((r) => r.expr0 < BULK_THRESHOLD_PER_USER);
|
|
77
|
+
findings.push({
|
|
78
|
+
id: 'failed-login-brute-force',
|
|
79
|
+
category: this.category,
|
|
80
|
+
riskLevel: 'HIGH',
|
|
81
|
+
title: `${remaining.length} account(s) with 20+ failed logins in 7 days`,
|
|
82
|
+
detail: `${remaining.length} user account(s) have received 20 or more failed login attempts in the last 7 days. This pattern may indicate targeted password-guessing attacks or credential reuse attempts from data breaches. Even a single successful login from an ongoing attack represents a full account compromise.`,
|
|
83
|
+
remediation: 'Review these accounts for successful logins from unexpected locations. Consider enforcing IP-based login restrictions and enabling MFA if not already in place. Configure Transaction Security Policies to auto-block logins after repeated failures.',
|
|
84
|
+
affectedItems: remaining.map((r) => ({
|
|
85
|
+
label: r.Username,
|
|
86
|
+
url: setupUrl,
|
|
87
|
+
note: `${r.expr0} failed attempts in 7 days`,
|
|
88
|
+
})),
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
if (totalFailures >= ORG_TOTAL_HIGH && bruteForceTargets.length === 0) {
|
|
92
|
+
findings.push({
|
|
93
|
+
id: 'failed-login-org-wide',
|
|
94
|
+
category: this.category,
|
|
95
|
+
riskLevel: 'HIGH',
|
|
96
|
+
title: `${totalFailures} failed logins across the org in the last 7 days`,
|
|
97
|
+
detail: `The org has recorded ${totalFailures} failed login attempts in 7 days distributed across many accounts. This pattern is consistent with broad credential stuffing — attackers using large lists of username/password combinations from data breaches, targeting the entire org rather than specific accounts. Even a low success rate across many attempts can yield multiple compromised accounts.`,
|
|
98
|
+
remediation: 'Review Login History for patterns (source IPs, time clustering, usernames). Enable Transaction Security Policies to rate-limit or block logins from suspicious IPs. Consider enabling Salesforce Shield or Event Monitoring for deeper login analytics.',
|
|
99
|
+
affectedItems: [
|
|
100
|
+
{
|
|
101
|
+
label: 'Org-wide login activity',
|
|
102
|
+
url: setupUrl,
|
|
103
|
+
note: `${totalFailures} failures in 7 days — review for patterns`,
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
else if (totalFailures > 0 && bruteForceTargets.length === 0) {
|
|
109
|
+
findings.push({
|
|
110
|
+
id: 'failed-login-low-volume',
|
|
111
|
+
category: this.category,
|
|
112
|
+
riskLevel: 'LOW',
|
|
113
|
+
passed: true,
|
|
114
|
+
title: `${totalFailures} failed login(s) in 7 days — no brute-force patterns detected`,
|
|
115
|
+
detail: `${totalFailures} failed login attempts recorded in the last 7 days, but no single account exceeded the brute-force threshold (${BRUTE_FORCE_PER_USER} failures). This volume appears consistent with normal user error.`,
|
|
116
|
+
remediation: 'Continue monitoring. Configure Transaction Security Policies to alert on anomalous login activity as volumes change.',
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
return { findings };
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=FailedLoginCheck.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AuditContext } from '../../context/AuditContext.js';
|
|
2
|
+
import type { SecurityCheck, CheckResult } from '../SecurityCheck.js';
|
|
3
|
+
export declare class FieldHistoryTrackingCheck implements SecurityCheck {
|
|
4
|
+
readonly id = "field-history-tracking";
|
|
5
|
+
readonly name = "Field History Tracking";
|
|
6
|
+
readonly category = "Data Security";
|
|
7
|
+
readonly description = "SBS-DATA-004: verifies field history tracking is enabled on sensitive standard objects";
|
|
8
|
+
run(ctx: AuditContext): Promise<CheckResult>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=FieldHistoryTrackingCheck.d.ts.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// Sensitive standard objects SBS-DATA-004 requires history tracking on.
|
|
2
|
+
// Custom objects (e.g. Financial__c) are intentionally excluded — they may not exist.
|
|
3
|
+
const SENSITIVE_OBJECTS = [
|
|
4
|
+
'Account', 'Contact', 'Lead', 'Opportunity', 'Case', 'Contract', 'Quote', 'User',
|
|
5
|
+
];
|
|
6
|
+
export class FieldHistoryTrackingCheck {
|
|
7
|
+
id = 'field-history-tracking';
|
|
8
|
+
name = 'Field History Tracking';
|
|
9
|
+
category = 'Data Security';
|
|
10
|
+
description = 'SBS-DATA-004: verifies field history tracking is enabled on sensitive standard objects';
|
|
11
|
+
async run(ctx) {
|
|
12
|
+
const findings = [];
|
|
13
|
+
const baseUrl = ctx.orgInfo.instanceUrl;
|
|
14
|
+
const setupUrl = `${baseUrl}/lightning/setup/ObjectManager/home`;
|
|
15
|
+
const objectList = SENSITIVE_OBJECTS.map((o) => `'${o}'`).join(', ');
|
|
16
|
+
try {
|
|
17
|
+
// Tooling API: count fields with history tracking enabled per sensitive object.
|
|
18
|
+
// Objects with zero tracked fields will be absent from the result — those are violations.
|
|
19
|
+
const results = await ctx.tooling.query(`SELECT EntityDefinition.QualifiedApiName objectName, COUNT(Id) trackedCount
|
|
20
|
+
FROM FieldDefinition
|
|
21
|
+
WHERE EntityDefinition.QualifiedApiName IN (${objectList})
|
|
22
|
+
AND IsFieldHistoryTracked = true
|
|
23
|
+
GROUP BY EntityDefinition.QualifiedApiName`);
|
|
24
|
+
const trackedMap = new Map();
|
|
25
|
+
for (const r of results) {
|
|
26
|
+
trackedMap.set(r.objectName, r.trackedCount ?? 0);
|
|
27
|
+
}
|
|
28
|
+
const withTracking = SENSITIVE_OBJECTS.filter((o) => (trackedMap.get(o) ?? 0) > 0);
|
|
29
|
+
const withoutTracking = SENSITIVE_OBJECTS.filter((o) => (trackedMap.get(o) ?? 0) === 0);
|
|
30
|
+
if (withoutTracking.length === 0) {
|
|
31
|
+
findings.push({
|
|
32
|
+
id: 'field-history-tracking-ok',
|
|
33
|
+
category: this.category,
|
|
34
|
+
riskLevel: 'LOW',
|
|
35
|
+
passed: true,
|
|
36
|
+
title: 'Field history tracking enabled on all checked sensitive objects — SBS-DATA-004',
|
|
37
|
+
detail: `SBS-DATA-004 requires field history tracking on sensitive objects to support incident investigation and compliance evidence. All ${SENSITIVE_OBJECTS.length} checked objects have at least one tracked field. Objects: ${withTracking.map((o) => `${o} (${trackedMap.get(o)} field(s))`).join(', ')}.`,
|
|
38
|
+
remediation: 'Periodically review which specific fields are tracked to ensure key sensitive fields (email address, phone, revenue, status) are included.',
|
|
39
|
+
});
|
|
40
|
+
return { findings };
|
|
41
|
+
}
|
|
42
|
+
findings.push({
|
|
43
|
+
id: 'field-history-tracking-missing',
|
|
44
|
+
category: this.category,
|
|
45
|
+
riskLevel: withoutTracking.length >= 3 ? 'HIGH' : 'MEDIUM',
|
|
46
|
+
title: `${withoutTracking.length} sensitive object(s) have no field history tracking — SBS-DATA-004`,
|
|
47
|
+
detail: `SBS-DATA-004 requires field history tracking on sensitive objects to capture who changed what data and when, enabling post-incident investigation and audit evidence. The following objects have no tracked fields: ${withoutTracking.join(', ')}. ${withTracking.length > 0 ? `Objects already configured: ${withTracking.map((o) => `${o} (${trackedMap.get(o)} field(s))`).join(', ')}.` : ''}`,
|
|
48
|
+
remediation: 'Enable field history tracking on each listed object in Setup → Object Manager → [Object] → Fields & Relationships → Set History Tracking. At minimum track key sensitive fields: email addresses, phone numbers, revenue fields, owner changes, and status changes.',
|
|
49
|
+
affectedItems: withoutTracking.map((name) => ({
|
|
50
|
+
label: name,
|
|
51
|
+
url: `${setupUrl}/list?objectType=${name}`,
|
|
52
|
+
note: 'No fields have history tracking enabled — configure via Object Manager → Set History Tracking',
|
|
53
|
+
})),
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
findings.push({
|
|
58
|
+
id: 'field-history-tracking-inconclusive',
|
|
59
|
+
category: this.category,
|
|
60
|
+
riskLevel: 'INFO',
|
|
61
|
+
inconclusive: true,
|
|
62
|
+
title: 'Field history tracking status could not be determined',
|
|
63
|
+
detail: 'SBS-DATA-004 requires field history tracking on sensitive objects. The Tooling API FieldDefinition query was not accessible with the current user permissions.',
|
|
64
|
+
remediation: 'Grant the audit user Tooling API access, or manually verify field history tracking in Setup → Object Manager for Account, Contact, Lead, Opportunity, Case, Contract, and User.',
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return { findings };
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=FieldHistoryTrackingCheck.js.map
|
|
@@ -40,25 +40,40 @@ export class FieldLevelSecurityCheck {
|
|
|
40
40
|
});
|
|
41
41
|
return { findings };
|
|
42
42
|
}
|
|
43
|
-
// 2. Resolve object API names
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
// 2. Resolve object API names.
|
|
44
|
+
// CustomField.TableEnumOrId is either:
|
|
45
|
+
// - An 18-char Salesforce ID (custom objects) — needs EntityDefinition lookup
|
|
46
|
+
// - An API name string like 'Account' (standard objects) — use directly
|
|
47
|
+
const sfIdPattern = /^[A-Za-z0-9]{15,18}$/;
|
|
48
|
+
const objectApiNameById = new Map();
|
|
49
|
+
const customObjectIds = [];
|
|
50
|
+
for (const field of sensitiveFields) {
|
|
51
|
+
const teo = field.TableEnumOrId;
|
|
52
|
+
if (teo.length >= 15 && sfIdPattern.test(teo)) {
|
|
53
|
+
customObjectIds.push(teo);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
// Standard object: TableEnumOrId IS the API name
|
|
57
|
+
objectApiNameById.set(teo, teo);
|
|
58
|
+
}
|
|
48
59
|
}
|
|
49
|
-
|
|
50
|
-
|
|
60
|
+
if (customObjectIds.length > 0) {
|
|
61
|
+
try {
|
|
62
|
+
const entityDefs = await ctx.tooling.query(`SELECT Id, QualifiedApiName FROM EntityDefinition WHERE Id IN (${[...new Set(customObjectIds)].map((id) => `'${id}'`).join(', ')})`);
|
|
63
|
+
for (const e of entityDefs) {
|
|
64
|
+
objectApiNameById.set(e.Id, e.QualifiedApiName);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
// If entity lookup fails, custom object field names will be unresolvable
|
|
69
|
+
}
|
|
51
70
|
}
|
|
52
|
-
const objectApiNameById = new Map(entityDefs.map((e) => [e.Id, e.QualifiedApiName]));
|
|
53
71
|
// Build field API names: {ObjectApiName}.{DeveloperName}__c
|
|
54
72
|
const fieldApiNames = [];
|
|
55
|
-
const fieldApiNameMap = new Map();
|
|
56
73
|
for (const field of sensitiveFields) {
|
|
57
74
|
const objectApiName = objectApiNameById.get(field.TableEnumOrId);
|
|
58
75
|
if (objectApiName) {
|
|
59
|
-
|
|
60
|
-
fieldApiNames.push(fieldApiName);
|
|
61
|
-
fieldApiNameMap.set(fieldApiName, fieldApiName);
|
|
76
|
+
fieldApiNames.push(`${objectApiName}.${field.DeveloperName}__c`);
|
|
62
77
|
}
|
|
63
78
|
}
|
|
64
79
|
if (fieldApiNames.length === 0) {
|
|
@@ -79,12 +94,7 @@ export class FieldLevelSecurityCheck {
|
|
|
79
94
|
const result = await ctx.soql.query(`SELECT Field, COUNT(ParentId) cnt FROM FieldPermissions
|
|
80
95
|
WHERE PermissionsRead = true AND Field IN (${fieldApiNames.map((f) => `'${f}'`).join(', ')})
|
|
81
96
|
GROUP BY Field`);
|
|
82
|
-
permRecords = result.records.map((r) => ({
|
|
83
|
-
Field: r.Field,
|
|
84
|
-
cnt: r.cnt != null
|
|
85
|
-
? Number(r.cnt)
|
|
86
|
-
: 0,
|
|
87
|
-
}));
|
|
97
|
+
permRecords = result.records.map((r) => ({ Field: r.Field, cnt: r.cnt ?? 0 }));
|
|
88
98
|
}
|
|
89
99
|
catch {
|
|
90
100
|
findings.push({
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AuditContext } from '../../context/AuditContext.js';
|
|
2
|
+
import type { SecurityCheck, CheckResult } from '../SecurityCheck.js';
|
|
3
|
+
export declare class GuestExecutableApexCheck implements SecurityCheck {
|
|
4
|
+
readonly id = "guest-executable-apex";
|
|
5
|
+
readonly name = "Guest-Executable Apex";
|
|
6
|
+
readonly category = "Access Control";
|
|
7
|
+
readonly description = "Finds Apex classes that unauthenticated guest profiles can execute, flagging those that run without sharing \u2014 the classic unauthenticated data-exfiltration vector";
|
|
8
|
+
readonly dependsOnCache: readonly ["apexBodies"];
|
|
9
|
+
run(ctx: AuditContext): Promise<CheckResult>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=GuestExecutableApexCheck.d.ts.map
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
const WITHOUT_SHARING = /\bwithout\s+sharing\b/i;
|
|
2
|
+
const WITH_SHARING = /\bwith\s+sharing\b/i;
|
|
3
|
+
export class GuestExecutableApexCheck {
|
|
4
|
+
id = 'guest-executable-apex';
|
|
5
|
+
name = 'Guest-Executable Apex';
|
|
6
|
+
category = 'Access Control';
|
|
7
|
+
description = 'Finds Apex classes that unauthenticated guest profiles can execute, flagging those that run without sharing — the classic unauthenticated data-exfiltration vector';
|
|
8
|
+
// Use cached Apex bodies (from HardcodedCredentialsCheck) when available to classify sharing.
|
|
9
|
+
dependsOnCache = ['apexBodies'];
|
|
10
|
+
async run(ctx) {
|
|
11
|
+
const findings = [];
|
|
12
|
+
const baseUrl = ctx.orgInfo.instanceUrl;
|
|
13
|
+
const guests = await ctx.soql.queryAll("SELECT Id, ProfileId, Username FROM User WHERE UserType = 'Guest' AND IsActive = true");
|
|
14
|
+
if (guests.length === 0) {
|
|
15
|
+
findings.push({
|
|
16
|
+
id: 'guest-executable-apex-none',
|
|
17
|
+
category: this.category,
|
|
18
|
+
riskLevel: 'LOW',
|
|
19
|
+
passed: true,
|
|
20
|
+
title: 'No active guest users — guest-executable Apex not a concern',
|
|
21
|
+
detail: 'There are no active guest users, so no Apex class is reachable by unauthenticated visitors.',
|
|
22
|
+
remediation: 'If an Experience Cloud/Sites guest user is added later, re-run this audit.',
|
|
23
|
+
});
|
|
24
|
+
return { findings };
|
|
25
|
+
}
|
|
26
|
+
const profileIds = [...new Set(guests.map((g) => g.ProfileId))];
|
|
27
|
+
const profileList = profileIds.map((id) => `'${id}'`).join(', ');
|
|
28
|
+
const access = await ctx.soql.queryAll(`SELECT SetupEntityId, ParentId FROM SetupEntityAccess
|
|
29
|
+
WHERE SetupEntityType = 'ApexClass' AND ParentId IN (${profileList})`);
|
|
30
|
+
const classIds = [...new Set(access.map((a) => a.SetupEntityId))];
|
|
31
|
+
if (classIds.length === 0) {
|
|
32
|
+
findings.push({
|
|
33
|
+
id: 'guest-executable-apex-ok',
|
|
34
|
+
category: this.category,
|
|
35
|
+
riskLevel: 'LOW',
|
|
36
|
+
passed: true,
|
|
37
|
+
title: 'Guest profiles cannot execute any Apex classes',
|
|
38
|
+
detail: 'No Apex class execution access is granted to guest user profiles.',
|
|
39
|
+
remediation: 'Continue to avoid granting Apex class access to guest profiles.',
|
|
40
|
+
});
|
|
41
|
+
return { findings };
|
|
42
|
+
}
|
|
43
|
+
const idList = classIds.map((id) => `'${id}'`).join(', ');
|
|
44
|
+
const names = await ctx.tooling.query(`SELECT Id, Name FROM ApexClass WHERE Id IN (${idList})`);
|
|
45
|
+
const nameById = new Map(names.map((n) => [n.Id, n.Name]));
|
|
46
|
+
const bodies = ctx.cache.apexBodies ?? [];
|
|
47
|
+
const bodyByName = new Map(bodies.map((b) => [b.name, b.body]));
|
|
48
|
+
const unprotected = [];
|
|
49
|
+
const exposed = [];
|
|
50
|
+
for (const id of classIds) {
|
|
51
|
+
const name = nameById.get(id) ?? id;
|
|
52
|
+
const body = bodyByName.get(name);
|
|
53
|
+
if (body && WITHOUT_SHARING.test(body)) {
|
|
54
|
+
unprotected.push(name);
|
|
55
|
+
}
|
|
56
|
+
else if (body && !WITH_SHARING.test(body)) {
|
|
57
|
+
// No sharing declaration in a guest-reachable class is also dangerous.
|
|
58
|
+
unprotected.push(name);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
exposed.push(name);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const apexUrl = `${baseUrl}/lightning/setup/ApexClasses/home`;
|
|
65
|
+
if (unprotected.length > 0) {
|
|
66
|
+
findings.push({
|
|
67
|
+
id: 'guest-executable-apex-unprotected',
|
|
68
|
+
category: this.category,
|
|
69
|
+
riskLevel: 'CRITICAL',
|
|
70
|
+
title: `${unprotected.length} guest-executable Apex class(es) run without "with sharing"`,
|
|
71
|
+
detail: 'These Apex classes can be invoked by unauthenticated guest users AND do not enforce record-level sharing. ' +
|
|
72
|
+
'This is the classic Salesforce guest-user exploit chain: an attacker calls the class and reads or writes ' +
|
|
73
|
+
'business data in bulk with no login. Object-level guest permissions do not mitigate this — the class runs in system context.',
|
|
74
|
+
remediation: 'Add "with sharing" to every guest-reachable Apex class, enforce CRUD/FLS, and remove guest execution access from any class that does not strictly need it.',
|
|
75
|
+
affectedItems: unprotected.map((n) => ({ label: n, url: apexUrl, note: 'Guest-executable + without/with-no sharing — fix immediately' })),
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
if (exposed.length > 0) {
|
|
79
|
+
findings.push({
|
|
80
|
+
id: 'guest-executable-apex-exposed',
|
|
81
|
+
category: this.category,
|
|
82
|
+
riskLevel: 'HIGH',
|
|
83
|
+
title: `${exposed.length} Apex class(es) are executable by guest users`,
|
|
84
|
+
detail: 'Guest user profiles can execute these Apex classes. Even with "with sharing", any guest-reachable Apex is ' +
|
|
85
|
+
'unauthenticated attack surface and must enforce CRUD/FLS and validate all input.',
|
|
86
|
+
remediation: 'Review each class for least-privilege: confirm "with sharing", CRUD/FLS checks, and input validation. Remove guest access where unnecessary.',
|
|
87
|
+
affectedItems: exposed.map((n) => ({ label: n, url: apexUrl, note: 'Guest-executable — review for least privilege' })),
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
return { findings };
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=GuestExecutableApexCheck.js.map
|
|
@@ -23,82 +23,74 @@ export class GuestUserAccessCheck {
|
|
|
23
23
|
});
|
|
24
24
|
return { findings };
|
|
25
25
|
}
|
|
26
|
-
//
|
|
26
|
+
// Build profile → users map and unique profile ID list for batch queries
|
|
27
|
+
const profileUserMap = new Map();
|
|
28
|
+
for (const user of guestUsers) {
|
|
29
|
+
const list = profileUserMap.get(user.ProfileId) ?? [];
|
|
30
|
+
list.push(user);
|
|
31
|
+
profileUserMap.set(user.ProfileId, list);
|
|
32
|
+
}
|
|
33
|
+
const profileIds = [...profileUserMap.keys()];
|
|
34
|
+
// Determine which objects to check (include HC objects only if installed)
|
|
27
35
|
const objectsToCheck = [...STANDARD_OBJECTS];
|
|
28
36
|
if (ctx.cache.healthCloudInstalled === true) {
|
|
29
37
|
objectsToCheck.push(...HEALTH_CLOUD_OBJECTS);
|
|
30
38
|
}
|
|
31
39
|
const writeViolations = [];
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
40
|
+
const readViolations = [];
|
|
41
|
+
// Single batch query: all profiles × all objects (replaces per-profile loop)
|
|
42
|
+
const profileIdList = profileIds.map((id) => `'${id}'`).join(', ');
|
|
43
|
+
const objectList = objectsToCheck.map((o) => `'${o}'`).join(', ');
|
|
44
|
+
try {
|
|
45
|
+
const perms = await ctx.soql.queryAll(`SELECT ParentId, SobjectType, PermissionsCreate, PermissionsEdit, PermissionsDelete, PermissionsRead
|
|
46
|
+
FROM ObjectPermissions
|
|
47
|
+
WHERE ParentId IN (${profileIdList})
|
|
48
|
+
AND SobjectType IN (${objectList})`);
|
|
49
|
+
for (const perm of perms) {
|
|
50
|
+
const profileUsers = profileUserMap.get(perm.ParentId) ?? [];
|
|
51
|
+
if (perm.PermissionsCreate || perm.PermissionsEdit || perm.PermissionsDelete) {
|
|
52
|
+
for (const u of profileUsers) {
|
|
53
|
+
writeViolations.push({
|
|
54
|
+
userId: u.Id,
|
|
55
|
+
username: u.Username,
|
|
56
|
+
sobjectType: perm.SobjectType,
|
|
57
|
+
canCreate: perm.PermissionsCreate,
|
|
58
|
+
canEdit: perm.PermissionsEdit,
|
|
59
|
+
canDelete: perm.PermissionsDelete,
|
|
60
|
+
});
|
|
52
61
|
}
|
|
53
62
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
try {
|
|
62
|
-
const perms = await ctx.soql.queryAll(`SELECT SobjectType, PermissionsCreate, PermissionsEdit, PermissionsRead FROM ObjectPermissions WHERE ParentId = '${profileId}' AND SobjectType = '${obj}'`);
|
|
63
|
-
for (const perm of perms) {
|
|
64
|
-
if (perm.PermissionsCreate || perm.PermissionsEdit) {
|
|
65
|
-
for (const u of profileUsers) {
|
|
66
|
-
writeViolations.push({
|
|
67
|
-
userId: u.Id,
|
|
68
|
-
username: u.Username,
|
|
69
|
-
sobjectType: perm.SobjectType,
|
|
70
|
-
canCreate: perm.PermissionsCreate,
|
|
71
|
-
canEdit: perm.PermissionsEdit,
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
catch {
|
|
78
|
-
// Object may not exist — skip silently
|
|
63
|
+
else if (perm.PermissionsRead) {
|
|
64
|
+
for (const u of profileUsers) {
|
|
65
|
+
readViolations.push({
|
|
66
|
+
userId: u.Id,
|
|
67
|
+
username: u.Username,
|
|
68
|
+
sobjectType: perm.SobjectType,
|
|
69
|
+
});
|
|
79
70
|
}
|
|
80
71
|
}
|
|
81
72
|
}
|
|
82
73
|
}
|
|
74
|
+
catch {
|
|
75
|
+
// Skip on error
|
|
76
|
+
}
|
|
83
77
|
const sharingExposures = [];
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
catch {
|
|
99
|
-
// Object may not be accessible — skip silently
|
|
78
|
+
const userIdList = guestUsers.map((u) => `'${u.Id}'`).join(', ');
|
|
79
|
+
for (const shareTable of SHARE_TABLES) {
|
|
80
|
+
try {
|
|
81
|
+
const result = await ctx.soql.query(`SELECT UserOrGroupId, COUNT(Id) cnt
|
|
82
|
+
FROM ${shareTable}
|
|
83
|
+
WHERE UserOrGroupId IN (${userIdList})
|
|
84
|
+
AND RowCause = 'SharingRule'
|
|
85
|
+
GROUP BY UserOrGroupId`);
|
|
86
|
+
const totalCount = result.records.reduce((sum, r) => sum + (r.cnt ?? 0), 0);
|
|
87
|
+
if (totalCount > 0) {
|
|
88
|
+
sharingExposures.push({ shareTable, count: totalCount });
|
|
100
89
|
}
|
|
101
90
|
}
|
|
91
|
+
catch {
|
|
92
|
+
// Object may not be accessible — skip silently
|
|
93
|
+
}
|
|
102
94
|
}
|
|
103
95
|
// Emit findings based on what was found
|
|
104
96
|
if (writeViolations.length > 0) {
|
|
@@ -108,7 +100,7 @@ export class GuestUserAccessCheck {
|
|
|
108
100
|
riskLevel: 'CRITICAL',
|
|
109
101
|
title: 'Guest user profile(s) have write access to Salesforce objects',
|
|
110
102
|
affectedItems: writeViolations.map((v) => {
|
|
111
|
-
const actions = [v.canCreate && 'Create', v.canEdit && 'Edit']
|
|
103
|
+
const actions = [v.canCreate && 'Create', v.canEdit && 'Edit', v.canDelete && 'Delete']
|
|
112
104
|
.filter(Boolean)
|
|
113
105
|
.join('/');
|
|
114
106
|
return {
|
|
@@ -117,8 +109,24 @@ export class GuestUserAccessCheck {
|
|
|
117
109
|
note: `Can ${actions} — remove immediately`,
|
|
118
110
|
};
|
|
119
111
|
}),
|
|
120
|
-
detail: 'Unauthenticated users (guests) with write access to standard objects represents a critical misconfiguration.',
|
|
121
|
-
remediation: 'Remove all Create and
|
|
112
|
+
detail: 'Unauthenticated users (guests) with write access to standard objects represents a critical misconfiguration. SBS-CPORTAL-002 requires guest users have no access to business objects.',
|
|
113
|
+
remediation: 'Remove all Create, Edit, and Delete permissions from guest user profiles immediately. Guest users should have no object access.',
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
// SBS-CPORTAL-002: read access also violates the standard
|
|
117
|
+
if (readViolations.length > 0) {
|
|
118
|
+
findings.push({
|
|
119
|
+
id: 'guest-user-read-access',
|
|
120
|
+
category: this.category,
|
|
121
|
+
riskLevel: 'HIGH',
|
|
122
|
+
title: `${readViolations.length} object(s) grant read access to guest user(s)`,
|
|
123
|
+
affectedItems: readViolations.map((v) => ({
|
|
124
|
+
label: `${v.username} — ${v.sobjectType}`,
|
|
125
|
+
url: `${baseUrl}/${v.userId}`,
|
|
126
|
+
note: 'Read access — remove from guest profile; restrict to authenticated users only',
|
|
127
|
+
})),
|
|
128
|
+
detail: 'SBS-CPORTAL-002 requires guest users be limited to authentication flows only with no access to business objects. Read access exposes data to unauthenticated visitors.',
|
|
129
|
+
remediation: 'Remove Read permissions on all business objects from guest user profiles. Data access should only be granted after authentication.',
|
|
122
130
|
});
|
|
123
131
|
}
|
|
124
132
|
if (sharingExposures.length > 0) {
|
|
@@ -137,7 +145,7 @@ export class GuestUserAccessCheck {
|
|
|
137
145
|
remediation: 'Review and remove sharing rules that grant guest users access to Salesforce records. Use Experience Cloud sites with explicit data access controls instead.',
|
|
138
146
|
});
|
|
139
147
|
}
|
|
140
|
-
if (writeViolations.length === 0 && sharingExposures.length === 0) {
|
|
148
|
+
if (writeViolations.length === 0 && readViolations.length === 0 && sharingExposures.length === 0) {
|
|
141
149
|
const count = guestUsers.length;
|
|
142
150
|
findings.push({
|
|
143
151
|
id: 'guest-user-baseline',
|
|
@@ -2,8 +2,8 @@ const HIGH_RISK_PATTERNS = [
|
|
|
2
2
|
/Bearer\s+[A-Za-z0-9\-_.~+/]{20,}=*/gi, // Bearer tokens (min length to avoid test stubs)
|
|
3
3
|
/Basic\s+[A-Za-z0-9+/]{20,}=*/gi, // Basic auth (min length)
|
|
4
4
|
/Authorization['":\s]+['"](Bearer|Basic)/gi, // Auth header construction
|
|
5
|
-
// Credential variable assignments with a string literal RHS
|
|
6
|
-
/(?:password|passwd|secret|apiKey|api_key|clientSecret|client_secret|accessToken|access_token|authToken|auth_token)\s*[=+]\s*'[^']{8,}'/gi,
|
|
5
|
+
// Credential variable assignments with a string literal RHS (single or double quoted)
|
|
6
|
+
/(?:password|passwd|secret|apiKey|api_key|clientSecret|client_secret|accessToken|access_token|authToken|auth_token)\s*[=+]\s*['"][^'"]{8,}['"]/gi,
|
|
7
7
|
];
|
|
8
8
|
const ENDPOINT_PATTERN = /\.setEndpoint\s*\(\s*'(https?:\/\/[^']+)'/gi;
|
|
9
9
|
const IS_TEST_CLASS = /@IsTest\b/i;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AuditContext } from '../../context/AuditContext.js';
|
|
2
|
+
import type { SecurityCheck, CheckResult } from '../SecurityCheck.js';
|
|
3
|
+
export declare class HighAssuranceSessionCheck implements SecurityCheck {
|
|
4
|
+
readonly id = "high-assurance-session";
|
|
5
|
+
readonly name = "High Assurance Session Requirements";
|
|
6
|
+
readonly category = "Authentication";
|
|
7
|
+
readonly description = "Checks whether connected apps with admin-like capabilities require short session timeouts or high-assurance MFA sessions";
|
|
8
|
+
run(ctx: AuditContext): Promise<CheckResult>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=HighAssuranceSessionCheck.d.ts.map
|