@cclabsnz/sf-audit 1.8.2 → 1.9.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 +199 -0
- package/README.md +138 -758
- package/lib/chains/CapabilityRegistry.d.ts +6 -2
- package/lib/chains/CapabilityRegistry.js +48 -2
- package/lib/chains/namedChains.js +140 -7
- package/lib/checks/impl/AgentChannelExposureCheck.js +52 -10
- package/lib/checks/impl/ApexCrudFLSCheck.js +3 -3
- package/lib/checks/impl/ApexRestEndpointCheck.js +0 -3
- package/lib/checks/impl/CustomLabelsCredentialCheck.js +1 -1
- package/lib/checks/impl/DataClassificationCheck.js +15 -1
- package/lib/checks/impl/FailedLoginCheck.js +16 -1
- package/lib/checks/impl/FieldLevelSecurityCheck.js +29 -16
- package/lib/checks/impl/GuestUserVisibilityCheck.d.ts +35 -0
- package/lib/checks/impl/GuestUserVisibilityCheck.js +168 -0
- package/lib/checks/impl/HardcodedCredentialsCheck.js +0 -1
- package/lib/checks/impl/HealthCheckCheck.js +1 -3
- package/lib/checks/impl/IntegrationLeastPrivilegeCheck.d.ts +42 -0
- package/lib/checks/impl/IntegrationLeastPrivilegeCheck.js +467 -0
- package/lib/checks/impl/IntegrationUsersCheck.js +48 -52
- package/lib/checks/impl/InternalUserMfaCheck.js +0 -1
- package/lib/checks/impl/IpRestrictionsCheck.js +39 -5
- package/lib/checks/impl/PublicGroupSharingCheck.js +21 -2
- package/lib/checks/impl/ScheduledApexCheck.js +0 -1
- package/lib/checks/impl/SoapLoginApiAuthCheck.d.ts +10 -0
- package/lib/checks/impl/SoapLoginApiAuthCheck.js +151 -0
- package/lib/checks/impl/SsoEnforcementCheck.js +0 -1
- package/lib/checks/impl/TrustedUrlHygieneCheck.js +3 -1
- package/lib/checks/registry.js +4 -0
- package/lib/checks/support/integrationAccounts.d.ts +35 -0
- package/lib/checks/support/integrationAccounts.js +209 -0
- package/lib/commands/audit/security.d.ts +12 -1
- package/lib/commands/audit/security.js +32 -9
- package/lib/compliance/catalogs/gdpr.d.ts +3 -0
- package/lib/compliance/catalogs/gdpr.js +54 -0
- package/lib/compliance/catalogs/hipaa.d.ts +3 -0
- package/lib/compliance/catalogs/hipaa.js +97 -0
- package/lib/compliance/catalogs/index.js +4 -0
- package/lib/compliance/mapping.js +111 -36
- package/lib/findings/CheckMeta.js +2 -0
- package/lib/findings/exitCode.d.ts +28 -0
- package/lib/findings/exitCode.js +46 -0
- package/lib/findings/loadScoringConfig.js +5 -5
- package/lib/renderers/HtmlRenderer.js +1 -1
- package/messages/audit.security.md +6 -0
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -8,15 +8,16 @@
|
|
|
8
8
|
[](https://github.com/cclabsnz/sf-audit-plugin/actions/workflows/codeql.yml)
|
|
9
9
|
[](https://github.com/cclabsnz/sf-audit-plugin/actions/workflows/semgrep.yml)
|
|
10
10
|
[](https://securityscorecards.dev/viewer/?uri=github.com/cclabsnz/sf-audit-plugin)
|
|
11
|
+
[](https://www.bestpractices.dev/projects/14149)
|
|
11
12
|
[](https://www.npmjs.com/package/@cclabsnz/sf-audit)
|
|
12
13
|
[](https://www.npmjs.com/package/@cclabsnz/sf-audit#provenance)
|
|
13
14
|
[](LICENSE)
|
|
14
15
|
|
|
15
16
|
A Salesforce CLI (`sf`) plugin that runs a complete, **read-only** security audit against any Salesforce org, risk-scores it with an A–F grade, and turns the result into a report your security team (or your client's) can act on.
|
|
16
17
|
|
|
17
|
-
- **
|
|
18
|
-
- **Attack-chain correlation:** links individual findings into named, multi-step attack scenarios
|
|
19
|
-
- **Compliance mapping:** every finding mapped to **source-verified** controls across
|
|
18
|
+
- **90 read-only checks** across identity, access, data, code, integrations, monitoring, and Agentforce / GenAI
|
|
19
|
+
- **Attack-chain correlation:** links individual findings into named, multi-step attack scenarios — eleven modelled chains, plus an emergent pass for combinations nobody has named yet (see [Attack chains](#attack-chains))
|
|
20
|
+
- **Compliance mapping:** every finding mapped to **source-verified** controls across 10 frameworks (OWASP, OWASP LLM Top 10, SOC 2, ISO/IEC 27001:2022, Security Benchmark for Salesforce, NZ Privacy Act, HISO 10029, NZISM, HIPAA Security Rule, GDPR)
|
|
20
21
|
- **Outputs:** a technical `html` / `md` / `json` report, or a branded, client-ready **executive report** (print-to-PDF) with priorities, remediation roadmap, and a compliance coverage matrix
|
|
21
22
|
- **History & diff:** archives each run and shows security-posture drift over time
|
|
22
23
|
- **Free event baseline:** `sf audit events pull` captures the org's free daily `EventLogFile` logs to local disk before the 1-day retention window drops them — no Event Monitoring / Shield add-on needed
|
|
@@ -29,33 +30,13 @@ A Salesforce CLI (`sf`) plugin that runs a complete, **read-only** security audi
|
|
|
29
30
|
sf plugins install @cclabsnz/sf-audit
|
|
30
31
|
```
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
You will be warned that the plugin is not digitally signed. That is expected and says nothing about
|
|
34
|
+
this plugin: Salesforce only accepts signing keys served from `developer.salesforce.com`, so no
|
|
35
|
+
third-party plugin can satisfy it. Answer `y`. For unattended installs, allowlisting and local
|
|
36
|
+
development setup are in **[docs/INSTALL.md](docs/INSTALL.md)**.
|
|
33
37
|
|
|
34
|
-
Since "trust us" is a poor answer from a tool that authenticates against your production org, the
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
npm audit signatures # reports "verified attestations" for @cclabsnz/sf-audit
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
See [Trust & verification](#trust--verification) for the full list, including the no-network-egress guard and the independent scans.
|
|
41
|
-
|
|
42
|
-
For CI or any unattended install, where an interactive prompt would hang the job, allowlist the package on the machine doing the installing:
|
|
43
|
-
|
|
44
|
-
```jsonc
|
|
45
|
-
// macOS and Linux: ~/.config/sf/unsignedPluginAllowList.json
|
|
46
|
-
// Windows: %LOCALAPPDATA%\sf\unsignedPluginAllowList.json
|
|
47
|
-
["@cclabsnz/sf-audit"]
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Or, for local development:
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
git clone https://github.com/cclabsnz/sf-audit-plugin.git
|
|
54
|
-
cd sf-audit-plugin
|
|
55
|
-
npm install
|
|
56
|
-
npm run build
|
|
57
|
-
sf plugins link .
|
|
58
|
-
```
|
|
38
|
+
Since "trust us" is a poor answer from a tool that authenticates against your production org, the
|
|
39
|
+
guarantees here are checkable rather than asserted — see [Trust & verification](#trust--verification).
|
|
59
40
|
|
|
60
41
|
## Usage
|
|
61
42
|
|
|
@@ -63,253 +44,108 @@ sf plugins link .
|
|
|
63
44
|
sf audit security --target-org <orgAlias>
|
|
64
45
|
```
|
|
65
46
|
|
|
66
|
-
|
|
47
|
+
Runs all 90 checks and writes an HTML report to the current directory. `sf audit list` prints every
|
|
48
|
+
check id.
|
|
67
49
|
|
|
68
|
-
|
|
50
|
+
| Flag | Default | |
|
|
51
|
+
|------|---------|---|
|
|
52
|
+
| `--format` / `-f` | `html` | `html`, `md`, `json`, `executive` — comma-separated |
|
|
53
|
+
| `--fail-on` | (none) | Exit 1 if any finding is at or above `CRITICAL`/`HIGH`/`MEDIUM`/`LOW`. For CI |
|
|
54
|
+
| `--fail-on-inconclusive` | `false` | Exit 3 if any check could not gather evidence. For CI |
|
|
55
|
+
| `--checks` | *(all)* | Run only these check ids |
|
|
56
|
+
| `--frameworks` | `universal` | Compliance matrix scope for the executive report |
|
|
69
57
|
|
|
70
58
|
```bash
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Options
|
|
75
|
-
|
|
76
|
-
| Flag | Default | Description |
|
|
77
|
-
|------|---------|-------------|
|
|
78
|
-
| `--target-org` | *(required)* | Org alias or username to audit |
|
|
79
|
-
| `--format` / `-f` | `html` | Output format(s), comma-separated: `html`, `md`, `json`, `executive` |
|
|
80
|
-
| `--output` / `-o` | `.` | Directory to write the report file |
|
|
81
|
-
| `--fail-on` | (none) | Exit with code 1 if any finding is at or above this severity: `CRITICAL`, `HIGH`, `MEDIUM`, `LOW` |
|
|
82
|
-
| `--checks` | *(all)* | Comma-separated check IDs to run instead of all 88 (e.g. `hardcoded-credentials,apex-sharing`) |
|
|
83
|
-
| `--scoring-config` | (none) | Path to a custom scoring config JSON file to override weights and grade thresholds |
|
|
84
|
-
| `--prepared-for` | (none) | Client name for the executive report cover line |
|
|
85
|
-
| `--branding` | (none) | Path to a `report-branding.json` to override CloudCounsel defaults (executive format) |
|
|
86
|
-
| `--top` | `5` | Number of executive priorities to highlight (executive format) |
|
|
87
|
-
| `--frameworks` | `universal` | Compliance matrix scope (executive format): `universal` (OWASP/OWASP LLM/SOC 2/ISO 27001), `nz` (ISO/HISO/Privacy Act/NZISM), `all`, or a comma list (e.g. `owasp,owasp-llm,iso,nzism`) |
|
|
88
|
-
| `--resolve-domains` | `false` | Makes **outbound DNS queries from this machine** to verify CSP trusted domains still resolve (flags unresolvable / parked domains as exfiltration channels). Off by default; a default run contacts **only the target org** and never reaches out to any other host. |
|
|
89
|
-
|
|
90
|
-
### Examples
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
# HTML report (default)
|
|
94
|
-
sf audit security --target-org myOrg
|
|
95
|
-
|
|
96
|
-
# Multiple formats at once
|
|
97
|
-
sf audit security --target-org myOrg --format html,md,json
|
|
98
|
-
|
|
99
|
-
# Write report to a specific directory
|
|
100
|
-
sf audit security --target-org myOrg --output ./reports
|
|
101
|
-
|
|
102
|
-
# Fail CI pipeline on HIGH or CRITICAL findings
|
|
59
|
+
# Fail a pipeline on HIGH or worse
|
|
103
60
|
sf audit security --target-org myOrg --fail-on HIGH
|
|
104
61
|
|
|
105
|
-
#
|
|
106
|
-
sf audit security --target-org myOrg --
|
|
62
|
+
# Also fail if the audit user could not see enough to judge
|
|
63
|
+
sf audit security --target-org myOrg --fail-on HIGH --fail-on-inconclusive
|
|
107
64
|
|
|
108
|
-
#
|
|
109
|
-
|
|
110
|
-
sf audit security --target-org myOrg --checks guest-user-access,guest-object-exposure,guest-site-options,guest-executable-apex,experience-cloud-site,threat-detection
|
|
65
|
+
# Branded, client-ready PDF-able report
|
|
66
|
+
sf audit security --target-org myOrg --format executive --prepared-for "Acme Health"
|
|
111
67
|
|
|
112
|
-
#
|
|
113
|
-
sf audit security --target-org myOrg --
|
|
68
|
+
# Machine-readable: result on stdout, progress logging suppressed
|
|
69
|
+
sf audit security --target-org myOrg --json
|
|
114
70
|
```
|
|
115
71
|
|
|
116
|
-
###
|
|
72
|
+
### Exit codes
|
|
117
73
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
74
|
+
| Code | Meaning |
|
|
75
|
+
|-----:|---------|
|
|
76
|
+
| `0` | Audit completed; nothing the caller asked to fail on |
|
|
77
|
+
| `1` | Findings at or above `--fail-on` |
|
|
78
|
+
| `2` | The audit could not run — authentication, connection, or bad flags |
|
|
79
|
+
| `3` | Audit ran, but checks could not gather evidence (`--fail-on-inconclusive` only) |
|
|
122
80
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
81
|
+
A definite finding outranks unknown coverage: when both apply you get `1`, and the
|
|
82
|
+
inconclusive count is still in the report body. `3` exists so a pipeline can tell
|
|
83
|
+
"this org is fine" apart from "the audit user could not see enough to judge".
|
|
126
84
|
|
|
127
|
-
|
|
128
|
-
|
|
85
|
+
All twelve flags, more examples, and what the executive report contains:
|
|
86
|
+
**[docs/COMMANDS.md](docs/COMMANDS.md)**.
|
|
129
87
|
|
|
130
|
-
|
|
131
|
-
sf audit security --target-org myOrg --format executive --branding ./report-branding.json
|
|
132
|
-
```
|
|
88
|
+
## What It Checks
|
|
133
89
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
Salesforce, NZ Privacy Act, HISO 10029, NZISM). Only source-verified controls render. "No findings detected" is **not** an attestation of
|
|
137
|
-
compliance (see the report's Scope & Liability section).
|
|
90
|
+
**90 read-only checks** across ten domains. Every finding is risk-rated CRITICAL → INFO, mapped to
|
|
91
|
+
compliance controls, and correlated into [attack chains](#attack-chains).
|
|
138
92
|
|
|
139
|
-
|
|
93
|
+
| Domain | Checks |
|
|
94
|
+
|--------|-------:|
|
|
95
|
+
| Identity & Authentication | 13 |
|
|
96
|
+
| Users, Permissions & Privilege | 12 |
|
|
97
|
+
| Data Access & Sharing | 11 |
|
|
98
|
+
| Guest & External-Facing Access | 12 |
|
|
99
|
+
| Integrations, Connected Apps & Deployments | 10 |
|
|
100
|
+
| Monitoring & Threat Detection | 10 |
|
|
101
|
+
| Apex & Code Security | 9 |
|
|
102
|
+
| AI & Agents (Agentforce / GenAI) | 6 |
|
|
103
|
+
| Org Health & Configuration | 5 |
|
|
104
|
+
| Secrets & Credential Storage | 2 |
|
|
140
105
|
|
|
141
|
-
|
|
106
|
+
Full inventory, with what each check looks for: **[docs/CHECKS.md](docs/CHECKS.md)**.
|
|
142
107
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
| Check | What it looks for |
|
|
147
|
-
|-------|------------------|
|
|
148
|
-
| Security Health Check | Salesforce Health Check score and individual high-risk settings |
|
|
149
|
-
| Enhanced Domains | Enhanced Domains enabled: prevents cross-org cookie leakage and enforces URL isolation |
|
|
150
|
-
| Pending Release Updates | Salesforce release updates pending activation, especially those past auto-activation |
|
|
151
|
-
| Legacy API Versions | Apex compiled on old API versions and SOAP-based remote site integrations |
|
|
152
|
-
| API & Resource Limits | API request consumption against daily and concurrent limits |
|
|
153
|
-
|
|
154
|
-
### Identity & Authentication
|
|
155
|
-
| Check | What it looks for |
|
|
156
|
-
|-------|------------------|
|
|
157
|
-
| SSO Enforcement | Username-password logins indicating SSO is not org-wide enforced |
|
|
158
|
-
| My Domain Login Policy | My Domain configured and login from login.salesforce.com blocked (stops SSO bypass) |
|
|
159
|
-
| Internal User MFA | MFA enforcement for active internal standard users |
|
|
160
|
-
| MFA for External Users | MFA enforced for external/portal users with data access |
|
|
161
|
-
| MFA Method Registration | Active standard users with no registered MFA method |
|
|
162
|
-
| MFA Method Strength | Registered MFA methods classified by strength (phishing-resistant / TOTP / weak) |
|
|
163
|
-
| High Assurance Sessions | Admin-capable connected apps requiring short timeouts or high-assurance MFA sessions |
|
|
164
|
-
| Trusted IP Ranges | Trusted IP ranges that bypass MFA, including overly broad ranges |
|
|
165
|
-
| Login IP Restrictions | Admin profiles missing IP ranges; connected apps with relaxed IP policy |
|
|
166
|
-
| Password & Session Policy | Password complexity, session timeout, and MFA gaps (from Health Check) |
|
|
167
|
-
| Certificate Expiry | Installed certificates nearing expiry (30 / 90 / 180-day thresholds) |
|
|
168
|
-
| Auth Providers & External IdPs | External Auth Providers and SAML SSO configs; flags social/JIT providers that can federate in or auto-provision users |
|
|
169
|
-
| Session & Clickjack Hardening | Clickjack, CSRF, XSS, and content-sniffing settings read authoritatively from SecuritySettings (Health Check cache fallback) with per-setting remediation |
|
|
170
|
-
|
|
171
|
-
### Users, Permissions & Privilege
|
|
172
|
-
| Check | What it looks for |
|
|
173
|
-
|-------|------------------|
|
|
174
|
-
| Users & Admins | Users with system-wide permissions (ModifyAllData, ViewAllData, AuthorApex, CustomizeApplication) |
|
|
175
|
-
| Permissions | Unassigned permission sets and high profile counts that widen the attack surface |
|
|
176
|
-
| Standard Profile Usage | Active users assigned to out-of-the-box standard profiles |
|
|
177
|
-
| Use Any API Client | Users with the permission that bypasses API Access Control |
|
|
178
|
-
| Privilege Escalation Permissions | Users holding lateral-movement / persistence permission clusters |
|
|
179
|
-
| Privileged Access & Shadow Admins | Effective high-risk permissions per user (profile + permission sets + groups); admin-equivalent users not on the System Administrator profile |
|
|
180
|
-
| Separation of Duties | Toxic permission combinations a single user holds (e.g. Manage Users + Assign Permission Sets, Author Apex + Modify All Data) |
|
|
181
|
-
| Integration / Service Accounts | Non-human identity inventory and excess privilege |
|
|
182
|
-
| Inactive Users | Active licensed users with no login in 90+ days |
|
|
183
|
-
| Login-As & Delegated Administration | Delegated-admin groups (SOQL) and the "log in as any user" policy read from SecuritySettings — user-impersonation and scoped-escalation paths |
|
|
184
|
-
| Mass Data Export Access | Profiles/permission sets with Weekly Data Export, or API access combined with View/Modify All Data (bulk-exfil capability) |
|
|
185
|
-
|
|
186
|
-
### Data Access & Sharing
|
|
187
|
-
| Check | What it looks for |
|
|
188
|
-
|-------|------------------|
|
|
189
|
-
| OWD Sharing Model | Org-wide defaults for Account, Contact, Opportunity, Case, Lead (internal + external) |
|
|
190
|
-
| Field-Level Security | Sensitive fields (SSN, credit card, tax ID) exposed to broad permission sets |
|
|
191
|
-
| Public Group Sharing | Sharing rules that grant access to All Internal Users |
|
|
192
|
-
| Report Folder Public Access | Report folders any authenticated user can view |
|
|
193
|
-
| Field History Tracking | History tracking enabled on sensitive standard objects |
|
|
194
|
-
| Data Classification & Encryption | Field data classification usage and Shield Platform Encryption |
|
|
195
|
-
| Encryption Coverage for Sensitive Fields | Fields classified PII/PHI (ComplianceGroup) that are NOT encrypted at rest with Shield |
|
|
196
|
-
| Sandbox Data Masking | In sandboxes, populated PII fields (likely unmasked production data); advises running Data Mask |
|
|
197
|
-
| Flows Without Sharing | Active flows running in system context without sharing enforcement |
|
|
198
|
-
| Content Distribution Links | Public file links missing expiry or passwords, and stale records |
|
|
199
|
-
| Public Static Resources & Documents | Documents marked externally available (anonymous URL access) and static resources cached publicly |
|
|
200
|
-
|
|
201
|
-
### Guest & External-Facing Access
|
|
202
|
-
| Check | What it looks for |
|
|
203
|
-
|-------|------------------|
|
|
204
|
-
| Guest User Access | Object permissions and sharing rules granted to unauthenticated guests |
|
|
205
|
-
| Guest Object Exposure (Bulk Read via UI API) | Auto-discovers guest-readable objects (incl. records exposed by guest ownership despite a Private OWD), then grades them by actual UI-API reachability: objects the UI API models are CRITICAL (GraphQL-pullable), objects readable only in the sharing model but not UI-API-modelled (Calendar, AuthSession, etc.) are separated as MEDIUM, with UserRecordAccess as ground-truth read confirmation |
|
|
206
|
-
| Guest-Executable Apex | Apex that guest profiles can run, flagging `without sharing` classes |
|
|
207
|
-
| Experience Cloud Sites | Live sites with self-registration enabled and guest user presence |
|
|
208
|
-
| Experience Cloud Guest Site Options | Guest file access and guest member visibility on Experience Cloud sites |
|
|
209
|
-
| Secure Guest User Record Access | Verifies the "Secure guest user record access" enforcement is activated — the guardrail that stops guest-owned records defeating a Private OWD (complements Guest Object Exposure) |
|
|
210
|
-
| Guest API & Bulk Access | Guest users granted API Enabled or Bulk API Hard Delete — programmatic bulk read/delete for unauthenticated visitors |
|
|
211
|
-
| Classic Force.com Sites | Active classic (Visualforce) Sites and their guest users — an unauthenticated surface separate from Experience Cloud |
|
|
212
|
-
| Experience Cloud CSP & Lightning Web Security | Advises verifying Strict CSP and Lightning Web Security on live sites (not reliably API-readable) |
|
|
213
|
-
| CORS Allowlist | Wildcard or overly broad CORS allowlist origins |
|
|
214
|
-
| CSP Trusted Sites | Content Security Policy trusted sites with insecure HTTP (mixed-content) endpoints |
|
|
215
|
-
|
|
216
|
-
### Apex & Code Security
|
|
217
|
-
| Check | What it looks for |
|
|
218
|
-
|-------|------------------|
|
|
219
|
-
| Apex Sharing Declarations | Classes classified by sharing declaration (with / without / inherited / omitted) |
|
|
220
|
-
| Apex CRUD/FLS Enforcement | DML or SOQL performed without CRUD/FLS permission checks |
|
|
221
|
-
| Apex REST Endpoints | `@RestResource` classes running `without sharing` |
|
|
222
|
-
| Visualforce XSS | `escape="false"` and unencoded merge fields in Visualforce markup |
|
|
223
|
-
| Hardcoded Credentials | Bearer tokens, Basic auth, API keys, and raw callout URLs in Apex |
|
|
224
|
-
| Code Security & Coverage | Org-wide Apex test coverage, class/trigger counts, and SOQL injection patterns |
|
|
225
|
-
| Scheduled & Batch Apex | Active scheduled and batch Apex jobs |
|
|
226
|
-
| Anonymous Apex Audit | Anonymous Apex executed in the last 90 days (via SetupAuditTrail) |
|
|
227
|
-
| Apex Logging Framework | Persistent logging usage and sensitive data exposed in Apex logs |
|
|
228
|
-
|
|
229
|
-
### Integrations, Connected Apps & Deployments
|
|
230
|
-
| Check | What it looks for |
|
|
231
|
-
|-------|------------------|
|
|
232
|
-
| Connected Apps | Apps not restricted to admin-approved users |
|
|
233
|
-
| Connected App OAuth Scopes | Full OAuth-scope grants and infinite refresh-token policies |
|
|
234
|
-
| Inactive Connected Apps | Apps with no OAuth logins in the past 90 days |
|
|
235
|
-
| Named Credentials | Named credential inventory; credentials not referenced in Apex |
|
|
236
|
-
| External Credential Authentication | External Credentials using no authentication or a custom (non-standard) scheme |
|
|
237
|
-
| Remote Site Settings | Remote sites with protocol security disabled |
|
|
238
|
-
| Outbound Messages | Workflow outbound messages that include a session ID or post to cleartext (http://) endpoints |
|
|
239
|
-
| Email Security & Spoofing | Inbound email services accepting mail from any sender / running Apex unauthenticated, and org-wide send-as addresses open to all profiles |
|
|
240
|
-
| Installed Packages | Managed/unmanaged package inventory; unmanaged or beta packages in production |
|
|
241
|
-
| Deployment Identity | Designated deployment identity and uncontrolled deployment activity |
|
|
242
|
-
|
|
243
|
-
### Secrets & Credential Storage
|
|
244
|
-
| Check | What it looks for |
|
|
245
|
-
|-------|------------------|
|
|
246
|
-
| Custom Settings & Credentials | Custom settings with credential-like names that may store secrets |
|
|
247
|
-
| Custom Labels Credential Exposure | API keys and tokens in globally-readable Custom Labels |
|
|
248
|
-
|
|
249
|
-
### Monitoring & Threat Detection
|
|
250
|
-
| Check | What it looks for |
|
|
251
|
-
|-------|------------------|
|
|
252
|
-
| Audit Trail | Permission changes and Login-As events in the setup audit trail |
|
|
253
|
-
| Login Session | Failed login trends, Login-As events, and access from diverse IPs |
|
|
254
|
-
| Failed Login Detection | Brute-force and credential-stuffing patterns (last 7 days) |
|
|
255
|
-
| Transaction Security Policies | Automated threat detection and response policies configured |
|
|
256
|
-
| Active Debug Log Traces | Active TraceFlag records capturing logs, including high-detail traces |
|
|
257
|
-
| Event Monitoring | Event Monitoring enabled with logs covering 30+ days |
|
|
258
|
-
| Threat Detection Event Storage | Guest User Anomaly / Threat Detection event storage enabled and retaining events |
|
|
259
|
-
| Guest Traffic Anomaly | Scans recent EventLogFile guest requests for anonymizer/hosting source IPs, single-IP bursts, and GraphQL `totalCount` reconnaissance sweeps |
|
|
260
|
-
| Anomalous Successful Logins | Accounts with successful logins from an unusually high number of distinct source IPs (credential-sharing / compromise signature) |
|
|
261
|
-
| SIEM Integration Signals | Evidence of SIEM or external monitoring integration |
|
|
262
|
-
|
|
263
|
-
### AI & Agents (Agentforce / GenAI)
|
|
264
|
-
| Check | What it looks for |
|
|
265
|
-
|-------|------------------|
|
|
266
|
-
| Agent Inventory | Every Agentforce agent, its active version, and its run-as user (inventory findings); flags an active agent whose run-as identity is inactive or frozen |
|
|
267
|
-
| Agent User Privilege | Agent / run-as users with Modify All Data or View All Data, broad object write access, or read access to objects classified as sensitive — the data a prompt injection inherits |
|
|
268
|
-
| Agent Action Surface | Write-capable agent actions (Apex/Flow that create, update, or delete) and agents with an unusually large action surface |
|
|
269
|
-
| Agentforce Channel Exposure | Correlates active agents with the channels that reach them (Experience Cloud sites, embedded deployments, messaging channels); flags guest-reachable exposure |
|
|
270
|
-
| Agentforce Monitoring Coverage | Active agents running with no Event Monitoring capture and no Transaction Security policy (the monitoring gap in the ForcedLeak pattern); points at `sf audit events pull` |
|
|
271
|
-
| Trusted URL Hygiene | Reviews the CSP trusted-sites allowlist for non-Salesforce domains that could be repurposed as exfiltration channels; with `--resolve-domains`, DNS-checks each for unresolvable or parked entries |
|
|
272
|
-
|
|
273
|
-
Two named attack chains correlate these findings: **Prompt injection blast radius** (guest-reachable channel + over-privileged agent user + write-capable actions) and **ForcedLeak pattern** (active agents + a stale/unresolvable trusted URL + no event capture).
|
|
274
|
-
|
|
275
|
-
The five agent-specific checks stay silent in orgs where Agentforce is not enabled (the GenAI objects do not exist, so the inventory records `not-enabled` and the dependent checks return nothing). Trusted URL Hygiene runs everywhere, since the CSP allowlist is an org-wide exfiltration surface regardless of Agentforce.
|
|
276
|
-
|
|
277
|
-
### Known limitations (advisory-only checks)
|
|
278
|
-
|
|
279
|
-
A small number of checks emit an **advisory** rather than a pass/fail verdict because the underlying setting is not exposed to the read APIs this plugin uses (SOQL/Tooling/REST/Metadata read):
|
|
280
|
-
|
|
281
|
-
- **Experience Cloud CSP & Lightning Web Security** — the per-site LWR Content Security Policy level and the Lightning Web Security toggle live inside the site's `ExperienceBundle`, not in a `metadata.read`-able type. The check lists live Experience sites and asks for manual verification. A true detection would require retrieving and parsing the `ExperienceBundle` (retrieve → unzip → read `config/*.json`), which is a larger capability than the current read clients; it is tracked as a future enhancement.
|
|
282
|
-
- **"Administrators Can Log In as Any User"** is a true detection when SecuritySettings is readable; if the Metadata client is unavailable it degrades to a manual-verification advisory.
|
|
283
|
-
|
|
284
|
-
Advisory findings are surfaced as `INFO` and never inflate the health score.
|
|
108
|
+
A handful of checks emit an advisory rather than a verdict, because the underlying setting is not
|
|
109
|
+
exposed to the read APIs this tool uses. Those are listed and explained in the same document —
|
|
110
|
+
advisories are INFO and never inflate the health score.
|
|
285
111
|
|
|
286
112
|
## Compliance frameworks
|
|
287
113
|
|
|
288
|
-
Findings
|
|
114
|
+
Findings map to controls across ten frameworks: OWASP Top 10, OWASP LLM Top 10, SOC 2, ISO/IEC
|
|
115
|
+
27001:2022, the Security Benchmark for Salesforce, the NZ Privacy Act, HISO 10029, NZISM, the HIPAA
|
|
116
|
+
Security Rule, and GDPR.
|
|
117
|
+
|
|
118
|
+
The mapping is built on a **sourced catalog** — each control carries its framework, pinned version,
|
|
119
|
+
official title and a citation — so a finding ties to an exact, defensible requirement rather than a
|
|
120
|
+
bare tag. A **provenance gate** means a control renders only once its reference has been confirmed
|
|
121
|
+
against the authoritative source.
|
|
122
|
+
|
|
123
|
+
Scope the executive report's matrix with `--frameworks universal|nz|all`, or name them:
|
|
124
|
+
`--frameworks owasp,iso,hipaa`. HIPAA and GDPR are in no named pack, because jurisdiction is your
|
|
125
|
+
call, not a default.
|
|
289
126
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
| OWASP Top 10 | 2021 | Web application risk categories |
|
|
293
|
-
| OWASP LLM Top 10 | 2025 | LLM/GenAI application risks (LLM01 Prompt Injection, LLM02 Sensitive Information Disclosure, LLM05 Improper Output Handling, LLM06 Excessive Agency); mapped by the AI & Agents checks |
|
|
294
|
-
| SOC 2 | AICPA TSC 2017 | Common Criteria (CC6–CC9) |
|
|
295
|
-
| ISO/IEC 27001 | 2022 | Annex A controls |
|
|
296
|
-
| Security Benchmark for Salesforce (SBS) | current | Salesforce-native benchmark: [docs.securitybenchmark.org](https://docs.securitybenchmark.org) |
|
|
297
|
-
| NZ Privacy Act | 2020 | Information Privacy Principles (IPP 5/9/12) |
|
|
298
|
-
| HISO 10029 | 2022 | NZ Health Information Security Framework |
|
|
299
|
-
| NZISM | v3.8 | NZ Information Security Manual |
|
|
127
|
+
> **Not an attestation.** A control showing "No findings detected" means this audit surfaced no
|
|
128
|
+
> issues mapped to it. It is not a statement of compliance. See [Scope & Liability](#scope--liability).
|
|
300
129
|
|
|
301
|
-
|
|
130
|
+
Framework versions, the packs, and the verification status of every control:
|
|
131
|
+
**[docs/COMPLIANCE.md](docs/COMPLIANCE.md)**.
|
|
302
132
|
|
|
303
|
-
|
|
133
|
+
## Attack chains
|
|
304
134
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
-
|
|
308
|
-
- a comma list of aliases, e.g. `owasp,owasp-llm,iso,nzism` (`owasp-llm` / `llm` selects the OWASP LLM Top 10)
|
|
135
|
+
A list of findings is not a risk assessment. Three MEDIUM findings that combine into an
|
|
136
|
+
unauthenticated path to bulk data matter more than a lone HIGH that leads nowhere, and reading a
|
|
137
|
+
report severity-by-severity hides exactly that.
|
|
309
138
|
|
|
310
|
-
|
|
139
|
+
So every audit correlates its findings into attack chains. **Eleven named chains** are hand-modelled
|
|
140
|
+
scenarios — each with its own narrative and remediation, several naming the concrete request path an
|
|
141
|
+
attacker would use. Where no named chain explains a combination, an emergent pass reports the
|
|
142
|
+
remaining entry-point → outcome pairs as lower-confidence "potential attack paths", so a novel
|
|
143
|
+
combination is still surfaced.
|
|
311
144
|
|
|
312
|
-
|
|
145
|
+
Every chain lists the findings forming its steps, and remediating **any one step breaks the chain**.
|
|
146
|
+
A chain is reported only when every ingredient is present: a clean org produces none.
|
|
147
|
+
|
|
148
|
+
All eleven with severities and trigger conditions: **[docs/ATTACK-CHAINS.md](docs/ATTACK-CHAINS.md)**.
|
|
313
149
|
|
|
314
150
|
## Scope & Liability
|
|
315
151
|
|
|
@@ -318,7 +154,7 @@ Findings are mapped to controls across eight security and privacy frameworks. Th
|
|
|
318
154
|
**What this tool is not.** It is **not** a penetration test, a dynamic/runtime security test, or a source-code audit of managed-package internals. It does not exploit vulnerabilities, attempt privilege escalation, or guarantee detection of every misconfiguration. The Health Score and A–F grade are **prioritisation aids**, not certifications, and do not represent compliance with, or accreditation under, any standard (OWASP, SOC 2, ISO 27001, HIPAA, GDPR, or otherwise). Compliance-framework tags indicate *relevance* to a control area only.
|
|
319
155
|
|
|
320
156
|
|
|
321
|
-
**Point-in-time.** Results reflect org configuration **at the moment the audit ran**. Configuration drift, new customisations, and platform changes can invalidate findings at any time. Re-run regularly (see [History & Diff](
|
|
157
|
+
**Point-in-time.** Results reflect org configuration **at the moment the audit ran**. Configuration drift, new customisations, and platform changes can invalidate findings at any time. Re-run regularly (see [History & Diff](docs/COMMANDS.md)).
|
|
322
158
|
|
|
323
159
|
**Authorisation.** Run this tool only against orgs you own or are **explicitly authorised in writing** to assess. You are responsible for obtaining the necessary permissions and for handling generated reports (which may contain sensitive security configuration) in accordance with your organisation's data-handling and confidentiality obligations.
|
|
324
160
|
|
|
@@ -326,547 +162,91 @@ Findings are mapped to controls across eight security and privacy frameworks. Th
|
|
|
326
162
|
|
|
327
163
|
## Trust & verification
|
|
328
164
|
|
|
329
|
-
Because this tool authenticates against production orgs, "is it safe to run?" deserves a verifiable
|
|
330
|
-
|
|
331
|
-
- **Read-only, enforced in CI.** The "no writes to your org" promise is a passing test, not a footnote. `test/unit/invariants/readonly-invariant.test.ts` statically scans this package's entire source tree and fails the build if any jsforce mutation API, HTTP write verb, or bulk/composite write path ever appears. Every org request funnels through the core clients (`@cclabsnz/sf-core`, `src/api/*ClientImpl.ts`), which issue only SOQL queries, REST **GET**s, and Metadata reads. Each package in the monorepo runs the same guard against its own source, so nothing is covered by omission.
|
|
332
|
-
- **Nothing phones home, enforced the same way.** `test/unit/invariants/network-egress.test.ts` fails the build on any third-party HTTP client, raw `node:http`/`https` use, telemetry/analytics/LLM endpoint, or websocket — and on any remote asset (`<script src>`, `<link href>`, `@import`) in a generated report. The only network destination is the org you authenticated against. Generated HTML reports are **fully self-contained**: webfonts are embedded as data URIs and Chart.js is inlined, so opening a report never calls out to a CDN — which matters, because reports carry sensitive findings and are often opened offline. Run both guards yourself:
|
|
333
|
-
|
|
334
|
-
```bash
|
|
335
|
-
pnpm --filter @cclabsnz/sf-audit test test/unit/invariants
|
|
336
|
-
```
|
|
337
|
-
- **What you install matches the public source.** Releases are published from GitHub Actions via [npm trusted publishing (OIDC)](https://docs.npmjs.com/trusted-publishers) with [build provenance](https://docs.npmjs.com/generating-provenance-statements) — no long-lived token, and the npm page shows a signed attestation linking the tarball to the exact public commit that built it. Verify it yourself:
|
|
165
|
+
Because this tool authenticates against production orgs, "is it safe to run?" deserves a verifiable
|
|
166
|
+
answer rather than a claim. Every guarantee below is something you can check yourself:
|
|
338
167
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
168
|
+
- **Read-only, enforced in CI** — a test statically fails the build if any write path appears in the source
|
|
169
|
+
- **No network egress** — enforced the same way; reports are fully self-contained (fonts and Chart.js inlined)
|
|
170
|
+
- **Signed provenance** — released from CI via npm trusted publishing (OIDC); `npm audit signatures` verifies the tarball against the public commit
|
|
171
|
+
- **Independent scans** — CodeQL (`security-extended`, source *and* workflows), Semgrep, OpenSSF Scorecard, a dependency-review licence gate, `pnpm audit`, Dependabot, secret scanning with push protection, SHA-pinned Actions, and a CycloneDX SBOM per release
|
|
342
172
|
|
|
343
|
-
|
|
344
|
-
- **Regulated-environment readiness.** The above give reviewers a paper trail for procurement: SBOM per release, an enforced dependency **license policy**, signed provenance, and independent SAST/supply-chain scans.
|
|
345
|
-
- **Least privilege & disclosure.** See [PERMISSIONS.md](PERMISSIONS.md) for the minimal access it needs and [SECURITY.md](SECURITY.md) for private vulnerability reporting.
|
|
346
|
-
|
|
347
|
-
### What third-party scanners flag, and why
|
|
348
|
-
|
|
349
|
-
[Socket](https://socket.dev/npm/package/@cclabsnz/sf-audit) raises two **supply-chain risk** alerts against this package. Neither is a vulnerability — both are behavioural heuristics — and rather than suppress them quietly, here is exactly what triggers each and how you can confirm it. The triage is committed as [`socket.yml`](../../socket.yml).
|
|
350
|
-
|
|
351
|
-
| Alert | What triggers it | Why it is expected |
|
|
352
|
-
| --- | --- | --- |
|
|
353
|
-
| **Filesystem access** | `node:fs` reads and writes | It is a CLI that writes your audit reports (HTML/MD/JSON) to disk and reads local inputs: report-branding overrides, event-log baselines under `~/.sf/audit-history`, and its own history archive. Every path is one you pass on the command line or the tool's own dot-directory. |
|
|
354
|
-
| **URL strings** | `https://` literals in the shipped code | These are inert citation links rendered as `<a href>` in reports — OWASP, NZISM, the NZ Privacy Act, Te Whatu Ora and CIS-style benchmark references cited by compliance findings. They are never fetched. |
|
|
355
|
-
|
|
356
|
-
Check the second one yourself — this lists every URL in the published build:
|
|
173
|
+
Run the guards yourself:
|
|
357
174
|
|
|
358
175
|
```bash
|
|
359
|
-
npm
|
|
360
|
-
|
|
176
|
+
npm test test/unit/invariants
|
|
177
|
+
npm audit signatures
|
|
361
178
|
```
|
|
362
179
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
https://docs.securitybenchmark.org/controls-at-a-glance.html
|
|
367
|
-
https://genai.owasp.org/llm-top-10/
|
|
368
|
-
https://nzism.gcsb.govt.nz/ism-document
|
|
369
|
-
https://owasp.org/Top10/2021/
|
|
370
|
-
https://privacy.org.nz/privacy-act-2020/privacy-principles/
|
|
371
|
-
https://www.legislation.govt.nz/act/public/2020/0031/latest/LMS23342.html
|
|
372
|
-
https://www.tewhatuora.govt.nz/health-services-and-programmes/cyber-hub/cyber-standards
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
No CDN, telemetry, or analytics endpoints — and the network-egress invariant above fails the build if one is ever added.
|
|
180
|
+
Full detail, including why Socket raises two behavioural alerts against this package and how to
|
|
181
|
+
confirm each: **[docs/TRUST.md](docs/TRUST.md)**. Least-privilege access is in
|
|
182
|
+
[PERMISSIONS.md](PERMISSIONS.md); vulnerability reporting in [SECURITY.md](SECURITY.md).
|
|
376
183
|
|
|
377
184
|
## Scoring
|
|
378
185
|
|
|
379
|
-
Each finding
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|------------|---------------|
|
|
383
|
-
| CRITICAL | 10 |
|
|
384
|
-
| HIGH | 7 |
|
|
385
|
-
| MEDIUM | 4 |
|
|
386
|
-
| LOW | 1 |
|
|
387
|
-
| INFO | 0 |
|
|
388
|
-
|
|
389
|
-
The health score is calculated as `100 - (total weight / max possible weight) * 100`, capped at 0.
|
|
390
|
-
|
|
391
|
-
The audit produces a **Health Score** (0–100) and a **Grade** (A–F):
|
|
392
|
-
|
|
393
|
-
| Grade | Criteria |
|
|
394
|
-
|-------|---------|
|
|
395
|
-
| A | Score ≥ 85, no HIGH findings |
|
|
396
|
-
| B | Score ≥ 70, ≤ 1 HIGH finding |
|
|
397
|
-
| C | Score ≥ 55, ≤ 3 HIGH findings |
|
|
398
|
-
| D | Score ≥ 40, no CRITICAL findings |
|
|
399
|
-
| F | Score < 40 or any CRITICAL finding |
|
|
400
|
-
|
|
401
|
-
### Custom Scoring Config
|
|
402
|
-
|
|
403
|
-
All weights and grade thresholds are configurable: no recompile needed. This is useful when your org has a different risk appetite (e.g. you want to penalise hardcoded credentials more heavily, or set stricter grade thresholds).
|
|
404
|
-
|
|
405
|
-
**Step 1:** Copy the sample config as your starting point:
|
|
406
|
-
|
|
407
|
-
```bash
|
|
408
|
-
cp config/scoring.sample.json my-scoring.json
|
|
409
|
-
```
|
|
410
|
-
|
|
411
|
-
**Step 2:** Edit the values. All three sections (`riskScores`, `checkWeights`, `gradeThresholds`) are optional: omit any section to keep the defaults.
|
|
412
|
-
|
|
413
|
-
```json
|
|
414
|
-
{
|
|
415
|
-
"riskScores": {
|
|
416
|
-
"CRITICAL": 10,
|
|
417
|
-
"HIGH": 7,
|
|
418
|
-
"MEDIUM": 4,
|
|
419
|
-
"LOW": 1,
|
|
420
|
-
"INFO": 0
|
|
421
|
-
},
|
|
422
|
-
"checkWeights": {
|
|
423
|
-
"hardcoded-credentials": 10,
|
|
424
|
-
"guest-user-access": 10,
|
|
425
|
-
"users-and-admins": 10,
|
|
426
|
-
"apex-sharing": 7
|
|
427
|
-
},
|
|
428
|
-
"gradeThresholds": {
|
|
429
|
-
"A": { "minScore": 90, "maxHigh": 0 },
|
|
430
|
-
"B": { "minScore": 75, "maxHigh": 1 },
|
|
431
|
-
"C": { "minScore": 60, "maxHigh": 3 },
|
|
432
|
-
"D": { "minScore": 40, "maxCritical": 0 },
|
|
433
|
-
"F": {}
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
```
|
|
437
|
-
|
|
438
|
-
The full list of valid `checkWeights` keys (one per check) is in [`config/scoring.sample.json`](config/scoring.sample.json).
|
|
439
|
-
|
|
440
|
-
**Step 3:** Pass it when running the audit:
|
|
441
|
-
|
|
442
|
-
```bash
|
|
443
|
-
sf audit security --target-org myOrg --scoring-config ./my-scoring.json
|
|
444
|
-
```
|
|
445
|
-
|
|
446
|
-
Your config is deep-merged with the defaults, so you only need to include the values you want to change.
|
|
447
|
-
|
|
448
|
-
## History & Diff
|
|
449
|
-
|
|
450
|
-
Every `sf audit security` run automatically archives a JSON copy of the report to:
|
|
451
|
-
|
|
452
|
-
```
|
|
453
|
-
~/.sf/audit-history/{orgId}/sf-audit-{orgId}-{timestamp}.json
|
|
454
|
-
```
|
|
455
|
-
|
|
456
|
-
No configuration needed: archiving happens silently after each run.
|
|
457
|
-
|
|
458
|
-
### View Audit History
|
|
459
|
-
|
|
460
|
-
Show how your org's security posture has changed across multiple runs:
|
|
461
|
-
|
|
462
|
-
```bash
|
|
463
|
-
sf audit history --target-org myOrg
|
|
464
|
-
```
|
|
465
|
-
|
|
466
|
-
Prints a terminal table with score trends and writes an HTML timeline to the current directory.
|
|
467
|
-
|
|
468
|
-
**Flags:**
|
|
469
|
-
|
|
470
|
-
| Flag | Description | Default |
|
|
471
|
-
|------|-------------|---------|
|
|
472
|
-
| `--target-org` | Org alias or username | required |
|
|
473
|
-
| `--reports-dir` | Custom directory containing archived reports | `~/.sf/audit-history/{orgId}` |
|
|
474
|
-
| `--output` | Directory to write the HTML timeline | `.` (cwd) |
|
|
475
|
-
| `--limit` | Maximum number of most-recent runs to show | all |
|
|
186
|
+
Each finding carries a risk weight (CRITICAL 10, HIGH 7, MEDIUM 4, LOW 1, INFO 0). The health score is
|
|
187
|
+
`100 - (total weight / max possible weight) * 100`, capped at 0, and maps to an A–F grade — A needs
|
|
188
|
+
≥ 85 with no HIGH findings; any CRITICAL is an F.
|
|
476
189
|
|
|
477
|
-
|
|
190
|
+
All weights and grade thresholds are configurable without recompiling, via
|
|
191
|
+
`--scoring-config ./my-scoring.json`. Start from [`config/scoring.sample.json`](config/scoring.sample.json),
|
|
192
|
+
which lists every valid `checkWeights` key; your config is deep-merged with the defaults, so include
|
|
193
|
+
only what you want to change.
|
|
478
194
|
|
|
479
|
-
|
|
480
|
-
Audit History: My Org (00D000000000001)
|
|
481
|
-
────────────────────────────────────────────────────────────────────────────────
|
|
482
|
-
# Date Score Grade CRIT HIGH MED LOW Δ Score
|
|
483
|
-
────────────────────────────────────────────────────────────────────────────────
|
|
484
|
-
1 2026-03-23 15:10 64 D 1 5 8 3 —
|
|
485
|
-
2 2026-04-09 11:22 81 B 0 2 5 3 +17
|
|
486
|
-
────────────────────────────────────────────────────────────────────────────────
|
|
487
|
-
Trend: ▲ +17 over 2 audits Best: 81 (2026-04-09 11:22) Worst: 64 (2026-03-23 15:10)
|
|
488
|
-
```
|
|
489
|
-
|
|
490
|
-
### Diff Two Reports
|
|
491
|
-
|
|
492
|
-
Compare any two audit JSON files to see exactly what changed:
|
|
493
|
-
|
|
494
|
-
```bash
|
|
495
|
-
sf audit diff baseline.json current.json
|
|
496
|
-
```
|
|
497
|
-
|
|
498
|
-
Writes an HTML and JSON diff report to the current directory.
|
|
499
|
-
|
|
500
|
-
**Flags:**
|
|
195
|
+
Grade bands, the full config shape and worked examples: **[docs/SCORING.md](docs/SCORING.md)**.
|
|
501
196
|
|
|
502
|
-
|
|
503
|
-
|------|-------------|---------|
|
|
504
|
-
| `--output` | Directory to write diff reports | `.` (cwd) |
|
|
505
|
-
| `--format` | Comma-separated formats: `html`, `json` | `html,json` |
|
|
197
|
+
## Other commands
|
|
506
198
|
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
```
|
|
510
|
-
Diff report written: ./sf-audit-diff-00D000000000001-...-vs-....html
|
|
511
|
-
Diff report written: ./sf-audit-diff-00D000000000001-...-vs-....json
|
|
512
|
-
|
|
513
|
-
─────────────────────────────
|
|
514
|
-
Diff Summary
|
|
515
|
-
─────────────────────────────
|
|
516
|
-
Score delta +17
|
|
517
|
-
Grade D → B
|
|
518
|
-
New 0
|
|
519
|
-
Resolved 1
|
|
520
|
-
─────────────────────────────
|
|
521
|
-
```
|
|
199
|
+
Beyond the audit itself, the plugin ships four commands. Each is documented in
|
|
200
|
+
**[docs/COMMANDS.md](docs/COMMANDS.md)**.
|
|
522
201
|
|
|
523
|
-
|
|
202
|
+
| Command | What it does |
|
|
203
|
+
|---------|--------------|
|
|
204
|
+
| `sf audit history` / `sf audit diff` | Every run auto-archives to `~/.sf/audit-history/{orgId}`. Show posture drift across runs as a table plus an HTML timeline, or diff any two report JSONs |
|
|
205
|
+
| `sf audit events pull` | Capture the org's **free** daily `EventLogFile` logs to local disk before the ~1-day retention window drops them — no Event Monitoring / Shield add-on needed. Idempotent, safe to cron |
|
|
206
|
+
| `sf audit timeline` | Reconstruct one actor's activity across every captured event type, entirely offline. Refuses to expand a shared identity or join on a blank field, and always reports capture coverage first |
|
|
207
|
+
| `sf audit apps` | Read the `RestApi` event log to compare what each connected app actually *uses* against what its run-as user is *granted*, and emit a suggested least-privilege permission set |
|
|
524
208
|
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
**~1 day**. Miss a day and that day's activity is gone.
|
|
529
|
-
|
|
530
|
-
`sf audit events pull` captures them to local disk before they expire, so a daily run builds a
|
|
531
|
-
rolling local baseline you own:
|
|
532
|
-
|
|
533
|
-
```bash
|
|
534
|
-
sf audit events pull --target-org myOrg
|
|
535
|
-
```
|
|
536
|
-
|
|
537
|
-
It queries whatever daily event types the org actually exposes, downloads each log's CSV body, and
|
|
538
|
-
saves it to `~/.sf/event-baseline/{orgId}/{EventType}/{LogDate}-{Id}.csv`, plus a per-run manifest.
|
|
539
|
-
It is **read-only** (GET only) and **idempotent**: any log already on disk is skipped, so it is safe
|
|
540
|
-
to run repeatedly. Run it once a day from cron or a scheduled GitHub Action and you beat the 1-day
|
|
541
|
-
retention window with a growing archive — no add-on required.
|
|
542
|
-
|
|
543
|
-
```bash
|
|
544
|
-
# Daily cron entry (07:15) — capture yesterday's logs
|
|
545
|
-
15 7 * * * sf audit events pull --target-org myOrg >> ~/.sf/event-baseline/pull.log 2>&1
|
|
546
|
-
```
|
|
547
|
-
|
|
548
|
-
**Flags:**
|
|
549
|
-
|
|
550
|
-
| Flag | Description | Default |
|
|
551
|
-
|------|-------------|---------|
|
|
552
|
-
| `--target-org` | Org alias or username | required |
|
|
553
|
-
| `--since` | Days of `LogDate` to request (`LAST_N_DAYS` window) | `1` |
|
|
554
|
-
| `--types` | Restrict to specific EventTypes, comma-separated (e.g. `Login,ApiTotalUsage`) | *(all available)* |
|
|
555
|
-
| `--output` / `-o` | Base directory to store logs under | `~/.sf/event-baseline` |
|
|
556
|
-
|
|
557
|
-
```bash
|
|
558
|
-
# Backfill the last 3 days (each still subject to the org's retention)
|
|
559
|
-
sf audit events pull --target-org myOrg --since 3
|
|
560
|
-
|
|
561
|
-
# Only pull login and API-usage logs
|
|
562
|
-
sf audit events pull --target-org myOrg --types Login,ApiTotalUsage
|
|
563
|
-
|
|
564
|
-
# Store under a project-local directory instead of ~/.sf
|
|
565
|
-
sf audit events pull --target-org myOrg --output ./event-baseline
|
|
566
|
-
```
|
|
567
|
-
|
|
568
|
-
> Reading `EventLogFile` requires the **View Event Log Files** permission on the running user (this
|
|
569
|
-
> is in addition to the minimum read-only audit permission set). If it is missing, or the edition
|
|
570
|
-
> does not expose free daily logs, the command exits cleanly with an explanation rather than failing.
|
|
571
|
-
|
|
572
|
-
**Example output:**
|
|
573
|
-
|
|
574
|
-
```
|
|
575
|
-
Pulling free EventLogFile logs for org: My Org (00D000000000001)
|
|
576
|
-
|
|
577
|
-
─────────────────────────────
|
|
578
|
-
Event Baseline Pull
|
|
579
|
-
─────────────────────────────
|
|
580
|
-
Found 7
|
|
581
|
-
Downloaded 7
|
|
582
|
-
Skipped 0 (already saved)
|
|
583
|
-
Total bytes 48213
|
|
584
|
-
─────────────────────────────
|
|
585
|
-
Saved to: ~/.sf/event-baseline/00D000000000001
|
|
586
|
-
Manifest: ~/.sf/event-baseline/00D000000000001/_manifests/manifest-...-....json
|
|
587
|
-
```
|
|
588
|
-
|
|
589
|
-
### Analyzing the captured logs
|
|
590
|
-
|
|
591
|
-
`events pull` is the collection half. To triage those `EventLogFile` CSVs for exploit and
|
|
592
|
-
abuse patterns, use the companion CLI **[sfelf-triage](https://github.com/cclabsnz/sfelf-triage)**.
|
|
593
|
-
It reads downloaded EventLogFile CSVs and emits a per-IP verdict
|
|
594
|
-
(`BENIGN_SCANNER | SUSPICIOUS | LIKELY_ABUSE`), answering *"is this guest/community IP a
|
|
595
|
-
vulnerability scanner or a real threat?"* — with **zero network egress** and no org connection.
|
|
596
|
-
|
|
597
|
-
sfelf-triage reads this plugin's `~/.sf/event-baseline/<orgId>` layout directly, so the two
|
|
598
|
-
tools chain with no glue:
|
|
599
|
-
|
|
600
|
-
```bash
|
|
601
|
-
sf audit events pull --target-org myOrg # capture (this plugin)
|
|
602
|
-
sfelf-triage analyze ~/.sf/event-baseline/<orgId> # triage (companion)
|
|
603
|
-
```
|
|
604
|
-
|
|
605
|
-
See the [sfelf-triage README](https://github.com/cclabsnz/sfelf-triage#readme) for install and usage.
|
|
606
|
-
|
|
607
|
-
## Forensic timeline
|
|
608
|
-
|
|
609
|
-
Salesforce splits one actor's activity across many event types, and each carries a different
|
|
610
|
-
subset of identifying fields — so no single log answers *"what did this actor do"*. Filtering by
|
|
611
|
-
IP finds the requests but misses every SOQL execution, because the query log has no `CLIENT_IP`
|
|
612
|
-
column at all. Filtering by user finds everything the *guest* user did, which on a community is
|
|
613
|
-
everyone.
|
|
614
|
-
|
|
615
|
-
`sf audit timeline` correlates a seed across every captured event type and writes a defensible
|
|
616
|
-
timeline:
|
|
617
|
-
|
|
618
|
-
```bash
|
|
619
|
-
sf audit timeline --window 2026-08-02T04:00Z/PT1H --seed ip:203.0.113.50
|
|
620
|
-
```
|
|
621
|
-
|
|
622
|
-
It runs **entirely offline** against captures written by `sf audit events pull` — no org
|
|
623
|
-
connection is opened, so it still works long after the org's retention window has expired or its
|
|
624
|
-
credentials have been revoked. The org id is inferred from the capture directory when only one
|
|
625
|
-
org has been captured.
|
|
626
|
-
|
|
627
|
-
### What it will not do
|
|
628
|
-
|
|
629
|
-
Cross-event correlation is easy to get confidently wrong, and a wrong answer here reads as
|
|
630
|
-
evidence. Two rules are enforced and both are visible in the output:
|
|
631
|
-
|
|
632
|
-
- **A blank field is never a join key.** A blank `REQUEST_ID` used as a key stops identifying
|
|
633
|
-
anything and starts matching every other row whose value is also blank — quietly attributing
|
|
634
|
-
strangers' sessions to your actor.
|
|
635
|
-
- **A shared identity is not expanded.** A community guest user can stand for hundreds of
|
|
636
|
-
distinct visitors. Expanding through it would present the whole crowd's activity as one
|
|
637
|
-
actor's, so it is refused by default and the refusal is reported with its evidence:
|
|
638
|
-
|
|
639
|
-
```
|
|
640
|
-
Expansion refused: userId 005xx0000000000 is shared by 1371 distinct addresses
|
|
641
|
-
(threshold 8). Override with --allow-shared-identity.
|
|
642
|
-
```
|
|
643
|
-
|
|
644
|
-
Every output also leads with what was actually captured, because *"no rows matched"* means two
|
|
645
|
-
entirely different things — the actor did nothing, or nobody captured the hour they did it in:
|
|
646
|
-
|
|
647
|
-
```
|
|
648
|
-
Window — coverage INCOMPLETE
|
|
649
|
-
captured AuraRequest, ListViewEvent
|
|
650
|
-
MISSING LightningInteraction (not-in-core-set)
|
|
651
|
-
MISSING GuestUserAnomalyEventStore (storage-disabled)
|
|
652
|
-
|
|
653
|
-
No activity in captured sources. Coverage incomplete — 2 sources missing.
|
|
654
|
-
```
|
|
655
|
-
|
|
656
|
-
**Flags:**
|
|
657
|
-
|
|
658
|
-
| Flag | Description | Default |
|
|
659
|
-
|------|-------------|---------|
|
|
660
|
-
| `--window` | When to look — see below | required |
|
|
661
|
-
| `--seed` | Typed and repeatable: `ip:` `user:` `session:` `request:` `login:` `transaction:` `event:` | *(whole window)* |
|
|
662
|
-
| `--org-id` | Which captured org to read | *(inferred when unambiguous)* |
|
|
663
|
-
| `--input` | Capture base directory | `~/.sf/event-baseline` |
|
|
664
|
-
| `--allow-shared-identity` | Expand through identities shared by many actors | `false` |
|
|
665
|
-
| `--max-cardinality` | Distinct-actor ceiling above which a key is not expanded | `8` |
|
|
666
|
-
| `--format` | Comma-separated: `csv,json,md` | all three |
|
|
667
|
-
| `--output` | Directory to write into | `.` |
|
|
668
|
-
|
|
669
|
-
**Finding your way in.** Two things you do not have to know up front. Omit `--seed` and you get
|
|
670
|
-
the whole window, uncorrelated — which is where you look to find something worth seeding on.
|
|
671
|
-
Ask for a window that was never captured and the error lists the days that *were*:
|
|
672
|
-
|
|
673
|
-
```
|
|
674
|
-
No captures for 2026-07-01 under ~/.sf/event-baseline/00Dxx0000000000EAA.
|
|
675
|
-
|
|
676
|
-
Captured days for this org:
|
|
677
|
-
2026-08-01 11 event type(s), whole day
|
|
678
|
-
2026-08-02 14 event type(s), whole day
|
|
679
|
-
|
|
680
|
-
Try: --window 2026-08-02
|
|
681
|
-
```
|
|
682
|
-
|
|
683
|
-
**Saying when.** `--window` takes whichever form is nearest to hand — you should not have to
|
|
684
|
-
compose an ISO 8601 interval while an incident is running:
|
|
685
|
-
|
|
686
|
-
| You type | You get |
|
|
687
|
-
|---|---|
|
|
688
|
-
| `yesterday` | the whole of yesterday, UTC |
|
|
689
|
-
| `today` | midnight UTC until now |
|
|
690
|
-
| `2h` · `90m` | the last two hours; the last ninety minutes |
|
|
691
|
-
| `2026-08-02` | that whole day — the shape the free tier captures in |
|
|
692
|
-
| `2026-08-02T04:17Z` | the hour containing that instant, for a timestamp pasted from an alert |
|
|
693
|
-
| `2026-08-02T04:00Z/PT1H` | an exact interval, start and duration |
|
|
694
|
-
| `2026-08-02T04:00Z/2026-08-02T06:00Z` | an exact interval, start and end |
|
|
695
|
-
|
|
696
|
-
Times are UTC, because every capture is stored in UTC — a bare timestamp with no zone is read
|
|
697
|
-
that way rather than as local time. A window has to fall inside one UTC day; one that crosses
|
|
698
|
-
midnight is refused, and the error names the two runs that would cover it.
|
|
699
|
-
|
|
700
|
-
```bash
|
|
701
|
-
# Follow one address across every captured event type
|
|
702
|
-
sf audit timeline --window yesterday --seed ip:203.0.113.50
|
|
703
|
-
|
|
704
|
-
# Start from a request and walk outward, including its Apex cascade
|
|
705
|
-
sf audit timeline --window 2026-08-02T04:00Z/PT1H --seed request:abc123
|
|
706
|
-
|
|
707
|
-
# Several orgs captured — name the one to read
|
|
708
|
-
sf audit timeline --org-id 00Dxx0000000000EAA --window 2026-08-02T04:00Z/PT2H --seed user:005xx000000000
|
|
709
|
-
|
|
710
|
-
# Machine-readable only, into an evidence directory
|
|
711
|
-
sf audit timeline --window 2026-08-02T04:00Z/PT1H --seed ip:203.0.113.50 \
|
|
712
|
-
--format json --output ./evidence/incident-2026-08-02
|
|
713
|
-
```
|
|
714
|
-
|
|
715
|
-
**Outputs:**
|
|
716
|
-
|
|
717
|
-
| File | Contents |
|
|
718
|
-
|------|----------|
|
|
719
|
-
| `timeline.csv` | The correlated rows, one schema across all sources, chronological |
|
|
720
|
-
| `timeline.json` | The same rows plus the provenance — seeds, every key expanded through, and every refusal |
|
|
721
|
-
| `summary.md` | Narrative: coverage, per-type counts, what tied each row in, refusals, and whether records left |
|
|
722
|
-
|
|
723
|
-
Each row records **which join key tied it in**, so attribution is checkable rather than asserted.
|
|
724
|
-
The `rows_processed` and `records_returned` columns are populated only from Real-Time Event
|
|
725
|
-
objects — no `EventLogFile` type records them — and when none were captured the summary says the
|
|
726
|
-
question is unanswerable rather than going quiet, since silence there reads as *"nothing left"*.
|
|
727
|
-
|
|
728
|
-
### Checking a claim against its control group
|
|
729
|
-
|
|
730
|
-
When a seed's rows share an identity with many other people — a community guest user, a shared
|
|
731
|
-
integration account — *"this actor did X"* needs something to be checked against. Otherwise the
|
|
732
|
-
claim is unfalsifiable: nobody can tell your 15 rows from the other 600 behind the same user.
|
|
733
|
-
|
|
734
|
-
The refusal message already gives you the denominator:
|
|
735
|
-
|
|
736
|
-
```
|
|
737
|
-
Expansion refused: userId 005xx000000000 is shared by 1371 distinct addresses (threshold 8).
|
|
738
|
-
```
|
|
739
|
-
|
|
740
|
-
To see the peer set itself, run the command a second time seeded on that identity, with expansion
|
|
741
|
-
allowed:
|
|
742
|
-
|
|
743
|
-
```bash
|
|
744
|
-
# 1. The claim — narrow, seeded on something that identifies one actor
|
|
745
|
-
sf audit timeline --window 2026-08-02T04:00Z/PT1H --seed request:REQ000000 \
|
|
746
|
-
--output ./evidence/actor
|
|
747
|
-
|
|
748
|
-
# 2. The control — everyone behind the identity those rows share
|
|
749
|
-
sf audit timeline --window 2026-08-02T04:00Z/PT1H --seed user:005xx000000000 \
|
|
750
|
-
--allow-shared-identity --output ./evidence/peers
|
|
751
|
-
```
|
|
752
|
-
|
|
753
|
-
Both use the same schema, so they concatenate and diff directly:
|
|
754
|
-
|
|
755
|
-
```bash
|
|
756
|
-
# How much of the identity's activity is actually your actor?
|
|
757
|
-
# (tail -n +2 skips the header row, so these are data rows)
|
|
758
|
-
echo "actor: $(tail -n +2 ./evidence/actor/timeline.csv | wc -l)"
|
|
759
|
-
echo "control: $(tail -n +2 ./evidence/peers/timeline.csv | wc -l)"
|
|
760
|
-
```
|
|
761
|
-
|
|
762
|
-
An actor accounting for 15 of 603 rows — 2.5%, and separable by request id — is a different
|
|
763
|
-
finding from one accounting for 580 of 603. The second command is what lets a reviewer tell
|
|
764
|
-
which they are looking at, rather than taking the first on trust.
|
|
765
|
-
|
|
766
|
-
> `sf audit timeline` adds **no checks** and does not affect the security grade. It is an
|
|
767
|
-
> investigation command, not a `SecurityCheck`.
|
|
768
|
-
|
|
769
|
-
## Connected-app least-privilege
|
|
770
|
-
|
|
771
|
-
Connected-app over-privilege was at the centre of the 2025-2026 wave of Salesforce data-theft
|
|
772
|
-
via OAuth: apps authorized with more scope than they use, and integration users with far more
|
|
773
|
-
object access than the app ever touches. The static checks (`connected-apps`, `connected-app-scope`,
|
|
774
|
-
`connected-app-inactivity`) tell you what was *granted*. `sf audit apps` tells you what is actually
|
|
775
|
-
*used*, so it can point at the specific access to remove.
|
|
776
|
-
|
|
777
|
-
```bash
|
|
778
|
-
sf audit apps --target-org myOrg --since 7
|
|
779
|
-
```
|
|
780
|
-
|
|
781
|
-
It reads the `RestApi` `EventLogFile` to see which objects each connected app touched, compares that
|
|
782
|
-
against the objects its run-as user can reach, and reports the over-grant per object and read/write
|
|
783
|
-
bit — plus a generated least-privilege permission set granting exactly what was observed. App IDs are
|
|
784
|
-
resolved to human-readable names (`AppMenuItem` / `ConnectedApplication` / a bundled standard-app
|
|
785
|
-
catalog / `LoginHistory` correlation), and anything unresolved is flagged loudly rather than hidden.
|
|
786
|
-
|
|
787
|
-
It is **read-only**: the suggested permission set is emitted as data, never deployed.
|
|
788
|
-
|
|
789
|
-
**Honest bounds.** `RestApi` attributes roughly half of API traffic to a connected app (the rest is
|
|
790
|
-
UI-API / session traffic), so *used* is a lower bound. Findings carry the observation window and
|
|
791
|
-
attribution rate, and revoke recommendations are suppressed below a soak window and for apps used by
|
|
792
|
-
many interactive users. Reading `EventLogFile` needs the **View Event Log Files** permission (the same
|
|
793
|
-
one `events pull` uses).
|
|
794
|
-
|
|
795
|
-
**Flags:**
|
|
796
|
-
|
|
797
|
-
| Flag | Description | Default |
|
|
798
|
-
|------|-------------|---------|
|
|
799
|
-
| `--target-org` | Org alias or username | required |
|
|
800
|
-
| `--since` | Days of `RestApi` log to analyze | `7` |
|
|
801
|
-
| `--from` | Read `RestApi` CSVs from a local `events pull` baseline dir instead of downloading | *(download)* |
|
|
802
|
-
| `--soak` | Minimum window (days) before asserting revoke recommendations | `7` |
|
|
803
|
-
| `--format` | `table` / `json` / `md` | `table` |
|
|
804
|
-
|
|
805
|
-
```bash
|
|
806
|
-
# Reuse an events-pull baseline instead of downloading again
|
|
807
|
-
sf audit apps --target-org myOrg --from ~/.sf/event-baseline/00Dxxx
|
|
808
|
-
|
|
809
|
-
# Machine-readable output
|
|
810
|
-
sf audit apps --target-org myOrg --format json
|
|
811
|
-
```
|
|
209
|
+
To triage captured logs for abuse patterns, pair `events pull` with the companion CLI
|
|
210
|
+
**[sfelf-triage](https://github.com/cclabsnz/sfelf-triage)**, which reads this plugin's
|
|
211
|
+
`~/.sf/event-baseline/<orgId>` layout directly.
|
|
812
212
|
|
|
813
213
|
## Requirements
|
|
814
214
|
|
|
815
215
|
- Node.js 18+
|
|
816
216
|
- Salesforce CLI (`sf`) v2+
|
|
817
|
-
- A least-privilege, **read-only** org user. The audit performs no writes and does **not** require `View All Data
|
|
217
|
+
- A least-privilege, **read-only** org user. The audit performs no writes and does **not** require `View All Data` — without it one probe (integration write evidence) reports *inconclusive* rather than drawing a conclusion. See **[PERMISSIONS.md](PERMISSIONS.md)** for the exact minimum permission set, what each is for, what the tool does *not* need, and a ready-to-deploy `SF Audit (Read-Only)` permission set ([`docs/permissionset/`](docs/permissionset/SF_Audit_ReadOnly.permissionset-meta.xml)).
|
|
818
218
|
|
|
819
219
|
## Development
|
|
820
220
|
|
|
821
221
|
```bash
|
|
822
222
|
npm run build # compile TypeScript
|
|
823
|
-
npm
|
|
824
|
-
npm
|
|
223
|
+
npm run typecheck # type-check src + test (tsc --noEmit)
|
|
224
|
+
npm test # typecheck, then run all tests
|
|
225
|
+
npm run test:unit # typecheck, then unit tests only
|
|
226
|
+
npm run test:jest # tests without the typecheck — fast inner loop
|
|
825
227
|
npm run clean # remove compiled output
|
|
826
228
|
```
|
|
827
229
|
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
230
|
+
Jest transforms with [swc](https://swc.rs), which strips types without checking them, so
|
|
231
|
+
`npm run typecheck` is what catches type errors in tests — it runs ahead of Jest in
|
|
232
|
+
`npm test`. Use `npm run test:jest` while iterating, but don't treat it as a green run.
|
|
831
233
|
|
|
832
|
-
|
|
234
|
+
Release history is in **[CHANGELOG.md](CHANGELOG.md)**; each entry mirrors its
|
|
235
|
+
[GitHub Release](https://github.com/cclabsnz/sf-audit-plugin/releases), which carries the signed
|
|
236
|
+
provenance attestation and the CycloneDX SBOM for that build.
|
|
833
237
|
|
|
834
|
-
**
|
|
238
|
+
Project documents: **[GOVERNANCE.md](docs/GOVERNANCE.md)** (roles, decisions, continuity), **[ARCHITECTURE.md](docs/ARCHITECTURE.md)**, **[ROADMAP.md](docs/ROADMAP.md)**, and the **[assurance case](docs/ASSURANCE-CASE.md)** — the argument, with evidence, that this tool is safe to point at a production org.
|
|
835
239
|
|
|
836
|
-
|
|
837
|
-
- [Free Salesforce Event Monitoring: a baseline from EventLogFile without Shield](https://www.softwareinsights.dev/posts/salesforce-free-event-monitoring-eventlogfile-baseline/) — why [`sf audit events pull`](#free-event-baseline) exists and how to cron it
|
|
838
|
-
- [Which connected apps use less than they're granted? Ask your own logs](https://www.softwareinsights.dev/posts/salesforce-connected-app-least-privilege-granted-vs-used/) — the granted-vs-used method behind [`sf audit apps`](#connected-app-least-privilege)
|
|
839
|
-
- [Scanner or breach? Triage EventLogFile in one command](https://www.softwareinsights.dev/posts/salesforce-eventlogfile-guest-traffic-triage-scanner-or-breach/) — pairing an `events pull` baseline with the [sfelf-triage](https://github.com/cclabsnz/sfelf-triage) companion
|
|
840
|
-
- [Salesforce guest user exposure, graded by real reachability](https://www.softwareinsights.dev/posts/sf-audit-guest-user-exposure-reachability/) — the UI-API reachability tiering behind the [guest checks](#guest--external-facing-access)
|
|
841
|
-
- [sf-audit vs sf-cli-security-audit](https://www.softwareinsights.dev/posts/sf-audit-vs-sf-cli-security-audit/) — how this plugin differs from a configurable policy engine, and when to reach for each
|
|
842
|
-
|
|
843
|
-
**The access model the privilege checks encode** — the reasoning behind [Users, Permissions & Privilege](#users-permissions--privilege):
|
|
844
|
-
|
|
845
|
-
- [Why your developers don't need Modify All Data](https://www.softwareinsights.dev/posts/salesforce-developers-modify-all-data-what-they-need-instead/) — part 1 of a four-part series on delivery-team access; feeds Users & Admins and Privileged Access & Shadow Admins
|
|
846
|
-
- [The access model: tiers and roles](https://www.softwareinsights.dev/posts/salesforce-delivery-team-access-model-tiers-and-roles/) — the tiering that Separation of Duties and Privilege Escalation Permissions test against
|
|
847
|
-
- [Sizing the model to your team](https://www.softwareinsights.dev/posts/salesforce-access-model-sizing-internal-vs-external-admin-teams/) — internal vs external admins, and what the model costs to run
|
|
848
|
-
- [Deployable permission sets](https://www.softwareinsights.dev/posts/salesforce-delivery-team-deployable-permission-sets/) — the metadata and the CI identity, which the Integration / Service Accounts check inventories
|
|
849
|
-
|
|
850
|
-
**Platform changes the checks track:**
|
|
240
|
+
Maintainers: see **[docs/RELEASE.md](docs/RELEASE.md)** for the release checklist and the one-time repository-hardening steps (npm provenance token, branch protection, and the CodeQL / Scorecard setup behind the badges above).
|
|
851
241
|
|
|
852
|
-
|
|
853
|
-
- [Audit your Agentforce footprint: every agent, agent user, and permission](https://www.softwareinsights.dev/posts/salesforce-agentforce-footprint-audit/) — the manual SOQL behind Agent Inventory
|
|
854
|
-
- [Agentforce agent user least privilege](https://www.softwareinsights.dev/posts/salesforce-agentforce-agent-user-least-privilege/) — feeds the Agent User Privilege check
|
|
855
|
-
- [Salesforce MFA enforcement: the revised 2026 dates](https://www.softwareinsights.dev/posts/salesforce-mfa-enforcement-paused-revised-dates-2026/) — feeds the MFA checks
|
|
856
|
-
- [The MFA enforcement admin guide](https://www.softwareinsights.dev/posts/salesforce-mfa-enforcement-2026-admin-guide/) — what the MFA Enforcement / Registration / Method Strength checks are measuring against
|
|
857
|
-
- [MFA lockout recovery and break-glass accounts](https://www.softwareinsights.dev/posts/salesforce-mfa-lockout-recovery-break-glass-accounts/) — the operational side of the MFA and High Assurance Session checks
|
|
858
|
-
- [OAuth username-password (ROPC) flow retirement in Winter '27](https://www.softwareinsights.dev/posts/salesforce-oauth-username-password-flow-retirement-winter-27/) — feeds the SSO Enforcement and Connected App OAuth Scopes checks
|
|
859
|
-
- [Email change verification retirement and Authorized Email Domains](https://www.softwareinsights.dev/posts/salesforce-email-change-verification-retirement-authorized-email-domains/) — feeds the Email Security check
|
|
860
|
-
- [Summer '26: SAML retirement & Apex secure-by-default](https://www.softwareinsights.dev/posts/salesforce-summer-26-saml-retirement-apex-secure-by-default/) — feeds the SSO / Apex checks
|
|
861
|
-
- [Salesforce security enforcement in 2026 — every change and date](https://www.softwareinsights.dev/posts/salesforce-security-enforcement-2026-complete-guide/) — the overall posture this tool measures
|
|
862
|
-
- [Report-export step-up enforcement: known issues](https://www.softwareinsights.dev/posts/salesforce-transaction-security-policy-report-export-known-issues/) — feeds the data-export / transaction-security checks
|
|
242
|
+
## Further reading
|
|
863
243
|
|
|
864
|
-
|
|
244
|
+
Deep dives on this tool and the topics it checks, from our engineering blog
|
|
245
|
+
**[softwareinsights.dev](https://www.softwareinsights.dev)** — including how sf-audit works, the free
|
|
246
|
+
Event Monitoring baseline, guest-user exposure grading, the delivery-team access model, Agentforce
|
|
247
|
+
hardening after ForcedLeak, and the NZ compliance context.
|
|
865
248
|
|
|
866
|
-
|
|
867
|
-
- [Data sovereignty for New Zealand Salesforce orgs](https://www.softwareinsights.dev/posts/salesforce-data-sovereignty-new-zealand/) — residency vs sovereignty, and why the `nz` framework pack exists
|
|
868
|
-
- [IPP 3A indirect collection notices](https://www.softwareinsights.dev/posts/salesforce-nz-privacy-ipp3a-indirect-collection-notice/) — feeds the NZ Privacy Act control mappings
|
|
869
|
-
- [Why Salesforce Health Cloud needs its own security review](https://www.softwareinsights.dev/posts/salesforce-health-cloud-security-review/) — the HISO 10029 context
|
|
249
|
+
Full annotated list: **[docs/FURTHER-READING.md](docs/FURTHER-READING.md)**.
|
|
870
250
|
|
|
871
251
|
## Commercial support
|
|
872
252
|
|