@cclabsnz/sf-audit 1.21.0 → 1.22.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 CHANGED
@@ -9,6 +9,30 @@ published note and carries the signed provenance attestation and CycloneDX SBOM
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [v1.22.0](https://github.com/cclabsnz/sf-audit-plugin/releases/tag/v1.22.0) — 2026-10-29
13
+
14
+ The executive report is now a consulting-style deck that leads with what to do, with the threat
15
+ model on its own slides.
16
+
17
+ ### Changed
18
+
19
+ - **The executive report is now a consulting-style deck.** Every slide's title states its conclusion, and a note under each exhibit says where its numbers come from. In order:
20
+ - **Cover**: grade and health score, kept small.
21
+ - **Executive summary**: situation, complication and resolution.
22
+ - **Where to act**: the actions placed on risk removed against effort.
23
+ - **Action plan**: ranked actions in three waves (start now, next 30 days, this quarter). For each, what it breaks, the findings it closes, effort, and an owner to agree.
24
+ - **Threat model**: a MITRE ATT&CK slide (findings per tactic, and the tactics each attack chain reaches) and a STRIDE and LINDDUN heatmap.
25
+ - **Attack scenarios**: one slide per named attack chain, and one for the potential chains.
26
+ - **Appendix and sign-off**: roadmap, compliance, findings, and a sign-off page.
27
+ - **Actions are computed, not listed.** Each named chain's break point becomes the action that breaks it (chains sharing a break point share it). Every other open critical or high finding becomes an action per check. Actions are ranked by the risk they remove, with a broken chain counting double.
28
+ - **It prints one slide per landscape A4 page.** Every printed page names its client, date and page. Fonts are Source Serif 4 and Source Sans 3, embedded so the report never fetches anything. A firm's own colours and fonts still apply when it has set them.
29
+
30
+ ## [v1.21.1](https://github.com/cclabsnz/sf-audit-plugin/releases/tag/v1.21.1) — 2026-10-28
31
+
32
+ ### Fixed
33
+
34
+ - **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.
35
+
12
36
  ## [v1.21.0](https://github.com/cclabsnz/sf-audit-plugin/releases/tag/v1.21.0) — 2026-10-28
13
37
 
14
38
  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
  });
@@ -77,7 +77,7 @@ export default class SecurityAuditCommand extends SfCommand {
77
77
  helpValue: './report-branding.json',
78
78
  }),
79
79
  top: Flags.integer({
80
- summary: 'Number of executive priorities to highlight (executive format).',
80
+ summary: 'Number of top actions to plot on the deck\'s "Where to act" slide, up to 10 (executive format). The action plan lists every action.',
81
81
  default: 5,
82
82
  }),
83
83
  frameworks: Flags.string({
@@ -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.' },
@@ -12,20 +12,30 @@ export declare class ClientReportRenderer implements AuditRenderer {
12
12
  readonly format = "executive";
13
13
  readonly fileExtension = ".html";
14
14
  readonly filenamePrefix = "SF_Audit_Executive";
15
+ private refs;
16
+ private labels;
15
17
  constructor(opts: ClientReportOptions);
16
18
  render(result: AuditResult): string;
17
- private chip;
18
- private sectionHead;
19
- private cover;
20
- private summary;
21
- private prioritiesSection;
22
- private coverageNote;
23
- private waiversSection;
24
- private scenarios;
25
- private roadmapSection;
19
+ private css;
20
+ private slide;
21
+ private tag;
22
+ private gradeColor;
23
+ private coverSlide;
24
+ private summarySlide;
25
+ private matrixSlide;
26
+ private planSlides;
27
+ private threatSlides;
28
+ private stepMeta;
29
+ private steps;
30
+ private chainSlide;
31
+ private potentialSlide;
32
+ private roadmapPage;
26
33
  private worst;
27
- private matrixSection;
28
- private findingsAppendix;
34
+ private matrixPage;
35
+ private waiversPage;
36
+ private coverageNote;
37
+ private findingsPage;
38
+ private signOffPage;
29
39
  private footer;
30
40
  }
31
41
  //# sourceMappingURL=ClientReportRenderer.d.ts.map