@j-schreiber/sf-cli-security-audit 0.11.0 → 0.11.2

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 (276) hide show
  1. package/README.md +3 -3
  2. package/lib/commands/org/audit/init.d.ts +5 -3
  3. package/lib/commands/org/audit/init.js +14 -20
  4. package/lib/commands/org/audit/init.js.map +1 -1
  5. package/lib/commands/org/audit/run.d.ts +1 -1
  6. package/lib/commands/org/audit/run.js +5 -3
  7. package/lib/commands/org/audit/run.js.map +1 -1
  8. package/lib/commands/org/scan/user-perms.js +1 -1
  9. package/lib/commands/org/scan/user-perms.js.map +1 -1
  10. package/lib/libs/{core → audit-engine}/auditRun.d.ts +6 -7
  11. package/lib/libs/{core → audit-engine}/auditRun.js +20 -16
  12. package/lib/libs/audit-engine/auditRun.js.map +1 -0
  13. package/lib/libs/audit-engine/file-manager/fileManager.d.ts +31 -0
  14. package/lib/libs/audit-engine/file-manager/fileManager.js +139 -0
  15. package/lib/libs/audit-engine/file-manager/fileManager.js.map +1 -0
  16. package/lib/libs/audit-engine/file-manager/fileManager.types.d.ts +30 -0
  17. package/lib/libs/audit-engine/file-manager/fileManager.types.js +2 -0
  18. package/lib/libs/audit-engine/file-manager/fileManager.types.js.map +1 -0
  19. package/lib/libs/audit-engine/index.d.ts +121 -0
  20. package/lib/libs/audit-engine/index.js +9 -0
  21. package/lib/libs/audit-engine/index.js.map +1 -0
  22. package/lib/libs/{core/registries/types.d.ts → audit-engine/registry/context.types.d.ts} +6 -10
  23. package/lib/libs/audit-engine/registry/context.types.js +2 -0
  24. package/lib/libs/audit-engine/registry/context.types.js.map +1 -0
  25. package/lib/libs/audit-engine/registry/definitions.d.ts +23 -0
  26. package/lib/libs/audit-engine/registry/definitions.js +53 -0
  27. package/lib/libs/audit-engine/registry/definitions.js.map +1 -0
  28. package/lib/libs/{core/registries → audit-engine/registry}/helpers/permissionsScanning.d.ts +12 -2
  29. package/lib/libs/{core/registries → audit-engine/registry}/helpers/permissionsScanning.js +15 -3
  30. package/lib/libs/audit-engine/registry/helpers/permissionsScanning.js.map +1 -0
  31. package/lib/libs/audit-engine/registry/policies/connectedApps.d.ts +12 -0
  32. package/lib/libs/audit-engine/registry/policies/connectedApps.js +22 -0
  33. package/lib/libs/audit-engine/registry/policies/connectedApps.js.map +1 -0
  34. package/lib/libs/audit-engine/registry/policies/permissionSets.d.ts +18 -0
  35. package/lib/libs/audit-engine/registry/policies/permissionSets.js +80 -0
  36. package/lib/libs/audit-engine/registry/policies/permissionSets.js.map +1 -0
  37. package/lib/libs/audit-engine/registry/policies/profiles.d.ts +18 -0
  38. package/lib/libs/audit-engine/registry/policies/profiles.js +76 -0
  39. package/lib/libs/audit-engine/registry/policies/profiles.js.map +1 -0
  40. package/lib/libs/audit-engine/registry/policies/settings.d.ts +18 -0
  41. package/lib/libs/{core/policies/settingsPolicy.js → audit-engine/registry/policies/settings.js} +48 -18
  42. package/lib/libs/audit-engine/registry/policies/settings.js.map +1 -0
  43. package/lib/libs/audit-engine/registry/policies/users.d.ts +19 -0
  44. package/lib/libs/audit-engine/registry/policies/users.js +76 -0
  45. package/lib/libs/audit-engine/registry/policies/users.js.map +1 -0
  46. package/lib/libs/{core/policies → audit-engine/registry}/policy.d.ts +7 -6
  47. package/lib/libs/{core/policies → audit-engine/registry}/policy.js +2 -0
  48. package/lib/libs/audit-engine/registry/policy.js.map +1 -0
  49. package/lib/libs/{core/result-types.d.ts → audit-engine/registry/result.types.d.ts} +2 -2
  50. package/lib/libs/audit-engine/registry/result.types.js +2 -0
  51. package/lib/libs/audit-engine/registry/result.types.js.map +1 -0
  52. package/lib/libs/{core/registries → audit-engine/registry}/ruleRegistry.d.ts +10 -7
  53. package/lib/libs/{core/registries → audit-engine/registry}/ruleRegistry.js +7 -7
  54. package/lib/libs/audit-engine/registry/ruleRegistry.js.map +1 -0
  55. package/lib/libs/audit-engine/registry/rules/allUsedAppsUnderManagement.d.ts +7 -0
  56. package/lib/libs/audit-engine/registry/rules/allUsedAppsUnderManagement.js.map +1 -0
  57. package/lib/libs/{core/registries → audit-engine/registry}/rules/enforcePermissionPresets.d.ts +4 -2
  58. package/lib/libs/{core/registries → audit-engine/registry}/rules/enforcePermissionPresets.js +17 -15
  59. package/lib/libs/audit-engine/registry/rules/enforcePermissionPresets.js.map +1 -0
  60. package/lib/libs/{core/registries → audit-engine/registry}/rules/enforcePermissionsOnProfileLike.d.ts +1 -1
  61. package/lib/libs/{core/registries → audit-engine/registry}/rules/enforcePermissionsOnProfileLike.js +3 -3
  62. package/lib/libs/audit-engine/registry/rules/enforcePermissionsOnProfileLike.js.map +1 -0
  63. package/lib/libs/{core/registries → audit-engine/registry}/rules/enforcePermissionsOnUser.d.ts +2 -2
  64. package/lib/libs/audit-engine/registry/rules/enforcePermissionsOnUser.js +38 -0
  65. package/lib/libs/audit-engine/registry/rules/enforcePermissionsOnUser.js.map +1 -0
  66. package/lib/libs/{core/registries → audit-engine/registry}/rules/enforceSettings.d.ts +2 -2
  67. package/lib/libs/audit-engine/registry/rules/enforceSettings.js.map +1 -0
  68. package/lib/libs/audit-engine/registry/rules/noInactiveUsers.d.ts +14 -0
  69. package/lib/libs/{core/registries → audit-engine/registry}/rules/noInactiveUsers.js +17 -4
  70. package/lib/libs/audit-engine/registry/rules/noInactiveUsers.js.map +1 -0
  71. package/lib/libs/{core/registries → audit-engine/registry}/rules/noOtherApexApiLogins.d.ts +2 -2
  72. package/lib/libs/{core/registries → audit-engine/registry}/rules/noOtherApexApiLogins.js +4 -1
  73. package/lib/libs/audit-engine/registry/rules/noOtherApexApiLogins.js.map +1 -0
  74. package/lib/libs/audit-engine/registry/rules/noUserCanSelfAuthorize.d.ts +7 -0
  75. package/lib/libs/audit-engine/registry/rules/noUserCanSelfAuthorize.js.map +1 -0
  76. package/lib/libs/{core/registries → audit-engine/registry}/rules/policyRule.d.ts +4 -6
  77. package/lib/libs/{core/registries → audit-engine/registry}/rules/policyRule.js +2 -12
  78. package/lib/libs/audit-engine/registry/rules/policyRule.js.map +1 -0
  79. package/lib/libs/audit-engine/registry/schema.d.ts +2 -0
  80. package/lib/libs/audit-engine/registry/schema.js +11 -0
  81. package/lib/libs/audit-engine/registry/schema.js.map +1 -0
  82. package/lib/libs/audit-engine/registry/shape/auditConfigShape.d.ts +122 -0
  83. package/lib/libs/audit-engine/registry/shape/auditConfigShape.js +54 -0
  84. package/lib/libs/audit-engine/registry/shape/auditConfigShape.js.map +1 -0
  85. package/lib/libs/audit-engine/registry/shape/schema.d.ts +96 -0
  86. package/lib/libs/audit-engine/registry/shape/schema.js +84 -0
  87. package/lib/libs/audit-engine/registry/shape/schema.js.map +1 -0
  88. package/lib/libs/conf-init/auditConfig.d.ts +3 -12
  89. package/lib/libs/conf-init/auditConfig.js +25 -25
  90. package/lib/libs/conf-init/auditConfig.js.map +1 -1
  91. package/lib/libs/conf-init/defaultClassifications.d.ts +8 -0
  92. package/lib/libs/conf-init/defaultClassifications.js +116 -0
  93. package/lib/libs/conf-init/defaultClassifications.js.map +1 -0
  94. package/lib/libs/conf-init/defaultPolicies.d.ts +2 -0
  95. package/lib/libs/conf-init/defaultPolicies.js +20 -0
  96. package/lib/libs/conf-init/defaultPolicies.js.map +1 -0
  97. package/lib/libs/conf-init/init.types.d.ts +27 -0
  98. package/lib/libs/conf-init/init.types.js +8 -0
  99. package/lib/libs/conf-init/init.types.js.map +1 -0
  100. package/lib/libs/conf-init/presets/loose.d.ts +1 -1
  101. package/lib/libs/conf-init/presets/loose.js +4 -2
  102. package/lib/libs/conf-init/presets/loose.js.map +1 -1
  103. package/lib/libs/conf-init/presets/none.d.ts +2 -7
  104. package/lib/libs/conf-init/presets/none.js +1 -1
  105. package/lib/libs/conf-init/presets/none.js.map +1 -1
  106. package/lib/libs/conf-init/presets/strict.js +3 -1
  107. package/lib/libs/conf-init/presets/strict.js.map +1 -1
  108. package/lib/libs/conf-init/presets.d.ts +1 -6
  109. package/lib/libs/conf-init/presets.js +1 -6
  110. package/lib/libs/conf-init/presets.js.map +1 -1
  111. package/lib/libs/quick-scan/userPermissionScanner.js +17 -13
  112. package/lib/libs/quick-scan/userPermissionScanner.js.map +1 -1
  113. package/lib/salesforce/index.d.ts +10 -0
  114. package/lib/salesforce/index.js +8 -0
  115. package/lib/salesforce/index.js.map +1 -0
  116. package/lib/salesforce/mdapi/constants.d.ts +1 -0
  117. package/lib/salesforce/mdapi/constants.js +3 -0
  118. package/lib/salesforce/mdapi/constants.js.map +1 -0
  119. package/lib/{libs/core/mdapi/anySettingsMetadata.d.ts → salesforce/mdapi/genericSettingsMetadata.d.ts} +3 -4
  120. package/lib/{libs/core/mdapi/anySettingsMetadata.js → salesforce/mdapi/genericSettingsMetadata.js} +8 -10
  121. package/lib/salesforce/mdapi/genericSettingsMetadata.js.map +1 -0
  122. package/lib/salesforce/mdapi/mdapi.d.ts +46 -0
  123. package/lib/{libs/core/mdapi/mdapiRetriever.js → salesforce/mdapi/mdapi.js} +19 -40
  124. package/lib/salesforce/mdapi/mdapi.js.map +1 -0
  125. package/lib/salesforce/mdapi/metadataRegistry.d.ts +26 -0
  126. package/lib/salesforce/mdapi/metadataRegistry.js +43 -0
  127. package/lib/salesforce/mdapi/metadataRegistry.js.map +1 -0
  128. package/lib/{libs/core → salesforce}/mdapi/metadataRegistryEntry.js +1 -1
  129. package/lib/salesforce/mdapi/metadataRegistryEntry.js.map +1 -0
  130. package/lib/{libs/core → salesforce}/mdapi/namedMetadataToolingQueryable.js +1 -1
  131. package/lib/{libs/core → salesforce}/mdapi/namedMetadataToolingQueryable.js.map +1 -1
  132. package/lib/salesforce/mdapi/namedMetadataType.js.map +1 -0
  133. package/lib/salesforce/mdapi/singletonMetadataType.js.map +1 -0
  134. package/lib/salesforce/repositories/connected-apps/connected-app.types.d.ts +28 -0
  135. package/lib/salesforce/repositories/connected-apps/connected-app.types.js +6 -0
  136. package/lib/salesforce/repositories/connected-apps/connected-app.types.js.map +1 -0
  137. package/lib/salesforce/repositories/connected-apps/connected-apps.d.ts +16 -0
  138. package/lib/salesforce/repositories/connected-apps/connected-apps.js +83 -0
  139. package/lib/salesforce/repositories/connected-apps/connected-apps.js.map +1 -0
  140. package/lib/salesforce/repositories/connected-apps/queries.d.ts +2 -0
  141. package/lib/salesforce/repositories/connected-apps/queries.js +3 -0
  142. package/lib/salesforce/repositories/connected-apps/queries.js.map +1 -0
  143. package/lib/salesforce/repositories/perm-sets/perm-sets.types.d.ts +29 -0
  144. package/lib/salesforce/repositories/perm-sets/perm-sets.types.js +10 -0
  145. package/lib/salesforce/repositories/perm-sets/perm-sets.types.js.map +1 -0
  146. package/lib/salesforce/repositories/perm-sets/permission-sets.d.ts +11 -0
  147. package/lib/salesforce/repositories/perm-sets/permission-sets.js +43 -0
  148. package/lib/salesforce/repositories/perm-sets/permission-sets.js.map +1 -0
  149. package/lib/salesforce/repositories/perm-sets/queries.d.ts +1 -0
  150. package/lib/salesforce/repositories/perm-sets/queries.js +2 -0
  151. package/lib/salesforce/repositories/perm-sets/queries.js.map +1 -0
  152. package/lib/salesforce/repositories/profiles/profile.types.d.ts +29 -0
  153. package/lib/salesforce/repositories/profiles/profile.types.js +8 -0
  154. package/lib/salesforce/repositories/profiles/profile.types.js.map +1 -0
  155. package/lib/salesforce/repositories/profiles/profiles.d.ts +14 -0
  156. package/lib/salesforce/repositories/profiles/profiles.js +38 -0
  157. package/lib/salesforce/repositories/profiles/profiles.js.map +1 -0
  158. package/lib/salesforce/repositories/profiles/queries.d.ts +2 -0
  159. package/lib/salesforce/repositories/profiles/queries.js +7 -0
  160. package/lib/salesforce/repositories/profiles/queries.js.map +1 -0
  161. package/lib/salesforce/repositories/users/queries.d.ts +3 -0
  162. package/lib/{libs/core/constants.js → salesforce/repositories/users/queries.js} +1 -11
  163. package/lib/salesforce/repositories/users/queries.js.map +1 -0
  164. package/lib/salesforce/repositories/users/user.types.d.ts +54 -0
  165. package/lib/salesforce/repositories/users/user.types.js +12 -0
  166. package/lib/salesforce/repositories/users/user.types.js.map +1 -0
  167. package/lib/salesforce/repositories/users/users.d.ts +22 -0
  168. package/lib/salesforce/repositories/users/users.js +134 -0
  169. package/lib/salesforce/repositories/users/users.js.map +1 -0
  170. package/lib/{libs/core/utils.d.ts → utils.d.ts} +2 -0
  171. package/lib/{libs/core/utils.js → utils.js} +26 -0
  172. package/lib/utils.js.map +1 -0
  173. package/lib/ux/auditRunMultiStage.d.ts +1 -1
  174. package/lib/ux/auditRunMultiStage.js +5 -5
  175. package/lib/ux/auditRunMultiStage.js.map +1 -1
  176. package/messages/policies.general.md +9 -1
  177. package/messages/policyclassifications.md +8 -0
  178. package/messages/rules.enforceClassificationPresets.md +2 -2
  179. package/messages/rules.users.md +1 -1
  180. package/oclif.manifest.json +1 -1
  181. package/package.json +1 -1
  182. package/lib/libs/conf-init/permissionsClassification.d.ts +0 -37
  183. package/lib/libs/conf-init/permissionsClassification.js +0 -126
  184. package/lib/libs/conf-init/permissionsClassification.js.map +0 -1
  185. package/lib/libs/conf-init/policyConfigs.d.ts +0 -21
  186. package/lib/libs/conf-init/policyConfigs.js +0 -47
  187. package/lib/libs/conf-init/policyConfigs.js.map +0 -1
  188. package/lib/libs/core/auditRun.js.map +0 -1
  189. package/lib/libs/core/classification-types.d.ts +0 -20
  190. package/lib/libs/core/classification-types.js +0 -23
  191. package/lib/libs/core/classification-types.js.map +0 -1
  192. package/lib/libs/core/constants.d.ts +0 -10
  193. package/lib/libs/core/constants.js.map +0 -1
  194. package/lib/libs/core/file-mgmt/auditConfigFileManager.d.ts +0 -48
  195. package/lib/libs/core/file-mgmt/auditConfigFileManager.js +0 -145
  196. package/lib/libs/core/file-mgmt/auditConfigFileManager.js.map +0 -1
  197. package/lib/libs/core/file-mgmt/schema.d.ts +0 -156
  198. package/lib/libs/core/file-mgmt/schema.js +0 -81
  199. package/lib/libs/core/file-mgmt/schema.js.map +0 -1
  200. package/lib/libs/core/mdapi/anySettingsMetadata.js.map +0 -1
  201. package/lib/libs/core/mdapi/mdapiRetriever.d.ts +0 -54
  202. package/lib/libs/core/mdapi/mdapiRetriever.js.map +0 -1
  203. package/lib/libs/core/mdapi/metadataRegistryEntry.js.map +0 -1
  204. package/lib/libs/core/mdapi/namedMetadataType.js.map +0 -1
  205. package/lib/libs/core/mdapi/singletonMetadataType.js.map +0 -1
  206. package/lib/libs/core/mdapi/usersRepository.d.ts +0 -85
  207. package/lib/libs/core/mdapi/usersRepository.js +0 -126
  208. package/lib/libs/core/mdapi/usersRepository.js.map +0 -1
  209. package/lib/libs/core/policies/connectedAppPolicy.d.ts +0 -10
  210. package/lib/libs/core/policies/connectedAppPolicy.js +0 -78
  211. package/lib/libs/core/policies/connectedAppPolicy.js.map +0 -1
  212. package/lib/libs/core/policies/permissionSetPolicy.d.ts +0 -12
  213. package/lib/libs/core/policies/permissionSetPolicy.js +0 -64
  214. package/lib/libs/core/policies/permissionSetPolicy.js.map +0 -1
  215. package/lib/libs/core/policies/policy.js.map +0 -1
  216. package/lib/libs/core/policies/profilePolicy.d.ts +0 -12
  217. package/lib/libs/core/policies/profilePolicy.js +0 -65
  218. package/lib/libs/core/policies/profilePolicy.js.map +0 -1
  219. package/lib/libs/core/policies/salesforceStandardTypes.d.ts +0 -58
  220. package/lib/libs/core/policies/salesforceStandardTypes.js +0 -2
  221. package/lib/libs/core/policies/salesforceStandardTypes.js.map +0 -1
  222. package/lib/libs/core/policies/settingsPolicy.d.ts +0 -11
  223. package/lib/libs/core/policies/settingsPolicy.js.map +0 -1
  224. package/lib/libs/core/policies/userPolicy.d.ts +0 -12
  225. package/lib/libs/core/policies/userPolicy.js +0 -62
  226. package/lib/libs/core/policies/userPolicy.js.map +0 -1
  227. package/lib/libs/core/policy-types.d.ts +0 -18
  228. package/lib/libs/core/policy-types.js +0 -28
  229. package/lib/libs/core/policy-types.js.map +0 -1
  230. package/lib/libs/core/policyRegistry.d.ts +0 -23
  231. package/lib/libs/core/policyRegistry.js +0 -52
  232. package/lib/libs/core/policyRegistry.js.map +0 -1
  233. package/lib/libs/core/registries/connectedApps.d.ts +0 -13
  234. package/lib/libs/core/registries/connectedApps.js +0 -13
  235. package/lib/libs/core/registries/connectedApps.js.map +0 -1
  236. package/lib/libs/core/registries/helpers/permissionsScanning.js.map +0 -1
  237. package/lib/libs/core/registries/permissionSets.d.ts +0 -11
  238. package/lib/libs/core/registries/permissionSets.js +0 -11
  239. package/lib/libs/core/registries/permissionSets.js.map +0 -1
  240. package/lib/libs/core/registries/profiles.d.ts +0 -11
  241. package/lib/libs/core/registries/profiles.js +0 -11
  242. package/lib/libs/core/registries/profiles.js.map +0 -1
  243. package/lib/libs/core/registries/ruleRegistry.js.map +0 -1
  244. package/lib/libs/core/registries/rules/allUsedAppsUnderManagement.d.ts +0 -7
  245. package/lib/libs/core/registries/rules/allUsedAppsUnderManagement.js.map +0 -1
  246. package/lib/libs/core/registries/rules/enforcePermissionPresets.js.map +0 -1
  247. package/lib/libs/core/registries/rules/enforcePermissionsOnProfileLike.js.map +0 -1
  248. package/lib/libs/core/registries/rules/enforcePermissionsOnUser.js +0 -42
  249. package/lib/libs/core/registries/rules/enforcePermissionsOnUser.js.map +0 -1
  250. package/lib/libs/core/registries/rules/enforceSettings.js.map +0 -1
  251. package/lib/libs/core/registries/rules/noInactiveUsers.d.ts +0 -9
  252. package/lib/libs/core/registries/rules/noInactiveUsers.js.map +0 -1
  253. package/lib/libs/core/registries/rules/noOtherApexApiLogins.js.map +0 -1
  254. package/lib/libs/core/registries/rules/noUserCanSelfAuthorize.d.ts +0 -7
  255. package/lib/libs/core/registries/rules/noUserCanSelfAuthorize.js.map +0 -1
  256. package/lib/libs/core/registries/rules/policyRule.js.map +0 -1
  257. package/lib/libs/core/registries/settings.d.ts +0 -8
  258. package/lib/libs/core/registries/settings.js +0 -51
  259. package/lib/libs/core/registries/settings.js.map +0 -1
  260. package/lib/libs/core/registries/types.js +0 -13
  261. package/lib/libs/core/registries/types.js.map +0 -1
  262. package/lib/libs/core/registries/users.d.ts +0 -10
  263. package/lib/libs/core/registries/users.js +0 -17
  264. package/lib/libs/core/registries/users.js.map +0 -1
  265. package/lib/libs/core/result-types.js +0 -2
  266. package/lib/libs/core/result-types.js.map +0 -1
  267. package/lib/libs/core/utils.js.map +0 -1
  268. /package/lib/libs/{core/registries → audit-engine/registry}/rules/allUsedAppsUnderManagement.js +0 -0
  269. /package/lib/libs/{core/registries → audit-engine/registry}/rules/enforceSettings.js +0 -0
  270. /package/lib/libs/{core/registries → audit-engine/registry}/rules/noUserCanSelfAuthorize.js +0 -0
  271. /package/lib/{libs/core → salesforce}/mdapi/metadataRegistryEntry.d.ts +0 -0
  272. /package/lib/{libs/core → salesforce}/mdapi/namedMetadataToolingQueryable.d.ts +0 -0
  273. /package/lib/{libs/core → salesforce}/mdapi/namedMetadataType.d.ts +0 -0
  274. /package/lib/{libs/core → salesforce}/mdapi/namedMetadataType.js +0 -0
  275. /package/lib/{libs/core → salesforce}/mdapi/singletonMetadataType.d.ts +0 -0
  276. /package/lib/{libs/core → salesforce}/mdapi/singletonMetadataType.js +0 -0
