@cclabsnz/sf-audit 1.16.0 → 1.18.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/CHANGELOG.md +172 -1
- package/PERMISSIONS.md +139 -0
- package/README.md +98 -26
- package/config/scoring.sample.json +104 -5
- package/docs/permissionset/SF_Audit_ReadOnly.permissionset-meta.xml +54 -0
- package/lib/apps/analyzeApps.d.ts +8 -2
- package/lib/apps/analyzeApps.js +7 -2
- package/lib/apps/apiLogSource.d.ts +39 -0
- package/lib/apps/apiLogSource.js +75 -0
- package/lib/apps/appResolver.js +30 -4
- package/lib/apps/grantedAccess.js +16 -3
- package/lib/apps/leastPrivilege.d.ts +3 -1
- package/lib/apps/leastPrivilege.js +7 -3
- package/lib/apps/permissionSetGenerator.d.ts +22 -0
- package/lib/apps/permissionSetGenerator.js +100 -0
- package/lib/apps/types.d.ts +6 -0
- package/lib/apps/usageCollector.d.ts +7 -1
- package/lib/apps/usageCollector.js +57 -26
- package/lib/chains/CapabilityRegistry.js +26 -0
- package/lib/chains/ChainEngine.js +11 -1
- package/lib/chains/namedChains.js +130 -24
- package/lib/checks/CheckEngine.d.ts +3 -1
- package/lib/checks/CheckEngine.js +65 -26
- package/lib/checks/impl/AgentUserPrivilegeCheck.js +5 -4
- package/lib/checks/impl/AnonymousApexAuditCheck.js +41 -8
- package/lib/checks/impl/ApexCrudFLSCheck.js +45 -10
- package/lib/checks/impl/ApexSharingCheck.js +19 -26
- package/lib/checks/impl/ApiClientPermissionCheck.js +21 -5
- package/lib/checks/impl/AuditTrailCheck.js +23 -8
- package/lib/checks/impl/AuthProviderRegistrationHandlerCheck.d.ts +10 -0
- package/lib/checks/impl/AuthProviderRegistrationHandlerCheck.js +131 -0
- package/lib/checks/impl/CertificateExpiryCheck.js +2 -1
- package/lib/checks/impl/ConnectedAppScopeCheck.js +61 -5
- package/lib/checks/impl/ConnectedAppsCheck.js +60 -5
- package/lib/checks/impl/ContentLinksCheck.js +33 -9
- package/lib/checks/impl/CorsAllowlistCheck.js +3 -2
- package/lib/checks/impl/DataClassificationCheck.js +15 -13
- package/lib/checks/impl/DataCloudDataSpaceIsolationCheck.d.ts +10 -0
- package/lib/checks/impl/DataCloudDataSpaceIsolationCheck.js +116 -0
- package/lib/checks/impl/DebugLogAccessCheck.js +4 -4
- package/lib/checks/impl/DelegatedAdministrationGroupsCheck.d.ts +10 -0
- package/lib/checks/impl/DelegatedAdministrationGroupsCheck.js +76 -0
- package/lib/checks/impl/DelegatedAuthenticationExposureCheck.d.ts +10 -0
- package/lib/checks/impl/DelegatedAuthenticationExposureCheck.js +105 -0
- package/lib/checks/impl/DeploymentIdentityCheck.js +32 -5
- package/lib/checks/impl/EmailSecurityCheck.d.ts +1 -1
- package/lib/checks/impl/EmailSecurityCheck.js +14 -34
- package/lib/checks/impl/EncryptionCoverageCheck.js +21 -15
- package/lib/checks/impl/EnhancedDomainsCheck.js +17 -2
- package/lib/checks/impl/EscalationPermsCheck.d.ts +2 -0
- package/lib/checks/impl/EscalationPermsCheck.js +88 -21
- package/lib/checks/impl/ExperienceCloudSiteCheck.js +56 -5
- package/lib/checks/impl/ExternalAccountHierarchyExposureCheck.d.ts +10 -0
- package/lib/checks/impl/ExternalAccountHierarchyExposureCheck.js +65 -0
- package/lib/checks/impl/ExternalCredentialsCheck.js +6 -3
- package/lib/checks/impl/FailedLoginCheck.js +36 -9
- package/lib/checks/impl/FieldHistoryTrackingCheck.js +14 -11
- package/lib/checks/impl/FlowHttpCalloutCredentialBypassCheck.d.ts +10 -0
- package/lib/checks/impl/FlowHttpCalloutCredentialBypassCheck.js +115 -0
- package/lib/checks/impl/GenAiPromptTemplateGroundingCheck.d.ts +10 -0
- package/lib/checks/impl/GenAiPromptTemplateGroundingCheck.js +227 -0
- package/lib/checks/impl/GuestExecutableApexCheck.d.ts +1 -1
- package/lib/checks/impl/GuestExecutableApexCheck.js +105 -14
- package/lib/checks/impl/GuestRecordAccessPolicyCheck.js +52 -11
- package/lib/checks/impl/HardcodedCredentialsCheck.js +7 -2
- package/lib/checks/impl/HealthCheckCheck.js +1 -0
- package/lib/checks/impl/HighAssuranceSessionCheck.js +16 -11
- package/lib/checks/impl/InactiveUsersCheck.js +1 -1
- package/lib/checks/impl/InboundEmailHandlerExposureCheck.d.ts +10 -0
- package/lib/checks/impl/InboundEmailHandlerExposureCheck.js +136 -0
- package/lib/checks/impl/IntegrationLeastPrivilegeCheck.js +7 -6
- package/lib/checks/impl/InternalUserMfaCheck.js +26 -8
- package/lib/checks/impl/IpRestrictionsCheck.js +35 -16
- package/lib/checks/impl/LoginAccessPolicyCheck.js +5 -4
- package/lib/checks/impl/LoginAnomalyCheck.js +10 -7
- package/lib/checks/impl/LoginSessionCheck.js +2 -0
- package/lib/checks/impl/MfaEnforcementCheck.js +23 -6
- package/lib/checks/impl/MfaMethodStrengthCheck.js +18 -3
- package/lib/checks/impl/MfaRegistrationCheck.js +4 -3
- package/lib/checks/impl/MyDomainLoginPolicyCheck.js +23 -10
- package/lib/checks/impl/OauthDeviceAndAssetTokenFlowsCheck.d.ts +10 -0
- package/lib/checks/impl/OauthDeviceAndAssetTokenFlowsCheck.js +84 -0
- package/lib/checks/impl/OrgWideEmailSpoofingCheck.d.ts +10 -0
- package/lib/checks/impl/OrgWideEmailSpoofingCheck.js +106 -0
- package/lib/checks/impl/OutboundMessagesCheck.js +48 -6
- package/lib/checks/impl/PackagePostInstallSupplyChainCheck.d.ts +10 -0
- package/lib/checks/impl/PackagePostInstallSupplyChainCheck.js +89 -0
- package/lib/checks/impl/PlatformEventSubscriberContextCheck.d.ts +10 -0
- package/lib/checks/impl/PlatformEventSubscriberContextCheck.js +88 -0
- package/lib/checks/impl/PrivilegedAccessCheck.js +12 -5
- package/lib/checks/impl/ReleaseUpdatesCheck.js +18 -3
- package/lib/checks/impl/RemoteSitesCheck.js +4 -4
- package/lib/checks/impl/RestrictionRulesIntegrityCheck.d.ts +10 -0
- package/lib/checks/impl/RestrictionRulesIntegrityCheck.js +105 -0
- package/lib/checks/impl/SeparationOfDutiesCheck.js +14 -3
- package/lib/checks/impl/ShieldTenantSecretLifecycleCheck.d.ts +10 -0
- package/lib/checks/impl/ShieldTenantSecretLifecycleCheck.js +90 -0
- package/lib/checks/impl/SoapLoginApiAuthCheck.js +20 -8
- package/lib/checks/impl/SsoEnforcementCheck.js +16 -5
- package/lib/checks/impl/TransactionSecurityPolicyCheck.js +5 -5
- package/lib/checks/impl/TrustedIPRangesCheck.js +18 -9
- package/lib/checks/impl/UsersAndAdminsCheck.js +24 -4
- package/lib/checks/permCatalog.js +1 -1
- package/lib/checks/registry.js +30 -0
- package/lib/checks/support/apexAccess.d.ts +56 -0
- package/lib/checks/support/apexAccess.js +127 -0
- package/lib/checks/support/missingObject.d.ts +13 -0
- package/lib/checks/support/missingObject.js +37 -0
- package/lib/checks/support/schema.d.ts +17 -0
- package/lib/checks/support/schema.js +41 -0
- package/lib/commands/audit/apps.d.ts +1 -0
- package/lib/commands/audit/apps.js +86 -30
- package/lib/commands/audit/diff.js +2 -2
- package/lib/commands/audit/events/pull.js +3 -1
- package/lib/commands/audit/history.js +2 -2
- package/lib/commands/audit/incident/collect.js +3 -1
- package/lib/commands/audit/incident/report.js +2 -2
- package/lib/commands/audit/security.d.ts +3 -0
- package/lib/commands/audit/security.js +65 -10
- package/lib/commands/audit/timeline.js +2 -2
- package/lib/compliance/mapping.js +28 -7
- package/lib/findings/AuditResult.d.ts +10 -0
- package/lib/findings/CheckMeta.js +15 -0
- package/lib/findings/Finding.d.ts +4 -0
- package/lib/findings/ScoringConfig.d.ts +10 -8
- package/lib/findings/ScoringConfig.js +12 -5
- package/lib/findings/coverage.d.ts +34 -0
- package/lib/findings/coverage.js +42 -0
- package/lib/findings/exitCode.js +1 -1
- package/lib/findings/loadScoringConfig.js +51 -8
- package/lib/findings/scoring.js +61 -10
- package/lib/history/HistoryStore.js +9 -3
- package/lib/history/archivePolicy.d.ts +19 -0
- package/lib/history/archivePolicy.js +34 -0
- package/lib/incident/bundleIo.js +4 -3
- package/lib/incident/collect/collectBundle.d.ts +1 -1
- package/lib/incident/collect/collectBundle.js +4 -3
- package/lib/incident/collect/streamGuestLogs.d.ts +1 -1
- package/lib/incident/collect/streamGuestLogs.js +3 -2
- package/lib/incident/csv.js +4 -4
- package/lib/incident/render/evidence.js +3 -3
- package/lib/incident/render/html.js +2 -3
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/lib/packageInfo.d.ts +6 -0
- package/lib/lib/packageInfo.js +19 -0
- package/lib/preflight/permissionMap.d.ts +2 -20
- package/lib/preflight/permissionMap.js +2 -43
- package/lib/preflight/permissions.d.ts +25 -0
- package/lib/preflight/permissions.js +50 -0
- package/lib/renderers/AttackChainDagRenderer.d.ts +7 -0
- package/lib/renderers/AttackChainDagRenderer.js +139 -0
- package/lib/renderers/ClientReportRenderer.d.ts +2 -0
- package/lib/renderers/ClientReportRenderer.js +34 -6
- package/lib/renderers/DiffHtmlRenderer.js +2 -7
- package/lib/renderers/HistoryRenderer.js +19 -11
- package/lib/renderers/HtmlRenderer.js +23 -6
- package/lib/renderers/MarkdownRenderer.js +11 -1
- package/lib/renderers/SarifRenderer.d.ts +43 -0
- package/lib/renderers/SarifRenderer.js +250 -0
- package/lib/report/ExecutivePriorities.js +1 -1
- package/lib/report/RemediationRoadmap.d.ts +5 -1
- package/lib/report/RemediationRoadmap.js +6 -2
- package/lib/waivers/WaiverLoader.d.ts +28 -0
- package/lib/waivers/WaiverLoader.js +103 -0
- package/lib/waivers/WaiverModel.d.ts +32 -0
- package/lib/waivers/WaiverModel.js +28 -0
- package/lib/waivers/applyWaivers.d.ts +22 -0
- package/lib/waivers/applyWaivers.js +85 -0
- package/package.json +6 -4
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { CHECKS } from '../checks/registry.js';
|
|
3
|
+
import { packageInfo } from '../lib/packageInfo.js';
|
|
4
|
+
/** Fingerprint key. Bump the version suffix if the hashed inputs ever change. */
|
|
5
|
+
export const FINGERPRINT_KEY = 'sfAuditFindingHash/v1';
|
|
6
|
+
/** Root of the synthetic artifact path every result points at. */
|
|
7
|
+
export const ORG_ARTIFACT_ROOT = 'salesforce-org';
|
|
8
|
+
const SEVERITY_ORDER = ['INFO', 'LOW', 'MEDIUM', 'HIGH', 'CRITICAL'];
|
|
9
|
+
export function riskToSarifLevel(level) {
|
|
10
|
+
switch (level) {
|
|
11
|
+
case 'CRITICAL':
|
|
12
|
+
case 'HIGH':
|
|
13
|
+
return 'error';
|
|
14
|
+
case 'MEDIUM':
|
|
15
|
+
return 'warning';
|
|
16
|
+
case 'LOW':
|
|
17
|
+
case 'INFO':
|
|
18
|
+
return 'note';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* GitHub's `security-severity` bands: >= 9.0 critical, 7.0-8.9 high, 4.0-6.9 medium,
|
|
23
|
+
* 0.1-3.9 low. Values sit inside each band rather than on its edge. INFO has none, so an
|
|
24
|
+
* advisory-only rule falls back to its `note` level instead of claiming a security severity.
|
|
25
|
+
*/
|
|
26
|
+
function riskToSecuritySeverity(level) {
|
|
27
|
+
switch (level) {
|
|
28
|
+
case 'CRITICAL':
|
|
29
|
+
return '9.5';
|
|
30
|
+
case 'HIGH':
|
|
31
|
+
return '8.0';
|
|
32
|
+
case 'MEDIUM':
|
|
33
|
+
return '5.5';
|
|
34
|
+
case 'LOW':
|
|
35
|
+
return '3.0';
|
|
36
|
+
case 'INFO':
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function maxRisk(a, b) {
|
|
41
|
+
return SEVERITY_ORDER.indexOf(a) >= SEVERITY_ORDER.indexOf(b) ? a : b;
|
|
42
|
+
}
|
|
43
|
+
function fingerprint(...parts) {
|
|
44
|
+
return createHash('sha256').update(parts.join('\u0000')).digest('hex');
|
|
45
|
+
}
|
|
46
|
+
/** Logical locations for the given names. SARIF requires the array's items to be unique. */
|
|
47
|
+
function logicalLocations(names) {
|
|
48
|
+
return [...new Set(names)].map((name) => ({ name, fullyQualifiedName: name, kind: 'resource' }));
|
|
49
|
+
}
|
|
50
|
+
/** The location every result points at: a synthetic per-rule artifact, plus the logical subjects. */
|
|
51
|
+
function orgLocation(ruleId, names) {
|
|
52
|
+
const logical = logicalLocations(names);
|
|
53
|
+
return {
|
|
54
|
+
physicalLocation: {
|
|
55
|
+
artifactLocation: { uri: `${ORG_ARTIFACT_ROOT}/${encodeURIComponent(ruleId)}` },
|
|
56
|
+
region: { startLine: 1 },
|
|
57
|
+
},
|
|
58
|
+
...(logical.length > 0 ? { logicalLocations: logical } : {}),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function ruleName(text) {
|
|
62
|
+
return text.replace(/[^a-zA-Z0-9]/g, '');
|
|
63
|
+
}
|
|
64
|
+
export class SarifRenderer {
|
|
65
|
+
format = 'sarif';
|
|
66
|
+
fileExtension = '.sarif';
|
|
67
|
+
filenamePrefix = 'sf-audit';
|
|
68
|
+
render(result) {
|
|
69
|
+
const pkg = packageInfo();
|
|
70
|
+
const rules = new Map();
|
|
71
|
+
for (const check of CHECKS) {
|
|
72
|
+
rules.set(check.id, {
|
|
73
|
+
rule: {
|
|
74
|
+
id: check.id,
|
|
75
|
+
name: ruleName(check.name),
|
|
76
|
+
shortDescription: { text: check.name },
|
|
77
|
+
fullDescription: { text: `${check.name} (${check.category})` },
|
|
78
|
+
help: {
|
|
79
|
+
text: `Each result for ${check.id} carries its own remediation.`,
|
|
80
|
+
markdown: `Each result for \`${check.id}\` carries its own remediation.\n\n**Category**: \`${check.category}\``,
|
|
81
|
+
},
|
|
82
|
+
defaultConfiguration: { level: 'warning' },
|
|
83
|
+
properties: { tags: ['security', 'salesforce', check.category] },
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
const results = [];
|
|
88
|
+
const notifications = [];
|
|
89
|
+
const seen = new Map();
|
|
90
|
+
for (const f of result.findings) {
|
|
91
|
+
if (f.passed === true)
|
|
92
|
+
continue;
|
|
93
|
+
const ruleId = f.checkId ?? f.id;
|
|
94
|
+
if (f.inconclusive === true) {
|
|
95
|
+
notifications.push({
|
|
96
|
+
level: 'warning',
|
|
97
|
+
message: { text: `${f.title}: ${f.detail}` },
|
|
98
|
+
associatedRule: { id: ruleId },
|
|
99
|
+
});
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
const acc = this.ruleFor(rules, ruleId, f);
|
|
103
|
+
acc.worst = acc.worst ? maxRisk(acc.worst, f.riskLevel) : f.riskLevel;
|
|
104
|
+
for (const tag of f.complianceTags ?? []) {
|
|
105
|
+
if (!acc.rule.properties.tags.includes(tag))
|
|
106
|
+
acc.rule.properties.tags.push(tag);
|
|
107
|
+
}
|
|
108
|
+
// Two findings sharing an id within one run would otherwise collapse into one alert.
|
|
109
|
+
const key = `${ruleId}\u0000${f.id}`;
|
|
110
|
+
const n = seen.get(key) ?? 0;
|
|
111
|
+
seen.set(key, n + 1);
|
|
112
|
+
results.push(this.findingResult(f, ruleId, n === 0 ? fingerprint(ruleId, f.id) : fingerprint(ruleId, f.id, String(n))));
|
|
113
|
+
}
|
|
114
|
+
for (const chain of result.attackChains ?? []) {
|
|
115
|
+
results.push(this.chainResult(rules, chain));
|
|
116
|
+
}
|
|
117
|
+
for (const acc of rules.values()) {
|
|
118
|
+
if (!acc.worst)
|
|
119
|
+
continue;
|
|
120
|
+
acc.rule.defaultConfiguration.level = riskToSarifLevel(acc.worst);
|
|
121
|
+
const sev = riskToSecuritySeverity(acc.worst);
|
|
122
|
+
if (sev)
|
|
123
|
+
acc.rule.properties['security-severity'] = sev;
|
|
124
|
+
}
|
|
125
|
+
const sarifLog = {
|
|
126
|
+
$schema: 'https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json',
|
|
127
|
+
version: '2.1.0',
|
|
128
|
+
runs: [
|
|
129
|
+
{
|
|
130
|
+
tool: {
|
|
131
|
+
driver: {
|
|
132
|
+
name: pkg.name,
|
|
133
|
+
version: pkg.version,
|
|
134
|
+
informationUri: 'https://github.com/cclabsnz/sf-audit-plugin',
|
|
135
|
+
rules: Array.from(rules.values(), (a) => a.rule),
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
// One category per org. GitHub code scanning closes any alert of a category that a new
|
|
139
|
+
// upload no longer contains, so two orgs sharing a category would close each other's.
|
|
140
|
+
automationDetails: { id: `sf-audit/${result.orgId}/` },
|
|
141
|
+
results,
|
|
142
|
+
invocations: [
|
|
143
|
+
{
|
|
144
|
+
// An inconclusive check is a partial analysis failure: the tool ran, but could
|
|
145
|
+
// not establish the answer for that check.
|
|
146
|
+
executionSuccessful: notifications.length === 0,
|
|
147
|
+
endTimeUtc: result.generatedAt.toISOString(),
|
|
148
|
+
toolExecutionNotifications: notifications,
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
properties: {
|
|
152
|
+
orgId: result.orgId,
|
|
153
|
+
orgName: result.orgName,
|
|
154
|
+
healthScore: result.healthScore,
|
|
155
|
+
grade: result.grade,
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
],
|
|
159
|
+
};
|
|
160
|
+
return JSON.stringify(sarifLog, null, 2);
|
|
161
|
+
}
|
|
162
|
+
ruleFor(rules, ruleId, f) {
|
|
163
|
+
let acc = rules.get(ruleId);
|
|
164
|
+
if (!acc) {
|
|
165
|
+
acc = {
|
|
166
|
+
rule: {
|
|
167
|
+
id: ruleId,
|
|
168
|
+
name: ruleName(ruleId),
|
|
169
|
+
shortDescription: { text: f.title },
|
|
170
|
+
fullDescription: { text: f.title },
|
|
171
|
+
help: { text: f.remediation, markdown: `### Remediation\n\n${f.remediation}` },
|
|
172
|
+
defaultConfiguration: { level: 'warning' },
|
|
173
|
+
properties: { tags: ['security', 'salesforce', f.category] },
|
|
174
|
+
},
|
|
175
|
+
};
|
|
176
|
+
rules.set(ruleId, acc);
|
|
177
|
+
}
|
|
178
|
+
return acc;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* One SARIF result per actionable finding. Accepted-risk waivers, when they land, attach
|
|
182
|
+
* here as `suppressions` (SARIF 3.27.23) rather than by dropping the result, so consumers
|
|
183
|
+
* can still see the finding and that it was waived.
|
|
184
|
+
*/
|
|
185
|
+
findingResult(f, ruleId, hash) {
|
|
186
|
+
const items = f.affectedItems ?? [];
|
|
187
|
+
return {
|
|
188
|
+
ruleId,
|
|
189
|
+
level: riskToSarifLevel(f.riskLevel),
|
|
190
|
+
message: { text: `${f.title}\n\n${f.detail}\n\nRemediation: ${f.remediation}` },
|
|
191
|
+
locations: [orgLocation(ruleId, items.map((i) => i.label))],
|
|
192
|
+
partialFingerprints: { [FINGERPRINT_KEY]: hash },
|
|
193
|
+
properties: {
|
|
194
|
+
findingId: f.id,
|
|
195
|
+
riskLevel: f.riskLevel,
|
|
196
|
+
category: f.category,
|
|
197
|
+
remediation: f.remediation,
|
|
198
|
+
complianceTags: f.complianceTags ?? [],
|
|
199
|
+
affectedItems: items.map((i) => ({ label: i.label, ...(i.note ? { note: i.note } : {}) })),
|
|
200
|
+
},
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
chainResult(rules, chain) {
|
|
204
|
+
const ruleId = `attack-chain-${chain.id}`;
|
|
205
|
+
let acc = rules.get(ruleId);
|
|
206
|
+
if (!acc) {
|
|
207
|
+
acc = {
|
|
208
|
+
rule: {
|
|
209
|
+
id: ruleId,
|
|
210
|
+
name: ruleName(chain.title),
|
|
211
|
+
shortDescription: { text: chain.title },
|
|
212
|
+
fullDescription: { text: chain.narrative },
|
|
213
|
+
help: {
|
|
214
|
+
text: chain.remediation,
|
|
215
|
+
markdown: `### Attack chain\n\n${chain.narrative}\n\n### Remediation\n\n${chain.remediation}`,
|
|
216
|
+
},
|
|
217
|
+
defaultConfiguration: { level: 'error' },
|
|
218
|
+
properties: { tags: ['security', 'salesforce', 'attack-chain'] },
|
|
219
|
+
},
|
|
220
|
+
};
|
|
221
|
+
rules.set(ruleId, acc);
|
|
222
|
+
}
|
|
223
|
+
acc.worst = acc.worst ? maxRisk(acc.worst, chain.severity) : chain.severity;
|
|
224
|
+
const stepLocation = (step, idx) => ({
|
|
225
|
+
message: { text: `Step ${idx + 1}: ${step.title ?? step.findingId} (${step.findingId})` },
|
|
226
|
+
logicalLocations: logicalLocations([step.findingId]),
|
|
227
|
+
properties: { capability: step.capability },
|
|
228
|
+
});
|
|
229
|
+
return {
|
|
230
|
+
ruleId,
|
|
231
|
+
level: riskToSarifLevel(chain.severity),
|
|
232
|
+
message: { text: `[Attack chain] ${chain.title}: ${chain.narrative}` },
|
|
233
|
+
locations: [orgLocation(ruleId, chain.steps.map((s) => s.findingId))],
|
|
234
|
+
codeFlows: [
|
|
235
|
+
{
|
|
236
|
+
message: { text: chain.title },
|
|
237
|
+
threadFlows: [{ locations: chain.steps.map((s, i) => ({ location: stepLocation(s, i) })) }],
|
|
238
|
+
},
|
|
239
|
+
],
|
|
240
|
+
partialFingerprints: { [FINGERPRINT_KEY]: fingerprint(ruleId, chain.id) },
|
|
241
|
+
properties: {
|
|
242
|
+
riskLevel: chain.severity,
|
|
243
|
+
confidence: chain.confidence,
|
|
244
|
+
attackChainId: chain.id,
|
|
245
|
+
remediation: chain.remediation,
|
|
246
|
+
},
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
//# sourceMappingURL=SarifRenderer.js.map
|
|
@@ -6,7 +6,7 @@ const RANK = { CRITICAL: 0, HIGH: 1, MEDIUM: 2, LOW: 3, INFO: 4 };
|
|
|
6
6
|
*/
|
|
7
7
|
export function selectPriorities(findings, chainFindingIds, topN) {
|
|
8
8
|
return findings
|
|
9
|
-
.filter((f) => !f.passed && !f.inconclusive)
|
|
9
|
+
.filter((f) => !f.passed && !f.inconclusive && !f.waived)
|
|
10
10
|
.slice()
|
|
11
11
|
.sort((a, b) => {
|
|
12
12
|
if (RANK[a.riskLevel] !== RANK[b.riskLevel])
|
|
@@ -4,6 +4,10 @@ export interface Roadmap {
|
|
|
4
4
|
moderate: Finding[];
|
|
5
5
|
project: Finding[];
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Group the findings that ask for a change into effort tiers, risk-sorted within each. Unknown
|
|
9
|
+
* checkId → moderate. INFO findings (inventories, advisories) and not-assessed ones (a check that
|
|
10
|
+
* failed or saw nothing) ask for no change, so they stay in the appendix and the coverage line.
|
|
11
|
+
*/
|
|
8
12
|
export declare function buildRoadmap(findings: Finding[]): Roadmap;
|
|
9
13
|
//# sourceMappingURL=RemediationRoadmap.d.ts.map
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { getCheckMeta } from '../findings/CheckMeta.js';
|
|
2
2
|
const RANK = { CRITICAL: 0, HIGH: 1, MEDIUM: 2, LOW: 3, INFO: 4 };
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Group the findings that ask for a change into effort tiers, risk-sorted within each. Unknown
|
|
5
|
+
* checkId → moderate. INFO findings (inventories, advisories) and not-assessed ones (a check that
|
|
6
|
+
* failed or saw nothing) ask for no change, so they stay in the appendix and the coverage line.
|
|
7
|
+
*/
|
|
4
8
|
export function buildRoadmap(findings) {
|
|
5
9
|
const out = { quick: [], moderate: [], project: [] };
|
|
6
10
|
for (const f of findings) {
|
|
7
|
-
if (f.passed || f.inconclusive)
|
|
11
|
+
if (f.passed || f.inconclusive || f.waived || f.notAssessed || f.riskLevel === 'INFO')
|
|
8
12
|
continue;
|
|
9
13
|
const effort = (f.checkId && getCheckMeta(f.checkId)?.effort) || 'moderate';
|
|
10
14
|
out[effort].push(f);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type EvaluatedWaiver, type WaiverEntry } from './WaiverModel.js';
|
|
2
|
+
/** The only file picked up without --waivers. Its path is always reported, so a waiver is never silent. */
|
|
3
|
+
export declare const DEFAULT_WAIVER_FILE = ".sfaudit-waivers.json";
|
|
4
|
+
export declare class WaiverLoader {
|
|
5
|
+
readonly source?: string | undefined;
|
|
6
|
+
private readonly evaluatedWaivers;
|
|
7
|
+
/**
|
|
8
|
+
* @param source the file the waivers came from, or undefined when none was loaded. Reported to
|
|
9
|
+
* the user so a waiver file picked up from the working directory is never applied silently.
|
|
10
|
+
*/
|
|
11
|
+
constructor(waivers: WaiverEntry[], now?: Date, source?: string | undefined);
|
|
12
|
+
get waivers(): readonly EvaluatedWaiver[];
|
|
13
|
+
get activeWaivers(): EvaluatedWaiver[];
|
|
14
|
+
get expiredWaivers(): EvaluatedWaiver[];
|
|
15
|
+
/**
|
|
16
|
+
* The waiver covering one entity of one finding, preferring an active waiver over an expired
|
|
17
|
+
* one. Matching is exact (case- and whitespace-insensitive): the entity must equal an affected
|
|
18
|
+
* item's label, or, for a finding with no affected items, the finding id itself. There are no
|
|
19
|
+
* wildcards or partial matches, so a waiver can never cover more than the entity it names.
|
|
20
|
+
*/
|
|
21
|
+
findMatchingWaiver(checkId: string, findingId: string, entityName: string): EvaluatedWaiver | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Loads waivers from an explicit path, or from `.sfaudit-waivers.json` in the working directory.
|
|
24
|
+
* Rejects any waiver that runs longer than MAX_WAIVER_DAYS from `now`.
|
|
25
|
+
*/
|
|
26
|
+
static load(explicitPath?: string, now?: Date): WaiverLoader;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=WaiverLoader.d.ts.map
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { MAX_WAIVER_DAYS, waiversConfigSchema } from './WaiverModel.js';
|
|
5
|
+
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
6
|
+
/** The only file picked up without --waivers. Its path is always reported, so a waiver is never silent. */
|
|
7
|
+
export const DEFAULT_WAIVER_FILE = '.sfaudit-waivers.json';
|
|
8
|
+
const norm = (s) => s.trim().toLowerCase();
|
|
9
|
+
export class WaiverLoader {
|
|
10
|
+
source;
|
|
11
|
+
evaluatedWaivers = [];
|
|
12
|
+
/**
|
|
13
|
+
* @param source the file the waivers came from, or undefined when none was loaded. Reported to
|
|
14
|
+
* the user so a waiver file picked up from the working directory is never applied silently.
|
|
15
|
+
*/
|
|
16
|
+
constructor(waivers, now = new Date(), source) {
|
|
17
|
+
this.source = source;
|
|
18
|
+
for (const w of waivers) {
|
|
19
|
+
const expiry = new Date(w.expiresAt);
|
|
20
|
+
this.evaluatedWaivers.push({
|
|
21
|
+
...w,
|
|
22
|
+
isExpired: now.getTime() > expiry.getTime(),
|
|
23
|
+
daysRemaining: Math.ceil((expiry.getTime() - now.getTime()) / DAY_MS),
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
get waivers() {
|
|
28
|
+
return this.evaluatedWaivers;
|
|
29
|
+
}
|
|
30
|
+
get activeWaivers() {
|
|
31
|
+
return this.evaluatedWaivers.filter((w) => !w.isExpired);
|
|
32
|
+
}
|
|
33
|
+
get expiredWaivers() {
|
|
34
|
+
return this.evaluatedWaivers.filter((w) => w.isExpired);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The waiver covering one entity of one finding, preferring an active waiver over an expired
|
|
38
|
+
* one. Matching is exact (case- and whitespace-insensitive): the entity must equal an affected
|
|
39
|
+
* item's label, or, for a finding with no affected items, the finding id itself. There are no
|
|
40
|
+
* wildcards or partial matches, so a waiver can never cover more than the entity it names.
|
|
41
|
+
*/
|
|
42
|
+
findMatchingWaiver(checkId, findingId, entityName) {
|
|
43
|
+
const target = norm(entityName);
|
|
44
|
+
if (target === '')
|
|
45
|
+
return undefined;
|
|
46
|
+
const candidates = this.evaluatedWaivers.filter((w) => w.checkId === checkId &&
|
|
47
|
+
(w.findingId === undefined || w.findingId === findingId) &&
|
|
48
|
+
norm(w.entity) === target);
|
|
49
|
+
return candidates.find((w) => !w.isExpired) ?? candidates[0];
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Loads waivers from an explicit path, or from `.sfaudit-waivers.json` in the working directory.
|
|
53
|
+
* Rejects any waiver that runs longer than MAX_WAIVER_DAYS from `now`.
|
|
54
|
+
*/
|
|
55
|
+
static load(explicitPath, now = new Date()) {
|
|
56
|
+
let targetPath = explicitPath;
|
|
57
|
+
if (!targetPath) {
|
|
58
|
+
const candidate = path.resolve(process.cwd(), DEFAULT_WAIVER_FILE);
|
|
59
|
+
if (fs.existsSync(candidate))
|
|
60
|
+
targetPath = candidate;
|
|
61
|
+
}
|
|
62
|
+
if (!targetPath)
|
|
63
|
+
return new WaiverLoader([], now);
|
|
64
|
+
if (!fs.existsSync(targetPath)) {
|
|
65
|
+
throw new Error(`Waiver file '${targetPath}' does not exist.`);
|
|
66
|
+
}
|
|
67
|
+
let raw;
|
|
68
|
+
try {
|
|
69
|
+
raw = fs.readFileSync(targetPath, 'utf-8');
|
|
70
|
+
}
|
|
71
|
+
catch (err) {
|
|
72
|
+
throw new Error(`Cannot read waiver file '${targetPath}': ${err instanceof Error ? err.message : String(err)}`);
|
|
73
|
+
}
|
|
74
|
+
let parsed;
|
|
75
|
+
try {
|
|
76
|
+
parsed = JSON.parse(raw);
|
|
77
|
+
}
|
|
78
|
+
catch (err) {
|
|
79
|
+
throw new Error(`Invalid JSON in waiver file '${targetPath}': ${err instanceof Error ? err.message : String(err)}`);
|
|
80
|
+
}
|
|
81
|
+
let config;
|
|
82
|
+
try {
|
|
83
|
+
config = waiversConfigSchema.parse(parsed);
|
|
84
|
+
}
|
|
85
|
+
catch (err) {
|
|
86
|
+
if (err instanceof z.ZodError) {
|
|
87
|
+
const details = err.issues.map((i) => ` - ${i.path.join('.') || 'root'}: ${i.message}`).join('\n');
|
|
88
|
+
throw new Error(`Malformed waiver configuration in '${targetPath}':\n${details}`);
|
|
89
|
+
}
|
|
90
|
+
throw err;
|
|
91
|
+
}
|
|
92
|
+
const limit = now.getTime() + MAX_WAIVER_DAYS * DAY_MS;
|
|
93
|
+
const tooLong = config.waivers
|
|
94
|
+
.map((w, i) => ({ w, i }))
|
|
95
|
+
.filter(({ w }) => new Date(w.expiresAt).getTime() > limit);
|
|
96
|
+
if (tooLong.length > 0) {
|
|
97
|
+
const details = tooLong.map(({ w, i }) => ` - waivers.${i}.expiresAt: ${w.expiresAt}`).join('\n');
|
|
98
|
+
throw new Error(`Waivers in '${targetPath}' expire more than ${MAX_WAIVER_DAYS} days from now. Re-approve them with a nearer date:\n${details}`);
|
|
99
|
+
}
|
|
100
|
+
return new WaiverLoader(config.waivers, now, targetPath);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=WaiverLoader.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** The longest a waiver may run from the day it is loaded. Longer acceptances must be re-approved. */
|
|
3
|
+
export declare const MAX_WAIVER_DAYS = 365;
|
|
4
|
+
export declare const waiverEntrySchema: z.ZodObject<{
|
|
5
|
+
checkId: z.ZodString;
|
|
6
|
+
findingId: z.ZodOptional<z.ZodString>;
|
|
7
|
+
entity: z.ZodString;
|
|
8
|
+
reason: z.ZodString;
|
|
9
|
+
approvedBy: z.ZodString;
|
|
10
|
+
expiresAt: z.ZodString;
|
|
11
|
+
acknowledgeCritical: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
}, z.core.$strict>;
|
|
13
|
+
export declare const waiversConfigSchema: z.ZodObject<{
|
|
14
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
15
|
+
_comment: z.ZodOptional<z.ZodString>;
|
|
16
|
+
waivers: z.ZodArray<z.ZodObject<{
|
|
17
|
+
checkId: z.ZodString;
|
|
18
|
+
findingId: z.ZodOptional<z.ZodString>;
|
|
19
|
+
entity: z.ZodString;
|
|
20
|
+
reason: z.ZodString;
|
|
21
|
+
approvedBy: z.ZodString;
|
|
22
|
+
expiresAt: z.ZodString;
|
|
23
|
+
acknowledgeCritical: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
+
}, z.core.$strict>>;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
export type WaiverEntry = z.infer<typeof waiverEntrySchema>;
|
|
27
|
+
export type WaiversConfig = z.infer<typeof waiversConfigSchema>;
|
|
28
|
+
export interface EvaluatedWaiver extends WaiverEntry {
|
|
29
|
+
isExpired: boolean;
|
|
30
|
+
daysRemaining: number;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=WaiverModel.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** The longest a waiver may run from the day it is loaded. Longer acceptances must be re-approved. */
|
|
3
|
+
export const MAX_WAIVER_DAYS = 365;
|
|
4
|
+
// A calendar date or a full ISO 8601 timestamp. Date.parse alone accepts forms like "March 2030"
|
|
5
|
+
// whose meaning depends on the runtime, which is no basis for an expiry.
|
|
6
|
+
const ISO_DATE = /^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:\d{2}))?$/;
|
|
7
|
+
export const waiverEntrySchema = z
|
|
8
|
+
.object({
|
|
9
|
+
checkId: z.string().trim().min(1, 'checkId is required'),
|
|
10
|
+
findingId: z.string().trim().min(1).optional(),
|
|
11
|
+
entity: z.string().trim().min(1, 'entity is required'),
|
|
12
|
+
reason: z.string().trim().min(5, 'reason must be at least 5 characters'),
|
|
13
|
+
approvedBy: z.string().trim().min(3, 'approvedBy is required'),
|
|
14
|
+
expiresAt: z
|
|
15
|
+
.string()
|
|
16
|
+
.regex(ISO_DATE, 'expiresAt must be an ISO 8601 date (2027-03-31) or timestamp')
|
|
17
|
+
.refine((val) => !Number.isNaN(Date.parse(val)), { message: 'expiresAt is not a real date' }),
|
|
18
|
+
acknowledgeCritical: z.boolean().optional(),
|
|
19
|
+
})
|
|
20
|
+
.strict();
|
|
21
|
+
export const waiversConfigSchema = z
|
|
22
|
+
.object({
|
|
23
|
+
$schema: z.string().optional(),
|
|
24
|
+
_comment: z.string().optional(),
|
|
25
|
+
waivers: z.array(waiverEntrySchema),
|
|
26
|
+
})
|
|
27
|
+
.strict();
|
|
28
|
+
//# sourceMappingURL=WaiverModel.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Finding } from '../findings/Finding.js';
|
|
2
|
+
import type { WaiverLoader } from './WaiverLoader.js';
|
|
3
|
+
export interface ApplyWaiversResult {
|
|
4
|
+
findings: Finding[];
|
|
5
|
+
waivedFindings: Finding[];
|
|
6
|
+
activeWaiverCount: number;
|
|
7
|
+
expiredWaiverCount: number;
|
|
8
|
+
/** Waivers that matched a CRITICAL finding without acknowledgeCritical, and so were not applied. */
|
|
9
|
+
unacknowledgedCriticalCount: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Marks findings covered by an approved, unexpired waiver as `waived`, which removes them from the
|
|
13
|
+
* score and from --fail-on. A finding with affected items is waived only when every item is
|
|
14
|
+
* covered; otherwise each covered item is annotated and the finding stays active. A finding with
|
|
15
|
+
* no affected items is matched by its own id.
|
|
16
|
+
*
|
|
17
|
+
* A CRITICAL finding is waived only when the waiver sets acknowledgeCritical, so accepting the
|
|
18
|
+
* most severe risks is always a deliberate, visible choice. Waived findings still take part in
|
|
19
|
+
* attack-chain correlation: accepting one weakness does not accept the path it forms with others.
|
|
20
|
+
*/
|
|
21
|
+
export declare function applyWaivers(findings: Finding[], loader: WaiverLoader): ApplyWaiversResult;
|
|
22
|
+
//# sourceMappingURL=applyWaivers.d.ts.map
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Marks findings covered by an approved, unexpired waiver as `waived`, which removes them from the
|
|
3
|
+
* score and from --fail-on. A finding with affected items is waived only when every item is
|
|
4
|
+
* covered; otherwise each covered item is annotated and the finding stays active. A finding with
|
|
5
|
+
* no affected items is matched by its own id.
|
|
6
|
+
*
|
|
7
|
+
* A CRITICAL finding is waived only when the waiver sets acknowledgeCritical, so accepting the
|
|
8
|
+
* most severe risks is always a deliberate, visible choice. Waived findings still take part in
|
|
9
|
+
* attack-chain correlation: accepting one weakness does not accept the path it forms with others.
|
|
10
|
+
*/
|
|
11
|
+
export function applyWaivers(findings, loader) {
|
|
12
|
+
const result = {
|
|
13
|
+
findings,
|
|
14
|
+
waivedFindings: [],
|
|
15
|
+
activeWaiverCount: 0,
|
|
16
|
+
expiredWaiverCount: 0,
|
|
17
|
+
unacknowledgedCriticalCount: 0,
|
|
18
|
+
};
|
|
19
|
+
if (loader.waivers.length === 0)
|
|
20
|
+
return result;
|
|
21
|
+
const outcome = (f, w) => {
|
|
22
|
+
if (w.isExpired)
|
|
23
|
+
return 'expired';
|
|
24
|
+
if (f.riskLevel === 'CRITICAL' && w.acknowledgeCritical !== true)
|
|
25
|
+
return 'critical-unacknowledged';
|
|
26
|
+
return 'waived';
|
|
27
|
+
};
|
|
28
|
+
const count = (o) => {
|
|
29
|
+
if (o === 'waived')
|
|
30
|
+
result.activeWaiverCount++;
|
|
31
|
+
else if (o === 'expired')
|
|
32
|
+
result.expiredWaiverCount++;
|
|
33
|
+
else
|
|
34
|
+
result.unacknowledgedCriticalCount++;
|
|
35
|
+
};
|
|
36
|
+
const tag = (o, w) => o === 'waived'
|
|
37
|
+
? `[WAIVED: ${w.reason} (approved by ${w.approvedBy}, expires ${w.expiresAt})]`
|
|
38
|
+
: o === 'expired'
|
|
39
|
+
? `[WAIVER EXPIRED] (expired ${w.expiresAt})`
|
|
40
|
+
: '[WAIVER NOT APPLIED: CRITICAL findings need acknowledgeCritical]';
|
|
41
|
+
const processed = [];
|
|
42
|
+
for (const f of findings) {
|
|
43
|
+
if (f.passed || f.inconclusive) {
|
|
44
|
+
processed.push(f);
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
const checkId = f.checkId ?? '';
|
|
48
|
+
if (f.affectedItems && f.affectedItems.length > 0) {
|
|
49
|
+
let waivedItems = 0;
|
|
50
|
+
const items = f.affectedItems.map((item) => {
|
|
51
|
+
const w = loader.findMatchingWaiver(checkId, f.id, item.label);
|
|
52
|
+
if (!w)
|
|
53
|
+
return item;
|
|
54
|
+
const o = outcome(f, w);
|
|
55
|
+
count(o);
|
|
56
|
+
if (o === 'waived')
|
|
57
|
+
waivedItems++;
|
|
58
|
+
return { ...item, note: item.note ? `${tag(o, w)} ${item.note}` : tag(o, w) };
|
|
59
|
+
});
|
|
60
|
+
const updated = { ...f, affectedItems: items };
|
|
61
|
+
if (waivedItems === f.affectedItems.length) {
|
|
62
|
+
updated.waived = true;
|
|
63
|
+
result.waivedFindings.push(updated);
|
|
64
|
+
}
|
|
65
|
+
processed.push(updated);
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
const w = loader.findMatchingWaiver(checkId, f.id, f.id);
|
|
69
|
+
if (!w) {
|
|
70
|
+
processed.push(f);
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
const o = outcome(f, w);
|
|
74
|
+
count(o);
|
|
75
|
+
const updated = { ...f, detail: `${tag(o, w)} ${f.detail}` };
|
|
76
|
+
if (o === 'waived') {
|
|
77
|
+
updated.waived = true;
|
|
78
|
+
result.waivedFindings.push(updated);
|
|
79
|
+
}
|
|
80
|
+
processed.push(updated);
|
|
81
|
+
}
|
|
82
|
+
result.findings = processed;
|
|
83
|
+
return result;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=applyWaivers.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cclabsnz/sf-audit",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Read-only Salesforce security audit for the sf CLI:
|
|
3
|
+
"version": "1.18.0",
|
|
4
|
+
"description": "Read-only Salesforce security audit for the sf CLI: 109 checks, attack-chain correlation, A-F risk grading, compliance mapping, free EventLogFile capture, and Guest User Anomaly investigation.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"salesforce",
|
|
7
7
|
"salesforce-cli",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"test:jest": "node --experimental-vm-modules node_modules/jest/bin/jest.js --passWithNoTests"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@cclabsnz/sf-core": "^0.
|
|
49
|
+
"@cclabsnz/sf-core": "^0.11.0",
|
|
50
50
|
"@oclif/core": "^4",
|
|
51
51
|
"@salesforce/core": "^9.3.0",
|
|
52
52
|
"@salesforce/sf-plugins-core": "^13",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"url": "https://github.com/cclabsnz/sf-audit-plugin/issues"
|
|
73
73
|
},
|
|
74
74
|
"engines": {
|
|
75
|
-
"node": ">=
|
|
75
|
+
"node": ">=22.0.0"
|
|
76
76
|
},
|
|
77
77
|
"oclif": {
|
|
78
78
|
"bin": "sf",
|
|
@@ -101,6 +101,8 @@
|
|
|
101
101
|
"files": [
|
|
102
102
|
"/lib",
|
|
103
103
|
"/CHANGELOG.md",
|
|
104
|
+
"/PERMISSIONS.md",
|
|
105
|
+
"/docs/permissionset",
|
|
104
106
|
"/messages",
|
|
105
107
|
"/config",
|
|
106
108
|
"!/lib/**/*.map"
|