@cclabsnz/sf-audit 1.21.0 → 1.21.1

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 CHANGED
@@ -9,6 +9,12 @@ published note and carries the signed provenance attestation and CycloneDX SBOM
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [v1.21.1](https://github.com/cclabsnz/sf-audit-plugin/releases/tag/v1.21.1) — 2026-10-28
13
+
14
+ ### Fixed
15
+
16
+ - **The CORS allowlist check no longer overstates the risk.** Its findings said a wildcard origin enabled "token theft" and "authenticated cross-origin requests". An allowlist entry supplies no credential: script on an allowed origin can use the org's APIs from a user's browser only with a session ID or OAuth token it already has, except for a Lightning Out app shared with guest users. The findings now say so. Severity is unchanged.
17
+
12
18
  ## [v1.21.0](https://github.com/cclabsnz/sf-audit-plugin/releases/tag/v1.21.0) — 2026-10-28
13
19
 
14
20
  Findings and attack chains now name the MITRE ATT&CK techniques an attacker would use, and chain
@@ -4,7 +4,7 @@ export declare class CorsAllowlistCheck implements SecurityCheck {
4
4
  readonly id = "cors-allowlist";
5
5
  readonly name = "CORS Allowlist";
6
6
  readonly category = "External Connectivity";
7
- readonly description = "Detects wildcard or overly broad CORS allowlist origins that let malicious sites make authenticated browser requests";
7
+ readonly description = "Detects wildcard or overly broad CORS allowlist origins, which widen the set of websites whose scripts can use the org's APIs from a user's browser";
8
8
  run(ctx: AuditContext): Promise<CheckResult>;
9
9
  }
10
10
  //# sourceMappingURL=CorsAllowlistCheck.d.ts.map
@@ -2,7 +2,7 @@ export class CorsAllowlistCheck {
2
2
  id = 'cors-allowlist';
3
3
  name = 'CORS Allowlist';
4
4
  category = 'External Connectivity';
5
- description = 'Detects wildcard or overly broad CORS allowlist origins that let malicious sites make authenticated browser requests';
5
+ description = 'Detects wildcard or overly broad CORS allowlist origins, which widen the set of websites whose scripts can use the org\'s APIs from a user\'s browser';
6
6
  async run(ctx) {
7
7
  const findings = [];
8
8
  const setupUrl = `${ctx.orgInfo.instanceUrl}/lightning/setup/CorsWhitelistEntries/home`;
@@ -31,7 +31,7 @@ export class CorsAllowlistCheck {
31
31
  riskLevel: 'LOW',
32
32
  passed: true,
33
33
  title: 'No CORS allowlist entries configured',
34
- detail: 'No cross-origin allowlist entries exist, so browser-based cross-origin token theft via CORS is not a concern.',
34
+ detail: 'No CORS allowlist entries exist, so scripts on other websites cannot use the org\'s REST-family APIs, Apex REST or Lightning Out from a user\'s browser. This setting does not affect server-to-server API access.',
35
35
  remediation: 'If CORS entries are added later, allow only exact, fully-qualified HTTPS origins.',
36
36
  });
37
37
  return { findings };
@@ -48,7 +48,10 @@ export class CorsAllowlistCheck {
48
48
  category: this.category,
49
49
  riskLevel: 'HIGH',
50
50
  title: `${wildcard.length} CORS allowlist entry(ies) use a full wildcard origin`,
51
- detail: 'A wildcard CORS origin lets ANY website make authenticated cross-origin requests to your org from a logged-in user\'s browser and read the responses, enabling session-scoped data and token theft.',
51
+ detail: 'A full wildcard origin lets scripts on any website use the org\'s REST APIs, Apex REST and Lightning Out from a user\'s browser and read the responses. ' +
52
+ 'These calls only work if the page supplies a session ID or OAuth access token; the allowlist entry does not provide one. ' +
53
+ 'The exception is a Lightning Out app shared with guest users, which any website can then run with guest access. ' +
54
+ 'Whatever the page does runs with the permissions of that token or session: it can read and change what that user can, within the token\'s scopes.',
52
55
  remediation: 'Replace wildcard origins with exact, fully-qualified HTTPS origins for each trusted application.',
53
56
  affectedItems: wildcard.map((r) => ({ label: r.UrlPattern, url: setupUrl, note: 'Full wildcard: remove immediately' })),
54
57
  });
@@ -59,7 +62,9 @@ export class CorsAllowlistCheck {
59
62
  category: this.category,
60
63
  riskLevel: 'MEDIUM',
61
64
  title: `${broad.length} CORS allowlist entry(ies) use a broad subdomain wildcard`,
62
- detail: 'Subdomain-wildcard CORS origins trust every current and future subdomain, widening the set of sites that can make authenticated cross-origin requests. A single compromised or attacker-controlled subdomain can steal session-scoped data.',
65
+ detail: 'A subdomain wildcard trusts every current and future subdomain of that domain. If any one of them is taken over or runs injected script, ' +
66
+ 'that script can use any Salesforce token or session available to it in the user\'s browser to read and change what that user can access. ' +
67
+ 'The entry itself exposes no stored credential.',
63
68
  remediation: 'Pin CORS origins to the exact subdomains that need access rather than a wildcard.',
64
69
  affectedItems: broad.map((r) => ({ label: r.UrlPattern, url: setupUrl, note: 'Broad wildcard: narrow to exact origins' })),
65
70
  });
@@ -62,7 +62,7 @@ export const CHECK_META = {
62
62
  'custom-labels-credential': { effort: 'quick', impact: 'Credentials in custom labels are globally readable by all authenticated users via merge fields.' },
63
63
  'report-folder-access': { effort: 'quick', impact: 'Public report folders let any authenticated user view all reports and the data behind them: mass exfiltration.' },
64
64
  'escalation-perms': { effort: 'moderate', impact: 'Lateral-movement permissions let a compromised account grant itself more access and persist.' },
65
- 'cors-allowlist': { effort: 'quick', impact: 'Wildcard CORS origins let malicious sites make authenticated browser requests against the org.' },
65
+ 'cors-allowlist': { effort: 'quick', impact: 'Wildcard CORS origins let script on any matching website use a Salesforce token or session available to it to call the org\'s APIs from the user\'s browser; the entry itself supplies no credential.' },
66
66
  'guest-executable-apex': { effort: 'project', impact: 'Unauthenticated web users can execute Apex that bypasses sharing: bulk record exfiltration without login.' },
67
67
  'email-security': { effort: 'quick', impact: 'Unauthenticated inbound email services and all-profile send-as addresses let attackers trigger Apex or spoof internal senders.' },
68
68
  'outbound-messages': { effort: 'quick', impact: 'Outbound messages can ship a live session ID to external endpoints over cleartext: a direct session-hijack and exfiltration path.' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cclabsnz/sf-audit",
3
- "version": "1.21.0",
3
+ "version": "1.21.1",
4
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",