@@ -1,47 +0,0 @@
1
- import { RuleRegistries } from '../core/registries/types.js';
2
- import { UserPrivilegeLevel } from '../core/policy-types.js';
3
- /**
4
- * Initialises a new settings policy with default rules enabled.
5
- *
6
- * @returns
7
- */
8
- export function initSettings() {
9
- const content = { enabled: true, rules: {} };
10
- ['Security', 'UserInterface', 'UserManagement', 'ConnectedApp'].forEach((settingName) => {
11
- content.rules[`Enforce${settingName}Settings`] = {
12
- enabled: true,
13
- };
14
- });
15
- return content;
16
- }
17
- /**
18
- * Initialises a users policy with all users flagged as standard user
19
- *
20
- * @param targetOrgCon
21
- */
22
- export function initUserPolicy() {
23
- const content = {
24
- ...initDefaultPolicy('users'),
25
- options: {
26
- analyseLastNDaysOfLoginHistory: 30,
27
- defaultRoleForMissingUsers: UserPrivilegeLevel.STANDARD_USER,
28
- },
29
- };
30
- return content;
31
- }
32
- /**
33
- * Initialises a default policy with all registered rules.
34
- *
35
- * @param policyName
36
- * @returns
37
- */
38
- export function initDefaultPolicy(policyName) {
39
- const content = { enabled: true, rules: {} };
40
- RuleRegistries[policyName].registeredRules().forEach((ruleName) => {
41
- content.rules[ruleName] = {
42
- enabled: true,
43
- };
44
- });
45
- return content;
46
- }
47
- //# sourceMappingURL=policyConfigs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"policyConfigs.js","sourceRoot":"","sources":["../../../src/libs/conf-init/policyConfigs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D;;;;GAIG;AACH,MAAM,UAAU,YAAY;IAC1B,MAAM,OAAO,GAA0B,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;IACpE,CAAC,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE;QACtF,OAAO,CAAC,KAAK,CAAC,UAAU,WAAW,UAAU,CAAC,GAAG;YAC/C,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,OAAO,GAA2B;QACtC,GAAG,iBAAiB,CAAC,OAAO,CAAC;QAC7B,OAAO,EAAE;YACP,8BAA8B,EAAE,EAAE;YAClC,0BAA0B,EAAE,kBAAkB,CAAC,aAAa;SAC7D;KACF,CAAC;IACF,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAuB;IACvD,MAAM,OAAO,GAA0B,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;IACpE,cAAc,CAAC,UAAU,CAAC,CAAC,eAAe,EAAE,CAAC,OAAO,CAAC,CAAC,QAAQ,EA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
- import { NamedPermissionClassification } from './file-mgmt/schema.js';
2
- /**
3
- * Enum to classify user and custom permissions.
4
- */
5
- export declare enum PermissionRiskLevel {
6
- /** Blacklisted permissions that are considered too critical and not allowed */
7
- BLOCKED = "Blocked",
8
- /** Developer permissions, allow to modify the application */
9
- CRITICAL = "Critical",
10
- /** Admin permissions, allow to manage users and change permissions */
11
- HIGH = "High",
12
- /** Elevated business permissions for privileged users */
13
- MEDIUM = "Medium",
14
- /** Regular user permissions, typically needed for day-to-day work */
15
- LOW = "Low",
16
- /** Not categorized or unknown permission. Will be ignored but create a warning */
17
- UNKNOWN = "Unknown"
18
- }
19
- export declare function resolveRiskLevelOrdinalValue(value: string): number;
20
- export declare const classificationSorter: (a: NamedPermissionClassification, b: NamedPermissionClassification) => number;
@@ -1,23 +0,0 @@
1
- /**
2
- * Enum to classify user and custom permissions.
3
- */
4
- export var PermissionRiskLevel;
5
- (function (PermissionRiskLevel) {
6
- /** Blacklisted permissions that are considered too critical and not allowed */
7
- PermissionRiskLevel["BLOCKED"] = "Blocked";
8
- /** Developer permissions, allow to modify the application */
9
- PermissionRiskLevel["CRITICAL"] = "Critical";
10
- /** Admin permissions, allow to manage users and change permissions */
11
- PermissionRiskLevel["HIGH"] = "High";
12
- /** Elevated business permissions for privileged users */
13
- PermissionRiskLevel["MEDIUM"] = "Medium";
14
- /** Regular user permissions, typically needed for day-to-day work */
15
- PermissionRiskLevel["LOW"] = "Low";
16
- /** Not categorized or unknown permission. Will be ignored but create a warning */
17
- PermissionRiskLevel["UNKNOWN"] = "Unknown";
18
- })(PermissionRiskLevel || (PermissionRiskLevel = {}));
19
- export function resolveRiskLevelOrdinalValue(value) {
20
- return Object.keys(PermissionRiskLevel).indexOf(value.toUpperCase());
21
- }
22
- export const classificationSorter = (a, b) => resolveRiskLevelOrdinalValue(a.classification) - resolveRiskLevelOrdinalValue(b.classification);
23
- //# sourceMappingURL=classification-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"classification-types.js","sourceRoot":"","sources":["../../../src/libs/core/classification-types.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAN,IAAY,mBAaX;AAbD,WAAY,mBAAmB;IAC7B,+EAA+E;IAC/E,0CAAmB,CAAA;IACnB,6DAA6D;IAC7D,4CAAqB,CAAA;IACrB,sEAAsE;IACtE,oCAAa,CAAA;IACb,yDAAyD;IACzD,wCAAiB,CAAA;IACjB,qEAAqE;IACrE,kCAAW,CAAA;IACX,kFAAkF;IAClF,0CAAmB,CAAA;AACrB,CAAC,EAbW,mBAAmB,KAAnB,mBAAmB,QAa9B;AAED,MAAM,UAAU,4BAA4B,CAAC,KAAa;IACxD,OAAO,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAgC,EAAE,CAAgC,EAAU,EAAE,CACjH,4BAA4B,CAAC,CAAC,CAAC,cAAc,CAAC,GAAG,4BAA4B,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC"}
@@ -1,10 +0,0 @@
1
- export declare const CUSTOM_PERMS_QUERY = "SELECT Id,MasterLabel,DeveloperName FROM CustomPermission";
2
- export declare const PROFILES_QUERY = "SELECT Profile.Name,Profile.UserType,IsCustom FROM PermissionSet WHERE IsOwnedByProfile = TRUE";
3
- export declare const PERMISSION_SETS_QUERY = "SELECT Name,Label,IsCustom,NamespacePrefix FROM PermissionSet WHERE IsOwnedByProfile = FALSE AND NamespacePrefix = NULL";
4
- export declare const CONNECTED_APPS_QUERY = "SELECT Name,OptionsAllowAdminApprovedUsersOnly FROM ConnectedApplication";
5
- export declare const OAUTH_TOKEN_QUERY = "SELECT User.Username,UseCount,AppName FROM OauthToken";
6
- export declare const ACTIVE_USERS_QUERY = "SELECT Id,Username,UserType FROM User WHERE IsActive = TRUE AND UserType IN ('Standard') LIMIT 2000";
7
- export declare const ACTIVE_USERS_DETAILS_QUERY = "SELECT Id,Username,Profile.Name,CreatedDate,LastLoginDate FROM User WHERE IsActive = TRUE AND UserType IN ('Standard') LIMIT 2000";
8
- export declare const buildPermsetAssignmentsQuery: (userIds: string[]) => string;
9
- export declare const buildLoginHistoryQuery: (daysToAnalayse?: number) => string;
10
- export declare const RETRIEVE_CACHE: string;
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/libs/core/constants.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,UAAU;AACV,MAAM,CAAC,MAAM,kBAAkB,GAAG,2DAA2D,CAAC;AAC9F,MAAM,CAAC,MAAM,cAAc,GACzB,gGAAgG,CAAC;AACnG,MAAM,CAAC,MAAM,qBAAqB,GAChC,yHAAyH,CAAC;AAC5H,MAAM,CAAC,MAAM,oBAAoB,GAAG,0EAA0E,CAAC;AAC/G,MAAM,CAAC,MAAM,iBAAiB,GAAG,uDAAuD,CAAC;AACzF,MAAM,CAAC,MAAM,kBAAkB,GAC7B,qGAAqG,CAAC;AACxG,MAAM,CAAC,MAAM,0BAA0B,GACrC,mIAAmI,CAAC;AAEtI,kBAAkB;AAClB,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,OAAiB,EAAU,EAAE,CACxE,GAAG,+BAA+B,uBAAuB,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AAE/G,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,cAAuB,EAAU,EAAE,CACxE,cAAc;IACZ,CAAC,CAAC,GAAG,yBAAyB,mCAAmC,cAAc,wCAAwC;IACvH,CAAC,CAAC,GAAG,yBAAyB,wCAAwC,CAAC;AAE3E,QAAQ;AACR,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAE7D,eAAe;AACf,MAAM,yBAAyB,GAC7B,mGAAmG,CAAC;AACtG,MAAM,+BAA+B,GACnC,yJAAyJ,CAAC"}
@@ -1,48 +0,0 @@
1
- import { PathLike } from 'node:fs';
2
- import { AuditRunConfig } from './schema.js';
3
- /**
4
- * Loads an audit run config with the default file manager
5
- *
6
- * @param dirPath
7
- * @returns
8
- */
9
- export declare const loadAuditConfig: (dirPath: string) => AuditRunConfig;
10
- /**
11
- * Saves a new or modified audit run config with the default file manager
12
- *
13
- * @param dirPath
14
- * @param conf
15
- */
16
- export declare const saveAuditConfig: (dirPath: string, conf: AuditRunConfig) => void;
17
- /**
18
- * The file manager streamlines initialisation of an audit config from
19
- * a source directory and writing updated content back to disk. The directory
20
- * structure is configurable, but most of the time using the default file manager
21
- * will be enough.
22
- */
23
- export default class AuditConfigFileManager {
24
- private readonly directoryStructure;
25
- constructor();
26
- /**
27
- * Parses a directory path for policy and classification files
28
- * and initialises an audit config from file contents.
29
- *
30
- * @param dirPath
31
- * @returns
32
- */
33
- parse(dirPath: PathLike): AuditRunConfig;
34
- /**
35
- * Writes a full audit config to disk. If the config was not
36
- * saved yet, initialises filePath on each element.
37
- *
38
- * @param dirPath
39
- * @param subdirName
40
- * @returns
41
- */
42
- save(targetDirPath: string, conf: AuditRunConfig): void;
43
- private parseSubdir;
44
- private writeClassifications;
45
- private writePolicies;
46
- private validateDependencies;
47
- }
48
- export declare const DefaultFileManager: AuditConfigFileManager;
@@ -1,145 +0,0 @@
1
- import path from 'node:path';
2
- import fs from 'node:fs';
3
- import yaml from 'js-yaml';
4
- import { Messages } from '@salesforce/core';
5
- import { isEmpty } from '../utils.js';
6
- import { classificationDefs, policyDefs } from '../policyRegistry.js';
7
- import { throwAsSfError, } from './schema.js';
8
- Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
9
- const messages = Messages.loadMessages('@j-schreiber/sf-cli-security-audit', 'org.audit.run');
10
- /**
11
- * Loads an audit run config with the default file manager
12
- *
13
- * @param dirPath
14
- * @returns
15
- */
16
- export const loadAuditConfig = (dirPath) => DefaultFileManager.parse(dirPath);
17
- /**
18
- * Saves a new or modified audit run config with the default file manager
19
- *
20
- * @param dirPath
21
- * @param conf
22
- */
23
- export const saveAuditConfig = (dirPath, conf) => {
24
- DefaultFileManager.save(dirPath, conf);
25
- };
26
- /**
27
- * The file manager streamlines initialisation of an audit config from
28
- * a source directory and writing updated content back to disk. The directory
29
- * structure is configurable, but most of the time using the default file manager
30
- * will be enough.
31
- */
32
- export default class AuditConfigFileManager {
33
- directoryStructure;
34
- constructor() {
35
- this.directoryStructure = {
36
- policies: policyDefs,
37
- classifications: classificationDefs,
38
- };
39
- }
40
- /**
41
- * Parses a directory path for policy and classification files
42
- * and initialises an audit config from file contents.
43
- *
44
- * @param dirPath
45
- * @returns
46
- */
47
- parse(dirPath) {
48
- const classifications = this.parseSubdir(dirPath, 'classifications');
49
- const policies = this.parseSubdir(dirPath, 'policies');
50
- const conf = { classifications, policies };
51
- assertIsMinimalConfig(conf, dirPath);
52
- this.validateDependencies(conf);
53
- return conf;
54
- }
55
- /**
56
- * Writes a full audit config to disk. If the config was not
57
- * saved yet, initialises filePath on each element.
58
- *
59
- * @param dirPath
60
- * @param subdirName
61
- * @returns
62
- */
63
- save(targetDirPath, conf) {
64
- this.writeClassifications(conf.classifications, targetDirPath);
65
- this.writePolicies(conf.policies, targetDirPath);
66
- }
67
- parseSubdir(dirPath, subdirName) {
68
- const parseResults = {};
69
- Object.entries(this.directoryStructure[subdirName]).forEach(([fileName, fileConfig]) => {
70
- const filePath = path.join(dirPath.toString(), subdirName, `${fileName}.yml`);
71
- if (fs.existsSync(filePath)) {
72
- const fileContent = yaml.load(fs.readFileSync(filePath, 'utf-8'));
73
- const parseResult = fileConfig.schema.safeParse(fileContent);
74
- if (parseResult.success) {
75
- parseResults[fileName] = { filePath, content: parseResult.data };
76
- }
77
- else {
78
- throwAsSfError(`${fileName}.yml`, parseResult.error);
79
- }
80
- }
81
- });
82
- return parseResults;
83
- }
84
- writeClassifications(content, targetDirPath) {
85
- const dirPath = path.join(targetDirPath.toString(), 'classifications');
86
- fs.mkdirSync(dirPath, { recursive: true });
87
- const dirConf = this.directoryStructure.classifications;
88
- Object.entries(content).forEach(([fileKey, confFile]) => {
89
- const fileDef = dirConf[fileKey];
90
- if (fileDef && !isEmpty(confFile.content)) {
91
- // eslint-disable-next-line no-param-reassign
92
- confFile.filePath = path.join(dirPath, `${fileKey}.yml`);
93
- fs.writeFileSync(confFile.filePath, yaml.dump(confFile.content));
94
- }
95
- });
96
- }
97
- writePolicies(content, targetDirPath) {
98
- const dirPath = path.join(targetDirPath.toString(), 'policies');
99
- fs.mkdirSync(dirPath, { recursive: true });
100
- const dirConf = this.directoryStructure.policies;
101
- Object.entries(content).forEach(([fileKey, confFile]) => {
102
- const fileDef = dirConf[fileKey];
103
- if (fileDef && !isEmpty(confFile.content)) {
104
- // eslint-disable-next-line no-param-reassign
105
- confFile.filePath = path.join(dirPath, `${fileKey}.yml`);
106
- fs.writeFileSync(confFile.filePath, yaml.dump(confFile.content));
107
- }
108
- });
109
- }
110
- validateDependencies(conf) {
111
- Object.keys(conf.policies).forEach((policyName) => {
112
- const policyDef = this.directoryStructure.policies[policyName];
113
- if (policyDef?.dependencies) {
114
- policyDef.dependencies.forEach((dependency) => {
115
- if (!dependencyExists(dependency.path, conf)) {
116
- throw messages.createError(dependency.errorName);
117
- }
118
- });
119
- }
120
- });
121
- }
122
- }
123
- function dependencyExists(fullPath, rootNode) {
124
- const dep = traverseDependencyPath(fullPath, rootNode);
125
- return Boolean(dep);
126
- }
127
- function traverseDependencyPath(remainingPath, rootNode) {
128
- if (remainingPath.length >= 2) {
129
- return traverseDependencyPath(remainingPath.slice(1), rootNode[remainingPath[0]]);
130
- }
131
- else if (remainingPath.length === 0) {
132
- return undefined;
133
- }
134
- else {
135
- return rootNode[remainingPath[0]];
136
- }
137
- }
138
- function assertIsMinimalConfig(conf, dirPath) {
139
- if (Object.keys(conf.policies).length === 0) {
140
- const formattedDirPath = !dirPath || dirPath.toString().length === 0 ? '<root-dir>' : dirPath.toString();
141
- throw messages.createError('NoAuditConfigFound', [formattedDirPath]);
142
- }
143
- }
144
- export const DefaultFileManager = new AuditConfigFileManager();
145
- //# sourceMappingURL=auditConfigFileManager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auditConfigFileManager.js","sourceRoot":"","sources":["../../../../src/libs/core/file-mgmt/auditConfigFileManager.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAgB,MAAM,SAAS,CAAC;AACvC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAuB,UAAU,EAAe,MAAM,sBAAsB,CAAC;AACxG,OAAO,EAKL,cAAc,GACf,MAAM,aAAa,CAAC;AAErB,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,oCAAoC,EAAE,eAAe,CAAC,CAAC;AAE9F;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAe,EAAkB,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAEtG;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAe,EAAE,IAAoB,EAAQ,EAAE;IAC7E,kBAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACzC,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,sBAAsB;IACxB,kBAAkB,CAAC;IAEpC;QACE,IAAI,CAAC,kBAAkB,GAAG;YACxB,QAAQ,EAA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../classification-types.js';
3
- import { UserPrivilegeLevel } from '../policy-types.js';
4
- export declare function throwAsSfError(fileName: string, parseError: z.ZodError, rulePath?: PropertyKey[]): never;
5
- declare const PermissionsClassificationSchema: z.ZodObject<{
6
- label: z.ZodOptional<z.ZodString>;
7
- reason: z.ZodOptional<z.ZodString>;
8
- classification: z.ZodEnum<typeof PermissionRiskLevel>;
9
- }, z.z.core.$strip>;
10
- declare const NamedPermissionsClassificationSchema: z.ZodObject<{
11
- label: z.ZodOptional<z.ZodString>;
12
- reason: z.ZodOptional<z.ZodString>;
13
- classification: z.ZodEnum<typeof PermissionRiskLevel>;
14
- name: z.ZodString;
15
- }, z.z.core.$strip>;
16
- declare const PolicyRuleConfigSchema: z.ZodObject<{
17
- enabled: z.ZodDefault<z.ZodBoolean>;
18
- options: z.ZodOptional<z.ZodUnknown>;
19
- }, z.z.core.$strip>;
20
- declare const RuleMapSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
21
- enabled: z.ZodDefault<z.ZodBoolean>;
22
- options: z.ZodOptional<z.ZodUnknown>;
23
- }, z.z.core.$strip>>;
24
- declare const PermSetConfig: z.ZodObject<{
25
- role: z.ZodEnum<typeof UserPrivilegeLevel>;
26
- }, z.z.core.$strip>;
27
- declare const PermSetMap: z.ZodRecord<z.ZodString, z.ZodObject<{
28
- role: z.ZodEnum<typeof UserPrivilegeLevel>;
29
- }, z.z.core.$strip>>;
30
- declare const ProfilesMap: z.ZodRecord<z.ZodString, z.ZodObject<{
31
- role: z.ZodEnum<typeof UserPrivilegeLevel>;
32
- }, z.z.core.$strip>>;
33
- declare const UserConfig: z.ZodObject<{
34
- role: z.ZodEnum<typeof UserPrivilegeLevel>;
35
- }, z.z.core.$strip>;
36
- export declare const UsersPolicyConfig: z.ZodObject<{
37
- defaultRoleForMissingUsers: z.ZodDefault<z.ZodEnum<typeof UserPrivilegeLevel>>;
38
- analyseLastNDaysOfLoginHistory: z.ZodOptional<z.ZodNumber>;
39
- }, z.z.core.$strict>;
40
- export declare const NoInactiveUsersOptionsSchema: z.ZodObject<{
41
- daysAfterUserIsInactive: z.ZodDefault<z.ZodNumber>;
42
- }, z.z.core.$strict>;
43
- export declare const PolicyFileSchema: z.ZodObject<{
44
- enabled: z.ZodDefault<z.ZodBoolean>;
45
- rules: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
46
- enabled: z.ZodDefault<z.ZodBoolean>;
47
- options: z.ZodOptional<z.ZodUnknown>;
48
- }, z.z.core.$strip>>>;
49
- }, z.z.core.$strip>;
50
- export declare const ProfilesPolicyFileSchema: z.ZodObject<{
51
- enabled: z.ZodDefault<z.ZodBoolean>;
52
- rules: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
53
- enabled: z.ZodDefault<z.ZodBoolean>;
54
- options: z.ZodOptional<z.ZodUnknown>;
55
- }, z.z.core.$strip>>>;
56
- profiles: z.ZodRecord<z.ZodString, z.ZodObject<{
57
- role: z.ZodEnum<typeof UserPrivilegeLevel>;
58
- }, z.z.core.$strip>>;
59
- }, z.z.core.$strip>;
60
- export declare const PermSetsPolicyFileSchema: z.ZodObject<{
61
- enabled: z.ZodDefault<z.ZodBoolean>;
62
- rules: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
63
- enabled: z.ZodDefault<z.ZodBoolean>;
64
- options: z.ZodOptional<z.ZodUnknown>;
65
- }, z.z.core.$strip>>>;
66
- permissionSets: z.ZodRecord<z.ZodString, z.ZodObject<{
67
- role: z.ZodEnum<typeof UserPrivilegeLevel>;
68
- }, z.z.core.$strip>>;
69
- }, z.z.core.$strip>;
70
- export declare const PermissionsClassificationFileSchema: z.ZodObject<{
71
- permissions: z.ZodRecord<z.ZodString, z.ZodObject<{
72
- label: z.ZodOptional<z.ZodString>;
73
- reason: z.ZodOptional<z.ZodString>;
74
- classification: z.ZodEnum<typeof PermissionRiskLevel>;
75
- }, z.z.core.$strip>>;
76
- }, z.z.core.$strip>;
77
- export declare const UsersPolicyFileSchema: z.ZodObject<{
78
- enabled: z.ZodDefault<z.ZodBoolean>;
79
- rules: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
80
- enabled: z.ZodDefault<z.ZodBoolean>;
81
- options: z.ZodOptional<z.ZodUnknown>;
82
- }, z.z.core.$strip>>>;
83
- options: z.ZodObject<{
84
- defaultRoleForMissingUsers: z.ZodDefault<z.ZodEnum<typeof UserPrivilegeLevel>>;
85
- analyseLastNDaysOfLoginHistory: z.ZodOptional<z.ZodNumber>;
86
- }, z.z.core.$strict>;
87
- }, z.z.core.$strip>;
88
- export declare const ProfilesClassificationContentSchema: z.ZodObject<{
89
- profiles: z.ZodRecord<z.ZodString, z.ZodObject<{
90
- role: z.ZodEnum<typeof UserPrivilegeLevel>;
91
- }, z.z.core.$strip>>;
92
- }, z.z.core.$strip>;
93
- export declare const PermissionSetsClassificationContentSchema: z.ZodObject<{
94
- permissionSets: z.ZodRecord<z.ZodString, z.ZodObject<{
95
- role: z.ZodEnum<typeof UserPrivilegeLevel>;
96
- }, z.z.core.$strip>>;
97
- }, z.z.core.$strip>;
98
- export declare const UsersClassificationContentSchema: z.ZodObject<{
99
- users: z.ZodRecord<z.ZodString, z.ZodObject<{
100
- role: z.ZodEnum<typeof UserPrivilegeLevel>;
101
- }, z.z.core.$strip>>;
102
- }, z.z.core.$strip>;
103
- export type PermissionClassification = z.infer<typeof PermissionsClassificationSchema>;
104
- export type NamedPermissionClassification = z.infer<typeof NamedPermissionsClassificationSchema>;
105
- export type NoInactiveUsersOptions = z.infer<typeof NoInactiveUsersOptionsSchema>;
106
- export type PolicyRuleConfig = z.infer<typeof PolicyRuleConfigSchema>;
107
- export type BasePolicyFileContent = z.infer<typeof PolicyFileSchema>;
108
- export type ProfilesPolicyFileContent = z.infer<typeof ProfilesPolicyFileSchema>;
109
- export type PermSetsPolicyFileContent = z.infer<typeof PermSetsPolicyFileSchema>;
110
- export type UsersPolicyFileContent = z.infer<typeof UsersPolicyFileSchema>;
111
- export type PermissionsClassificationContent = z.infer<typeof PermissionsClassificationFileSchema>;
112
- export type ProfilesClassificationContent = z.infer<typeof ProfilesClassificationContentSchema>;
113
- export type PermissionSetsClassificationContent = z.infer<typeof PermissionSetsClassificationContentSchema>;
114
- export type UsersClassificationContent = z.infer<typeof UsersClassificationContentSchema>;
115
- export type PermissionSetConfig = z.infer<typeof PermSetConfig>;
116
- export type RuleMap = z.infer<typeof RuleMapSchema>;
117
- export type ProfilesMap = z.infer<typeof ProfilesMap>;
118
- export type PermissionSetsMap = z.infer<typeof PermSetMap>;
119
- export type UserConfig = z.infer<typeof UserConfig>;
120
- export type ConfigFile<T> = {
121
- filePath?: string;
122
- content: T;
123
- };
124
- type ClassificationsFile = {
125
- [key: string]: Record<string, unknown>;
126
- };
127
- export type AuditRunConfigClassifications = {
128
- userPermissions?: ConfigFile<PermissionsClassificationContent>;
129
- customPermissions?: ConfigFile<PermissionsClassificationContent>;
130
- profiles?: ConfigFile<ProfilesClassificationContent>;
131
- permissionSets?: ConfigFile<PermissionSetsClassificationContent>;
132
- users?: ConfigFile<UsersClassificationContent>;
133
- };
134
- type ExtractRecordFromConfigFile<C> = C extends ConfigFile<infer T> ? T[keyof T] : never;
135
- /**
136
- * Utility type to extract the actual mapped entities from audit run classifications
137
- */
138
- export type ExtractedClassifications = {
139
- [K in keyof AuditRunConfigClassifications]: ExtractRecordFromConfigFile<AuditRunConfigClassifications[K]>;
140
- };
141
- export declare function extractEntities<C extends ConfigFile<ClassificationsFile>>(config: C): ExtractRecordFromConfigFile<C>;
142
- export type Classifications = keyof AuditRunConfigClassifications;
143
- export type AuditRunConfigPolicies = {
144
- profiles?: ConfigFile<BasePolicyFileContent>;
145
- permissionSets?: ConfigFile<BasePolicyFileContent>;
146
- connectedApps?: ConfigFile<BasePolicyFileContent>;
147
- settings?: ConfigFile<BasePolicyFileContent>;
148
- users?: ConfigFile<UsersPolicyFileContent>;
149
- };
150
- export type AuditRunConfig = {
151
- classifications: AuditRunConfigClassifications;
152
- policies: AuditRunConfigPolicies;
153
- };
154
- export declare function isPermissionsClassification(cls: unknown): cls is ConfigFile<PermissionsClassificationContent>;
155
- export declare function isPolicyConfig(cls: unknown): cls is ConfigFile<BasePolicyFileContent>;
156
- export {};
@@ -1,81 +0,0 @@
1
- import z from 'zod';
2
- import { Messages } from '@salesforce/core';
3
- import { PermissionRiskLevel } from '../classification-types.js';
4
- import { UserPrivilegeLevel } from '../policy-types.js';
5
- Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
6
- const messages = Messages.loadMessages('@j-schreiber/sf-cli-security-audit', 'org.audit.run');
7
- export function throwAsSfError(fileName, parseError, rulePath) {
8
- const issues = parseError.issues.map((zodIssue) => {
9
- const definitivePath = rulePath ? [...rulePath, ...zodIssue.path] : zodIssue.path;
10
- return definitivePath.length > 0 ? `${zodIssue.message} in "${definitivePath.join('.')}"` : zodIssue.message;
11
- });
12
- throw messages.createError('error.InvalidConfigFileSchema', [fileName, issues.join(', ')]);
13
- }
14
- const PermissionsClassificationSchema = z.object({
15
- /** UI Label */
16
- label: z.string().optional(),
17
- /** An optional description to explain the classification */
18
- reason: z.string().optional(),
19
- /** Risk assessment of the permissions */
20
- classification: z.enum(PermissionRiskLevel),
21
- });
22
- const NamedPermissionsClassificationSchema = PermissionsClassificationSchema.extend({
23
- /** Developer name of the permission, used in metadata */
24
- name: z.string(),
25
- });
26
- const PolicyRuleConfigSchema = z.object({
27
- enabled: z.boolean().default(true),
28
- options: z.unknown().optional(),
29
- });
30
- const RuleMapSchema = z.record(z.string(), PolicyRuleConfigSchema);
31
- const PermSetConfig = z.object({
32
- role: z.enum(UserPrivilegeLevel),
33
- });
34
- const PermSetMap = z.record(z.string(), PermSetConfig);
35
- const ProfilesMap = z.record(z.string(), PermSetConfig);
36
- const UserConfig = z.object({ role: z.enum(UserPrivilegeLevel) });
37
- const UsersMap = z.record(z.string(), UserConfig);
38
- export const UsersPolicyConfig = z.strictObject({
39
- defaultRoleForMissingUsers: z.enum(UserPrivilegeLevel).default(UserPrivilegeLevel.STANDARD_USER),
40
- analyseLastNDaysOfLoginHistory: z.number().optional(),
41
- });
42
- export const NoInactiveUsersOptionsSchema = z.strictObject({
43
- daysAfterUserIsInactive: z.number().default(90),
44
- });
45
- // FILE CONTENT SCHEMATA
46
- export const PolicyFileSchema = z.object({
47
- enabled: z.boolean().default(true),
48
- rules: RuleMapSchema.default({}),
49
- });
50
- export const ProfilesPolicyFileSchema = PolicyFileSchema.extend({
51
- profiles: PermSetMap,
52
- });
53
- export const PermSetsPolicyFileSchema = PolicyFileSchema.extend({
54
- permissionSets: PermSetMap,
55
- });
56
- export const PermissionsClassificationFileSchema = z.object({
57
- permissions: z.record(z.string(), PermissionsClassificationSchema),
58
- });
59
- export const UsersPolicyFileSchema = PolicyFileSchema.extend({
60
- options: UsersPolicyConfig,
61
- });
62
- export const ProfilesClassificationContentSchema = z.object({
63
- profiles: ProfilesMap,
64
- });
65
- export const PermissionSetsClassificationContentSchema = z.object({
66
- permissionSets: PermSetMap,
67
- });
68
- export const UsersClassificationContentSchema = z.object({
69
- users: UsersMap,
70
- });
71
- export function extractEntities(config) {
72
- const value = Object.values(config.content)[0];
73
- return value;
74
- }
75
- export function isPermissionsClassification(cls) {
76
- return cls.content?.permissions !== undefined;
77
- }
78
- export function isPolicyConfig(cls) {
79
- return cls.content?.rules !== undefined;
80
- }
81
- //# sourceMappingURL=schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/libs/core/file-mgmt/schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7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,cAAc,CAAC,UAAU,CAAC,CAAC;QAClF,gBAAgB,CAAC,cAAc,CAAC,gBAAgB,EAAE,CAAC,CAAC;QACpD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,oBAAoB,CAAC,YAAsB,EAAE,UAAwB;QAC3E,MAAM,MAAM,GAAG,IAAI,GAAG,EAA6B,CAAC;QACpD,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;YACvC,MAAM,IAAI,GAAG,UAAU,CAAC,mBAAmB,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;YAC1G,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,GAAG,WAAW,UAAU,CAAC,CAAC;YAC7E,IAAI,eAAe,EAAE,CAAC;gBACpB,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;YAC3C,CAAC;QACH,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,eAAe,CAAC,IAAuB,EAAE,YAAoB;QACnE,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;YACnC,MAAM,WAAW,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;YACvD,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAA4B,CAAC;YACjF,OAAO,cAAc,CAAC,YAAY,CAA4B,CAAC;QACjE,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
@@ -1,54 +0,0 @@
1
- import { Connection } from '@salesforce/core';
2
- import { ConnectedAppSettings, PermissionSet, Profile as ProfileMetadata } from '@jsforce/jsforce-node/lib/api/metadata.js';
3
- import NamedMetadata from './namedMetadataType.js';
4
- import SingletonMetadata from './singletonMetadataType.js';
5
- import NamedMetadataQueryable from './namedMetadataToolingQueryable.js';
6
- export default class MDAPI {
7
- private readonly connection;
8
- private static readonly retrievers;
9
- private readonly cache;
10
- constructor(connection: Connection);
11
- static create(connection: Connection): MDAPI;
12
- /**
13
- * Resolves one of the pre-configured metadata types and returns
14
- * a map of resolved names and entire XML content of source file body.
15
- *
16
- * @param typeName
17
- * @param componentNames
18
- * @returns
19
- */
20
- resolve<K extends keyof typeof NamedTypesRegistry>(typeName: K, componentNames: string[]): Promise<NamedReturnTypes[K]>;
21
- /**
22
- * Resolves one of the pre-configured metadata types and returns
23
- * the entire XML content of source file body.
24
- *
25
- * @param typeName
26
- * @returns
27
- */
28
- resolveSingleton<K extends keyof typeof SingletonRegistry>(typeName: K): Promise<SingletonReturnTypes[K]>;
29
- private cacheResults;
30
- private fetchCached;
31
- }
32
- export declare const NamedTypesRegistry: {
33
- PermissionSet: NamedMetadata<PermissionSetXml, "PermissionSet">;
34
- Profile: NamedMetadataQueryable<ProfileXml, "Profile">;
35
- };
36
- export declare const SingletonRegistry: {
37
- ConnectedAppSettings: SingletonMetadata<ConnectedAppSettingsXml, "ConnectedAppSettings">;
38
- };
39
- type NamedReturnTypes = {
40
- [K in keyof typeof NamedTypesRegistry]: Awaited<ReturnType<(typeof NamedTypesRegistry)[K]['resolve']>>;
41
- };
42
- type SingletonReturnTypes = {
43
- [K in keyof typeof SingletonRegistry]: Awaited<ReturnType<(typeof SingletonRegistry)[K]['resolve']>>;
44
- };
45
- type ProfileXml = {
46
- Profile: ProfileMetadata;
47
- };
48
- type PermissionSetXml = {
49
- PermissionSet: PermissionSet;
50
- };
51
- type ConnectedAppSettingsXml = {
52
- ConnectedAppSettings: ConnectedAppSettings;
53
- };
54
- export {};
@@ -1 +0,0 @@
1
- {"version":3,"file":"mdapiRetriever.js","sourceRoot":"","sources":["../../../../src/libs/core/mdapi/mdapiRetriever.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBA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