@cclabsnz/sf-audit 1.24.1 → 1.25.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,39 @@ published note and carries the signed provenance attestation and CycloneDX SBOM
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [v1.25.0](https://github.com/cclabsnz/sf-audit-plugin/releases/tag/v1.25.0) — 2026-11-10
13
+
14
+ The technical HTML report is redesigned. It now uses the executive report's white consulting look
15
+ and reads in the order an admin works: what to fix first, how an attacker would get in, where each
16
+ area of the org stands, and every result in one table.
17
+
18
+ ### Changed
19
+
20
+ - **`--format html` is on white**, in the executive report's palette and fonts. The dark theme is
21
+ gone. Severity is shown by tag style and text as well as colour, so the report works printed or
22
+ in greyscale.
23
+ - **One verdict band at the top**: the grade, score, why it got that grade and evidence coverage,
24
+ next to the open-finding total with one severity bar and four counts. This replaces the score
25
+ ring, donut and KPI strip, which repeated the same numbers.
26
+ - **Fix first**: the report opens on the executive report's action plan and headline. Each action
27
+ lists the findings it closes and the attack chains it breaks or is part of.
28
+ - **Attack paths** collapse to one line each (severity, C1/P1 label as in the executive report,
29
+ title, where to break it). Steps, the diagram and the fix open on demand.
30
+ - **By domain**: a scorecard row for each of the ten domains in docs/CHECKS.md, worst first, then
31
+ each domain's findings by severity with passed checks folded away. A domain with checks that could
32
+ not be assessed is marked "partly unseen", never "clear".
33
+ - **All results**: one table that can be regrouped by severity, domain, attack chain or framework,
34
+ and searched. Passed checks are hidden until asked for.
35
+ - Each finding is drawn once, with a stable link (`#f-<id>`) for tickets; the plan, attack paths
36
+ and table link to it.
37
+
38
+ ### Added
39
+
40
+ - `domainOf` / `DOMAINS` (src/checks/domains.ts): the domain each check belongs to, kept in step
41
+ with docs/CHECKS.md by a test.
42
+ - `planHeadline` and the plan's effort and wave labels are shared by the executive and HTML reports,
43
+ so both state the same answer.
44
+
12
45
  ## [v1.24.1](https://github.com/cclabsnz/sf-audit-plugin/releases/tag/v1.24.1) — 2026-11-01
13
46
 
14
47
  The threat model reads as the threats it found. Inventory lines no longer sit in the STRIDE view as
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The ten domains docs/CHECKS.md groups the checks into, and which domain each check belongs to.
3
+ * A finding's own `category` is finer and inconsistent across checks (29 labels for 10 domains), so
4
+ * reports that group by area use this instead. test/unit/checks/domains.test.ts keeps it in step with
5
+ * the registry and with docs/CHECKS.md.
6
+ */
7
+ export declare const DOMAINS: readonly ['Org Health & Configuration', 'Identity & Authentication', 'Users, Permissions & Privilege', 'Data Access & Sharing', 'Guest & External-Facing Access', 'Apex & Code Security', 'Integrations, Connected Apps & Deployments', 'Secrets & Credential Storage', 'Monitoring & Threat Detection', 'AI & Agents (Agentforce / GenAI)'];
8
+ export type Domain = (typeof DOMAINS)[number];
9
+ /** The domain a check belongs to, or undefined for an id no registered check has. */
10
+ export declare function domainOf(checkId: string | undefined): Domain | undefined;
11
+ //# sourceMappingURL=domains.d.ts.map
@@ -0,0 +1,155 @@
1
+ /**
2
+ * The ten domains docs/CHECKS.md groups the checks into, and which domain each check belongs to.
3
+ * A finding's own `category` is finer and inconsistent across checks (29 labels for 10 domains), so
4
+ * reports that group by area use this instead. test/unit/checks/domains.test.ts keeps it in step with
5
+ * the registry and with docs/CHECKS.md.
6
+ */
7
+ export const DOMAINS = [
8
+ 'Org Health & Configuration',
9
+ 'Identity & Authentication',
10
+ 'Users, Permissions & Privilege',
11
+ 'Data Access & Sharing',
12
+ 'Guest & External-Facing Access',
13
+ 'Apex & Code Security',
14
+ 'Integrations, Connected Apps & Deployments',
15
+ 'Secrets & Credential Storage',
16
+ 'Monitoring & Threat Detection',
17
+ 'AI & Agents (Agentforce / GenAI)',
18
+ ];
19
+ const BY_DOMAIN = {
20
+ 'Org Health & Configuration': [
21
+ 'health-check',
22
+ 'api-limits',
23
+ 'enhanced-domains',
24
+ 'release-updates',
25
+ 'legacy-api-version',
26
+ ],
27
+ 'Identity & Authentication': [
28
+ 'password-session-policy',
29
+ 'ip-restrictions',
30
+ 'sso-enforcement',
31
+ 'mfa-enforcement',
32
+ 'certificate-expiry',
33
+ 'trusted-ip-ranges',
34
+ 'my-domain-login-policy',
35
+ 'high-assurance-session',
36
+ 'internal-user-mfa',
37
+ 'auth-providers',
38
+ 'session-hardening',
39
+ 'oauth-device-and-asset-token-flows',
40
+ 'delegated-authentication-exposure',
41
+ 'auth-provider-registration-handler',
42
+ 'mfa-registration',
43
+ 'mfa-method-strength',
44
+ ],
45
+ 'Users, Permissions & Privilege': [
46
+ 'users-and-admins',
47
+ 'permissions',
48
+ 'inactive-users',
49
+ 'standard-profiles',
50
+ 'api-client-permission',
51
+ 'soap-login-api-auth',
52
+ 'integration-users',
53
+ 'integration-least-privilege',
54
+ 'escalation-perms',
55
+ 'login-access-policy',
56
+ 'data-export-access',
57
+ 'privileged-access',
58
+ 'delegated-administration-groups',
59
+ 'separation-of-duties',
60
+ ],
61
+ 'Data Access & Sharing': [
62
+ 'sharing-model',
63
+ 'flows-without-sharing',
64
+ 'public-group-sharing',
65
+ 'field-level-security',
66
+ 'content-links',
67
+ 'field-history-tracking',
68
+ 'data-classification',
69
+ 'report-folder-access',
70
+ 'public-content-exposure',
71
+ 'encryption-coverage',
72
+ 'sandbox-data-masking',
73
+ 'data-cloud-data-space-isolation',
74
+ 'restriction-rules-integrity',
75
+ 'shield-tenant-secret-lifecycle',
76
+ ],
77
+ 'Guest & External-Facing Access': [
78
+ 'guest-user-access',
79
+ 'csp-trusted-sites',
80
+ 'experience-cloud-site',
81
+ 'cors-allowlist',
82
+ 'guest-object-exposure',
83
+ 'guest-site-options',
84
+ 'guest-record-access-policy',
85
+ 'classic-sites',
86
+ 'guest-api-access',
87
+ 'guest-user-visibility',
88
+ 'experience-csp',
89
+ 'external-account-hierarchy-exposure',
90
+ 'guest-executable-apex',
91
+ ],
92
+ 'Apex & Code Security': [
93
+ 'hardcoded-credentials',
94
+ 'apex-sharing',
95
+ 'scheduled-apex',
96
+ 'code-security',
97
+ 'anonymous-apex-audit',
98
+ 'platform-event-subscriber-context',
99
+ 'flow-http-callout-credential-bypass',
100
+ 'apex-logging',
101
+ 'apex-crud-fls',
102
+ 'apex-rest-endpoint',
103
+ 'visualforce-xss',
104
+ 'lightning-message-channel',
105
+ ],
106
+ 'Integrations, Connected Apps & Deployments': [
107
+ 'connected-apps',
108
+ 'remote-sites',
109
+ 'named-credentials',
110
+ 'installed-packages',
111
+ 'connected-app-scope',
112
+ 'email-security',
113
+ 'outbound-messages',
114
+ 'external-credentials',
115
+ 'inbound-email-handler-exposure',
116
+ 'org-wide-email-spoofing',
117
+ 'package-post-install-supply-chain',
118
+ 'deployment-identity',
119
+ 'connected-app-inactivity',
120
+ 'oauth-token-inventory',
121
+ ],
122
+ 'Secrets & Credential Storage': [
123
+ 'custom-settings',
124
+ 'custom-labels-credential',
125
+ ],
126
+ 'Monitoring & Threat Detection': [
127
+ 'login-session',
128
+ 'audit-trail',
129
+ 'debug-log-access',
130
+ 'transaction-security-policy',
131
+ 'failed-login-detection',
132
+ 'threat-detection',
133
+ 'login-anomaly',
134
+ 'event-monitoring',
135
+ 'guest-traffic-anomaly',
136
+ 'siem-integration',
137
+ ],
138
+ 'AI & Agents (Agentforce / GenAI)': [
139
+ 'genai-prompt-template-grounding',
140
+ 'agent-inventory',
141
+ 'agent-user-privilege',
142
+ 'agent-action-surface',
143
+ 'agent-channel-exposure',
144
+ 'agent-monitoring-coverage',
145
+ 'agent-query-reach',
146
+ 'agent-outbound-actions',
147
+ 'trusted-url-hygiene',
148
+ ],
149
+ };
150
+ const DOMAIN_OF = new Map(Object.entries(BY_DOMAIN).flatMap(([d, ids]) => ids.map((id) => [id, d])));
151
+ /** The domain a check belongs to, or undefined for an id no registered check has. */
152
+ export function domainOf(checkId) {
153
+ return checkId === undefined ? undefined : DOMAIN_OF.get(checkId);
154
+ }
155
+ //# sourceMappingURL=domains.js.map
@@ -5,7 +5,7 @@ import { buildComplianceMatrix } from '../report/ComplianceMatrix.js';
5
5
  import { coverageSummary, coverageAdvice } from '../findings/coverage.js';
6
6
  import { techniqueLabel, ATTACK_TACTIC_ORDER } from '../threats/attack.js';
7
7
  import { buildThreatView, threatRowStatusText } from '../threats/view.js';
8
- import { buildActionPlan } from '../report/ActionPlan.js';
8
+ import { buildActionPlan, planHeadline, EFFORT_LABEL, WAVE_LABEL, WAVE_WHY } from '../report/ActionPlan.js';
9
9
  import { buildAttackJourney } from '../report/AttackJourney.js';
10
10
  import { deckFontFaceCss } from './deckFonts.js';
11
11
  // The executive report is a consulting-style deck: every slide's title states its conclusion, the
@@ -20,13 +20,6 @@ const SEV_RANK = { CRITICAL: 0, HIGH: 1, MEDIUM: 2, LOW: 3, INFO: 4 };
20
20
  const SEVERITIES = ['CRITICAL', 'HIGH', 'MEDIUM', 'LOW', 'INFO'];
21
21
  // The threat view holds no INFO results, so the heatmap has no Info column.
22
22
  const THREAT_LEVELS = SEVERITIES.filter((l) => l !== 'INFO');
23
- const EFFORT_LABEL = { quick: 'Under a day', moderate: 'Days', project: 'Weeks' };
24
- const WAVE_LABEL = { 1: 'Start now', 2: 'Next 30 days', 3: 'This quarter' };
25
- const WAVE_WHY = {
26
- 1: 'breaks a critical chain or closes a critical finding, whatever the effort',
27
- 2: 'high severity, days of work or less',
28
- 3: 'high severity, weeks of work',
29
- };
30
23
  const PLAN_ROWS_PER_SLIDE = 6;
31
24
  const MATRIX_MAX = 10;
32
25
  const TACTIC_SHORT = {
@@ -405,25 +398,8 @@ ${head}<div class="content">${s.body}</div>
405
398
  const passed = r.findings.filter((f) => f.passed).length;
406
399
  const named = chains.filter((c) => c.abuseCase);
407
400
  const critChains = chains.map((c, i) => ({ c, i })).filter((x) => x.c.severity === 'CRITICAL' && x.c.abuseCase);
408
- // Every critical chain, potential ones too: a path is only "closed" when an action breaks it.
409
- const allCrit = chains.map((c, i) => ({ c, i })).filter((x) => x.c.severity === 'CRITICAL');
410
- const wave1 = plan.filter((a) => a.wave === 1);
411
- const brokenByWave1 = new Set(wave1.flatMap((a) => a.breaks));
412
- const allCritBroken = allCrit.length > 0 && allCrit.every((x) => brokenByWave1.has(x.i));
413
- const rest = plan.length - wave1.length;
414
- const restText = rest ? `; ${rest} more action${verb(rest, ' completes', 's complete')} the plan` : '';
415
- const n1 = wave1.length;
416
- let headline;
417
- if (plan.length === 0)
418
- headline = 'No critical or high-severity issues are open; the remaining fixes are routine hardening';
419
- else if (allCritBroken)
420
- headline = `${actions(n1)} to start now ${verb(n1, 'closes', 'close')} every critical attack path${restText}`;
421
- else if (n1)
422
- headline = `${actions(n1)} to start now ${verb(n1, 'addresses', 'address')} the critical exposure${restText}`;
423
- else if (high)
424
- headline = `${actions(plan.length)} ${verb(plan.length, 'addresses', 'address')} every open high-severity issue; none is critical`;
425
- else
426
- headline = `${actions(plan.length)} ${verb(plan.length, 'addresses', 'address')} the remaining exposure; none is critical or high`;
401
+ const n1 = plan.filter((a) => a.wave === 1).length;
402
+ const headline = planHeadline(plan, chains, high);
427
403
  const c = r.coverage;
428
404
  const incon = r.findings.filter(unassessed).length;
429
405
  const waivedN = r.findings.filter(isWaived).length;
@@ -4,6 +4,12 @@ export declare class HtmlRenderer implements AuditRenderer {
4
4
  readonly format = "html";
5
5
  readonly fileExtension = ".html";
6
6
  private renderAttackPaths;
7
+ /** Option A: the fixes, in the order to do them, each with the findings it closes. */
8
+ private renderPlan;
9
+ /** Option C: one scorecard row per domain, then each domain's findings, with passed checks folded away. */
10
+ private renderDomains;
11
+ /** Option D: every result in one table that can be regrouped and searched; links to the full finding. */
12
+ private renderTable;
7
13
  render(result: AuditResult): string;
8
14
  }
9
15
  //# sourceMappingURL=HtmlRenderer.d.ts.map