@cclabsnz/sf-audit 1.6.0 → 1.7.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 +110 -1
- package/lib/apps/analyzeApps.d.ts +1 -1
- package/lib/apps/appResolver.d.ts +1 -1
- package/lib/apps/grantedAccess.d.ts +1 -1
- package/lib/chains/AttackChain.d.ts +1 -1
- package/lib/chains/namedChains.d.ts +1 -1
- package/lib/checks/CheckEngine.d.ts +1 -1
- package/lib/checks/SecurityCheck.d.ts +3 -3
- package/lib/checks/impl/AgentActionSurfaceCheck.d.ts +1 -1
- package/lib/checks/impl/AgentActionSurfaceCheck.js +1 -1
- package/lib/checks/impl/AgentChannelExposureCheck.d.ts +1 -1
- package/lib/checks/impl/AgentInventoryCheck.d.ts +1 -1
- package/lib/checks/impl/AgentInventoryCheck.js +1 -1
- package/lib/checks/impl/AgentMonitoringCoverageCheck.d.ts +1 -1
- package/lib/checks/impl/AgentUserPrivilegeCheck.d.ts +1 -1
- package/lib/checks/impl/AnonymousApexAuditCheck.d.ts +1 -1
- package/lib/checks/impl/ApexCrudFLSCheck.d.ts +1 -1
- package/lib/checks/impl/ApexLoggingCheck.d.ts +1 -1
- package/lib/checks/impl/ApexRestEndpointCheck.d.ts +1 -1
- package/lib/checks/impl/ApexSharingCheck.d.ts +1 -1
- package/lib/checks/impl/ApexSharingCheck.js +3 -2
- package/lib/checks/impl/ApiClientPermissionCheck.d.ts +1 -1
- package/lib/checks/impl/ApiLimitsCheck.d.ts +1 -1
- package/lib/checks/impl/AuditTrailCheck.d.ts +1 -1
- package/lib/checks/impl/AuthProvidersCheck.d.ts +1 -1
- package/lib/checks/impl/CertificateExpiryCheck.d.ts +1 -1
- package/lib/checks/impl/ClassicSitesCheck.d.ts +1 -1
- package/lib/checks/impl/CodeSecurityCheck.d.ts +1 -1
- package/lib/checks/impl/CodeSecurityCheck.js +5 -5
- package/lib/checks/impl/ConnectedAppInactivityCheck.d.ts +1 -1
- package/lib/checks/impl/ConnectedAppScopeCheck.d.ts +1 -1
- package/lib/checks/impl/ConnectedAppsCheck.d.ts +1 -1
- package/lib/checks/impl/ContentLinksCheck.d.ts +1 -1
- package/lib/checks/impl/CorsAllowlistCheck.d.ts +1 -1
- package/lib/checks/impl/CspTrustedSitesCheck.d.ts +1 -1
- package/lib/checks/impl/CustomLabelsCredentialCheck.d.ts +1 -1
- package/lib/checks/impl/CustomSettingsCheck.d.ts +1 -1
- package/lib/checks/impl/DataClassificationCheck.d.ts +1 -1
- package/lib/checks/impl/DataExportAccessCheck.d.ts +1 -1
- package/lib/checks/impl/DebugLogAccessCheck.d.ts +1 -1
- package/lib/checks/impl/DeploymentIdentityCheck.d.ts +1 -1
- package/lib/checks/impl/EmailSecurityCheck.d.ts +1 -1
- package/lib/checks/impl/EncryptionCoverageCheck.d.ts +1 -1
- package/lib/checks/impl/EnhancedDomainsCheck.d.ts +1 -1
- package/lib/checks/impl/EnhancedDomainsCheck.js +18 -4
- package/lib/checks/impl/EscalationPermsCheck.d.ts +1 -1
- package/lib/checks/impl/EventMonitoringCheck.d.ts +1 -1
- package/lib/checks/impl/EventMonitoringCheck.js +1 -1
- package/lib/checks/impl/ExperienceCloudSiteCheck.d.ts +1 -1
- package/lib/checks/impl/ExperienceCspCheck.d.ts +1 -1
- package/lib/checks/impl/ExternalCredentialsCheck.d.ts +1 -1
- package/lib/checks/impl/FailedLoginCheck.d.ts +1 -1
- package/lib/checks/impl/FieldHistoryTrackingCheck.d.ts +1 -1
- package/lib/checks/impl/FieldLevelSecurityCheck.d.ts +1 -1
- package/lib/checks/impl/FlowsWithoutSharingCheck.d.ts +1 -1
- package/lib/checks/impl/FlowsWithoutSharingCheck.js +10 -9
- package/lib/checks/impl/GuestApiAccessCheck.d.ts +1 -1
- package/lib/checks/impl/GuestExecutableApexCheck.d.ts +1 -1
- package/lib/checks/impl/GuestExecutableApexCheck.js +4 -3
- package/lib/checks/impl/GuestObjectExposureCheck.d.ts +1 -1
- package/lib/checks/impl/GuestRecordAccessPolicyCheck.d.ts +1 -1
- package/lib/checks/impl/GuestSiteOptionsCheck.d.ts +1 -1
- package/lib/checks/impl/GuestTrafficAnomalyCheck.d.ts +1 -1
- package/lib/checks/impl/GuestTrafficAnomalyCheck.js +1 -1
- package/lib/checks/impl/GuestUserAccessCheck.d.ts +1 -1
- package/lib/checks/impl/HardcodedCredentialsCheck.d.ts +1 -1
- package/lib/checks/impl/HardcodedCredentialsCheck.js +8 -1
- package/lib/checks/impl/HealthCheckCheck.d.ts +1 -1
- package/lib/checks/impl/HighAssuranceSessionCheck.d.ts +1 -1
- package/lib/checks/impl/InactiveUsersCheck.d.ts +1 -1
- package/lib/checks/impl/InstalledPackagesCheck.d.ts +1 -1
- package/lib/checks/impl/IntegrationUsersCheck.d.ts +1 -1
- package/lib/checks/impl/InternalUserMfaCheck.d.ts +1 -1
- package/lib/checks/impl/IpRestrictionsCheck.d.ts +1 -1
- package/lib/checks/impl/LegacyApiVersionCheck.d.ts +1 -1
- package/lib/checks/impl/LoginAccessPolicyCheck.d.ts +1 -1
- package/lib/checks/impl/LoginAnomalyCheck.d.ts +1 -1
- package/lib/checks/impl/LoginSessionCheck.d.ts +1 -1
- package/lib/checks/impl/MfaEnforcementCheck.d.ts +1 -1
- package/lib/checks/impl/MfaMethodStrengthCheck.d.ts +1 -1
- package/lib/checks/impl/MfaRegistrationCheck.d.ts +1 -1
- package/lib/checks/impl/MyDomainLoginPolicyCheck.d.ts +1 -1
- package/lib/checks/impl/NamedCredentialsCheck.d.ts +1 -1
- package/lib/checks/impl/NamedCredentialsCheck.js +7 -6
- package/lib/checks/impl/OutboundMessagesCheck.d.ts +1 -1
- package/lib/checks/impl/PasswordSessionPolicyCheck.d.ts +2 -2
- package/lib/checks/impl/PermissionsCheck.d.ts +1 -1
- package/lib/checks/impl/PrivilegedAccessCheck.d.ts +1 -1
- package/lib/checks/impl/PublicContentExposureCheck.d.ts +1 -1
- package/lib/checks/impl/PublicGroupSharingCheck.d.ts +1 -1
- package/lib/checks/impl/ReleaseUpdatesCheck.d.ts +1 -1
- package/lib/checks/impl/RemoteSitesCheck.d.ts +1 -1
- package/lib/checks/impl/ReportFolderAccessCheck.d.ts +1 -1
- package/lib/checks/impl/SandboxDataMaskingCheck.d.ts +1 -1
- package/lib/checks/impl/ScheduledApexCheck.d.ts +1 -1
- package/lib/checks/impl/SeparationOfDutiesCheck.d.ts +1 -1
- package/lib/checks/impl/SessionHardeningCheck.d.ts +1 -1
- package/lib/checks/impl/SharingModelCheck.d.ts +1 -1
- package/lib/checks/impl/SiemIntegrationCheck.d.ts +1 -1
- package/lib/checks/impl/SsoEnforcementCheck.d.ts +1 -1
- package/lib/checks/impl/StandardProfilesCheck.d.ts +1 -1
- package/lib/checks/impl/ThreatDetectionCheck.d.ts +1 -1
- package/lib/checks/impl/TransactionSecurityPolicyCheck.d.ts +1 -1
- package/lib/checks/impl/TrustedIPRangesCheck.d.ts +1 -1
- package/lib/checks/impl/TrustedUrlHygieneCheck.d.ts +1 -1
- package/lib/checks/impl/UsersAndAdminsCheck.d.ts +1 -1
- package/lib/checks/impl/VisualforceXssCheck.d.ts +1 -1
- package/lib/commands/audit/events/pull.d.ts +1 -1
- package/lib/commands/audit/events/pull.js +3 -3
- package/lib/commands/audit/security.js +3 -1
- package/lib/findings/AuditResult.d.ts +1 -1
- package/lib/findings/Finding.d.ts +1 -1
- package/lib/findings/ScoringConfig.d.ts +9 -217
- package/lib/findings/scoring.d.ts +2 -2
- package/lib/findings/scoring.js +1 -1
- package/lib/history/AuditDiff.d.ts +1 -1
- package/lib/history/metricMeta.d.ts +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/lib/wire.d.ts +6 -6
- package/lib/lib/wire.js +4 -4
- package/lib/renderers/ClientReportRenderer.d.ts +1 -1
- package/lib/renderers/ClientReportRenderer.js +6 -3
- package/lib/renderers/HistoryRenderer.js +2 -1
- package/lib/renderers/HtmlRenderer.js +3 -4
- package/lib/renderers/MarkdownRenderer.js +1 -1
- package/lib/renderers/chartAsset.d.ts +12 -0
- package/lib/renderers/chartAsset.js +25 -0
- package/package.json +26 -28
- package/lib/api/ApiError.d.ts +0 -6
- package/lib/api/ApiError.js +0 -6
- package/lib/api/MetadataClient.d.ts +0 -4
- package/lib/api/MetadataClient.js +0 -2
- package/lib/api/MetadataClientImpl.d.ts +0 -8
- package/lib/api/MetadataClientImpl.js +0 -22
- package/lib/api/RestClient.d.ts +0 -6
- package/lib/api/RestClient.js +0 -2
- package/lib/api/RestClientImpl.d.ts +0 -10
- package/lib/api/RestClientImpl.js +0 -45
- package/lib/api/SoqlClient.d.ts +0 -10
- package/lib/api/SoqlClient.js +0 -2
- package/lib/api/SoqlClientImpl.d.ts +0 -9
- package/lib/api/SoqlClientImpl.js +0 -19
- package/lib/api/ToolingClient.d.ts +0 -5
- package/lib/api/ToolingClient.js +0 -2
- package/lib/api/ToolingClientImpl.d.ts +0 -10
- package/lib/api/ToolingClientImpl.js +0 -29
- package/lib/api/index.d.ts +0 -9
- package/lib/api/index.js +0 -5
- package/lib/checks/eventLogAccess.d.ts +0 -14
- package/lib/checks/eventLogAccess.js +0 -33
- package/lib/context/AuditCache.d.ts +0 -78
- package/lib/context/AuditCache.js +0 -2
- package/lib/context/AuditContext.d.ts +0 -19
- package/lib/context/AuditContext.js +0 -2
- package/lib/context/OrgInfo.d.ts +0 -9
- package/lib/context/OrgInfo.js +0 -2
- package/lib/context/OrgMetrics.d.ts +0 -20
- package/lib/context/OrgMetrics.js +0 -20
- package/lib/events/EventBaselineStore.d.ts +0 -16
- package/lib/events/EventBaselineStore.js +0 -55
- package/lib/events/eventLogQuery.d.ts +0 -21
- package/lib/events/eventLogQuery.js +0 -34
- package/lib/events/pullEventLogs.d.ts +0 -51
- package/lib/events/pullEventLogs.js +0 -79
- package/lib/findings/ComplianceMapping.d.ts +0 -3
- package/lib/findings/ComplianceMapping.js +0 -75
- package/lib/findings/RiskLevel.d.ts +0 -3
- package/lib/findings/RiskLevel.js +0 -2
- package/lib/queries/QueryDefinition.d.ts +0 -48
- package/lib/queries/QueryDefinition.js +0 -11
- package/lib/queries/QueryRegistry.d.ts +0 -13
- package/lib/queries/QueryRegistry.js +0 -93
- package/lib/renderers/html-utils.d.ts +0 -2
- package/lib/renderers/html-utils.js +0 -8
- package/lib/report/branding.d.ts +0 -18
- package/lib/report/branding.js +0 -19
- package/lib/report/fonts.d.ts +0 -2
- package/lib/report/fonts.js +0 -22
- package/src/assets/fonts/dm-sans-italic-latin.woff2 +0 -0
- package/src/assets/fonts/dm-sans-normal-latin.woff2 +0 -0
- package/src/assets/fonts/dm-serif-display-italic-latin.woff2 +0 -0
- package/src/assets/fonts/dm-serif-display-normal-latin.woff2 +0 -0
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
// Maps each SecurityCheck `id` to its compliance framework references.
|
|
2
|
-
// Tags use the format: <Framework>-<Control> e.g. OWASP-A01, SOC2-CC6.1, ISO-A.9.2, SBS-<domain>-<num>
|
|
3
|
-
export const COMPLIANCE_MAP = {
|
|
4
|
-
'users-and-admins': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.9.2', 'HIPAA-164.312a', 'GDPR-Art.32', 'SBS-ACS-004'],
|
|
5
|
-
'permissions': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.9.2', 'GDPR-Art.32', 'SBS-ACS-002', 'SBS-ACS-005'],
|
|
6
|
-
'inactive-users': ['OWASP-A01', 'SOC2-CC6.2', 'ISO-A.9.2', 'HIPAA-164.312a', 'GDPR-Art.5', 'SBS-ACS-007'],
|
|
7
|
-
'login-session': ['OWASP-A07', 'SOC2-CC6.1', 'ISO-A.9.4', 'HIPAA-164.312a', 'GDPR-Art.32'],
|
|
8
|
-
'ip-restrictions': ['OWASP-A07', 'SOC2-CC6.1', 'ISO-A.9.4', 'HIPAA-164.312a', 'GDPR-Art.32', 'SBS-AUTH-003'],
|
|
9
|
-
'password-session-policy': ['OWASP-A07', 'SOC2-CC6.1', 'ISO-A.9.4', 'HIPAA-164.312d', 'GDPR-Art.32'],
|
|
10
|
-
'field-level-security': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.9.4', 'HIPAA-164.312a', 'GDPR-Art.5'],
|
|
11
|
-
'sharing-model': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.9.4', 'HIPAA-164.312a', 'GDPR-Art.32'],
|
|
12
|
-
'public-group-sharing': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.9.4', 'HIPAA-164.312a', 'GDPR-Art.32'],
|
|
13
|
-
'guest-user-access': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.9.2', 'GDPR-Art.32', 'SBS-CPORTAL-002'],
|
|
14
|
-
'apex-sharing': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.9.4', 'GDPR-Art.32', 'SBS-CPORTAL-001'],
|
|
15
|
-
'flows-without-sharing': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.9.4', 'GDPR-Art.32', 'SBS-CPORTAL-004'],
|
|
16
|
-
'connected-apps': ['OWASP-A05', 'SOC2-CC6.6', 'ISO-A.9.4', 'GDPR-Art.32', 'SBS-OAUTH-001', 'SBS-OAUTH-002', 'SBS-DEP-006'],
|
|
17
|
-
'remote-sites': ['OWASP-A05', 'SOC2-CC6.4', 'ISO-A.14.1', 'GDPR-Art.32', 'SBS-INT-002'],
|
|
18
|
-
'csp-trusted-sites': ['OWASP-A05', 'SOC2-CC6.4', 'ISO-A.14.1', 'GDPR-Art.32'],
|
|
19
|
-
'named-credentials': ['OWASP-A02', 'SOC2-CC6.7', 'ISO-A.9.4', 'GDPR-Art.32', 'SBS-INT-003'],
|
|
20
|
-
'hardcoded-credentials': ['OWASP-A02', 'SOC2-CC6.7', 'ISO-A.9.4', 'HIPAA-164.312d', 'GDPR-Art.32', 'SBS-DEP-005'],
|
|
21
|
-
'custom-settings': ['OWASP-A02', 'SOC2-CC6.7', 'ISO-A.9.4', 'GDPR-Art.32'],
|
|
22
|
-
'health-check': ['OWASP-A05', 'SOC2-CC7.1', 'ISO-A.12.6', 'GDPR-Art.32', 'SBS-SECCONF-001', 'SBS-SECCONF-002'],
|
|
23
|
-
'audit-trail': ['OWASP-A09', 'SOC2-CC7.2', 'ISO-A.12.4', 'HIPAA-164.312b', 'GDPR-Art.32', 'SBS-MON-002'],
|
|
24
|
-
'code-security': ['OWASP-A03', 'OWASP-A05', 'SOC2-CC7.2', 'ISO-A.14.2', 'GDPR-Art.32', 'SBS-CODE-002'],
|
|
25
|
-
'api-limits': ['OWASP-A05', 'SOC2-CC9.1', 'ISO-A.12.6', 'GDPR-Art.32', 'SBS-MON-005'],
|
|
26
|
-
'scheduled-apex': ['OWASP-A05', 'SOC2-CC7.2', 'ISO-A.12.1', 'GDPR-Art.32'],
|
|
27
|
-
// Net-new SBS checks
|
|
28
|
-
'standard-profiles': ['OWASP-A01', 'SOC2-CC6.3', 'ISO-A.9.2', 'GDPR-Art.32', 'SBS-ACS-005'],
|
|
29
|
-
'sso-enforcement': ['OWASP-A07', 'SOC2-CC6.1', 'ISO-A.9.4', 'HIPAA-164.312d', 'GDPR-Art.32', 'SBS-AUTH-001', 'SBS-AUTH-002'],
|
|
30
|
-
'mfa-enforcement': ['OWASP-A07', 'SOC2-CC6.1', 'ISO-A.9.4', 'HIPAA-164.312d', 'GDPR-Art.32', 'SBS-AUTH-004'],
|
|
31
|
-
'api-client-permission': ['OWASP-A01', 'SOC2-CC6.3', 'ISO-A.9.4', 'GDPR-Art.32', 'SBS-ACS-006'],
|
|
32
|
-
'integration-users': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.9.2', 'GDPR-Art.32', 'SBS-ACS-007', 'SBS-ACS-008', 'SBS-ACS-009'],
|
|
33
|
-
'content-links': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.13.2', 'GDPR-Art.32', 'SBS-FILE-001', 'SBS-FILE-002', 'SBS-FILE-003'],
|
|
34
|
-
'field-history-tracking': ['OWASP-A09', 'SOC2-CC7.2', 'ISO-A.12.4', 'HIPAA-164.312b', 'GDPR-Art.32', 'SBS-DATA-004'],
|
|
35
|
-
'data-classification': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.8.2', 'HIPAA-164.514', 'GDPR-Art.30', 'SBS-DATA-001', 'SBS-DATA-002', 'SBS-DATA-003'],
|
|
36
|
-
'deployment-identity': ['OWASP-A05', 'SOC2-CC8.1', 'ISO-A.12.1', 'GDPR-Art.32', 'SBS-DEP-001', 'SBS-DEP-003'],
|
|
37
|
-
'apex-logging': ['OWASP-A09', 'SOC2-CC7.2', 'ISO-A.12.4', 'GDPR-Art.32', 'SBS-CODE-003', 'SBS-CODE-004'],
|
|
38
|
-
'event-monitoring': ['OWASP-A09', 'SOC2-CC7.2', 'ISO-A.12.4', 'HIPAA-164.312b', 'GDPR-Art.32', 'SBS-MON-001', 'SBS-INT-004'],
|
|
39
|
-
'siem-integration': ['OWASP-A09', 'SOC2-CC7.2', 'ISO-A.12.4', 'HIPAA-164.312b', 'GDPR-Art.32', 'SBS-MON-003', 'SBS-MON-004'],
|
|
40
|
-
// Additional security checks
|
|
41
|
-
'apex-crud-fls': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.9.4', 'HIPAA-164.312a', 'GDPR-Art.32'],
|
|
42
|
-
'apex-rest-endpoint': ['OWASP-A01', 'OWASP-A07', 'SOC2-CC6.1', 'ISO-A.9.4', 'GDPR-Art.32'],
|
|
43
|
-
'visualforce-xss': ['OWASP-A03', 'SOC2-CC6.1', 'ISO-A.14.2', 'GDPR-Art.32'],
|
|
44
|
-
'certificate-expiry': ['OWASP-A02', 'SOC2-CC6.7', 'ISO-A.10.1', 'HIPAA-164.312e', 'GDPR-Art.32'],
|
|
45
|
-
'installed-packages': ['OWASP-A06', 'SOC2-CC9.2', 'ISO-A.14.2', 'GDPR-Art.32'],
|
|
46
|
-
'trusted-ip-ranges': ['OWASP-A07', 'SOC2-CC6.1', 'ISO-A.9.4', 'HIPAA-164.312d', 'GDPR-Art.32', 'SBS-AUTH-003'],
|
|
47
|
-
'anonymous-apex-audit': ['OWASP-A09', 'SOC2-CC7.2', 'ISO-A.12.4', 'GDPR-Art.32'],
|
|
48
|
-
'debug-log-access': ['OWASP-A09', 'SOC2-CC7.2', 'ISO-A.12.4', 'HIPAA-164.312b', 'GDPR-Art.32'],
|
|
49
|
-
'connected-app-inactivity': ['OWASP-A05', 'SOC2-CC6.6', 'ISO-A.9.2', 'GDPR-Art.32'],
|
|
50
|
-
'my-domain-login-policy': ['OWASP-A07', 'SOC2-CC6.1', 'ISO-A.9.4', 'HIPAA-164.312d', 'GDPR-Art.32', 'SBS-AUTH-001'],
|
|
51
|
-
'high-assurance-session': ['OWASP-A07', 'SOC2-CC6.1', 'ISO-A.9.4', 'HIPAA-164.312d', 'GDPR-Art.32'],
|
|
52
|
-
'enhanced-domains': ['OWASP-A05', 'SOC2-CC6.1', 'ISO-A.14.1', 'GDPR-Art.32'],
|
|
53
|
-
// Recent Salesforce MFA improvements
|
|
54
|
-
'internal-user-mfa': ['OWASP-A07', 'SOC2-CC6.1', 'ISO-A.9.4', 'HIPAA-164.312d', 'GDPR-Art.32', 'SBS-AUTH-004'],
|
|
55
|
-
'mfa-registration': ['OWASP-A07', 'SOC2-CC6.1', 'ISO-A.9.4', 'HIPAA-164.312d', 'GDPR-Art.32'],
|
|
56
|
-
'mfa-method-strength': ['OWASP-A07', 'SOC2-CC6.1', 'ISO-A.9.4', 'HIPAA-164.312d', 'GDPR-Art.32'],
|
|
57
|
-
// Platform hygiene + API security
|
|
58
|
-
'release-updates': ['OWASP-A06', 'SOC2-CC7.1', 'ISO-A.12.6', 'GDPR-Art.32'],
|
|
59
|
-
'legacy-api-version': ['OWASP-A06', 'SOC2-CC6.4', 'ISO-A.12.6', 'GDPR-Art.32'],
|
|
60
|
-
'connected-app-scope': ['OWASP-A01', 'OWASP-A05', 'SOC2-CC6.6', 'ISO-A.9.4', 'GDPR-Art.32', 'SBS-OAUTH-002'],
|
|
61
|
-
// Threat detection + hacker attack surface coverage
|
|
62
|
-
'transaction-security-policy': ['OWASP-A09', 'SOC2-CC7.2', 'ISO-A.12.4', 'HIPAA-164.312b', 'GDPR-Art.32', 'SBS-MON-003'],
|
|
63
|
-
'failed-login-detection': ['OWASP-A07', 'SOC2-CC7.2', 'ISO-A.12.4', 'HIPAA-164.312b', 'GDPR-Art.32', 'SBS-MON-003'],
|
|
64
|
-
'experience-cloud-site': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.9.4', 'GDPR-Art.32', 'SBS-CPORTAL-003'],
|
|
65
|
-
'custom-labels-credential': ['OWASP-A02', 'SOC2-CC6.7', 'ISO-A.9.4', 'HIPAA-164.312d', 'GDPR-Art.32'],
|
|
66
|
-
'report-folder-access': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.9.4', 'HIPAA-164.312a', 'GDPR-Art.32'],
|
|
67
|
-
// Attack-chain ingredient checks
|
|
68
|
-
'escalation-perms': ['OWASP-A01', 'SOC2-CC6.3', 'ISO-A.9.2', 'HIPAA-164.312a', 'GDPR-Art.32', 'SBS-ACS-004'],
|
|
69
|
-
'cors-allowlist': ['OWASP-A05', 'SOC2-CC6.4', 'ISO-A.14.1', 'GDPR-Art.32'],
|
|
70
|
-
'guest-executable-apex': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.9.4', 'GDPR-Art.32', 'SBS-CPORTAL-001', 'SBS-CPORTAL-002'],
|
|
71
|
-
};
|
|
72
|
-
export function getComplianceTags(checkId) {
|
|
73
|
-
return COMPLIANCE_MAP[checkId] ?? [];
|
|
74
|
-
}
|
|
75
|
-
//# sourceMappingURL=ComplianceMapping.js.map
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const QueryDefinitionSchema: z.ZodObject<{
|
|
3
|
-
api: z.ZodEnum<["soql", "tooling", "rest"]>;
|
|
4
|
-
soql: z.ZodOptional<z.ZodString>;
|
|
5
|
-
path: z.ZodOptional<z.ZodString>;
|
|
6
|
-
description: z.ZodString;
|
|
7
|
-
fallbackOnError: z.ZodDefault<z.ZodBoolean>;
|
|
8
|
-
minApiVersion: z.ZodOptional<z.ZodString>;
|
|
9
|
-
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
api: "soql" | "tooling" | "rest";
|
|
11
|
-
description: string;
|
|
12
|
-
fallbackOnError: boolean;
|
|
13
|
-
path?: string | undefined;
|
|
14
|
-
soql?: string | undefined;
|
|
15
|
-
minApiVersion?: string | undefined;
|
|
16
|
-
}, {
|
|
17
|
-
api: "soql" | "tooling" | "rest";
|
|
18
|
-
description: string;
|
|
19
|
-
path?: string | undefined;
|
|
20
|
-
soql?: string | undefined;
|
|
21
|
-
fallbackOnError?: boolean | undefined;
|
|
22
|
-
minApiVersion?: string | undefined;
|
|
23
|
-
}>;
|
|
24
|
-
export type QueryDefinition = z.infer<typeof QueryDefinitionSchema>;
|
|
25
|
-
export declare const QueryFileSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
26
|
-
api: z.ZodEnum<["soql", "tooling", "rest"]>;
|
|
27
|
-
soql: z.ZodOptional<z.ZodString>;
|
|
28
|
-
path: z.ZodOptional<z.ZodString>;
|
|
29
|
-
description: z.ZodString;
|
|
30
|
-
fallbackOnError: z.ZodDefault<z.ZodBoolean>;
|
|
31
|
-
minApiVersion: z.ZodOptional<z.ZodString>;
|
|
32
|
-
}, "strip", z.ZodTypeAny, {
|
|
33
|
-
api: "soql" | "tooling" | "rest";
|
|
34
|
-
description: string;
|
|
35
|
-
fallbackOnError: boolean;
|
|
36
|
-
path?: string | undefined;
|
|
37
|
-
soql?: string | undefined;
|
|
38
|
-
minApiVersion?: string | undefined;
|
|
39
|
-
}, {
|
|
40
|
-
api: "soql" | "tooling" | "rest";
|
|
41
|
-
description: string;
|
|
42
|
-
path?: string | undefined;
|
|
43
|
-
soql?: string | undefined;
|
|
44
|
-
fallbackOnError?: boolean | undefined;
|
|
45
|
-
minApiVersion?: string | undefined;
|
|
46
|
-
}>>;
|
|
47
|
-
export type QueryFile = z.infer<typeof QueryFileSchema>;
|
|
48
|
-
//# sourceMappingURL=QueryDefinition.d.ts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export const QueryDefinitionSchema = z.object({
|
|
3
|
-
api: z.enum(['soql', 'tooling', 'rest']),
|
|
4
|
-
soql: z.string().optional(),
|
|
5
|
-
path: z.string().optional(),
|
|
6
|
-
description: z.string(),
|
|
7
|
-
fallbackOnError: z.boolean().default(false),
|
|
8
|
-
minApiVersion: z.string().optional(),
|
|
9
|
-
});
|
|
10
|
-
export const QueryFileSchema = z.record(z.string(), QueryDefinitionSchema);
|
|
11
|
-
//# sourceMappingURL=QueryDefinition.js.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type QueryDefinition } from './QueryDefinition.js';
|
|
2
|
-
import type { QueryResult } from '../api/SoqlClient.js';
|
|
3
|
-
import type { AuditContext } from '../context/AuditContext.js';
|
|
4
|
-
export declare class QueryRegistry {
|
|
5
|
-
private readonly map;
|
|
6
|
-
private constructor();
|
|
7
|
-
static load(configDir: string): QueryRegistry;
|
|
8
|
-
get(id: string): QueryDefinition;
|
|
9
|
-
execute<T>(id: string, ctx: AuditContext): Promise<T[] | null>;
|
|
10
|
-
executeQuery<T>(id: string, ctx: AuditContext): Promise<QueryResult<T> | null>;
|
|
11
|
-
getAll(): ReadonlyMap<string, QueryDefinition>;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=QueryRegistry.d.ts.map
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import * as fs from 'node:fs';
|
|
2
|
-
import * as path from 'node:path';
|
|
3
|
-
import { QueryFileSchema } from './QueryDefinition.js';
|
|
4
|
-
function warnFallback(id, err) {
|
|
5
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
6
|
-
process.stderr.write(`[QueryRegistry] Query '${id}' failed (fallbackOnError): ${msg}\n`);
|
|
7
|
-
}
|
|
8
|
-
export class QueryRegistry {
|
|
9
|
-
map;
|
|
10
|
-
constructor(entries) {
|
|
11
|
-
this.map = entries;
|
|
12
|
-
}
|
|
13
|
-
static load(configDir) {
|
|
14
|
-
const queryDir = path.join(configDir, 'config', 'queries');
|
|
15
|
-
const files = ['soql.json', 'tooling.json'];
|
|
16
|
-
const entries = new Map();
|
|
17
|
-
for (const file of files) {
|
|
18
|
-
const filePath = path.join(queryDir, file);
|
|
19
|
-
let raw;
|
|
20
|
-
try {
|
|
21
|
-
raw = JSON.parse(fs.readFileSync(filePath, 'utf-8'));
|
|
22
|
-
}
|
|
23
|
-
catch (err) {
|
|
24
|
-
throw new Error(`QueryRegistry: failed to read ${filePath}: ${err.message}`);
|
|
25
|
-
}
|
|
26
|
-
const parsed = QueryFileSchema.safeParse(raw);
|
|
27
|
-
if (!parsed.success) {
|
|
28
|
-
throw new Error(`QueryRegistry: invalid schema in ${file}:\n${parsed.error.message}`);
|
|
29
|
-
}
|
|
30
|
-
for (const [key, def] of Object.entries(parsed.data)) {
|
|
31
|
-
if (entries.has(key)) {
|
|
32
|
-
throw new Error(`QueryRegistry: duplicate key '${key}' found in ${file}`);
|
|
33
|
-
}
|
|
34
|
-
entries.set(key, def);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return new QueryRegistry(entries);
|
|
38
|
-
}
|
|
39
|
-
get(id) {
|
|
40
|
-
const def = this.map.get(id);
|
|
41
|
-
if (!def) {
|
|
42
|
-
throw new Error(`QueryRegistry: unknown query key '${id}'`);
|
|
43
|
-
}
|
|
44
|
-
return def;
|
|
45
|
-
}
|
|
46
|
-
async execute(id, ctx) {
|
|
47
|
-
const def = this.get(id);
|
|
48
|
-
try {
|
|
49
|
-
if (def.api === 'soql') {
|
|
50
|
-
if (!def.soql)
|
|
51
|
-
throw new Error(`Query '${id}' has api='soql' but no soql field`);
|
|
52
|
-
return await ctx.soql.queryAll(def.soql);
|
|
53
|
-
}
|
|
54
|
-
if (def.api === 'tooling') {
|
|
55
|
-
if (!def.soql)
|
|
56
|
-
throw new Error(`Query '${id}' has api='tooling' but no soql field`);
|
|
57
|
-
return await ctx.tooling.query(def.soql);
|
|
58
|
-
}
|
|
59
|
-
throw new Error(`QueryRegistry.execute: api='rest' entries cannot be executed here. ` +
|
|
60
|
-
`Use ctx.rest.get() or ctx.tooling.getRecord() directly. Key: '${id}'`);
|
|
61
|
-
}
|
|
62
|
-
catch (err) {
|
|
63
|
-
if (def.fallbackOnError) {
|
|
64
|
-
warnFallback(id, err);
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
throw err;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
async executeQuery(id, ctx) {
|
|
71
|
-
const def = this.get(id);
|
|
72
|
-
if (def.api !== 'soql') {
|
|
73
|
-
throw new Error(`QueryRegistry.executeQuery: query '${id}' must have api='soql'`);
|
|
74
|
-
}
|
|
75
|
-
if (!def.soql) {
|
|
76
|
-
throw new Error(`Query '${id}' has api='soql' but no soql field`);
|
|
77
|
-
}
|
|
78
|
-
try {
|
|
79
|
-
return await ctx.soql.query(def.soql);
|
|
80
|
-
}
|
|
81
|
-
catch (err) {
|
|
82
|
-
if (def.fallbackOnError) {
|
|
83
|
-
warnFallback(id, err);
|
|
84
|
-
return null;
|
|
85
|
-
}
|
|
86
|
-
throw err;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
getAll() {
|
|
90
|
-
return this.map;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
//# sourceMappingURL=QueryRegistry.js.map
|
package/lib/report/branding.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export interface Branding {
|
|
2
|
-
firmName: string;
|
|
3
|
-
primary: string;
|
|
4
|
-
ink: string;
|
|
5
|
-
bg: string;
|
|
6
|
-
bgAlt: string;
|
|
7
|
-
muted: string;
|
|
8
|
-
border: string;
|
|
9
|
-
fontDisplay: string;
|
|
10
|
-
fontBody: string;
|
|
11
|
-
contact: string;
|
|
12
|
-
logoPath?: string;
|
|
13
|
-
preparedFor?: string;
|
|
14
|
-
}
|
|
15
|
-
export declare const DEFAULT_BRANDING: Branding;
|
|
16
|
-
export type BrandingOverrides = Partial<Branding>;
|
|
17
|
-
export declare function resolveBranding(overrides: BrandingOverrides | undefined, preparedFor: string | undefined): Branding;
|
|
18
|
-
//# sourceMappingURL=branding.d.ts.map
|
package/lib/report/branding.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export const DEFAULT_BRANDING = {
|
|
2
|
-
firmName: 'CloudCounsel Limited',
|
|
3
|
-
primary: '#3a5a82',
|
|
4
|
-
ink: '#1a1d24',
|
|
5
|
-
bg: '#faf6ef',
|
|
6
|
-
bgAlt: '#f7f7f2',
|
|
7
|
-
muted: '#636770',
|
|
8
|
-
border: '#e9e9e3',
|
|
9
|
-
fontDisplay: 'DM Serif Display',
|
|
10
|
-
fontBody: 'DM Sans',
|
|
11
|
-
contact: 'hello@cloudcounsel.co.nz',
|
|
12
|
-
};
|
|
13
|
-
export function resolveBranding(overrides, preparedFor) {
|
|
14
|
-
const merged = { ...DEFAULT_BRANDING, ...(overrides ?? {}) };
|
|
15
|
-
if (preparedFor)
|
|
16
|
-
merged.preparedFor = preparedFor;
|
|
17
|
-
return merged;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=branding.js.map
|
package/lib/report/fonts.d.ts
DELETED
package/lib/report/fonts.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from 'node:fs';
|
|
2
|
-
import { fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname, join } from 'node:path';
|
|
4
|
-
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
5
|
-
// Resolves to <packageRoot>/src/assets/fonts from both lib/report (compiled) and src/report (ts-jest).
|
|
6
|
-
const FONT_DIR = join(HERE, '..', '..', 'src', 'assets', 'fonts');
|
|
7
|
-
function dataUri(file) {
|
|
8
|
-
const buf = readFileSync(join(FONT_DIR, file));
|
|
9
|
-
return `data:font/woff2;base64,${buf.toString('base64')}`;
|
|
10
|
-
}
|
|
11
|
-
function face(family, style, file) {
|
|
12
|
-
return `@font-face{font-family: '${family}';font-style:${style};font-display:swap;src:url(${dataUri(file)}) format('woff2');}`;
|
|
13
|
-
}
|
|
14
|
-
export function fontFaceCss() {
|
|
15
|
-
return [
|
|
16
|
-
face('DM Sans', 'normal', 'dm-sans-normal-latin.woff2'),
|
|
17
|
-
face('DM Sans', 'italic', 'dm-sans-italic-latin.woff2'),
|
|
18
|
-
face('DM Serif Display', 'normal', 'dm-serif-display-normal-latin.woff2'),
|
|
19
|
-
face('DM Serif Display', 'italic', 'dm-serif-display-italic-latin.woff2'),
|
|
20
|
-
].join('\n');
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=fonts.js.map
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|