@cclabsnz/sf-audit 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -11
- package/lib/api/RestClient.d.ts +1 -0
- package/lib/api/RestClientImpl.d.ts +1 -0
- package/lib/api/RestClientImpl.js +27 -0
- package/lib/apps/analyzeApps.d.ts +8 -0
- package/lib/apps/analyzeApps.js +19 -0
- package/lib/apps/appResolver.d.ts +4 -0
- package/lib/apps/appResolver.js +50 -0
- package/lib/apps/grantedAccess.d.ts +4 -0
- package/lib/apps/grantedAccess.js +36 -0
- package/lib/apps/leastPrivilege.d.ts +6 -0
- package/lib/apps/leastPrivilege.js +47 -0
- package/lib/apps/renderApps.d.ts +5 -0
- package/lib/apps/renderApps.js +23 -0
- package/lib/apps/standardAppCatalog.d.ts +11 -0
- package/lib/apps/standardAppCatalog.js +14 -0
- package/lib/apps/types.d.ts +64 -0
- package/lib/apps/types.js +2 -0
- package/lib/apps/usageCollector.d.ts +9 -0
- package/lib/apps/usageCollector.js +104 -0
- package/lib/chains/namedChains.js +45 -0
- package/lib/checks/impl/AgentActionSurfaceCheck.d.ts +13 -0
- package/lib/checks/impl/AgentActionSurfaceCheck.js +125 -0
- package/lib/checks/impl/AgentChannelExposureCheck.d.ts +15 -0
- package/lib/checks/impl/AgentChannelExposureCheck.js +223 -0
- package/lib/checks/impl/AgentInventoryCheck.d.ts +15 -0
- package/lib/checks/impl/AgentInventoryCheck.js +228 -0
- package/lib/checks/impl/AgentMonitoringCoverageCheck.d.ts +12 -0
- package/lib/checks/impl/AgentMonitoringCoverageCheck.js +97 -0
- package/lib/checks/impl/AgentUserPrivilegeCheck.d.ts +13 -0
- package/lib/checks/impl/AgentUserPrivilegeCheck.js +204 -0
- package/lib/checks/impl/CspTrustedSitesCheck.d.ts +1 -0
- package/lib/checks/impl/CspTrustedSitesCheck.js +10 -1
- package/lib/checks/impl/TrustedUrlHygieneCheck.d.ts +16 -0
- package/lib/checks/impl/TrustedUrlHygieneCheck.js +198 -0
- package/lib/checks/registry.js +19 -0
- package/lib/commands/audit/apps.d.ts +16 -0
- package/lib/commands/audit/apps.js +64 -0
- package/lib/commands/audit/security.d.ts +1 -0
- package/lib/commands/audit/security.js +7 -1
- package/lib/compliance/catalogs/index.js +2 -0
- package/lib/compliance/catalogs/owaspLlm.d.ts +3 -0
- package/lib/compliance/catalogs/owaspLlm.js +34 -0
- package/lib/compliance/mapping.js +19 -0
- package/lib/compliance/resolve.js +4 -3
- package/lib/compliance/types.d.ts +1 -1
- package/lib/context/AuditCache.d.ts +28 -0
- package/lib/context/AuditContext.d.ts +4 -0
- package/lib/events/pullEventLogs.js +3 -3
- package/lib/findings/CheckMeta.js +6 -0
- package/lib/lib/wire.d.ts +2 -2
- package/lib/lib/wire.js +2 -1
- package/lib/renderers/ClientReportRenderer.js +1 -1
- package/package.json +4 -1
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { resolve as dnsResolve } from 'node:dns/promises';
|
|
2
|
+
// Domains treated as "Salesforce family" and therefore not flagged. This is a review
|
|
3
|
+
// heuristic to cut noise, NOT an allowlist: an attacker-controlled subdomain of a
|
|
4
|
+
// look-alike is not made safe by matching one of these suffixes. Any trusted URL outside
|
|
5
|
+
// this set is surfaced for a human to confirm it is still owned and expected.
|
|
6
|
+
const SALESFORCE_FAMILY_DOMAINS = [
|
|
7
|
+
'salesforce.com',
|
|
8
|
+
'force.com',
|
|
9
|
+
'salesforce-experience.com',
|
|
10
|
+
'visualforce.com',
|
|
11
|
+
'documentforce.com',
|
|
12
|
+
'salesforceliveagent.com',
|
|
13
|
+
'sfdcstatic.com',
|
|
14
|
+
];
|
|
15
|
+
// Nameservers that indicate a domain has lapsed and been picked up by a parking /
|
|
16
|
+
// drop-catch provider. Heuristic: matched as substrings of the resolved NS hostnames.
|
|
17
|
+
// A parked trusted domain is the ForcedLeak precondition (an expired allowlisted domain
|
|
18
|
+
// re-registered by an attacker as an exfiltration channel).
|
|
19
|
+
const PARKING_NAMESERVERS = ['parkingcrew', 'sedoparking', 'bodis', 'afternic', 'dan.com'];
|
|
20
|
+
// Bound outbound DNS work so a large allowlist cannot fan out into hundreds of
|
|
21
|
+
// simultaneous lookups, and cap each individual lookup so one slow domain cannot stall
|
|
22
|
+
// the audit.
|
|
23
|
+
const DNS_CONCURRENCY = 5;
|
|
24
|
+
const DNS_TIMEOUT_MS = 3000;
|
|
25
|
+
export class TrustedUrlHygieneCheck {
|
|
26
|
+
id = 'trusted-url-hygiene';
|
|
27
|
+
name = 'Trusted URL Hygiene';
|
|
28
|
+
category = 'AI & Agents';
|
|
29
|
+
description = 'Reviews the CSP trusted-sites allowlist for non-Salesforce domains that could be repurposed as data-exfiltration channels (the ForcedLeak pattern). With --resolve-domains, DNS-checks each domain for unresolvable or parked entries.';
|
|
30
|
+
dependsOnCache = ['cspTrustedSites'];
|
|
31
|
+
async run(ctx) {
|
|
32
|
+
const sites = ctx.cache.cspTrustedSites;
|
|
33
|
+
// Cache absent: CspTrustedSitesCheck was skipped/failed. Nothing to review, stay silent.
|
|
34
|
+
if (!sites)
|
|
35
|
+
return { findings: [] };
|
|
36
|
+
// Flag every active trusted URL whose domain is not in the Salesforce family.
|
|
37
|
+
const flagged = new Map();
|
|
38
|
+
for (const s of sites) {
|
|
39
|
+
if (!s.isActive)
|
|
40
|
+
continue;
|
|
41
|
+
const domain = extractDomain(s.endpointUrl);
|
|
42
|
+
if (!domain)
|
|
43
|
+
continue;
|
|
44
|
+
if (isSalesforceFamily(domain))
|
|
45
|
+
continue;
|
|
46
|
+
if (!flagged.has(domain))
|
|
47
|
+
flagged.set(domain, s);
|
|
48
|
+
}
|
|
49
|
+
if (flagged.size === 0)
|
|
50
|
+
return { findings: [] };
|
|
51
|
+
const resolveDomains = ctx.options?.resolveDomains === true;
|
|
52
|
+
if (!resolveDomains) {
|
|
53
|
+
return { findings: [...flagged.entries()].map(([d, s]) => this.reviewFinding(d, s)) };
|
|
54
|
+
}
|
|
55
|
+
// --resolve-domains: DNS-check each flagged domain with bounded concurrency.
|
|
56
|
+
const domains = [...flagged.keys()];
|
|
57
|
+
const outcomes = await mapWithConcurrency(domains, DNS_CONCURRENCY, (d) => resolveDomain(d));
|
|
58
|
+
const findings = [];
|
|
59
|
+
domains.forEach((domain, i) => {
|
|
60
|
+
const site = flagged.get(domain);
|
|
61
|
+
const outcome = outcomes[i];
|
|
62
|
+
switch (outcome.kind) {
|
|
63
|
+
case 'unresolvable':
|
|
64
|
+
findings.push(this.unresolvableFinding(domain, site));
|
|
65
|
+
break;
|
|
66
|
+
case 'parked':
|
|
67
|
+
findings.push(this.parkedFinding(domain, site, outcome.nameservers));
|
|
68
|
+
break;
|
|
69
|
+
case 'unverifiable':
|
|
70
|
+
findings.push(this.unverifiableFinding(domain, site, outcome.reason));
|
|
71
|
+
break;
|
|
72
|
+
case 'resolved':
|
|
73
|
+
// Resolves cleanly to non-parking nameservers: still non-Salesforce, so keep the
|
|
74
|
+
// review finding rather than silently passing it.
|
|
75
|
+
findings.push(this.reviewFinding(domain, site));
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
return { findings };
|
|
80
|
+
}
|
|
81
|
+
reviewFinding(domain, site) {
|
|
82
|
+
return {
|
|
83
|
+
id: `trusted-url-hygiene-review-${domain}`,
|
|
84
|
+
category: this.category,
|
|
85
|
+
riskLevel: 'LOW',
|
|
86
|
+
title: `CSP trusted site "${domain}" is a non-Salesforce domain`,
|
|
87
|
+
detail: `The CSP trusted-sites allowlist includes "${site.endpointUrl}", whose domain "${domain}" is not ` +
|
|
88
|
+
`part of the Salesforce platform. Every allowlisted domain is a place Lightning/Agentforce output can ` +
|
|
89
|
+
`send data to. In the ForcedLeak incident an expired allowlisted domain was re-registered by an attacker ` +
|
|
90
|
+
`and used as the exfiltration channel for prompt-injected data. Confirm this domain is still owned by a ` +
|
|
91
|
+
`party you trust and is still required.`,
|
|
92
|
+
remediation: 'Verify ownership and continued need for this trusted site. Remove it if it is no longer required. ' +
|
|
93
|
+
'To DNS-check the allowlist automatically, re-run with --resolve-domains.',
|
|
94
|
+
affectedItems: [{ label: site.endpointUrl, note: site.context ? `Context: ${site.context}` : undefined }],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
unresolvableFinding(domain, site) {
|
|
98
|
+
return {
|
|
99
|
+
id: `trusted-url-hygiene-unresolvable-${domain}`,
|
|
100
|
+
category: this.category,
|
|
101
|
+
riskLevel: 'CRITICAL',
|
|
102
|
+
title: `CSP trusted site "${domain}" does not resolve (unregistered/expired)`,
|
|
103
|
+
detail: `The trusted domain "${domain}" (${site.endpointUrl}) returned NXDOMAIN — it does not resolve. An ` +
|
|
104
|
+
`unregistered domain on the CSP allowlist is the literal ForcedLeak precondition: anyone can register it ` +
|
|
105
|
+
`and instantly gain an allowlisted exfiltration channel for data from Lightning components and Agentforce ` +
|
|
106
|
+
`agent output.`,
|
|
107
|
+
remediation: 'Remove this trusted site immediately, or re-register the domain under your control if it must remain allowlisted.',
|
|
108
|
+
affectedItems: [{ label: site.endpointUrl, note: site.context ? `Context: ${site.context}` : undefined }],
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
parkedFinding(domain, site, nameservers) {
|
|
112
|
+
return {
|
|
113
|
+
id: `trusted-url-hygiene-parked-${domain}`,
|
|
114
|
+
category: this.category,
|
|
115
|
+
riskLevel: 'CRITICAL',
|
|
116
|
+
title: `CSP trusted site "${domain}" appears to be a parked/dropped domain`,
|
|
117
|
+
detail: `The trusted domain "${domain}" (${site.endpointUrl}) resolves to nameservers associated with a domain ` +
|
|
118
|
+
`parking / drop-catch provider (${nameservers.join(', ')}). This strongly suggests the domain lapsed and ` +
|
|
119
|
+
`is no longer under your control — the ForcedLeak pattern, where an expired allowlisted domain is reused ` +
|
|
120
|
+
`as an exfiltration channel.`,
|
|
121
|
+
remediation: 'Remove this trusted site immediately and reclaim the domain if it must remain allowlisted.',
|
|
122
|
+
affectedItems: [{ label: site.endpointUrl, note: `Nameservers: ${nameservers.join(', ')}` }],
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
unverifiableFinding(domain, site, reason) {
|
|
126
|
+
return {
|
|
127
|
+
id: `trusted-url-hygiene-unverified-${domain}`,
|
|
128
|
+
category: this.category,
|
|
129
|
+
riskLevel: 'INFO',
|
|
130
|
+
title: `Could not verify CSP trusted domain "${domain}"`,
|
|
131
|
+
detail: `A DNS lookup for the trusted domain "${domain}" (${site.endpointUrl}) could not be completed (${reason}). ` +
|
|
132
|
+
`This is not itself a finding — the domain may be healthy — but it could not be checked from the machine ` +
|
|
133
|
+
`running the audit.`,
|
|
134
|
+
remediation: 'Re-run --resolve-domains from a network with outbound DNS, or verify the domain manually.',
|
|
135
|
+
affectedItems: [{ label: site.endpointUrl, note: site.context ? `Context: ${site.context}` : undefined }],
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
// Extract the registrable-ish domain from a CSP endpoint URL. CSP endpoints may be bare
|
|
140
|
+
// hostnames, wildcards (*.example.com), or full URLs; normalise to a lowercase hostname.
|
|
141
|
+
export function extractDomain(endpoint) {
|
|
142
|
+
let host = endpoint.trim().toLowerCase();
|
|
143
|
+
host = host.replace(/^[a-z]+:\/\//, ''); // strip scheme
|
|
144
|
+
host = host.replace(/^\*\./, ''); // strip leading wildcard label
|
|
145
|
+
host = host.split('/')[0]; // drop any path
|
|
146
|
+
host = host.split('?')[0];
|
|
147
|
+
host = host.split(':')[0]; // drop port
|
|
148
|
+
host = host.replace(/\.$/, ''); // trailing dot
|
|
149
|
+
return host.length > 0 ? host : null;
|
|
150
|
+
}
|
|
151
|
+
function isSalesforceFamily(domain) {
|
|
152
|
+
return SALESFORCE_FAMILY_DOMAINS.some((f) => domain === f || domain.endsWith(`.${f}`));
|
|
153
|
+
}
|
|
154
|
+
// Resolve one domain into a ResolveOutcome. Never throws: DNS errors are classified.
|
|
155
|
+
async function resolveDomain(domain) {
|
|
156
|
+
try {
|
|
157
|
+
const ns = await withTimeout(dnsResolve(domain, 'NS'), DNS_TIMEOUT_MS);
|
|
158
|
+
const nsHosts = ns.map((h) => h.toLowerCase());
|
|
159
|
+
const parkingHits = nsHosts.filter((h) => PARKING_NAMESERVERS.some((p) => h.includes(p)));
|
|
160
|
+
if (parkingHits.length > 0)
|
|
161
|
+
return { kind: 'parked', nameservers: nsHosts };
|
|
162
|
+
return { kind: 'resolved' };
|
|
163
|
+
}
|
|
164
|
+
catch (err) {
|
|
165
|
+
const code = err?.code ?? '';
|
|
166
|
+
if (code === 'ENOTFOUND' || code === 'NXDOMAIN' || code === 'ENODATA') {
|
|
167
|
+
// ENODATA: domain exists but has no NS answer — treat as resolved-but-unverifiable
|
|
168
|
+
// only for ENODATA; NXDOMAIN/ENOTFOUND are the unregistered case.
|
|
169
|
+
if (code === 'ENODATA')
|
|
170
|
+
return { kind: 'resolved' };
|
|
171
|
+
return { kind: 'unresolvable' };
|
|
172
|
+
}
|
|
173
|
+
const reason = code || (err instanceof Error ? err.message : String(err)) || 'DNS error';
|
|
174
|
+
return { kind: 'unverifiable', reason };
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
// Reject with a marker error if the wrapped promise does not settle within ms.
|
|
178
|
+
function withTimeout(p, ms) {
|
|
179
|
+
return Promise.race([
|
|
180
|
+
p,
|
|
181
|
+
new Promise((_, reject) => setTimeout(() => reject(Object.assign(new Error('DNS timeout'), { code: 'ETIMEDOUT' })), ms).unref?.()),
|
|
182
|
+
]);
|
|
183
|
+
}
|
|
184
|
+
// Map over items with a fixed worker pool, preserving input order in the result.
|
|
185
|
+
async function mapWithConcurrency(items, limit, fn) {
|
|
186
|
+
const results = new Array(items.length);
|
|
187
|
+
let next = 0;
|
|
188
|
+
const worker = async () => {
|
|
189
|
+
while (next < items.length) {
|
|
190
|
+
const i = next++;
|
|
191
|
+
results[i] = await fn(items[i]);
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
const workers = Array.from({ length: Math.min(limit, items.length) }, () => worker());
|
|
195
|
+
await Promise.all(workers);
|
|
196
|
+
return results;
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=TrustedUrlHygieneCheck.js.map
|
package/lib/checks/registry.js
CHANGED
|
@@ -86,6 +86,14 @@ import { SandboxDataMaskingCheck } from './impl/SandboxDataMaskingCheck.js';
|
|
|
86
86
|
// Access-control depth: effective-permission resolution + combination analysis
|
|
87
87
|
import { PrivilegedAccessCheck } from './impl/PrivilegedAccessCheck.js';
|
|
88
88
|
import { SeparationOfDutiesCheck } from './impl/SeparationOfDutiesCheck.js';
|
|
89
|
+
// AI & Agents — Agentforce / GenAI checks (v1.5). AgentInventoryCheck is the single point
|
|
90
|
+
// of agent queries; the dependent checks (Phase 2) read the cache keys it populates.
|
|
91
|
+
import { AgentInventoryCheck } from './impl/AgentInventoryCheck.js';
|
|
92
|
+
import { AgentUserPrivilegeCheck } from './impl/AgentUserPrivilegeCheck.js';
|
|
93
|
+
import { AgentActionSurfaceCheck } from './impl/AgentActionSurfaceCheck.js';
|
|
94
|
+
import { AgentChannelExposureCheck } from './impl/AgentChannelExposureCheck.js';
|
|
95
|
+
import { AgentMonitoringCoverageCheck } from './impl/AgentMonitoringCoverageCheck.js';
|
|
96
|
+
import { TrustedUrlHygieneCheck } from './impl/TrustedUrlHygieneCheck.js';
|
|
89
97
|
// Order matters: a check's dependsOnCache must be satisfied by a preceding check's populatesCache.
|
|
90
98
|
// CheckEngine.validateCacheOrdering() enforces this at startup.
|
|
91
99
|
export const CHECKS = [
|
|
@@ -160,6 +168,9 @@ export const CHECKS = [
|
|
|
160
168
|
new ExperienceCspCheck(), // Experience Cloud CSP / Lightning Web Security advisory
|
|
161
169
|
new SandboxDataMaskingCheck(), // sandbox with populated (likely unmasked) PII
|
|
162
170
|
new PrivilegedAccessCheck(), // writes: effectivePermissions; shadow-admin detection
|
|
171
|
+
// AI & Agents block (v1.5) — Agentforce / GenAI. AgentInventoryCheck writes agentInventory,
|
|
172
|
+
// agentUsers, agentAccess; the Phase 2 dependent checks are registered after it.
|
|
173
|
+
new AgentInventoryCheck(), // writes: agentInventory, agentUsers, agentAccess
|
|
163
174
|
// Cache-dependent checks — must come after their producers
|
|
164
175
|
new DeploymentIdentityCheck(), // reads connectedAppNames
|
|
165
176
|
new ApexLoggingCheck(), // reads apexBodies + scheduledApexClassNames
|
|
@@ -175,5 +186,13 @@ export const CHECKS = [
|
|
|
175
186
|
// connectedAppNames, scheduledApexClassNames, eventLogSummary
|
|
176
187
|
new MfaMethodStrengthCheck(), // reads mfaRegistrations
|
|
177
188
|
new SeparationOfDutiesCheck(), // reads effectivePermissions — toxic permission combinations
|
|
189
|
+
// AI & Agents dependent checks (v1.5) — registered after all their cache producers:
|
|
190
|
+
// AgentInventoryCheck (agentInventory/agentUsers/agentAccess) above, EventMonitoringCheck
|
|
191
|
+
// (eventLogSummary) and CspTrustedSitesCheck (cspTrustedSites) earlier in the list.
|
|
192
|
+
new AgentUserPrivilegeCheck(), // reads agentUsers, agentAccess
|
|
193
|
+
new AgentActionSurfaceCheck(), // reads agentInventory, agentAccess
|
|
194
|
+
new AgentChannelExposureCheck(), // reads agentInventory, agentAccess
|
|
195
|
+
new AgentMonitoringCoverageCheck(), // reads agentInventory, agentAccess, eventLogSummary
|
|
196
|
+
new TrustedUrlHygieneCheck(), // reads cspTrustedSites (runs even without Agentforce)
|
|
178
197
|
];
|
|
179
198
|
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import type { AppFinding } from '../../apps/types.js';
|
|
3
|
+
export default class AuditAppsCommand extends SfCommand<AppFinding[]> {
|
|
4
|
+
static summary: string;
|
|
5
|
+
static description: string;
|
|
6
|
+
static examples: string[];
|
|
7
|
+
static flags: {
|
|
8
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
since: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
from: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
soak: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
format: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
};
|
|
14
|
+
run(): Promise<AppFinding[]>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=apps.d.ts.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { readFileSync, readdirSync, unlinkSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
4
|
+
import { resolveOrgInfo, buildAuditContext } from '../../lib/wire.js';
|
|
5
|
+
import { analyzeApps } from '../../apps/analyzeApps.js';
|
|
6
|
+
import { renderJson, renderMarkdown, renderTable } from '../../apps/renderApps.js';
|
|
7
|
+
export default class AuditAppsCommand extends SfCommand {
|
|
8
|
+
static summary = 'Report connected apps that are granted more access than they use';
|
|
9
|
+
static description = 'Reads the RestApi EventLogFile to see which objects each connected app actually touches, compares that ' +
|
|
10
|
+
'against the access its run-as user is granted, and reports the over-grant per object and read/write bit, ' +
|
|
11
|
+
'plus a suggested least-privilege permission set. Read-only. "Used" is a lower bound (RestApi attributes ' +
|
|
12
|
+
'roughly half of API traffic), so revoke recommendations are suppressed below a soak window.';
|
|
13
|
+
static examples = [
|
|
14
|
+
'<%= config.bin %> <%= command.id %> --target-org myOrg --since 7',
|
|
15
|
+
'<%= config.bin %> <%= command.id %> --target-org myOrg --from ~/.sf/event-baseline/00Dxxx',
|
|
16
|
+
'<%= config.bin %> <%= command.id %> --target-org myOrg --format json',
|
|
17
|
+
];
|
|
18
|
+
static flags = {
|
|
19
|
+
'target-org': Flags.requiredOrg(),
|
|
20
|
+
since: Flags.integer({ summary: 'Days of RestApi log to analyze.', default: 7, helpValue: '7' }),
|
|
21
|
+
from: Flags.string({ summary: 'Read RestApi CSVs from a local events-pull baseline dir instead of downloading.', helpValue: './baseline' }),
|
|
22
|
+
soak: Flags.integer({ summary: 'Minimum window (days) before asserting revoke recommendations.', default: 7 }),
|
|
23
|
+
format: Flags.string({ summary: 'Output format.', options: ['table', 'json', 'md'], default: 'table' }),
|
|
24
|
+
};
|
|
25
|
+
async run() {
|
|
26
|
+
const { flags } = await this.parse(AuditAppsCommand);
|
|
27
|
+
const conn = flags['target-org'].getConnection('62.0');
|
|
28
|
+
const orgInfo = await resolveOrgInfo(conn);
|
|
29
|
+
const ctx = buildAuditContext(conn, orgInfo);
|
|
30
|
+
let restApiCsv = '';
|
|
31
|
+
if (flags.from) {
|
|
32
|
+
// Concatenate any RestApi CSVs found under the baseline dir.
|
|
33
|
+
const dir = join(flags.from, 'RestApi');
|
|
34
|
+
try {
|
|
35
|
+
restApiCsv = readdirSync(dir).filter((f) => f.endsWith('.csv')).map((f) => readFileSync(join(dir, f), 'utf-8')).join('\n');
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
this.error(`No RestApi logs under ${dir}. Run "sf audit events pull" first, or drop --from to download.`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
const rows = await ctx.soql.queryAll(`SELECT Id FROM EventLogFile WHERE EventType = 'RestApi' AND LogDate = LAST_N_DAYS:${flags.since} ORDER BY LogDate DESC`);
|
|
43
|
+
for (const r of rows) {
|
|
44
|
+
// Stream each RestApi log to a temp file and read it back (getRawToFile never buffers the body).
|
|
45
|
+
const tmp = join(process.env.TMPDIR ?? '/tmp', `sfaudit-restapi-${r.Id}.csv`);
|
|
46
|
+
await ctx.rest.getRawToFile(`/sobjects/EventLogFile/${r.Id}/LogFile`, tmp);
|
|
47
|
+
try {
|
|
48
|
+
restApiCsv += '\n' + readFileSync(tmp, 'utf-8');
|
|
49
|
+
}
|
|
50
|
+
finally {
|
|
51
|
+
try {
|
|
52
|
+
unlinkSync(tmp);
|
|
53
|
+
}
|
|
54
|
+
catch { /* ignore if already gone */ }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const findings = await analyzeApps(restApiCsv, ctx.soql, { since: flags.since, soakDays: flags.soak });
|
|
59
|
+
const out = flags.format === 'json' ? renderJson(findings) : flags.format === 'md' ? renderMarkdown(findings) : renderTable(findings);
|
|
60
|
+
this.log(out);
|
|
61
|
+
return findings;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=apps.js.map
|
|
@@ -15,6 +15,7 @@ export default class SecurityAuditCommand extends SfCommand<AuditResult> {
|
|
|
15
15
|
branding: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
16
|
top: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
17
|
frameworks: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
'resolve-domains': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
19
|
};
|
|
19
20
|
run(): Promise<AuditResult>;
|
|
20
21
|
/** Resolve --checks to the checks to run, erroring on any unknown ID. */
|
|
@@ -64,6 +64,10 @@ export default class SecurityAuditCommand extends SfCommand {
|
|
|
64
64
|
summary: 'Compliance frameworks for the executive matrix: universal | nz | all | a comma list (executive format).',
|
|
65
65
|
default: 'universal',
|
|
66
66
|
}),
|
|
67
|
+
'resolve-domains': Flags.boolean({
|
|
68
|
+
summary: 'Make outbound DNS queries from this machine to verify CSP trusted domains resolve. Off by default; default runs contact only the target org.',
|
|
69
|
+
default: false,
|
|
70
|
+
}),
|
|
67
71
|
};
|
|
68
72
|
async run() {
|
|
69
73
|
const { flags } = await this.parse(SecurityAuditCommand);
|
|
@@ -74,7 +78,9 @@ export default class SecurityAuditCommand extends SfCommand {
|
|
|
74
78
|
const formats = this.resolveFormats(flags.format);
|
|
75
79
|
const conn = flags['target-org'].getConnection('62.0');
|
|
76
80
|
const orgInfo = await resolveOrgInfo(conn);
|
|
77
|
-
const ctx = buildAuditContext(conn, orgInfo
|
|
81
|
+
const ctx = buildAuditContext(conn, orgInfo, {
|
|
82
|
+
resolveDomains: flags['resolve-domains'],
|
|
83
|
+
});
|
|
78
84
|
const knownCheckIds = new Set(CHECKS.map((c) => c.id));
|
|
79
85
|
const scoringConfig = loadScoringConfig(flags['scoring-config'], knownCheckIds, (msg) => this.warn(msg));
|
|
80
86
|
this.log(`Auditing org: ${orgInfo.name} (${orgInfo.id})`);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OWASP_CONTROLS } from './owasp.js';
|
|
2
|
+
import { OWASP_LLM_CONTROLS } from './owaspLlm.js';
|
|
2
3
|
import { SOC2_CONTROLS } from './soc2.js';
|
|
3
4
|
import { ISO27001_CONTROLS } from './iso27001.js';
|
|
4
5
|
import { SBS_CONTROLS } from './sbs.js';
|
|
@@ -7,6 +8,7 @@ import { HISO10029_CONTROLS } from './hiso10029.js';
|
|
|
7
8
|
import { NZISM_CONTROLS } from './nzism.js';
|
|
8
9
|
export const ALL_CONTROLS = [
|
|
9
10
|
...OWASP_CONTROLS,
|
|
11
|
+
...OWASP_LLM_CONTROLS,
|
|
10
12
|
...SOC2_CONTROLS,
|
|
11
13
|
...ISO27001_CONTROLS,
|
|
12
14
|
...SBS_CONTROLS,
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// OWASP Top 10 for Large Language Model Applications, 2025 edition.
|
|
2
|
+
// Ids and titles verified 2026-07 against the official list: https://genai.owasp.org/llm-top-10/
|
|
3
|
+
// Only the risks that a read-only Salesforce/Agentforce config audit can speak to are
|
|
4
|
+
// catalogued here; the remaining 2025 entries (LLM03 Supply Chain, LLM04 Data & Model
|
|
5
|
+
// Poisoning, LLM07 System Prompt Leakage, LLM08 Vector & Embedding Weaknesses, LLM09
|
|
6
|
+
// Misinformation, LLM10 Unbounded Consumption) concern model/training/runtime behaviour that
|
|
7
|
+
// is not observable from org metadata, so they are intentionally omitted rather than mapped
|
|
8
|
+
// weakly — the same discipline OWASP web A04 (Insecure Design) is treated with in owasp.ts.
|
|
9
|
+
const V = 'OWASP Top 10 for LLM Applications 2025';
|
|
10
|
+
const ref = (id) => `OWASP Top 10 for LLM Applications 2025, ${id}`;
|
|
11
|
+
const url = 'https://genai.owasp.org/llm-top-10/';
|
|
12
|
+
export const OWASP_LLM_CONTROLS = [
|
|
13
|
+
{ id: 'LLM01', framework: 'OWASP_LLM', version: V, title: 'Prompt Injection',
|
|
14
|
+
requirement: 'User or content-supplied input can alter an LLM application\'s behaviour or outputs in unintended, ' +
|
|
15
|
+
'attacker-controlled ways. Untrusted input paths to an agent (public channels) and the destinations ' +
|
|
16
|
+
'that injected output can reach (allowlisted egress domains) are constrained and reviewed.',
|
|
17
|
+
sourceRef: ref('LLM01'), url, verified: true },
|
|
18
|
+
{ id: 'LLM02', framework: 'OWASP_LLM', version: V, title: 'Sensitive Information Disclosure',
|
|
19
|
+
requirement: 'The LLM application must not expose sensitive data through its outputs, and misuse that leads to such ' +
|
|
20
|
+
'disclosure must be detectable. Access to sensitive data by the agent identity is minimised and agent ' +
|
|
21
|
+
'activity is captured so exfiltration can be detected and investigated.',
|
|
22
|
+
sourceRef: ref('LLM02'), url, verified: true },
|
|
23
|
+
{ id: 'LLM05', framework: 'OWASP_LLM', version: V, title: 'Improper Output Handling',
|
|
24
|
+
requirement: 'LLM-generated output is validated and safely handled by downstream components rather than trusted ' +
|
|
25
|
+
'implicitly. Channels that agent output can be sent to (e.g. CSP-trusted / allowlisted domains) are ' +
|
|
26
|
+
'owned, current, and expected, so output cannot be routed to an attacker-controlled destination.',
|
|
27
|
+
sourceRef: ref('LLM05'), url, verified: true },
|
|
28
|
+
{ id: 'LLM06', framework: 'OWASP_LLM', version: V, title: 'Excessive Agency',
|
|
29
|
+
requirement: 'An LLM-based system is granted only the functionality, permissions, and autonomy it strictly needs. ' +
|
|
30
|
+
'The agent\'s run-as identity is least-privilege and its action surface (especially write-capable ' +
|
|
31
|
+
'actions) is minimal, inventoried, and reviewed.',
|
|
32
|
+
sourceRef: ref('LLM06'), url, verified: true },
|
|
33
|
+
];
|
|
34
|
+
//# sourceMappingURL=owaspLlm.js.map
|
|
@@ -87,6 +87,25 @@ const BASE_CHECK_CONTROL_MAP = {
|
|
|
87
87
|
'encryption-coverage': ['OWASP-A02', 'SOC2-CC6.1', 'ISO-A.8.24'],
|
|
88
88
|
'experience-csp': ['OWASP-A05', 'SOC2-CC6.6', 'ISO-A.8.26'],
|
|
89
89
|
'sandbox-data-masking': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.5.12'],
|
|
90
|
+
// AI & Agents (v1.5). Each agent check carries its web-OWASP / SOC2 / ISO governance
|
|
91
|
+
// control(s) plus the OWASP LLM Top 10 (2025) risk it maps to. LLM ids/titles are the real
|
|
92
|
+
// 2025 edition (see catalogs/owaspLlm.ts). Rationale is inline per check:
|
|
93
|
+
// LLM01 Prompt Injection — untrusted input path (public channel) or the egress a
|
|
94
|
+
// payload leaves through (allowlisted domain).
|
|
95
|
+
// LLM02 Sensitive Info Disclose — undetected agent-driven exfiltration (monitoring gap).
|
|
96
|
+
// LLM05 Improper Output Handling — agent output routed to an unowned/parked destination
|
|
97
|
+
// (the ForcedLeak exfil channel; this was "Insecure Output
|
|
98
|
+
// Handling / LLM02" in the 2023 list, renumbered to LLM05
|
|
99
|
+
// in 2025 — we map to the 2025 id honestly).
|
|
100
|
+
// LLM06 Excessive Agency — over-broad run-as identity or write-capable action surface.
|
|
101
|
+
// agent-inventory keeps its access-governance base and adds LLM06 (inventorying agent
|
|
102
|
+
// identities + run-as access is the foundation of least-agency).
|
|
103
|
+
'agent-inventory': ['OWASP-A01', 'SOC2-CC6.3', 'ISO-A.5.18', 'LLM06'],
|
|
104
|
+
'agent-user-privilege': ['OWASP-A01', 'SOC2-CC6.3', 'ISO-A.5.18', 'LLM06'],
|
|
105
|
+
'agent-action-surface': ['OWASP-A01', 'SOC2-CC6.3', 'ISO-A.8.3', 'LLM06'],
|
|
106
|
+
'agent-channel-exposure': ['OWASP-A01', 'SOC2-CC6.1', 'ISO-A.8.3', 'LLM01'],
|
|
107
|
+
'agent-monitoring-coverage': ['OWASP-A09', 'SOC2-CC7.2', 'ISO-A.8.15', 'LLM02'],
|
|
108
|
+
'trusted-url-hygiene': ['OWASP-A05', 'OWASP-A10', 'SOC2-CC6.6', 'ISO-A.8.26', 'LLM01', 'LLM05'],
|
|
90
109
|
};
|
|
91
110
|
// NZ pack crosswalk — each check belongs to one domain; the domain's NZ control ids are
|
|
92
111
|
// layered onto its base entry. HISO/NZISM are domain/chapter-level drafts; Privacy Act IPPs
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CHECK_CONTROL_MAP } from './mapping.js';
|
|
2
2
|
import { getControl } from './catalogs/index.js';
|
|
3
3
|
const PACKS = {
|
|
4
|
-
universal: ['OWASP', 'SOC2', 'ISO27001'],
|
|
4
|
+
universal: ['OWASP', 'OWASP_LLM', 'SOC2', 'ISO27001'],
|
|
5
5
|
nz: ['ISO27001', 'HISO10029', 'PRIVACY_ACT', 'NZISM'],
|
|
6
|
-
all: ['OWASP', 'SOC2', 'ISO27001', 'SBS', 'HISO10029', 'PRIVACY_ACT', 'NZISM', 'HIPAA', 'GDPR'],
|
|
6
|
+
all: ['OWASP', 'OWASP_LLM', 'SOC2', 'ISO27001', 'SBS', 'HISO10029', 'PRIVACY_ACT', 'NZISM', 'HIPAA', 'GDPR'],
|
|
7
7
|
};
|
|
8
8
|
export function packFrameworks(pack) {
|
|
9
9
|
return PACKS[pack];
|
|
@@ -29,7 +29,8 @@ export function getComplianceTags(checkId) {
|
|
|
29
29
|
return CHECK_CONTROL_MAP[checkId] ?? [];
|
|
30
30
|
}
|
|
31
31
|
const ALIAS = {
|
|
32
|
-
owasp: 'OWASP',
|
|
32
|
+
owasp: 'OWASP', 'owasp-llm': 'OWASP_LLM', llm: 'OWASP_LLM',
|
|
33
|
+
soc2: 'SOC2', iso: 'ISO27001', iso27001: 'ISO27001', sbs: 'SBS',
|
|
33
34
|
privacy: 'PRIVACY_ACT', 'privacy-act': 'PRIVACY_ACT', hiso: 'HISO10029', nzism: 'NZISM',
|
|
34
35
|
hipaa: 'HIPAA', gdpr: 'GDPR',
|
|
35
36
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type Framework = 'OWASP' | 'SOC2' | 'ISO27001' | 'SBS' | 'HISO10029' | 'PRIVACY_ACT' | 'NZISM' | 'HIPAA' | 'GDPR';
|
|
1
|
+
export type Framework = 'OWASP' | 'OWASP_LLM' | 'SOC2' | 'ISO27001' | 'SBS' | 'HISO10029' | 'PRIVACY_ACT' | 'NZISM' | 'HIPAA' | 'GDPR';
|
|
2
2
|
export interface ControlDef {
|
|
3
3
|
id: string;
|
|
4
4
|
framework: Framework;
|
|
@@ -20,6 +20,30 @@ export interface EventLogSummary {
|
|
|
20
20
|
accessible?: boolean;
|
|
21
21
|
accessError?: EventLogAccess;
|
|
22
22
|
}
|
|
23
|
+
export type AgentAccess = 'ok' | 'not-enabled' | 'unknown';
|
|
24
|
+
export interface AgentDefinition {
|
|
25
|
+
developerName: string;
|
|
26
|
+
label: string;
|
|
27
|
+
type: 'agent' | 'classic-bot';
|
|
28
|
+
isActive: boolean;
|
|
29
|
+
activeVersion?: number;
|
|
30
|
+
runAsUserId?: string;
|
|
31
|
+
runAsUserActive?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface AgentUser {
|
|
34
|
+
userId: string;
|
|
35
|
+
username: string;
|
|
36
|
+
profileName: string;
|
|
37
|
+
isActive: boolean;
|
|
38
|
+
permissionSetIds: string[];
|
|
39
|
+
permissionSetLicenseNames: string[];
|
|
40
|
+
}
|
|
41
|
+
export interface CspTrustedSite {
|
|
42
|
+
developerName: string;
|
|
43
|
+
endpointUrl: string;
|
|
44
|
+
isActive: boolean;
|
|
45
|
+
context?: string;
|
|
46
|
+
}
|
|
23
47
|
export interface MfaRegistration {
|
|
24
48
|
userId: string;
|
|
25
49
|
username: string;
|
|
@@ -45,6 +69,10 @@ export interface AuditCache {
|
|
|
45
69
|
eventLogSummary?: EventLogSummary;
|
|
46
70
|
mfaRegistrations?: MfaRegistration[];
|
|
47
71
|
vfPageBodies?: VfPageBody[];
|
|
72
|
+
cspTrustedSites?: CspTrustedSite[];
|
|
48
73
|
effectivePermissions?: EffectivePermissionGrant[];
|
|
74
|
+
agentInventory?: AgentDefinition[];
|
|
75
|
+
agentUsers?: AgentUser[];
|
|
76
|
+
agentAccess?: AgentAccess;
|
|
49
77
|
}
|
|
50
78
|
//# sourceMappingURL=AuditCache.d.ts.map
|
|
@@ -4,12 +4,16 @@ import type { RestClient } from '../api/RestClient.js';
|
|
|
4
4
|
import type { MetadataClient } from '../api/MetadataClient.js';
|
|
5
5
|
import type { OrgInfo } from './OrgInfo.js';
|
|
6
6
|
import type { AuditCache } from './AuditCache.js';
|
|
7
|
+
export interface AuditOptions {
|
|
8
|
+
resolveDomains?: boolean;
|
|
9
|
+
}
|
|
7
10
|
export interface AuditContext {
|
|
8
11
|
readonly soql: SoqlClient;
|
|
9
12
|
readonly tooling: ToolingClient;
|
|
10
13
|
readonly rest: RestClient;
|
|
11
14
|
readonly metadata?: MetadataClient;
|
|
12
15
|
readonly orgInfo: OrgInfo;
|
|
16
|
+
readonly options?: AuditOptions;
|
|
13
17
|
cache: AuditCache;
|
|
14
18
|
}
|
|
15
19
|
//# sourceMappingURL=AuditContext.d.ts.map
|
|
@@ -39,9 +39,9 @@ export async function pullEventLogs(deps, opts) {
|
|
|
39
39
|
continue;
|
|
40
40
|
}
|
|
41
41
|
try {
|
|
42
|
-
|
|
43
|
-
const savedPath = store.
|
|
44
|
-
const bytes =
|
|
42
|
+
// Stream straight to disk — never buffer the body — so large daily logs don't blow the heap.
|
|
43
|
+
const savedPath = store.pathFor(orgId, row.EventType, logDate, row.Id);
|
|
44
|
+
const bytes = await rest.getRawToFile(`/sobjects/EventLogFile/${row.Id}/LogFile`, savedPath);
|
|
45
45
|
base.downloaded += 1;
|
|
46
46
|
base.totalBytes += bytes;
|
|
47
47
|
base.logs.push({ id: row.Id, eventType: row.EventType, logDate, bytes, savedPath, status: 'downloaded' });
|
|
@@ -81,6 +81,12 @@ export const CHECK_META = {
|
|
|
81
81
|
'encryption-coverage': { effort: 'moderate', impact: 'Fields labelled PII/PHI but stored in plaintext are unprotected at rest and on export — the sensitivity is known, the protection is missing.' },
|
|
82
82
|
'experience-csp': { effort: 'moderate', impact: 'Relaxed CSP or disabled Lightning Web Security on a public site lets injected/third-party scripts run against unauthenticated visitors.' },
|
|
83
83
|
'sandbox-data-masking': { effort: 'moderate', impact: 'Unmasked production PII/PHI copied into a sandbox spreads sensitive data into a lower-trust environment with broader access and weaker monitoring.' },
|
|
84
|
+
'agent-inventory': { effort: 'quick', impact: 'Untracked Agentforce agents each run as a user with real data access; an active agent whose run-as identity is disabled is a latent misconfiguration and a way to smuggle access back in on reactivation.' },
|
|
85
|
+
'agent-user-privilege': { effort: 'moderate', impact: 'An Agentforce agent runs as its user, so a prompt injection inherits that user\'s access; Modify/View All Data or broad object write turns one injected prompt into org-wide read, edit, or exfiltration of classified data.' },
|
|
86
|
+
'agent-action-surface': { effort: 'moderate', impact: 'Write-capable agent actions (Apex/Flow that create, update, or delete) let an injected prompt take state-changing operations, not just read data — the difference between a leak and active tampering on an exposed agent.' },
|
|
87
|
+
'agent-channel-exposure': { effort: 'moderate', impact: 'An agent bound to a guest-reachable channel lets any unauthenticated visitor send prompt-injection input to an agent that executes with its run-as user\'s data access: the public-input half of the ForcedLeak pattern.' },
|
|
88
|
+
'agent-monitoring-coverage': { effort: 'moderate', impact: 'Active agents with no Event Monitoring capture and no Transaction Security policy leave prompt injection, mass reads, and exfiltration with no auditable trail and no automated response.' },
|
|
89
|
+
'trusted-url-hygiene': { effort: 'quick', impact: 'A non-Salesforce CSP-trusted domain that has lapsed or been parked is an allowlisted exfiltration channel: whoever re-registers it can receive prompt-injected data from Lightning and Agentforce output — the exact ForcedLeak exfil vector.' },
|
|
84
90
|
};
|
|
85
91
|
export function getCheckMeta(id) {
|
|
86
92
|
return CHECK_META[id];
|
package/lib/lib/wire.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { SoqlClientImpl } from '../api/SoqlClientImpl.js';
|
|
|
3
3
|
import { ToolingClientImpl } from '../api/ToolingClientImpl.js';
|
|
4
4
|
import { RestClientImpl } from '../api/RestClientImpl.js';
|
|
5
5
|
import { MetadataClientImpl } from '../api/MetadataClientImpl.js';
|
|
6
|
-
import type { AuditContext } from '../context/AuditContext.js';
|
|
6
|
+
import type { AuditContext, AuditOptions } from '../context/AuditContext.js';
|
|
7
7
|
import type { OrgInfo } from '../context/OrgInfo.js';
|
|
8
8
|
export declare function buildApiClients(conn: Connection): {
|
|
9
9
|
soql: SoqlClientImpl;
|
|
@@ -12,5 +12,5 @@ export declare function buildApiClients(conn: Connection): {
|
|
|
12
12
|
metadata: MetadataClientImpl;
|
|
13
13
|
};
|
|
14
14
|
export declare function resolveOrgInfo(conn: Connection): Promise<OrgInfo>;
|
|
15
|
-
export declare function buildAuditContext(conn: Connection, orgInfo: OrgInfo): AuditContext;
|
|
15
|
+
export declare function buildAuditContext(conn: Connection, orgInfo: OrgInfo, options?: AuditOptions): AuditContext;
|
|
16
16
|
//# sourceMappingURL=wire.d.ts.map
|
package/lib/lib/wire.js
CHANGED
|
@@ -24,7 +24,7 @@ export async function resolveOrgInfo(conn) {
|
|
|
24
24
|
instanceUrl: conn.instanceUrl,
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
export function buildAuditContext(conn, orgInfo) {
|
|
27
|
+
export function buildAuditContext(conn, orgInfo, options) {
|
|
28
28
|
const clients = buildApiClients(conn);
|
|
29
29
|
return {
|
|
30
30
|
soql: clients.soql,
|
|
@@ -32,6 +32,7 @@ export function buildAuditContext(conn, orgInfo) {
|
|
|
32
32
|
rest: clients.rest,
|
|
33
33
|
metadata: clients.metadata,
|
|
34
34
|
orgInfo,
|
|
35
|
+
options,
|
|
35
36
|
cache: {},
|
|
36
37
|
};
|
|
37
38
|
}
|
|
@@ -13,7 +13,7 @@ const GRADE_COLOR = {
|
|
|
13
13
|
};
|
|
14
14
|
const SEV_ORDER = ['CRITICAL', 'HIGH', 'MEDIUM', 'LOW'];
|
|
15
15
|
const FRAMEWORK_LABEL = {
|
|
16
|
-
OWASP: 'OWASP Top 10', SOC2: 'SOC 2', ISO27001: 'ISO/IEC 27001',
|
|
16
|
+
OWASP: 'OWASP Top 10', OWASP_LLM: 'OWASP LLM Top 10', SOC2: 'SOC 2', ISO27001: 'ISO/IEC 27001',
|
|
17
17
|
SBS: 'Security Benchmark for Salesforce', PRIVACY_ACT: 'NZ Privacy Act',
|
|
18
18
|
HISO10029: 'HISO 10029', NZISM: 'NZISM', HIPAA: 'HIPAA', GDPR: 'GDPR',
|
|
19
19
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cclabsnz/sf-audit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Salesforce Security Audit — native sf plugin",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -46,6 +46,9 @@
|
|
|
46
46
|
"subtopics": {
|
|
47
47
|
"events": {
|
|
48
48
|
"description": "Capture free EventLogFile logs to local disk"
|
|
49
|
+
},
|
|
50
|
+
"apps": {
|
|
51
|
+
"description": "Analyze connected-app least-privilege from EventLogFile usage"
|
|
49
52
|
}
|
|
50
53
|
}
|
|
51
54
|
}
|