@cclabsnz/sf-audit

A read-only security audit for any Salesforce org, run from the Salesforce CLI (sf): 112 checks, an
A–F grade, and a report your security team (or your client's) can act on.

A sample report from a fictional org, produced by the real checks against synthetic data. Open the
full technical report or the
executive report.
sf plugins install @cclabsnz/sf-audit # warns that it is unsigned: answer y (see Installation)
sf audit security --target-org <orgAlias>
That writes an HTML report to the current directory. Safe to run against production: it only
uses SOQL, Tooling/REST GETs and Metadata API reads, and a test fails the build if a write call
appears in the source (PERMISSIONS.md, Trust & verification).
- Checks: identity, access, data, guest exposure, integrations, code, monitoring and Agentforce. See What It Checks
- Attack chains: findings linked into multi-step attack scenarios: nineteen named chains, plus a pass for combinations nobody has named yet
- Compliance: every finding mapped to 10 frameworks, including SOC 2, ISO/IEC 27001, OWASP, NZISM, HIPAA and GDPR
- CI:
--format sarif for GitHub code scanning, --fail-on to gate a pipeline, and expiring risk waivers
The plugin also has commands to capture the free daily event logs, check connected apps for least
privilege, and investigate guest-user anomalies. See Other commands.
Installation
sf plugins install @cclabsnz/sf-audit
You will be warned that the plugin is not digitally signed. That is expected and says nothing about
this plugin: Salesforce only accepts signing keys served from developer.salesforce.com, so no
third-party plugin can satisfy it. Answer y.
Unattended installs (CI/CD)
To install in CI/CD without the interactive prompt, allowlist the plugin first (sf CLI 2.135.0 or later):
sf plugins trust allowlist add --name @cclabsnz/sf-audit
sf plugins install @cclabsnz/sf-audit
Older CLIs have no allowlist command; docs/INSTALL.md shows the file to write instead.
Verifying provenance
Every release is published from GitHub Actions with a signed npm provenance attestation that
links the tarball to the commit and workflow run that built it. To check a version before
installing it:
npm view @cclabsnz/sf-audit@<version> dist.attestations.provenance.predicateType
# https://slsa.dev/provenance/v1
The package page on npmjs.com shows the same attestation, with a link to the build.
Detailed allowlisting and local development setup are in docs/INSTALL.md.
Since "trust us" is a poor answer from a tool that authenticates against your production org, the
guarantees here are checkable rather than asserted — see Trust & verification.
Usage
sf audit security --target-org <orgAlias>
Runs all 112 checks and writes an HTML report to the current directory. sf audit list prints every
check id.