@cclabsnz/sf-audit 1.6.1 → 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.
Files changed (176) hide show
  1. package/README.md +96 -5
  2. package/lib/apps/analyzeApps.d.ts +1 -1
  3. package/lib/apps/appResolver.d.ts +1 -1
  4. package/lib/apps/grantedAccess.d.ts +1 -1
  5. package/lib/chains/AttackChain.d.ts +1 -1
  6. package/lib/chains/namedChains.d.ts +1 -1
  7. package/lib/checks/CheckEngine.d.ts +1 -1
  8. package/lib/checks/SecurityCheck.d.ts +3 -3
  9. package/lib/checks/impl/AgentActionSurfaceCheck.d.ts +1 -1
  10. package/lib/checks/impl/AgentActionSurfaceCheck.js +1 -1
  11. package/lib/checks/impl/AgentChannelExposureCheck.d.ts +1 -1
  12. package/lib/checks/impl/AgentInventoryCheck.d.ts +1 -1
  13. package/lib/checks/impl/AgentInventoryCheck.js +1 -1
  14. package/lib/checks/impl/AgentMonitoringCoverageCheck.d.ts +1 -1
  15. package/lib/checks/impl/AgentUserPrivilegeCheck.d.ts +1 -1
  16. package/lib/checks/impl/AnonymousApexAuditCheck.d.ts +1 -1
  17. package/lib/checks/impl/ApexCrudFLSCheck.d.ts +1 -1
  18. package/lib/checks/impl/ApexLoggingCheck.d.ts +1 -1
  19. package/lib/checks/impl/ApexRestEndpointCheck.d.ts +1 -1
  20. package/lib/checks/impl/ApexSharingCheck.d.ts +1 -1
  21. package/lib/checks/impl/ApexSharingCheck.js +3 -2
  22. package/lib/checks/impl/ApiClientPermissionCheck.d.ts +1 -1
  23. package/lib/checks/impl/ApiLimitsCheck.d.ts +1 -1
  24. package/lib/checks/impl/AuditTrailCheck.d.ts +1 -1
  25. package/lib/checks/impl/AuthProvidersCheck.d.ts +1 -1
  26. package/lib/checks/impl/CertificateExpiryCheck.d.ts +1 -1
  27. package/lib/checks/impl/ClassicSitesCheck.d.ts +1 -1
  28. package/lib/checks/impl/CodeSecurityCheck.d.ts +1 -1
  29. package/lib/checks/impl/CodeSecurityCheck.js +5 -5
  30. package/lib/checks/impl/ConnectedAppInactivityCheck.d.ts +1 -1
  31. package/lib/checks/impl/ConnectedAppScopeCheck.d.ts +1 -1
  32. package/lib/checks/impl/ConnectedAppsCheck.d.ts +1 -1
  33. package/lib/checks/impl/ContentLinksCheck.d.ts +1 -1
  34. package/lib/checks/impl/CorsAllowlistCheck.d.ts +1 -1
  35. package/lib/checks/impl/CspTrustedSitesCheck.d.ts +1 -1
  36. package/lib/checks/impl/CustomLabelsCredentialCheck.d.ts +1 -1
  37. package/lib/checks/impl/CustomSettingsCheck.d.ts +1 -1
  38. package/lib/checks/impl/DataClassificationCheck.d.ts +1 -1
  39. package/lib/checks/impl/DataExportAccessCheck.d.ts +1 -1
  40. package/lib/checks/impl/DebugLogAccessCheck.d.ts +1 -1
  41. package/lib/checks/impl/DeploymentIdentityCheck.d.ts +1 -1
  42. package/lib/checks/impl/EmailSecurityCheck.d.ts +1 -1
  43. package/lib/checks/impl/EncryptionCoverageCheck.d.ts +1 -1
  44. package/lib/checks/impl/EnhancedDomainsCheck.d.ts +1 -1
  45. package/lib/checks/impl/EnhancedDomainsCheck.js +2 -2
  46. package/lib/checks/impl/EscalationPermsCheck.d.ts +1 -1
  47. package/lib/checks/impl/EventMonitoringCheck.d.ts +1 -1
  48. package/lib/checks/impl/EventMonitoringCheck.js +1 -1
  49. package/lib/checks/impl/ExperienceCloudSiteCheck.d.ts +1 -1
  50. package/lib/checks/impl/ExperienceCspCheck.d.ts +1 -1
  51. package/lib/checks/impl/ExternalCredentialsCheck.d.ts +1 -1
  52. package/lib/checks/impl/FailedLoginCheck.d.ts +1 -1
  53. package/lib/checks/impl/FieldHistoryTrackingCheck.d.ts +1 -1
  54. package/lib/checks/impl/FieldLevelSecurityCheck.d.ts +1 -1
  55. package/lib/checks/impl/FlowsWithoutSharingCheck.d.ts +1 -1
  56. package/lib/checks/impl/FlowsWithoutSharingCheck.js +10 -9
  57. package/lib/checks/impl/GuestApiAccessCheck.d.ts +1 -1
  58. package/lib/checks/impl/GuestExecutableApexCheck.d.ts +1 -1
  59. package/lib/checks/impl/GuestExecutableApexCheck.js +4 -3
  60. package/lib/checks/impl/GuestObjectExposureCheck.d.ts +1 -1
  61. package/lib/checks/impl/GuestRecordAccessPolicyCheck.d.ts +1 -1
  62. package/lib/checks/impl/GuestSiteOptionsCheck.d.ts +1 -1
  63. package/lib/checks/impl/GuestTrafficAnomalyCheck.d.ts +1 -1
  64. package/lib/checks/impl/GuestTrafficAnomalyCheck.js +1 -1
  65. package/lib/checks/impl/GuestUserAccessCheck.d.ts +1 -1
  66. package/lib/checks/impl/HardcodedCredentialsCheck.d.ts +1 -1
  67. package/lib/checks/impl/HardcodedCredentialsCheck.js +8 -1
  68. package/lib/checks/impl/HealthCheckCheck.d.ts +1 -1
  69. package/lib/checks/impl/HighAssuranceSessionCheck.d.ts +1 -1
  70. package/lib/checks/impl/InactiveUsersCheck.d.ts +1 -1
  71. package/lib/checks/impl/InstalledPackagesCheck.d.ts +1 -1
  72. package/lib/checks/impl/IntegrationUsersCheck.d.ts +1 -1
  73. package/lib/checks/impl/InternalUserMfaCheck.d.ts +1 -1
  74. package/lib/checks/impl/IpRestrictionsCheck.d.ts +1 -1
  75. package/lib/checks/impl/LegacyApiVersionCheck.d.ts +1 -1
  76. package/lib/checks/impl/LoginAccessPolicyCheck.d.ts +1 -1
  77. package/lib/checks/impl/LoginAnomalyCheck.d.ts +1 -1
  78. package/lib/checks/impl/LoginSessionCheck.d.ts +1 -1
  79. package/lib/checks/impl/MfaEnforcementCheck.d.ts +1 -1
  80. package/lib/checks/impl/MfaMethodStrengthCheck.d.ts +1 -1
  81. package/lib/checks/impl/MfaRegistrationCheck.d.ts +1 -1
  82. package/lib/checks/impl/MyDomainLoginPolicyCheck.d.ts +1 -1
  83. package/lib/checks/impl/NamedCredentialsCheck.d.ts +1 -1
  84. package/lib/checks/impl/NamedCredentialsCheck.js +7 -6
  85. package/lib/checks/impl/OutboundMessagesCheck.d.ts +1 -1
  86. package/lib/checks/impl/PasswordSessionPolicyCheck.d.ts +2 -2
  87. package/lib/checks/impl/PermissionsCheck.d.ts +1 -1
  88. package/lib/checks/impl/PrivilegedAccessCheck.d.ts +1 -1
  89. package/lib/checks/impl/PublicContentExposureCheck.d.ts +1 -1
  90. package/lib/checks/impl/PublicGroupSharingCheck.d.ts +1 -1
  91. package/lib/checks/impl/ReleaseUpdatesCheck.d.ts +1 -1
  92. package/lib/checks/impl/RemoteSitesCheck.d.ts +1 -1
  93. package/lib/checks/impl/ReportFolderAccessCheck.d.ts +1 -1
  94. package/lib/checks/impl/SandboxDataMaskingCheck.d.ts +1 -1
  95. package/lib/checks/impl/ScheduledApexCheck.d.ts +1 -1
  96. package/lib/checks/impl/SeparationOfDutiesCheck.d.ts +1 -1
  97. package/lib/checks/impl/SessionHardeningCheck.d.ts +1 -1
  98. package/lib/checks/impl/SharingModelCheck.d.ts +1 -1
  99. package/lib/checks/impl/SiemIntegrationCheck.d.ts +1 -1
  100. package/lib/checks/impl/SsoEnforcementCheck.d.ts +1 -1
  101. package/lib/checks/impl/StandardProfilesCheck.d.ts +1 -1
  102. package/lib/checks/impl/ThreatDetectionCheck.d.ts +1 -1
  103. package/lib/checks/impl/TransactionSecurityPolicyCheck.d.ts +1 -1
  104. package/lib/checks/impl/TrustedIPRangesCheck.d.ts +1 -1
  105. package/lib/checks/impl/TrustedUrlHygieneCheck.d.ts +1 -1
  106. package/lib/checks/impl/UsersAndAdminsCheck.d.ts +1 -1
  107. package/lib/checks/impl/VisualforceXssCheck.d.ts +1 -1
  108. package/lib/commands/audit/events/pull.d.ts +1 -1
  109. package/lib/commands/audit/events/pull.js +3 -3
  110. package/lib/commands/audit/security.js +3 -1
  111. package/lib/findings/AuditResult.d.ts +1 -1
  112. package/lib/findings/Finding.d.ts +1 -1
  113. package/lib/findings/ScoringConfig.d.ts +9 -217
  114. package/lib/findings/scoring.d.ts +2 -2
  115. package/lib/findings/scoring.js +1 -1
  116. package/lib/history/AuditDiff.d.ts +1 -1
  117. package/lib/history/metricMeta.d.ts +1 -1
  118. package/lib/index.d.ts +2 -2
  119. package/lib/lib/wire.d.ts +6 -6
  120. package/lib/lib/wire.js +4 -4
  121. package/lib/renderers/ClientReportRenderer.d.ts +1 -1
  122. package/lib/renderers/ClientReportRenderer.js +6 -3
  123. package/lib/renderers/HistoryRenderer.js +2 -1
  124. package/lib/renderers/HtmlRenderer.js +3 -4
  125. package/lib/renderers/MarkdownRenderer.js +1 -1
  126. package/lib/renderers/chartAsset.d.ts +12 -0
  127. package/lib/renderers/chartAsset.js +25 -0
  128. package/package.json +20 -18
  129. package/lib/api/ApiError.d.ts +0 -6
  130. package/lib/api/ApiError.js +0 -6
  131. package/lib/api/MetadataClient.d.ts +0 -4
  132. package/lib/api/MetadataClient.js +0 -2
  133. package/lib/api/MetadataClientImpl.d.ts +0 -8
  134. package/lib/api/MetadataClientImpl.js +0 -22
  135. package/lib/api/RestClient.d.ts +0 -6
  136. package/lib/api/RestClient.js +0 -2
  137. package/lib/api/RestClientImpl.d.ts +0 -10
  138. package/lib/api/RestClientImpl.js +0 -45
  139. package/lib/api/SoqlClient.d.ts +0 -10
  140. package/lib/api/SoqlClient.js +0 -2
  141. package/lib/api/SoqlClientImpl.d.ts +0 -9
  142. package/lib/api/SoqlClientImpl.js +0 -19
  143. package/lib/api/ToolingClient.d.ts +0 -5
  144. package/lib/api/ToolingClient.js +0 -2
  145. package/lib/api/ToolingClientImpl.d.ts +0 -10
  146. package/lib/api/ToolingClientImpl.js +0 -29
  147. package/lib/api/index.d.ts +0 -9
  148. package/lib/api/index.js +0 -5
  149. package/lib/checks/eventLogAccess.d.ts +0 -14
  150. package/lib/checks/eventLogAccess.js +0 -33
  151. package/lib/context/AuditCache.d.ts +0 -78
  152. package/lib/context/AuditCache.js +0 -2
  153. package/lib/context/AuditContext.d.ts +0 -19
  154. package/lib/context/AuditContext.js +0 -2
  155. package/lib/context/OrgInfo.d.ts +0 -9
  156. package/lib/context/OrgInfo.js +0 -2
  157. package/lib/context/OrgMetrics.d.ts +0 -20
  158. package/lib/context/OrgMetrics.js +0 -20
  159. package/lib/events/EventBaselineStore.d.ts +0 -16
  160. package/lib/events/EventBaselineStore.js +0 -55
  161. package/lib/events/eventLogQuery.d.ts +0 -21
  162. package/lib/events/eventLogQuery.js +0 -34
  163. package/lib/events/pullEventLogs.d.ts +0 -51
  164. package/lib/events/pullEventLogs.js +0 -79
  165. package/lib/findings/RiskLevel.d.ts +0 -3
  166. package/lib/findings/RiskLevel.js +0 -2
  167. package/lib/renderers/html-utils.d.ts +0 -2
  168. package/lib/renderers/html-utils.js +0 -8
  169. package/lib/report/branding.d.ts +0 -18
  170. package/lib/report/branding.js +0 -19
  171. package/lib/report/fonts.d.ts +0 -2
  172. package/lib/report/fonts.js +0 -22
  173. package/src/assets/fonts/dm-sans-italic-latin.woff2 +0 -0
  174. package/src/assets/fonts/dm-sans-normal-latin.woff2 +0 -0
  175. package/src/assets/fonts/dm-serif-display-italic-latin.woff2 +0 -0
  176. package/src/assets/fonts/dm-serif-display-normal-latin.woff2 +0 -0
@@ -1,8 +0,0 @@
1
- export function esc(str) {
2
- return str
3
- .replace(/&/g, '&')
4
- .replace(/</g, '&lt;')
5
- .replace(/>/g, '&gt;')
6
- .replace(/"/g, '&quot;');
7
- }
8
- //# sourceMappingURL=html-utils.js.map
@@ -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
@@ -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
@@ -1,2 +0,0 @@
1
- export declare function fontFaceCss(): string;
2
- //# sourceMappingURL=fonts.d.ts.map
@@ -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