@cclabsnz/sf-audit 0.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 +145 -0
- package/config/queries/soql.json +24 -0
- package/config/queries/tooling.json +28 -0
- package/config/scoring.json +9 -0
- package/lib/api/ApiError.d.ts +6 -0
- package/lib/api/ApiError.js +6 -0
- package/lib/api/RestClient.d.ts +4 -0
- package/lib/api/RestClient.js +2 -0
- package/lib/api/RestClientImpl.d.ts +8 -0
- package/lib/api/RestClientImpl.js +12 -0
- package/lib/api/SoqlClient.d.ts +10 -0
- package/lib/api/SoqlClient.js +2 -0
- package/lib/api/SoqlClientImpl.d.ts +9 -0
- package/lib/api/SoqlClientImpl.js +19 -0
- package/lib/api/ToolingClient.d.ts +5 -0
- package/lib/api/ToolingClient.js +2 -0
- package/lib/api/ToolingClientImpl.d.ts +10 -0
- package/lib/api/ToolingClientImpl.js +26 -0
- package/lib/api/index.d.ts +9 -0
- package/lib/api/index.js +5 -0
- package/lib/checks/CheckEngine.d.ts +11 -0
- package/lib/checks/CheckEngine.js +56 -0
- package/lib/checks/SecurityCheck.d.ts +18 -0
- package/lib/checks/SecurityCheck.js +2 -0
- package/lib/checks/impl/ApexSharingCheck.d.ts +11 -0
- package/lib/checks/impl/ApexSharingCheck.js +108 -0
- package/lib/checks/impl/ApiLimitsCheck.d.ts +10 -0
- package/lib/checks/impl/ApiLimitsCheck.js +65 -0
- package/lib/checks/impl/AuditTrailCheck.d.ts +10 -0
- package/lib/checks/impl/AuditTrailCheck.js +69 -0
- package/lib/checks/impl/CodeSecurityCheck.d.ts +10 -0
- package/lib/checks/impl/CodeSecurityCheck.js +53 -0
- package/lib/checks/impl/ConnectedAppsCheck.d.ts +10 -0
- package/lib/checks/impl/ConnectedAppsCheck.js +48 -0
- package/lib/checks/impl/CustomSettingsCheck.d.ts +10 -0
- package/lib/checks/impl/CustomSettingsCheck.js +59 -0
- package/lib/checks/impl/FieldLevelSecurityCheck.d.ts +10 -0
- package/lib/checks/impl/FieldLevelSecurityCheck.js +149 -0
- package/lib/checks/impl/FlowsWithoutSharingCheck.d.ts +10 -0
- package/lib/checks/impl/FlowsWithoutSharingCheck.js +60 -0
- package/lib/checks/impl/GuestUserAccessCheck.d.ts +11 -0
- package/lib/checks/impl/GuestUserAccessCheck.js +158 -0
- package/lib/checks/impl/HardcodedCredentialsCheck.d.ts +12 -0
- package/lib/checks/impl/HardcodedCredentialsCheck.js +146 -0
- package/lib/checks/impl/HealthCheckCheck.d.ts +11 -0
- package/lib/checks/impl/HealthCheckCheck.js +70 -0
- package/lib/checks/impl/InactiveUsersCheck.d.ts +10 -0
- package/lib/checks/impl/InactiveUsersCheck.js +47 -0
- package/lib/checks/impl/IpRestrictionsCheck.d.ts +10 -0
- package/lib/checks/impl/IpRestrictionsCheck.js +94 -0
- package/lib/checks/impl/LoginSessionCheck.d.ts +10 -0
- package/lib/checks/impl/LoginSessionCheck.js +54 -0
- package/lib/checks/impl/NamedCredentialsCheck.d.ts +11 -0
- package/lib/checks/impl/NamedCredentialsCheck.js +100 -0
- package/lib/checks/impl/PasswordSessionPolicyCheck.d.ts +12 -0
- package/lib/checks/impl/PasswordSessionPolicyCheck.js +100 -0
- package/lib/checks/impl/PermissionsCheck.d.ts +10 -0
- package/lib/checks/impl/PermissionsCheck.js +91 -0
- package/lib/checks/impl/PublicGroupSharingCheck.d.ts +11 -0
- package/lib/checks/impl/PublicGroupSharingCheck.js +68 -0
- package/lib/checks/impl/RemoteSitesCheck.d.ts +11 -0
- package/lib/checks/impl/RemoteSitesCheck.js +69 -0
- package/lib/checks/impl/ScheduledApexCheck.d.ts +10 -0
- package/lib/checks/impl/ScheduledApexCheck.js +72 -0
- package/lib/checks/impl/SharingModelCheck.d.ts +10 -0
- package/lib/checks/impl/SharingModelCheck.js +61 -0
- package/lib/checks/impl/UsersAndAdminsCheck.d.ts +10 -0
- package/lib/checks/impl/UsersAndAdminsCheck.js +85 -0
- package/lib/checks/registry.d.ts +3 -0
- package/lib/checks/registry.js +49 -0
- package/lib/commands/audit/list.d.ts +15 -0
- package/lib/commands/audit/list.js +35 -0
- package/lib/commands/audit/security.d.ts +18 -0
- package/lib/commands/audit/security.js +117 -0
- package/lib/context/AuditCache.d.ts +18 -0
- package/lib/context/AuditCache.js +2 -0
- package/lib/context/AuditContext.d.ts +15 -0
- package/lib/context/AuditContext.js +2 -0
- package/lib/context/OrgInfo.d.ts +9 -0
- package/lib/context/OrgInfo.js +2 -0
- package/lib/context/OrgMetrics.d.ts +20 -0
- package/lib/context/OrgMetrics.js +20 -0
- package/lib/findings/AuditResult.d.ts +15 -0
- package/lib/findings/AuditResult.js +2 -0
- package/lib/findings/Finding.d.ts +16 -0
- package/lib/findings/Finding.js +2 -0
- package/lib/findings/RiskLevel.d.ts +3 -0
- package/lib/findings/RiskLevel.js +2 -0
- package/lib/findings/scoring.d.ts +6 -0
- package/lib/findings/scoring.js +61 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/lib/wire.d.ts +15 -0
- package/lib/lib/wire.js +36 -0
- package/lib/queries/QueryDefinition.d.ts +48 -0
- package/lib/queries/QueryDefinition.js +11 -0
- package/lib/queries/QueryRegistry.d.ts +13 -0
- package/lib/queries/QueryRegistry.js +93 -0
- package/lib/renderers/AuditRenderer.d.ts +7 -0
- package/lib/renderers/AuditRenderer.js +2 -0
- package/lib/renderers/HtmlRenderer.d.ts +8 -0
- package/lib/renderers/HtmlRenderer.js +270 -0
- package/lib/renderers/JsonRenderer.d.ts +8 -0
- package/lib/renderers/JsonRenderer.js +8 -0
- package/lib/renderers/MarkdownRenderer.d.ts +8 -0
- package/lib/renderers/MarkdownRenderer.js +54 -0
- package/messages/audit.security.md +22 -0
- package/package.json +54 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export class NamedCredentialsCheck {
|
|
2
|
+
id = 'named-credentials';
|
|
3
|
+
name = 'Named Credentials';
|
|
4
|
+
category = 'External Connectivity';
|
|
5
|
+
description = 'Inventories Named Credentials and flags any not referenced in Apex code';
|
|
6
|
+
populatesCache = ['namedCredentialEndpoints'];
|
|
7
|
+
async run(ctx) {
|
|
8
|
+
const findings = [];
|
|
9
|
+
const baseUrl = ctx.orgInfo.instanceUrl;
|
|
10
|
+
const setupUrl = `${baseUrl}/lightning/setup/NamedCredential/page`;
|
|
11
|
+
// Query named credentials using Tooling API
|
|
12
|
+
const records = await ctx.tooling.query('SELECT Id, MasterLabel, DeveloperName, Endpoint FROM NamedCredential');
|
|
13
|
+
const count = records.length;
|
|
14
|
+
// Cache the endpoints for use by HardcodedCredentialsCheck
|
|
15
|
+
ctx.cache.namedCredentialEndpoints = records.map((r) => r.Endpoint);
|
|
16
|
+
if (count === 0) {
|
|
17
|
+
findings.push({
|
|
18
|
+
id: 'named-credentials-none',
|
|
19
|
+
category: this.category,
|
|
20
|
+
riskLevel: 'INFO',
|
|
21
|
+
title: 'No named credentials configured',
|
|
22
|
+
detail: 'No named credentials are configured. If this org makes external callouts, consider using Named Credentials to avoid hardcoded endpoints.',
|
|
23
|
+
remediation: 'Configure Named Credentials for any external service integrations rather than hardcoding endpoints in Apex.',
|
|
24
|
+
});
|
|
25
|
+
return { findings, metrics: { namedCredentialsCount: 0, unusedNamedCredentialsCount: 0 } };
|
|
26
|
+
}
|
|
27
|
+
// Scan Apex code to find which named credentials are actually referenced
|
|
28
|
+
// Named credentials are referenced as 'callout:DeveloperName' in Apex
|
|
29
|
+
let apexBodies = ctx.cache.apexBodies ?? [];
|
|
30
|
+
if (apexBodies.length === 0) {
|
|
31
|
+
try {
|
|
32
|
+
const apexRecords = await ctx.tooling.query('SELECT Name, Body FROM ApexClass WHERE NamespacePrefix = null');
|
|
33
|
+
apexBodies = apexRecords.map((r) => ({ name: r.Name, body: r.Body ?? '' }));
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
// If we can't scan Apex, emit inventory only
|
|
37
|
+
findings.push({
|
|
38
|
+
id: 'named-credentials-inventory',
|
|
39
|
+
category: this.category,
|
|
40
|
+
riskLevel: 'INFO',
|
|
41
|
+
title: `${count} named credential(s) configured`,
|
|
42
|
+
detail: 'Named credentials provide a secure way to store endpoint URLs and authentication details for external callouts.',
|
|
43
|
+
remediation: 'Periodically review named credentials to ensure endpoints are current and credentials remain valid.',
|
|
44
|
+
affectedItems: records.map((r) => ({
|
|
45
|
+
label: r.MasterLabel,
|
|
46
|
+
url: setupUrl,
|
|
47
|
+
note: r.Endpoint,
|
|
48
|
+
})),
|
|
49
|
+
});
|
|
50
|
+
return { findings, metrics: { namedCredentialsCount: count, unusedNamedCredentialsCount: 0 } };
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const combinedApexSource = apexBodies.map((c) => c.body).join('\n');
|
|
54
|
+
const unusedCredentials = records.filter((r) => {
|
|
55
|
+
// Named credentials are referenced as callout:DeveloperName or callout:MasterLabel
|
|
56
|
+
const refPatternDev = new RegExp(`callout:${r.DeveloperName}\\b`, 'i');
|
|
57
|
+
const refPatternLabel = new RegExp(`callout:${r.MasterLabel.replace(/\s+/g, '_')}\\b`, 'i');
|
|
58
|
+
return !refPatternDev.test(combinedApexSource) && !refPatternLabel.test(combinedApexSource);
|
|
59
|
+
});
|
|
60
|
+
const usedCredentials = records.filter((r) => !unusedCredentials.includes(r));
|
|
61
|
+
// Inventory finding
|
|
62
|
+
findings.push({
|
|
63
|
+
id: 'named-credentials-inventory',
|
|
64
|
+
category: this.category,
|
|
65
|
+
riskLevel: 'INFO',
|
|
66
|
+
title: `${count} named credential(s) configured (${usedCredentials.length} used, ${unusedCredentials.length} unused in Apex)`,
|
|
67
|
+
detail: 'Named credentials provide a secure way to store endpoint URLs and authentication details for external callouts.',
|
|
68
|
+
remediation: 'Periodically review named credentials to ensure endpoints are current and credentials remain valid.',
|
|
69
|
+
affectedItems: records.map((r) => ({
|
|
70
|
+
label: r.MasterLabel,
|
|
71
|
+
url: setupUrl,
|
|
72
|
+
note: r.Endpoint,
|
|
73
|
+
})),
|
|
74
|
+
});
|
|
75
|
+
// Flag unused credentials
|
|
76
|
+
if (unusedCredentials.length > 0) {
|
|
77
|
+
findings.push({
|
|
78
|
+
id: 'named-credentials-unused',
|
|
79
|
+
category: this.category,
|
|
80
|
+
riskLevel: 'LOW',
|
|
81
|
+
title: `${unusedCredentials.length} named credential(s) are not referenced in any Apex class`,
|
|
82
|
+
detail: 'Named credentials with no Apex references may be stale configuration from removed integrations. Unused credentials still hold valid endpoint and authentication data.',
|
|
83
|
+
remediation: 'Review each unused named credential. If the integration it supports has been removed, delete the credential to reduce the attack surface.',
|
|
84
|
+
affectedItems: unusedCredentials.map((r) => ({
|
|
85
|
+
label: r.MasterLabel,
|
|
86
|
+
url: setupUrl,
|
|
87
|
+
note: `${r.Endpoint} — verify if still required, delete if orphaned`,
|
|
88
|
+
})),
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
findings,
|
|
93
|
+
metrics: {
|
|
94
|
+
namedCredentialsCount: count,
|
|
95
|
+
unusedNamedCredentialsCount: unusedCredentials.length,
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=NamedCredentialsCheck.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AuditContext } from '../../context/AuditContext.js';
|
|
2
|
+
import type { SecurityCheck, CheckResult } from '../SecurityCheck.js';
|
|
3
|
+
import type { AuditCache } from '../../context/AuditCache.js';
|
|
4
|
+
export declare class PasswordSessionPolicyCheck implements SecurityCheck {
|
|
5
|
+
readonly id = "password-session-policy";
|
|
6
|
+
readonly name = "Password and Session Policy";
|
|
7
|
+
readonly category = "Identity & Access";
|
|
8
|
+
readonly description = "Evaluates password complexity, session timeout, and MFA enforcement from Health Check data";
|
|
9
|
+
readonly dependsOnCache: ReadonlyArray<keyof AuditCache>;
|
|
10
|
+
run(ctx: AuditContext): Promise<CheckResult>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=PasswordSessionPolicyCheck.d.ts.map
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
const PASSWORD_SETTINGS = [
|
|
2
|
+
'MinimumPasswordLength', 'PasswordComplexity', 'PasswordExpiration',
|
|
3
|
+
'PasswordHistory', 'MaximumInvalidLoginAttempts', 'LockoutInterval',
|
|
4
|
+
'PasswordQuestion',
|
|
5
|
+
];
|
|
6
|
+
const SESSION_SETTINGS = [
|
|
7
|
+
'SessionTimeout', 'SessionSecurity', 'ClickjackProtection',
|
|
8
|
+
'ContentSniffingProtection', 'CSRFProtection', 'ForceReauth',
|
|
9
|
+
];
|
|
10
|
+
const MFA_SETTINGS = [
|
|
11
|
+
'RequireMfa', 'MfaRequired', 'MultiFactorAuthentication',
|
|
12
|
+
'MultiFactorAuthenticationForUiLogins',
|
|
13
|
+
];
|
|
14
|
+
function matchesList(setting, keywords) {
|
|
15
|
+
const lower = setting.toLowerCase();
|
|
16
|
+
return keywords.some((kw) => lower.includes(kw.toLowerCase()));
|
|
17
|
+
}
|
|
18
|
+
export class PasswordSessionPolicyCheck {
|
|
19
|
+
id = 'password-session-policy';
|
|
20
|
+
name = 'Password and Session Policy';
|
|
21
|
+
category = 'Identity & Access';
|
|
22
|
+
description = 'Evaluates password complexity, session timeout, and MFA enforcement from Health Check data';
|
|
23
|
+
dependsOnCache = ['healthCheckRisks'];
|
|
24
|
+
async run(ctx) {
|
|
25
|
+
const findings = [];
|
|
26
|
+
const baseUrl = ctx.orgInfo.instanceUrl;
|
|
27
|
+
const risks = ctx.cache.healthCheckRisks;
|
|
28
|
+
if (!risks || risks.length === 0) {
|
|
29
|
+
findings.push({
|
|
30
|
+
id: 'password-session-policy-no-data',
|
|
31
|
+
category: this.category,
|
|
32
|
+
riskLevel: 'INFO',
|
|
33
|
+
title: 'Password and session policy analysis requires Health Check data',
|
|
34
|
+
detail: 'No Health Check risk data was available in the cache. The HealthCheckCheck may have failed or this org may not have Health Check access.',
|
|
35
|
+
remediation: 'Run the Security Health Check in Setup → Security Center and ensure the running user has the Security Health Check permission.',
|
|
36
|
+
});
|
|
37
|
+
return { findings };
|
|
38
|
+
}
|
|
39
|
+
const passwordRisks = risks.filter((r) => matchesList(r.setting, PASSWORD_SETTINGS));
|
|
40
|
+
const sessionRisks = risks.filter((r) => matchesList(r.setting, SESSION_SETTINGS));
|
|
41
|
+
const mfaRisks = risks.filter((r) => matchesList(r.setting, MFA_SETTINGS));
|
|
42
|
+
if (passwordRisks.length > 0) {
|
|
43
|
+
findings.push({
|
|
44
|
+
id: 'password-policy-failures',
|
|
45
|
+
category: this.category,
|
|
46
|
+
riskLevel: 'MEDIUM',
|
|
47
|
+
title: `${passwordRisks.length} password policy setting(s) do not meet security recommendations`,
|
|
48
|
+
affectedItems: passwordRisks.map((r) => ({
|
|
49
|
+
label: r.setting,
|
|
50
|
+
url: `${baseUrl}/lightning/setup/SecurityPasswordPolicies/page`,
|
|
51
|
+
note: `Current: ${r.value} — update in Setup → Password Policies`,
|
|
52
|
+
})),
|
|
53
|
+
detail: 'Password policy settings deviate from CIS Salesforce Benchmark recommendations. Weak password policies increase the risk of credential-based attacks.',
|
|
54
|
+
remediation: 'Review each flagged password policy setting in Setup → Security Controls → Password Policies and align with CIS benchmarks.',
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
if (sessionRisks.length > 0) {
|
|
58
|
+
findings.push({
|
|
59
|
+
id: 'session-security-deviations',
|
|
60
|
+
category: this.category,
|
|
61
|
+
riskLevel: 'MEDIUM',
|
|
62
|
+
title: `${sessionRisks.length} session security setting(s) need attention`,
|
|
63
|
+
affectedItems: sessionRisks.map((r) => ({
|
|
64
|
+
label: r.setting,
|
|
65
|
+
url: `${baseUrl}/lightning/setup/SessionSettings/page`,
|
|
66
|
+
note: `Current: ${r.value} — update in Setup → Session Settings`,
|
|
67
|
+
})),
|
|
68
|
+
detail: 'Session security settings deviate from recommended values. This can expose users to session hijacking or cross-site request forgery attacks.',
|
|
69
|
+
remediation: 'Review session security settings in Setup → Security Controls → Session Settings.',
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
if (mfaRisks.length > 0) {
|
|
73
|
+
findings.push({
|
|
74
|
+
id: 'mfa-gaps',
|
|
75
|
+
category: this.category,
|
|
76
|
+
riskLevel: 'HIGH',
|
|
77
|
+
title: 'Multi-factor authentication is not fully enforced',
|
|
78
|
+
affectedItems: mfaRisks.map((r) => ({
|
|
79
|
+
label: r.setting,
|
|
80
|
+
url: `${baseUrl}/lightning/setup/MultiFactorAuthentication/page`,
|
|
81
|
+
note: `Current: ${r.value} — enable MFA in Setup → Identity → Multi-Factor Authentication`,
|
|
82
|
+
})),
|
|
83
|
+
detail: 'MFA enforcement protects against credential-based attacks. Gaps in MFA policy leave accounts vulnerable even if passwords are compromised.',
|
|
84
|
+
remediation: 'Enable MFA for all users in Setup → Identity → Multi-Factor Authentication. Use Salesforce Authenticator or a compatible authenticator app.',
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
if (passwordRisks.length === 0 && sessionRisks.length === 0 && mfaRisks.length === 0) {
|
|
88
|
+
findings.push({
|
|
89
|
+
id: 'password-session-policy-compliant',
|
|
90
|
+
category: this.category,
|
|
91
|
+
riskLevel: 'LOW',
|
|
92
|
+
title: 'Password and session policies appear compliant with security recommendations',
|
|
93
|
+
detail: 'No password, session, or MFA-related deviations were detected in the Security Health Check results.',
|
|
94
|
+
remediation: 'Continue monitoring password policies and MFA enforcement as Salesforce releases new security recommendations.',
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
return { findings };
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=PasswordSessionPolicyCheck.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 PermissionsCheck implements SecurityCheck {
|
|
4
|
+
readonly id = "permissions";
|
|
5
|
+
readonly name = "Permissions";
|
|
6
|
+
readonly category = "Permissions";
|
|
7
|
+
readonly description = "Reports unassigned permission sets and high profile counts that increase the attack surface";
|
|
8
|
+
run(ctx: AuditContext): Promise<CheckResult>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=PermissionsCheck.d.ts.map
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// Standard Salesforce built-in profiles present in every org — excluded from custom profile counts.
|
|
2
|
+
// Profile SOQL does not expose an IsCustom field; this list covers the known standard set.
|
|
3
|
+
const STANDARD_PROFILE_NAMES = [
|
|
4
|
+
'System Administrator',
|
|
5
|
+
'Standard User',
|
|
6
|
+
'Read Only',
|
|
7
|
+
'Solution Manager',
|
|
8
|
+
'Marketing User',
|
|
9
|
+
'Contract Manager',
|
|
10
|
+
'Standard Platform User',
|
|
11
|
+
'Standard Platform One App User',
|
|
12
|
+
'Chatter Free User',
|
|
13
|
+
'Chatter External User',
|
|
14
|
+
'Chatter Moderator User',
|
|
15
|
+
'High Volume Customer Portal User',
|
|
16
|
+
'Authenticated Website',
|
|
17
|
+
'Customer Portal Manager Standard',
|
|
18
|
+
'Partner App Subscription User',
|
|
19
|
+
'Analytics Cloud Explorer User',
|
|
20
|
+
'Identity User',
|
|
21
|
+
'Work.com Only User',
|
|
22
|
+
'Force.com - App Subscription User',
|
|
23
|
+
'Force.com - One App User',
|
|
24
|
+
'Force.com - Free User',
|
|
25
|
+
'Guest User',
|
|
26
|
+
'External Apps Login User',
|
|
27
|
+
'External Identity User',
|
|
28
|
+
'Minimum Access - Salesforce',
|
|
29
|
+
];
|
|
30
|
+
export class PermissionsCheck {
|
|
31
|
+
id = 'permissions';
|
|
32
|
+
name = 'Permissions';
|
|
33
|
+
category = 'Permissions';
|
|
34
|
+
description = 'Reports unassigned permission sets and high profile counts that increase the attack surface';
|
|
35
|
+
async run(ctx) {
|
|
36
|
+
const findings = [];
|
|
37
|
+
const baseUrl = ctx.orgInfo.instanceUrl;
|
|
38
|
+
// Custom permission sets only: IsCustom = true excludes profile-owned and Salesforce system-managed sets
|
|
39
|
+
const psCountResult = await ctx.soql.query('SELECT COUNT() FROM PermissionSet WHERE IsCustom = true');
|
|
40
|
+
const permissionSetCount = psCountResult.totalSize;
|
|
41
|
+
const psRisk = permissionSetCount > 100 ? 'HIGH' : permissionSetCount > 50 ? 'MEDIUM' : 'LOW';
|
|
42
|
+
findings.push({
|
|
43
|
+
id: 'permissions-set-count',
|
|
44
|
+
category: this.category,
|
|
45
|
+
riskLevel: psRisk,
|
|
46
|
+
title: `${permissionSetCount} custom permission sets in use`,
|
|
47
|
+
detail: 'A large number of permission sets increases administrative complexity and makes it harder to audit access effectively.',
|
|
48
|
+
remediation: 'Review and consolidate permission sets. Excessive numbers increase administrative complexity and expand the attack surface.',
|
|
49
|
+
});
|
|
50
|
+
// Unassigned custom permission sets — exclude direct assignments AND membership in a permission set group
|
|
51
|
+
const unassignedResult = await ctx.soql.query('SELECT Id, Name FROM PermissionSet WHERE IsCustom = true AND Id NOT IN (SELECT PermissionSetId FROM PermissionSetAssignment) AND Id NOT IN (SELECT PermissionSetId FROM PermissionSetGroupComponent)');
|
|
52
|
+
const unassignedSets = unassignedResult.records;
|
|
53
|
+
const unassignedCount = unassignedSets.length;
|
|
54
|
+
if (unassignedCount > 0) {
|
|
55
|
+
findings.push({
|
|
56
|
+
id: 'permissions-unassigned-sets',
|
|
57
|
+
category: this.category,
|
|
58
|
+
riskLevel: 'LOW',
|
|
59
|
+
title: `${unassignedCount} permission set(s) are defined but never assigned`,
|
|
60
|
+
detail: 'Permission sets that are defined but never assigned to any user (directly or via a permission set group) represent configuration bloat and may indicate outdated or orphaned access configurations.',
|
|
61
|
+
remediation: 'Unused permission sets should be reviewed and deleted to reduce configuration bloat.',
|
|
62
|
+
affectedItems: unassignedSets.map((r) => ({
|
|
63
|
+
label: r.Name,
|
|
64
|
+
url: `${baseUrl}/${r.Id}`,
|
|
65
|
+
})),
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
// Custom profile count: exclude managed-package profiles (NamespacePrefix = null) and known standard Salesforce profiles
|
|
69
|
+
const standardProfileList = STANDARD_PROFILE_NAMES.map((n) => `'${n}'`).join(', ');
|
|
70
|
+
const profileCountResult = await ctx.soql.query(`SELECT COUNT() FROM Profile WHERE NamespacePrefix = null AND Name NOT IN (${standardProfileList})`);
|
|
71
|
+
const profileCount = profileCountResult.totalSize;
|
|
72
|
+
if (profileCount > 30) {
|
|
73
|
+
findings.push({
|
|
74
|
+
id: 'permissions-high-profile-count',
|
|
75
|
+
category: this.category,
|
|
76
|
+
riskLevel: 'MEDIUM',
|
|
77
|
+
title: `${profileCount} custom profiles exist in this org`,
|
|
78
|
+
detail: 'A high number of custom profiles increases the complexity of access management and makes it harder to maintain a clear security model.',
|
|
79
|
+
remediation: 'Consider migrating access control from profiles to permission sets for more granular and auditable access management.',
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
findings,
|
|
84
|
+
metrics: {
|
|
85
|
+
permissionSetCount,
|
|
86
|
+
profileCount,
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=PermissionsCheck.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AuditContext } from '../../context/AuditContext.js';
|
|
2
|
+
import type { SecurityCheck, CheckResult } from '../SecurityCheck.js';
|
|
3
|
+
export declare class PublicGroupSharingCheck implements SecurityCheck {
|
|
4
|
+
readonly id = "public-group-sharing";
|
|
5
|
+
readonly name = "Public Group Sharing Exposure";
|
|
6
|
+
readonly category = "Sharing & Visibility";
|
|
7
|
+
readonly description = "Finds sharing rules that grant broad access to All Internal Users";
|
|
8
|
+
readonly dependsOnCache: readonly ["healthCloudInstalled"];
|
|
9
|
+
run(ctx: AuditContext): Promise<CheckResult>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=PublicGroupSharingCheck.d.ts.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
const SHARE_TABLES = ['AccountShare', 'CaseShare', 'ContactShare', 'OpportunityShare'];
|
|
2
|
+
export class PublicGroupSharingCheck {
|
|
3
|
+
id = 'public-group-sharing';
|
|
4
|
+
name = 'Public Group Sharing Exposure';
|
|
5
|
+
category = 'Sharing & Visibility';
|
|
6
|
+
description = 'Finds sharing rules that grant broad access to All Internal Users';
|
|
7
|
+
dependsOnCache = ['healthCloudInstalled'];
|
|
8
|
+
async run(ctx) {
|
|
9
|
+
const findings = [];
|
|
10
|
+
const baseUrl = ctx.orgInfo.instanceUrl;
|
|
11
|
+
const sharingRulesUrl = `${baseUrl}/lightning/setup/SecuritySharingRules/page`;
|
|
12
|
+
const groups = await ctx.soql.queryAll("SELECT Id, Name, Type FROM Group WHERE Type = 'AllInternal'");
|
|
13
|
+
if (groups.length === 0) {
|
|
14
|
+
findings.push({
|
|
15
|
+
id: 'public-group-sharing-none',
|
|
16
|
+
category: this.category,
|
|
17
|
+
riskLevel: 'LOW',
|
|
18
|
+
title: 'No records shared to All Internal Users groups via sharing rules',
|
|
19
|
+
detail: 'No sharing rules were found targeting the "All Internal Users" group on key objects.',
|
|
20
|
+
remediation: 'Continue to avoid broad sharing rules. Periodically review sharing configuration as the org grows.',
|
|
21
|
+
});
|
|
22
|
+
return { findings };
|
|
23
|
+
}
|
|
24
|
+
const exposures = [];
|
|
25
|
+
for (const group of groups) {
|
|
26
|
+
for (const shareTable of SHARE_TABLES) {
|
|
27
|
+
try {
|
|
28
|
+
const result = await ctx.soql.query(`SELECT COUNT() FROM ${shareTable} WHERE UserOrGroupId = '${group.Id}' AND RowCause = 'SharingRule'`);
|
|
29
|
+
if (result.totalSize > 0) {
|
|
30
|
+
exposures.push({ shareTable, groupName: group.Name, count: result.totalSize });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
// Object may not exist or not be accessible — skip silently
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (exposures.length > 0) {
|
|
39
|
+
const objectCount = new Set(exposures.map((e) => e.shareTable)).size;
|
|
40
|
+
const riskLevel = ctx.cache.healthCloudInstalled === true ? 'HIGH' : 'MEDIUM';
|
|
41
|
+
findings.push({
|
|
42
|
+
id: 'public-group-sharing-exposure',
|
|
43
|
+
category: this.category,
|
|
44
|
+
riskLevel,
|
|
45
|
+
title: `All Internal Users group shares records across ${objectCount} object type(s)`,
|
|
46
|
+
affectedItems: exposures.map((e) => ({
|
|
47
|
+
label: `${e.shareTable} → ${e.groupName}`,
|
|
48
|
+
url: sharingRulesUrl,
|
|
49
|
+
note: `${e.count} sharing rule(s) — replace with targeted group or role-based sharing`,
|
|
50
|
+
})),
|
|
51
|
+
detail: 'Sharing rules targeting "All Internal Users" expose records to every active internal user in the org.',
|
|
52
|
+
remediation: 'Replace "All Internal Users" sharing rules with more targeted public groups or role-based sharing.',
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
findings.push({
|
|
57
|
+
id: 'public-group-sharing-none',
|
|
58
|
+
category: this.category,
|
|
59
|
+
riskLevel: 'LOW',
|
|
60
|
+
title: 'No records shared to All Internal Users groups via sharing rules',
|
|
61
|
+
detail: 'No sharing rules were found targeting the "All Internal Users" group on key objects.',
|
|
62
|
+
remediation: 'Continue to avoid broad sharing rules. Periodically review sharing configuration as the org grows.',
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return { findings };
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=PublicGroupSharingCheck.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AuditContext } from '../../context/AuditContext.js';
|
|
2
|
+
import type { SecurityCheck, CheckResult } from '../SecurityCheck.js';
|
|
3
|
+
export declare class RemoteSitesCheck implements SecurityCheck {
|
|
4
|
+
readonly id = "remote-sites";
|
|
5
|
+
readonly name = "Remote Site Settings";
|
|
6
|
+
readonly category = "External Connectivity";
|
|
7
|
+
readonly description = "Inventories remote site settings and flags those with protocol security disabled";
|
|
8
|
+
readonly populatesCache: readonly ["remoteSiteUrls"];
|
|
9
|
+
run(ctx: AuditContext): Promise<CheckResult>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=RemoteSitesCheck.d.ts.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export class RemoteSitesCheck {
|
|
2
|
+
id = 'remote-sites';
|
|
3
|
+
name = 'Remote Site Settings';
|
|
4
|
+
category = 'External Connectivity';
|
|
5
|
+
description = 'Inventories remote site settings and flags those with protocol security disabled';
|
|
6
|
+
populatesCache = ['remoteSiteUrls'];
|
|
7
|
+
async run(ctx) {
|
|
8
|
+
const findings = [];
|
|
9
|
+
const baseUrl = ctx.orgInfo.instanceUrl;
|
|
10
|
+
const setupUrl = `${baseUrl}/lightning/setup/SecurityWhitelistPage/page`;
|
|
11
|
+
// Query active remote site settings using Tooling API
|
|
12
|
+
const records = await ctx.tooling.query('SELECT Id, SiteName, EndpointUrl, IsActive, DisableProtocolSecurity FROM RemoteProxy WHERE IsActive = true');
|
|
13
|
+
const count = records.length;
|
|
14
|
+
// Cache the URLs for use by HardcodedCredentialsCheck
|
|
15
|
+
ctx.cache.remoteSiteUrls = records.map((r) => r.EndpointUrl);
|
|
16
|
+
// Flag sites with protocol security disabled — these allow insecure HTTP callouts
|
|
17
|
+
const insecureSites = records.filter((r) => r.DisableProtocolSecurity);
|
|
18
|
+
const secureSites = records.filter((r) => !r.DisableProtocolSecurity);
|
|
19
|
+
if (insecureSites.length > 0) {
|
|
20
|
+
findings.push({
|
|
21
|
+
id: 'remote-sites-protocol-security-disabled',
|
|
22
|
+
category: this.category,
|
|
23
|
+
riskLevel: 'HIGH',
|
|
24
|
+
title: `${insecureSites.length} remote site(s) have protocol security disabled`,
|
|
25
|
+
detail: 'Remote sites with "Disable Protocol Security" enabled allow Apex to make callouts over plain HTTP, exposing data in transit to interception.',
|
|
26
|
+
remediation: 'Enable HTTPS on each endpoint and remove the "Disable Protocol Security" flag. Plaintext HTTP callouts should never be used for any integration.',
|
|
27
|
+
affectedItems: insecureSites.map((r) => ({
|
|
28
|
+
label: r.SiteName,
|
|
29
|
+
url: setupUrl,
|
|
30
|
+
note: `${r.EndpointUrl} — enable HTTPS and re-enable protocol security`,
|
|
31
|
+
})),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
// Emit an inventory finding (INFO) for all active sites
|
|
35
|
+
if (count > 0) {
|
|
36
|
+
findings.push({
|
|
37
|
+
id: 'remote-sites-inventory',
|
|
38
|
+
category: this.category,
|
|
39
|
+
riskLevel: insecureSites.length === 0 ? 'LOW' : 'INFO',
|
|
40
|
+
title: `${count} active remote site setting(s) registered (${insecureSites.length} insecure, ${secureSites.length} secure)`,
|
|
41
|
+
detail: 'Remote Site Settings control which external URLs Apex code can call. Entries should be reviewed periodically to remove unused entries.',
|
|
42
|
+
remediation: 'Audit each remote site setting to confirm it is still actively used. Remove unused entries to reduce the attack surface.',
|
|
43
|
+
affectedItems: records.map((r) => ({
|
|
44
|
+
label: r.SiteName,
|
|
45
|
+
url: setupUrl,
|
|
46
|
+
note: `${r.EndpointUrl}${r.DisableProtocolSecurity ? ' ⚠ Protocol security disabled' : ''}`,
|
|
47
|
+
})),
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
findings.push({
|
|
52
|
+
id: 'no-remote-sites',
|
|
53
|
+
category: this.category,
|
|
54
|
+
riskLevel: 'LOW',
|
|
55
|
+
title: 'No active remote site settings found',
|
|
56
|
+
detail: 'No active Remote Site Settings are registered in this org.',
|
|
57
|
+
remediation: 'This is expected if the org does not make outbound callouts. Monitor as integrations are added.',
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
findings,
|
|
62
|
+
metrics: {
|
|
63
|
+
remoteSitesCount: count,
|
|
64
|
+
insecureRemoteSitesCount: insecureSites.length,
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=RemoteSitesCheck.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 ScheduledApexCheck implements SecurityCheck {
|
|
4
|
+
readonly id = "scheduled-apex";
|
|
5
|
+
readonly name = "Scheduled and Batch Apex";
|
|
6
|
+
readonly category = "Code Security";
|
|
7
|
+
readonly description = "Lists active scheduled and batch Apex jobs running in the org";
|
|
8
|
+
run(ctx: AuditContext): Promise<CheckResult>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=ScheduledApexCheck.d.ts.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export class ScheduledApexCheck {
|
|
2
|
+
id = 'scheduled-apex';
|
|
3
|
+
name = 'Scheduled and Batch Apex';
|
|
4
|
+
category = 'Code Security';
|
|
5
|
+
description = 'Lists active scheduled and batch Apex jobs running in the org';
|
|
6
|
+
async run(ctx) {
|
|
7
|
+
const findings = [];
|
|
8
|
+
const baseUrl = ctx.orgInfo.instanceUrl;
|
|
9
|
+
const apexJobsUrl = `${baseUrl}/lightning/setup/ScheduledJobs/page`;
|
|
10
|
+
const apexClassesUrl = `${baseUrl}/lightning/setup/ApexClasses/page`;
|
|
11
|
+
// Query all active scheduled/batch Apex jobs
|
|
12
|
+
const jobs = await ctx.soql.queryAll(`
|
|
13
|
+
SELECT Id, ApexClass.Name, JobType, Status, CreatedById
|
|
14
|
+
FROM AsyncApexJob
|
|
15
|
+
WHERE JobType IN ('ScheduledApex', 'BatchApex')
|
|
16
|
+
AND Status NOT IN ('Aborted', 'Failed', 'Completed')
|
|
17
|
+
`);
|
|
18
|
+
const totalJobs = jobs.length;
|
|
19
|
+
// If there are jobs, get creator profiles
|
|
20
|
+
let creatorMap = {};
|
|
21
|
+
if (jobs.length > 0) {
|
|
22
|
+
const creatorIds = [...new Set(jobs.map((j) => j.CreatedById))];
|
|
23
|
+
const inClause = creatorIds.map((id) => `'${id}'`).join(',');
|
|
24
|
+
const creators = await ctx.soql.query(`
|
|
25
|
+
SELECT Id, Username, Profile.Name FROM User WHERE Id IN (${inClause})
|
|
26
|
+
`);
|
|
27
|
+
creators.records.forEach((u) => {
|
|
28
|
+
creatorMap[u.Id] = u;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
// Find privileged admin jobs
|
|
32
|
+
const privilegedJobs = jobs.filter((job) => {
|
|
33
|
+
const creator = creatorMap[job.CreatedById];
|
|
34
|
+
if (!creator)
|
|
35
|
+
return false;
|
|
36
|
+
const profileName = creator.Profile.Name || '';
|
|
37
|
+
return (profileName.toLowerCase().includes('admin') ||
|
|
38
|
+
profileName.toLowerCase().includes('system administrator'));
|
|
39
|
+
});
|
|
40
|
+
if (privilegedJobs.length > 0) {
|
|
41
|
+
findings.push({
|
|
42
|
+
id: 'scheduled-apex-privileged',
|
|
43
|
+
category: this.category,
|
|
44
|
+
riskLevel: 'MEDIUM',
|
|
45
|
+
title: `${privilegedJobs.length} scheduled/batch Apex job(s) are running under privileged accounts`,
|
|
46
|
+
detail: 'Scheduled Apex jobs running under administrator accounts execute with elevated privileges and may persist after the original user is deactivated.',
|
|
47
|
+
remediation: 'Assign a dedicated integration user with minimum necessary permissions to own scheduled jobs.',
|
|
48
|
+
affectedItems: privilegedJobs.map((job) => ({
|
|
49
|
+
label: `${job.ApexClass.Name} (${job.JobType})`,
|
|
50
|
+
url: apexJobsUrl,
|
|
51
|
+
note: `Owner: ${creatorMap[job.CreatedById].Username} [${creatorMap[job.CreatedById].Profile.Name}] — reassign to a dedicated integration user`,
|
|
52
|
+
})),
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
// Always emit INFO finding
|
|
56
|
+
findings.push({
|
|
57
|
+
id: 'scheduled-apex-inventory',
|
|
58
|
+
category: this.category,
|
|
59
|
+
riskLevel: 'INFO',
|
|
60
|
+
title: `${totalJobs} active scheduled/batch Apex job(s) found`,
|
|
61
|
+
detail: 'This is an inventory of currently active scheduled and batch Apex jobs in the org.',
|
|
62
|
+
remediation: 'Periodically review scheduled jobs to ensure all active automation is expected and authorized.',
|
|
63
|
+
affectedItems: jobs.length > 0 ? jobs.map((job) => ({
|
|
64
|
+
label: `${job.ApexClass.Name} (${job.JobType})`,
|
|
65
|
+
url: apexJobsUrl,
|
|
66
|
+
note: `Class: ${job.ApexClass.Name}`,
|
|
67
|
+
})) : undefined,
|
|
68
|
+
});
|
|
69
|
+
return { findings };
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=ScheduledApexCheck.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 SharingModelCheck implements SecurityCheck {
|
|
4
|
+
readonly id = "sharing-model";
|
|
5
|
+
readonly name = "Org-Wide Defaults (OWD) Sharing Model";
|
|
6
|
+
readonly category = "Data Access Control";
|
|
7
|
+
readonly description = "Checks OWD sharing settings for Account, Contact, Opportunity, Case, and Lead";
|
|
8
|
+
run(ctx: AuditContext): Promise<CheckResult>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=SharingModelCheck.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const OBJECTS_TO_CHECK = ['Account', 'Contact', 'Opportunity', 'Case', 'Lead'];
|
|
2
|
+
export class SharingModelCheck {
|
|
3
|
+
id = 'sharing-model';
|
|
4
|
+
name = 'Org-Wide Defaults (OWD) Sharing Model';
|
|
5
|
+
category = 'Data Access Control';
|
|
6
|
+
description = 'Checks OWD sharing settings for Account, Contact, Opportunity, Case, and Lead';
|
|
7
|
+
async run(ctx) {
|
|
8
|
+
const findings = [];
|
|
9
|
+
const baseUrl = ctx.orgInfo.instanceUrl;
|
|
10
|
+
const owdUrl = `${baseUrl}/lightning/setup/OrgWideDefaultSettings/page`;
|
|
11
|
+
const publicReadWriteObjects = [];
|
|
12
|
+
for (const objectName of OBJECTS_TO_CHECK) {
|
|
13
|
+
try {
|
|
14
|
+
const result = await ctx.rest.get(`/sobjects/${objectName}/describe/`);
|
|
15
|
+
const { sharingModel } = result;
|
|
16
|
+
if (sharingModel === 'ReadWrite' || sharingModel === 'ReadWriteTransfer') {
|
|
17
|
+
publicReadWriteObjects.push({ name: objectName, sharingModel });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
// Skip objects that fail to describe (e.g., org without certain modules)
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const count = publicReadWriteObjects.length;
|
|
26
|
+
let riskLevel;
|
|
27
|
+
if (count >= 3)
|
|
28
|
+
riskLevel = 'HIGH';
|
|
29
|
+
else if (count >= 1)
|
|
30
|
+
riskLevel = 'MEDIUM';
|
|
31
|
+
else
|
|
32
|
+
riskLevel = 'LOW';
|
|
33
|
+
if (count > 0) {
|
|
34
|
+
findings.push({
|
|
35
|
+
id: 'sharing-model-public-read-write',
|
|
36
|
+
category: this.category,
|
|
37
|
+
riskLevel,
|
|
38
|
+
title: `${count} object(s) have Public Read/Write org-wide defaults`,
|
|
39
|
+
detail: 'Org-wide defaults of Public Read/Write mean any user can read and edit all records of these objects regardless of ownership.',
|
|
40
|
+
remediation: 'Set org-wide defaults to Private or Public Read Only for sensitive objects and use sharing rules to grant specific access.',
|
|
41
|
+
affectedItems: publicReadWriteObjects.map((obj) => ({
|
|
42
|
+
label: obj.name,
|
|
43
|
+
url: owdUrl,
|
|
44
|
+
note: `Current OWD: ${obj.sharingModel} — change to Private or Public Read Only`,
|
|
45
|
+
})),
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
findings.push({
|
|
50
|
+
id: 'sharing-model-secure',
|
|
51
|
+
category: this.category,
|
|
52
|
+
riskLevel: 'LOW',
|
|
53
|
+
title: 'No objects have Public Read/Write org-wide defaults',
|
|
54
|
+
detail: 'All checked standard objects have appropriately restrictive org-wide default sharing settings.',
|
|
55
|
+
remediation: 'Continue monitoring OWD settings as new objects and customizations are introduced.',
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return { findings };
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=SharingModelCheck.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 UsersAndAdminsCheck implements SecurityCheck {
|
|
4
|
+
readonly id = "users-and-admins";
|
|
5
|
+
readonly name = "Users and Admins";
|
|
6
|
+
readonly category = "Users & Admins";
|
|
7
|
+
readonly description = "Identifies users with dangerous system-wide permissions (ModifyAllData, ViewAllData, AuthorApex, CustomizeApplication)";
|
|
8
|
+
run(ctx: AuditContext): Promise<CheckResult>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=UsersAndAdminsCheck.d.ts.map
|