@cclabsnz/sf-audit 1.0.0 → 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 +35 -2
- package/package.json +12 -3
|
@@ -1,59 +1,130 @@
|
|
|
1
1
|
const OBJECTS_TO_CHECK = ['Account', 'Contact', 'Opportunity', 'Case', 'Lead'];
|
|
2
|
+
const PUBLIC_WRITE_MODELS = new Set(['ReadWrite', 'ReadWriteTransfer', 'FullAccess']);
|
|
3
|
+
const PUBLIC_READ_MODELS = new Set(['Read']);
|
|
2
4
|
export class SharingModelCheck {
|
|
3
5
|
id = 'sharing-model';
|
|
4
6
|
name = 'Org-Wide Defaults (OWD) Sharing Model';
|
|
5
7
|
category = 'Data Access Control';
|
|
6
|
-
description = 'Checks OWD sharing settings for Account, Contact, Opportunity, Case, and Lead';
|
|
8
|
+
description = 'Checks OWD sharing settings for Account, Contact, Opportunity, Case, and Lead — both internal and external (portal) sharing models';
|
|
7
9
|
async run(ctx) {
|
|
8
10
|
const findings = [];
|
|
9
11
|
const baseUrl = ctx.orgInfo.instanceUrl;
|
|
10
12
|
const owdUrl = `${baseUrl}/lightning/setup/SecuritySharing/page`;
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
const nameList = OBJECTS_TO_CHECK.map((n) => `'${n}'`).join(', ');
|
|
14
|
+
let entities;
|
|
15
|
+
try {
|
|
16
|
+
entities = await ctx.soql.queryAll(`SELECT QualifiedApiName, InternalSharingModel, ExternalSharingModel
|
|
17
|
+
FROM EntityDefinition
|
|
18
|
+
WHERE QualifiedApiName IN (${nameList})`);
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
findings.push({
|
|
22
|
+
id: 'sharing-model-inaccessible',
|
|
23
|
+
category: this.category,
|
|
24
|
+
riskLevel: 'INFO',
|
|
25
|
+
inconclusive: true,
|
|
26
|
+
title: 'OWD sharing settings could not be retrieved',
|
|
27
|
+
detail: 'The EntityDefinition SOQL query was not accessible. This may indicate the audit user lacks "View Setup and Configuration" permission.',
|
|
28
|
+
remediation: 'Grant "View Setup and Configuration" to the audit user and re-run.',
|
|
29
|
+
});
|
|
30
|
+
return { findings };
|
|
31
|
+
}
|
|
32
|
+
const internalWriteObjects = [];
|
|
33
|
+
const externalWriteObjects = [];
|
|
34
|
+
const externalReadObjects = [];
|
|
35
|
+
const internalReadObjects = [];
|
|
36
|
+
for (const entity of entities) {
|
|
37
|
+
const name = entity.QualifiedApiName;
|
|
38
|
+
const internal = entity.InternalSharingModel;
|
|
39
|
+
const external = entity.ExternalSharingModel;
|
|
40
|
+
if (PUBLIC_WRITE_MODELS.has(internal)) {
|
|
41
|
+
internalWriteObjects.push({ name, model: internal });
|
|
42
|
+
}
|
|
43
|
+
else if (PUBLIC_READ_MODELS.has(internal)) {
|
|
44
|
+
internalReadObjects.push({ name, model: internal });
|
|
45
|
+
}
|
|
46
|
+
if (PUBLIC_WRITE_MODELS.has(external)) {
|
|
47
|
+
externalWriteObjects.push({ name, model: external });
|
|
19
48
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
continue;
|
|
49
|
+
else if (PUBLIC_READ_MODELS.has(external)) {
|
|
50
|
+
externalReadObjects.push({ name, model: external });
|
|
23
51
|
}
|
|
24
52
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
53
|
+
let hasFindings = false;
|
|
54
|
+
if (externalWriteObjects.length > 0) {
|
|
55
|
+
hasFindings = true;
|
|
56
|
+
findings.push({
|
|
57
|
+
id: 'sharing-model-external-write',
|
|
58
|
+
category: this.category,
|
|
59
|
+
riskLevel: 'CRITICAL',
|
|
60
|
+
title: `${externalWriteObjects.length} object(s) have Public Read/Write OWD for external/portal users`,
|
|
61
|
+
detail: 'An external OWD of Public Read/Write exposes all records to Experience Cloud portal users and guest users. Any low-trust or unauthenticated portal user can read and modify every record. This is a critical data exposure vector frequently overlooked when configuring portal sites — attackers who create or compromise a portal account gain unrestricted write access to the entire dataset.',
|
|
62
|
+
remediation: 'Set external OWD to Private for all sensitive objects immediately. Grant portal access via sharing sets, sharing rules, or Apex managed sharing — never via open OWD.',
|
|
63
|
+
affectedItems: externalWriteObjects.map((o) => ({
|
|
64
|
+
label: o.name,
|
|
65
|
+
url: owdUrl,
|
|
66
|
+
note: `External OWD: ${o.model} — immediate action required`,
|
|
67
|
+
})),
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
if (externalReadObjects.length > 0) {
|
|
71
|
+
hasFindings = true;
|
|
34
72
|
findings.push({
|
|
35
|
-
id: 'sharing-model-
|
|
73
|
+
id: 'sharing-model-external-read',
|
|
74
|
+
category: this.category,
|
|
75
|
+
riskLevel: 'HIGH',
|
|
76
|
+
title: `${externalReadObjects.length} object(s) have Public Read OWD for external/portal users`,
|
|
77
|
+
detail: 'An external OWD of Public Read exposes all records to any Experience Cloud portal user. Attackers who create or compromise a portal account can enumerate the entire dataset for reconnaissance and data theft — even without write access, bulk record exposure violates data minimisation principles and enables targeted attacks.',
|
|
78
|
+
remediation: 'Set external OWD to Private and use sharing sets or sharing rules to grant portal users access only to their own records.',
|
|
79
|
+
affectedItems: externalReadObjects.map((o) => ({
|
|
80
|
+
label: o.name,
|
|
81
|
+
url: owdUrl,
|
|
82
|
+
note: `External OWD: ${o.model} — portal users can read all records`,
|
|
83
|
+
})),
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
if (internalWriteObjects.length > 0) {
|
|
87
|
+
hasFindings = true;
|
|
88
|
+
const riskLevel = internalWriteObjects.length >= 3 ? 'HIGH' : 'MEDIUM';
|
|
89
|
+
findings.push({
|
|
90
|
+
id: 'sharing-model-internal-write',
|
|
36
91
|
category: this.category,
|
|
37
92
|
riskLevel,
|
|
38
|
-
title: `${
|
|
39
|
-
detail: '
|
|
40
|
-
remediation: 'Set
|
|
41
|
-
affectedItems:
|
|
42
|
-
label:
|
|
93
|
+
title: `${internalWriteObjects.length} object(s) have Public Read/Write OWD for internal users`,
|
|
94
|
+
detail: 'An internal OWD of Public Read/Write means every authenticated user can read and modify all records regardless of record ownership. A compromised internal account, malicious insider, or over-permissioned integration user gains full access to the entire dataset. This undermines record-level access controls and violates least-privilege principles.',
|
|
95
|
+
remediation: 'Set OWD to Private or Public Read Only for sensitive objects. Use sharing rules, role hierarchy, or Apex managed sharing to grant specific access where needed.',
|
|
96
|
+
affectedItems: internalWriteObjects.map((o) => ({
|
|
97
|
+
label: o.name,
|
|
98
|
+
url: owdUrl,
|
|
99
|
+
note: `Internal OWD: ${o.model} — change to Private or Public Read Only`,
|
|
100
|
+
})),
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
if (internalReadObjects.length > 0) {
|
|
104
|
+
hasFindings = true;
|
|
105
|
+
findings.push({
|
|
106
|
+
id: 'sharing-model-internal-read',
|
|
107
|
+
category: this.category,
|
|
108
|
+
riskLevel: 'LOW',
|
|
109
|
+
title: `${internalReadObjects.length} object(s) have Public Read OWD for internal users`,
|
|
110
|
+
detail: 'An internal OWD of Public Read means all authenticated users can view all records. While read-only access is less severe than write access, it may expose sensitive data to users who should not see all records (e.g., HR data visible to all sales reps).',
|
|
111
|
+
remediation: 'Review whether these objects contain sensitive data. If so, consider setting OWD to Private and creating sharing rules to grant access by role or territory.',
|
|
112
|
+
affectedItems: internalReadObjects.map((o) => ({
|
|
113
|
+
label: o.name,
|
|
43
114
|
url: owdUrl,
|
|
44
|
-
note: `
|
|
115
|
+
note: `Internal OWD: ${o.model} — all internal users can read all records`,
|
|
45
116
|
})),
|
|
46
117
|
});
|
|
47
118
|
}
|
|
48
|
-
|
|
119
|
+
if (!hasFindings) {
|
|
49
120
|
findings.push({
|
|
50
121
|
id: 'sharing-model-secure',
|
|
51
122
|
category: this.category,
|
|
52
123
|
riskLevel: 'LOW',
|
|
53
124
|
passed: true,
|
|
54
|
-
title: '
|
|
55
|
-
detail:
|
|
56
|
-
remediation: 'Continue monitoring OWD settings as new
|
|
125
|
+
title: 'All checked objects have appropriately restrictive OWD settings',
|
|
126
|
+
detail: `All ${OBJECTS_TO_CHECK.length} standard objects (${OBJECTS_TO_CHECK.join(', ')}) have Private or Controlled-by-Parent OWD for both internal and external users.`,
|
|
127
|
+
remediation: 'Continue monitoring OWD settings as new Experience Cloud sites and custom objects are added.',
|
|
57
128
|
});
|
|
58
129
|
}
|
|
59
130
|
return { findings };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AuditContext } from '../../context/AuditContext.js';
|
|
2
|
+
import type { SecurityCheck, CheckResult } from '../SecurityCheck.js';
|
|
3
|
+
export declare class SiemIntegrationCheck implements SecurityCheck {
|
|
4
|
+
readonly id = "siem-integration";
|
|
5
|
+
readonly name = "SIEM Integration Signals";
|
|
6
|
+
readonly category = "Event Monitoring";
|
|
7
|
+
readonly description = "SBS-MON-003/004: detects evidence of SIEM or external monitoring integration using cached org data (zero extra queries)";
|
|
8
|
+
readonly dependsOnCache: readonly ["namedCredentialEndpoints", "remoteSiteUrls", "connectedAppNames", "scheduledApexClassNames", "eventLogSummary"];
|
|
9
|
+
run(ctx: AuditContext): Promise<CheckResult>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=SiemIntegrationCheck.d.ts.map
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// Known SIEM and log-forwarding service hostname/name patterns
|
|
2
|
+
const SIEM_ENDPOINT_PATTERNS = [
|
|
3
|
+
/splunk/i, /sumo[\s-]*logic/i, /sumologic/i, /datadog/i,
|
|
4
|
+
/elastic(?:search|\.co)/i, /logstash/i, /kibana/i,
|
|
5
|
+
/new[\s-]*relic/i, /dynatrace/i, /logrhythm/i,
|
|
6
|
+
/securonix/i, /qradar/i, /arcsight/i,
|
|
7
|
+
/microsoft[\s-]*sentinel/i, /azure[\s-]*sentinel/i,
|
|
8
|
+
/loggly/i, /papertrail/i, /\bsiem\b/i,
|
|
9
|
+
];
|
|
10
|
+
const SIEM_APP_PATTERNS = [
|
|
11
|
+
/splunk/i, /datadog/i, /sumo/i, /elastic/i, /new[\s-]*relic/i,
|
|
12
|
+
/dynatrace/i, /\bsiem\b/i, /log[\s-]*forward/i, /event[\s-]*export/i,
|
|
13
|
+
];
|
|
14
|
+
const SIEM_APEX_PATTERNS = [
|
|
15
|
+
/splunk/i, /datadog/i, /sumo/i, /elastic/i,
|
|
16
|
+
/LogForward/i, /SiemSync/i, /EventExport/i, /LogShipper/i,
|
|
17
|
+
];
|
|
18
|
+
export class SiemIntegrationCheck {
|
|
19
|
+
id = 'siem-integration';
|
|
20
|
+
name = 'SIEM Integration Signals';
|
|
21
|
+
category = 'Event Monitoring';
|
|
22
|
+
description = 'SBS-MON-003/004: detects evidence of SIEM or external monitoring integration using cached org data (zero extra queries)';
|
|
23
|
+
// All five caches are read-only — no new API calls needed
|
|
24
|
+
dependsOnCache = [
|
|
25
|
+
'namedCredentialEndpoints',
|
|
26
|
+
'remoteSiteUrls',
|
|
27
|
+
'connectedAppNames',
|
|
28
|
+
'scheduledApexClassNames',
|
|
29
|
+
'eventLogSummary',
|
|
30
|
+
];
|
|
31
|
+
async run(ctx) {
|
|
32
|
+
const findings = [];
|
|
33
|
+
const baseUrl = ctx.orgInfo.instanceUrl;
|
|
34
|
+
const namedCredEndpoints = ctx.cache.namedCredentialEndpoints ?? [];
|
|
35
|
+
const remoteSiteUrls = ctx.cache.remoteSiteUrls ?? [];
|
|
36
|
+
const connectedAppNames = ctx.cache.connectedAppNames ?? [];
|
|
37
|
+
const scheduledApexNames = ctx.cache.scheduledApexClassNames ?? [];
|
|
38
|
+
const eventLogSummary = ctx.cache.eventLogSummary;
|
|
39
|
+
// Collect positive signals of external monitoring integration
|
|
40
|
+
const siemNamedCreds = namedCredEndpoints.filter((url) => SIEM_ENDPOINT_PATTERNS.some((p) => p.test(url)));
|
|
41
|
+
const siemRemoteSites = remoteSiteUrls.filter((url) => SIEM_ENDPOINT_PATTERNS.some((p) => p.test(url)));
|
|
42
|
+
const siemApps = connectedAppNames.filter((name) => SIEM_APP_PATTERNS.some((p) => p.test(name)));
|
|
43
|
+
const siemApex = scheduledApexNames.filter((name) => SIEM_APEX_PATTERNS.some((p) => p.test(name)));
|
|
44
|
+
const totalSignals = siemNamedCreds.length + siemRemoteSites.length + siemApps.length + siemApex.length;
|
|
45
|
+
const signalSources = [
|
|
46
|
+
...siemNamedCreds.map((u) => ({ label: u, note: 'Named Credential endpoint' })),
|
|
47
|
+
...siemRemoteSites.map((u) => ({ label: u, note: 'Remote Site URL' })),
|
|
48
|
+
...siemApps.map((n) => ({ label: n, note: 'Connected App' })),
|
|
49
|
+
...siemApex.map((n) => ({ label: n, note: 'Scheduled Apex class' })),
|
|
50
|
+
];
|
|
51
|
+
if (totalSignals > 0) {
|
|
52
|
+
const signalSummary = [
|
|
53
|
+
siemNamedCreds.length > 0 && `Named Credentials: ${siemNamedCreds.join(', ')}`,
|
|
54
|
+
siemRemoteSites.length > 0 && `Remote Sites: ${siemRemoteSites.join(', ')}`,
|
|
55
|
+
siemApps.length > 0 && `Connected Apps: ${siemApps.join(', ')}`,
|
|
56
|
+
siemApex.length > 0 && `Scheduled Apex: ${siemApex.join(', ')}`,
|
|
57
|
+
]
|
|
58
|
+
.filter(Boolean)
|
|
59
|
+
.join('; ');
|
|
60
|
+
findings.push({
|
|
61
|
+
id: 'siem-integration-detected',
|
|
62
|
+
category: this.category,
|
|
63
|
+
riskLevel: 'LOW',
|
|
64
|
+
passed: true,
|
|
65
|
+
title: `${totalSignals} SIEM/monitoring integration signal(s) detected — SBS-MON-003/004`,
|
|
66
|
+
detail: `SBS-MON-003 requires suspicious login activity to be monitored and alerted on. SBS-MON-004 requires API activity anomalies to be detected. Both controls require integration with an external monitoring system. ${totalSignals} signal(s) suggest external monitoring is in place. Sources: ${signalSummary}.`,
|
|
67
|
+
remediation: 'Verify the integration is actively receiving and alerting on Login, API, and DataExport events. Confirm alert thresholds cover: multiple failed logins, off-hours access, bulk data export, and unusual geographic login patterns (SBS-MON-003). Confirm API anomaly detection is configured (SBS-MON-004).',
|
|
68
|
+
affectedItems: signalSources.map((s) => ({
|
|
69
|
+
label: s.label,
|
|
70
|
+
url: `${baseUrl}/lightning/setup/home`,
|
|
71
|
+
note: s.note,
|
|
72
|
+
})),
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
findings.push({
|
|
77
|
+
id: 'siem-integration-not-detected',
|
|
78
|
+
category: this.category,
|
|
79
|
+
riskLevel: 'HIGH',
|
|
80
|
+
title: 'No SIEM or external monitoring integration detected — SBS-MON-003/004',
|
|
81
|
+
detail: 'SBS-MON-003 requires suspicious login activity to be monitored and alerted on. SBS-MON-004 requires API activity anomalies to be detected. No signals of an external monitoring or SIEM integration were found across Named Credentials, Remote Sites, Connected Apps, or Scheduled Apex jobs. Without external log forwarding, Event Monitoring data remains unanalysed and no automated alerts can be generated.',
|
|
82
|
+
remediation: 'Integrate Salesforce Event Monitoring with a SIEM platform (Splunk, Datadog, Sumo Logic, Microsoft Sentinel, etc.) using the EventLogFile API or Salesforce Shield Event Streaming. Configure alerts for: repeated failed logins, off-hours API access, bulk data export events, and unusual login geolocations (SBS-MON-003). Enable API usage anomaly detection (SBS-MON-004).',
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
// Additional signal: check if event logs cover sufficient days for SIEM ingestion
|
|
86
|
+
if (eventLogSummary && eventLogSummary.totalFiles > 0 && eventLogSummary.earliestDate) {
|
|
87
|
+
const daysCovered = Math.ceil((Date.now() - new Date(eventLogSummary.earliestDate).getTime()) / 86_400_000);
|
|
88
|
+
if (daysCovered < 30 && totalSignals === 0) {
|
|
89
|
+
findings.push({
|
|
90
|
+
id: 'siem-retention-gap',
|
|
91
|
+
category: this.category,
|
|
92
|
+
riskLevel: 'MEDIUM',
|
|
93
|
+
title: `Event logs cover only ${daysCovered} day(s) in Salesforce — SIEM ingestion needed for SBS-INT-004 compliance`,
|
|
94
|
+
detail: 'SBS-INT-004 requires 30 days of API event log retention. Without a SIEM or log archival process ingesting logs daily, native Salesforce retention may be insufficient — logs older than the native retention window will be permanently lost.',
|
|
95
|
+
remediation: `Configure a SIEM or log archival process to ingest EventLogFile records at least daily. This ensures the 30-day retention requirement is met independent of Salesforce's native retention window.`,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return { findings };
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=SiemIntegrationCheck.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 SsoEnforcementCheck implements SecurityCheck {
|
|
4
|
+
readonly id = "sso-enforcement";
|
|
5
|
+
readonly name = "SSO Enforcement";
|
|
6
|
+
readonly category = "Authentication";
|
|
7
|
+
readonly description = "SBS-AUTH-001/002: detects username-password logins indicating SSO is not org-wide enforced";
|
|
8
|
+
run(ctx: AuditContext): Promise<CheckResult>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=SsoEnforcementCheck.d.ts.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export class SsoEnforcementCheck {
|
|
2
|
+
id = 'sso-enforcement';
|
|
3
|
+
name = 'SSO Enforcement';
|
|
4
|
+
category = 'Authentication';
|
|
5
|
+
description = 'SBS-AUTH-001/002: detects username-password logins indicating SSO is not org-wide enforced';
|
|
6
|
+
async run(ctx) {
|
|
7
|
+
const findings = [];
|
|
8
|
+
const baseUrl = ctx.orgInfo.instanceUrl;
|
|
9
|
+
const setupUrl = `${baseUrl}/lightning/setup/SingleSignOn/home`;
|
|
10
|
+
try {
|
|
11
|
+
// Single query: recent credential logins over the past 30 days.
|
|
12
|
+
// Presence of 'Username-Password' logins is direct evidence that SBS-AUTH-001
|
|
13
|
+
// (org-wide SSO enforcement) is not fully applied.
|
|
14
|
+
const result = await ctx.soql.queryAll(`SELECT Id, UserId, Username, LoginType, LoginTime
|
|
15
|
+
FROM LoginHistory
|
|
16
|
+
WHERE LoginTime > LAST_N_DAYS:30
|
|
17
|
+
AND LoginType = 'Username-Password'
|
|
18
|
+
ORDER BY LoginTime DESC
|
|
19
|
+
LIMIT 300`);
|
|
20
|
+
const records = result;
|
|
21
|
+
if (records.length === 0) {
|
|
22
|
+
findings.push({
|
|
23
|
+
id: 'sso-no-password-logins',
|
|
24
|
+
category: this.category,
|
|
25
|
+
riskLevel: 'LOW',
|
|
26
|
+
passed: true,
|
|
27
|
+
title: 'No username-password logins detected in the last 30 days',
|
|
28
|
+
detail: 'SBS-AUTH-001 requires production orgs to disable Salesforce credential logins. No username-password logins were found in LoginHistory for the past 30 days, which is consistent with SSO being enforced.',
|
|
29
|
+
remediation: 'Verify in Setup → Single Sign-On Settings that "Prevent Login with Salesforce Credentials" is enabled to enforce SBS-AUTH-001 at the org level.',
|
|
30
|
+
});
|
|
31
|
+
return { findings };
|
|
32
|
+
}
|
|
33
|
+
// Deduplicate by user to find unique users bypassing SSO
|
|
34
|
+
const byUser = new Map();
|
|
35
|
+
for (const r of records) {
|
|
36
|
+
const existing = byUser.get(r.UserId);
|
|
37
|
+
if (existing) {
|
|
38
|
+
existing.count++;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
byUser.set(r.UserId, { username: r.Username, count: 1, latest: r.LoginTime });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const uniqueUsers = [...byUser.entries()];
|
|
45
|
+
findings.push({
|
|
46
|
+
id: 'sso-password-logins-detected',
|
|
47
|
+
category: this.category,
|
|
48
|
+
riskLevel: 'HIGH',
|
|
49
|
+
title: `${uniqueUsers.length} user(s) logged in with username-password credentials in the last 30 days — SBS-AUTH-001/002`,
|
|
50
|
+
detail: `SBS-AUTH-001 requires production orgs to enable the org-level setting that disables Salesforce credential logins for all users. SBS-AUTH-002 requires that any users permitted to bypass SSO be explicitly authorised and documented. Found ${records.length} password-based login(s) across ${uniqueUsers.length} unique user(s) in the past 30 days, indicating SSO is either not enforced org-wide or users have undocumented SSO bypass.`,
|
|
51
|
+
remediation: 'Enable "Prevent Login with Salesforce Credentials" in Setup → Single Sign-On Settings (SBS-AUTH-001). For any users who legitimately need credential login (break-glass accounts), document their authorisation in the system of record (SBS-AUTH-002) and restrict their profile IP ranges.',
|
|
52
|
+
affectedItems: uniqueUsers.map(([userId, info]) => ({
|
|
53
|
+
label: info.username,
|
|
54
|
+
url: `${baseUrl}/${userId}`,
|
|
55
|
+
note: `${info.count} credential login(s) — last: ${new Date(info.latest).toISOString().split('T')[0]}`,
|
|
56
|
+
})),
|
|
57
|
+
});
|
|
58
|
+
// Advisory: flag users who appear to be SSO-exempt service accounts
|
|
59
|
+
const highFrequency = uniqueUsers.filter(([, v]) => v.count > 10);
|
|
60
|
+
if (highFrequency.length > 0) {
|
|
61
|
+
findings.push({
|
|
62
|
+
id: 'sso-frequent-bypass-users',
|
|
63
|
+
category: this.category,
|
|
64
|
+
riskLevel: 'MEDIUM',
|
|
65
|
+
title: `${highFrequency.length} user(s) logged in with credentials >10 times — likely undocumented SSO exemptions (SBS-AUTH-002)`,
|
|
66
|
+
detail: 'SBS-AUTH-002 requires all users permitted to bypass SSO to be explicitly documented. High-frequency credential logins suggest these are regular exemptions rather than emergency break-glass access.',
|
|
67
|
+
remediation: 'Document each user in the system of record with a justified reason for SSO bypass. Consider converting service accounts to Connected App OAuth flows instead.',
|
|
68
|
+
affectedItems: highFrequency.map(([userId, info]) => ({
|
|
69
|
+
label: info.username,
|
|
70
|
+
url: `${baseUrl}/${userId}`,
|
|
71
|
+
note: `${info.count} credential logins in 30 days — document or remove exemption`,
|
|
72
|
+
})),
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
findings.push({
|
|
78
|
+
id: 'sso-enforcement-inconclusive',
|
|
79
|
+
category: this.category,
|
|
80
|
+
riskLevel: 'INFO',
|
|
81
|
+
inconclusive: true,
|
|
82
|
+
title: 'SSO enforcement status could not be determined — LoginHistory not accessible',
|
|
83
|
+
detail: 'SBS-AUTH-001/002 require SSO enforcement configuration to be verified. LoginHistory was not accessible with current permissions.',
|
|
84
|
+
remediation: 'Manually verify in Setup → Single Sign-On Settings that "Prevent Login with Salesforce Credentials" is enabled.',
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
return { findings };
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=SsoEnforcementCheck.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 StandardProfilesCheck implements SecurityCheck {
|
|
4
|
+
readonly id = "standard-profiles";
|
|
5
|
+
readonly name = "Standard Profile Usage";
|
|
6
|
+
readonly category = "Permissions";
|
|
7
|
+
readonly description = "SBS-ACS-005: flags active users assigned to out-of-the-box Salesforce standard profiles";
|
|
8
|
+
run(ctx: AuditContext): Promise<CheckResult>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=StandardProfilesCheck.d.ts.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// SBS-ACS-005: "All active users must be assigned custom profiles.
|
|
2
|
+
// The out-of-the-box standard profiles must not be used."
|
|
3
|
+
const STANDARD_PROFILE_NAMES = [
|
|
4
|
+
'System Administrator', 'Standard User', 'Read Only', 'Solution Manager',
|
|
5
|
+
'Marketing User', 'Contract Manager', 'Standard Platform User',
|
|
6
|
+
'Standard Platform One App User', 'Chatter Free User', 'Chatter External User',
|
|
7
|
+
'Chatter Moderator User', 'High Volume Customer Portal User', 'Authenticated Website',
|
|
8
|
+
'Customer Portal Manager Standard', 'Partner App Subscription User',
|
|
9
|
+
'Analytics Cloud Explorer User', 'Identity User', 'Work.com Only User',
|
|
10
|
+
'Force.com - App Subscription User', 'Force.com - One App User', 'Force.com - Free User',
|
|
11
|
+
'Guest User', 'External Apps Login User', 'External Identity User',
|
|
12
|
+
'Minimum Access - Salesforce',
|
|
13
|
+
];
|
|
14
|
+
export class StandardProfilesCheck {
|
|
15
|
+
id = 'standard-profiles';
|
|
16
|
+
name = 'Standard Profile Usage';
|
|
17
|
+
category = 'Permissions';
|
|
18
|
+
description = 'SBS-ACS-005: flags active users assigned to out-of-the-box Salesforce standard profiles';
|
|
19
|
+
async run(ctx) {
|
|
20
|
+
const findings = [];
|
|
21
|
+
const baseUrl = ctx.orgInfo.instanceUrl;
|
|
22
|
+
const profileList = STANDARD_PROFILE_NAMES.map((n) => `'${n}'`).join(', ');
|
|
23
|
+
const frozenFilter = 'Id NOT IN (SELECT UserId FROM UserLogin WHERE IsFrozen = true)';
|
|
24
|
+
// Query 1: aggregate count per profile — avoids fetching every user row upfront
|
|
25
|
+
const countResult = await ctx.soql.query(`SELECT Profile.Name ProfileName, COUNT(Id) UserCount
|
|
26
|
+
FROM User
|
|
27
|
+
WHERE IsActive = true AND Profile.Name IN (${profileList})
|
|
28
|
+
AND ${frozenFilter}
|
|
29
|
+
GROUP BY Profile.Name`);
|
|
30
|
+
const groups = countResult.records;
|
|
31
|
+
const totalAffected = groups.reduce((sum, r) => sum + r.UserCount, 0);
|
|
32
|
+
if (totalAffected === 0) {
|
|
33
|
+
findings.push({
|
|
34
|
+
id: 'standard-profiles-ok',
|
|
35
|
+
category: this.category,
|
|
36
|
+
riskLevel: 'LOW',
|
|
37
|
+
passed: true,
|
|
38
|
+
title: 'No active users are assigned to standard out-of-the-box Salesforce profiles',
|
|
39
|
+
detail: 'SBS-ACS-005 requires all active users be on custom profiles. No violations found.',
|
|
40
|
+
remediation: 'Continue monitoring as new users are onboarded.',
|
|
41
|
+
});
|
|
42
|
+
return { findings };
|
|
43
|
+
}
|
|
44
|
+
// Query 2: list affected users only when violations exist
|
|
45
|
+
const users = await ctx.soql.queryAll(`SELECT Id, Username, Profile.Name
|
|
46
|
+
FROM User
|
|
47
|
+
WHERE IsActive = true AND Profile.Name IN (${profileList})
|
|
48
|
+
AND ${frozenFilter}
|
|
49
|
+
ORDER BY Profile.Name, Username
|
|
50
|
+
LIMIT 200`);
|
|
51
|
+
const profileSummary = groups.map((g) => `${g.ProfileName} (${g.UserCount})`).join(', ');
|
|
52
|
+
findings.push({
|
|
53
|
+
id: 'standard-profiles-in-use',
|
|
54
|
+
category: this.category,
|
|
55
|
+
riskLevel: 'HIGH',
|
|
56
|
+
title: `${totalAffected} active user(s) assigned to standard out-of-the-box Salesforce profiles`,
|
|
57
|
+
detail: `SBS-ACS-005 requires all active users be assigned custom profiles — standard profiles must not be used in production. Standard profiles grant broad, poorly-audited permissions and cannot be tailored to least-privilege requirements. Affected profile(s): ${profileSummary}.`,
|
|
58
|
+
remediation: 'Create custom profiles based on minimum required permissions and migrate all active users. Remove access to standard profiles in production. Standard profiles cannot be edited so they often grant more than needed.',
|
|
59
|
+
affectedItems: users.slice(0, 50).map((u) => ({
|
|
60
|
+
label: u.Username,
|
|
61
|
+
url: `${baseUrl}/${u.Id}`,
|
|
62
|
+
note: `Profile: ${u.Profile.Name} — migrate to a custom profile`,
|
|
63
|
+
})),
|
|
64
|
+
});
|
|
65
|
+
return { findings };
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=StandardProfilesCheck.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 TransactionSecurityPolicyCheck implements SecurityCheck {
|
|
4
|
+
readonly id = "transaction-security-policy";
|
|
5
|
+
readonly name = "Transaction Security Policies";
|
|
6
|
+
readonly category = "Threat Detection";
|
|
7
|
+
readonly description = "Checks whether Transaction Security Policies are configured to provide automated threat detection and response";
|
|
8
|
+
run(ctx: AuditContext): Promise<CheckResult>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=TransactionSecurityPolicyCheck.d.ts.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export class TransactionSecurityPolicyCheck {
|
|
2
|
+
id = 'transaction-security-policy';
|
|
3
|
+
name = 'Transaction Security Policies';
|
|
4
|
+
category = 'Threat Detection';
|
|
5
|
+
description = 'Checks whether Transaction Security Policies are configured to provide automated threat detection and response';
|
|
6
|
+
async run(ctx) {
|
|
7
|
+
const findings = [];
|
|
8
|
+
const baseUrl = ctx.orgInfo.instanceUrl;
|
|
9
|
+
const setupUrl = `${baseUrl}/lightning/setup/TransactionSecurityPolicies/home`;
|
|
10
|
+
let policies;
|
|
11
|
+
try {
|
|
12
|
+
policies = await ctx.tooling.query(`SELECT Id, Name, EventType, State FROM TransactionSecurityPolicy WHERE State = 'Enabled'`);
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
findings.push({
|
|
16
|
+
id: 'transaction-security-policy-inaccessible',
|
|
17
|
+
category: this.category,
|
|
18
|
+
riskLevel: 'INFO',
|
|
19
|
+
inconclusive: true,
|
|
20
|
+
title: 'Transaction Security Policies could not be queried',
|
|
21
|
+
detail: 'The Tooling API TransactionSecurityPolicy query was not accessible. This may indicate the audit user lacks Tooling API access, or Transaction Security is not enabled for this org.',
|
|
22
|
+
remediation: 'Enable Transaction Security in Setup and grant Tooling API access to the audit user, then re-run.',
|
|
23
|
+
});
|
|
24
|
+
return { findings };
|
|
25
|
+
}
|
|
26
|
+
if (policies.length === 0) {
|
|
27
|
+
findings.push({
|
|
28
|
+
id: 'transaction-security-policy-none',
|
|
29
|
+
category: this.category,
|
|
30
|
+
riskLevel: 'HIGH',
|
|
31
|
+
title: 'No Transaction Security Policies are enabled',
|
|
32
|
+
detail: 'Transaction Security Policies provide automated, real-time threat detection and response within Salesforce. With no policies enabled, the org has no automated defence against: credential stuffing and brute-force attacks, impossible-travel logins (e.g. login from two countries within minutes), bulk data downloads and mass API queries, concurrent session anomalies, and privilege escalation attempts. An attacker who compromises any credential can operate without triggering any automated response.',
|
|
33
|
+
remediation: 'Enable Transaction Security (Setup → Transaction Security Policies) and create policies for at minimum: (1) Login anomalies — impossible travel, concurrent sessions from different IPs; (2) Data export — block or notify on bulk Report/List View exports; (3) API anomalies — high-volume REST/SOAP queries. Recommended actions: Block + Notify for critical events; Notify for informational events.',
|
|
34
|
+
affectedItems: [
|
|
35
|
+
{
|
|
36
|
+
label: 'Transaction Security Policies',
|
|
37
|
+
url: setupUrl,
|
|
38
|
+
note: 'No policies enabled — real-time threat response is completely absent',
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
});
|
|
42
|
+
return { findings };
|
|
43
|
+
}
|
|
44
|
+
const eventTypes = [...new Set(policies.map((p) => p.EventType))].sort();
|
|
45
|
+
findings.push({
|
|
46
|
+
id: 'transaction-security-policy-present',
|
|
47
|
+
category: this.category,
|
|
48
|
+
riskLevel: 'LOW',
|
|
49
|
+
passed: true,
|
|
50
|
+
title: `${policies.length} Transaction Security Polic${policies.length === 1 ? 'y' : 'ies'} enabled`,
|
|
51
|
+
detail: `Active Transaction Security Policies covering: ${eventTypes.join(', ')}. Automated threat detection and response is in place for these event types.`,
|
|
52
|
+
remediation: 'Periodically review policies to ensure coverage includes login anomalies, bulk data exports, and high-volume API usage. Verify that policy actions (Block/Notify) are appropriate for each event type.',
|
|
53
|
+
affectedItems: policies.map((p) => ({
|
|
54
|
+
label: p.Name,
|
|
55
|
+
url: setupUrl,
|
|
56
|
+
note: `EventType: ${p.EventType}`,
|
|
57
|
+
})),
|
|
58
|
+
});
|
|
59
|
+
return { findings };
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=TransactionSecurityPolicyCheck.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 TrustedIPRangesCheck implements SecurityCheck {
|
|
4
|
+
readonly id = "trusted-ip-ranges";
|
|
5
|
+
readonly name = "Trusted IP Ranges";
|
|
6
|
+
readonly category = "Authentication";
|
|
7
|
+
readonly description = "Identifies trusted IP ranges that completely bypass MFA, including overly broad ranges";
|
|
8
|
+
run(ctx: AuditContext): Promise<CheckResult>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=TrustedIPRangesCheck.d.ts.map
|