A pi coding agent package that integrates the Security Benchmark for Salesforce specification into your development workflow.
When you work on Salesforce projects, the agent automatically detects security-relevant files, surfaces applicable SBS controls, and provides audit, implementation, and review workflows — all grounded in the 25 controls defined by the SBS specification.
pi install git:github.com/sanchezcodes/pi-salesforce-security-benchmarkOr project-local:
pi install git:github.com/sanchezcodes/pi-salesforce-security-benchmark -lThe subagent workflows (/sbs-audit, /sbs-fix, /sbs-review) require the subagent extension. Copy the agent definitions to your agents directory:
cp agents/*.md ~/.pi/agent/agents/Five domain skills loaded on-demand when the agent needs SBS reference material:
| Skill | Controls | Description |
|---|---|---|
sbs-overview |
— | SBS structure, domains, risk levels, regulation mapping |
sbs-access-controls |
SBS-ACS-001 – 012 | Permission sets, profiles, RBAC, NHIs, access reviews |
sbs-code-security |
SBS-CODE-001 – 004 | Peer review, SAST, persistent logging, sensitive data |
sbs-deployments |
SBS-DEP-001 – 006 | Deployment identity, metadata protection, secret scanning |
sbs-file-security |
SBS-FILE-001 – 003 | Public content links, expiry, passwords, periodic review |
Use directly: /skill:sbs-access-controls or let the agent load them automatically.
A TypeScript extension providing active detection and tooling:
| Feature | Description |
|---|---|
| Auto-detection | Detects Salesforce files in your prompt and injects applicable control IDs into context |
sbs_check tool |
LLM-callable tool to look up controls by ID, domain, risk level, or file pattern |
/sbs command |
Interactive browser: /sbs, /sbs access-controls, /sbs SBS-ACS-001 |
| Write monitoring | Notifies you of applicable controls when the agent writes Salesforce metadata |
Specialized agents for formal security workflows (requires subagent extension):
| Prompt | Workflow | Description |
|---|---|---|
/sbs-audit |
scout → sbs-auditor | Full audit of all 25 controls against a project |
/sbs-fix |
sbs-auditor → sbs-implementer → sbs-reviewer | Find gaps, remediate, and validate |
/sbs-review |
sbs-reviewer | Review recent changes for SBS compliance |
Edit a .permissionset-meta.xml and the agent automatically knows SBS-ACS-001 through SBS-ACS-012 may apply. It loads the relevant skill and follows the controls.
What SBS controls apply to Apex classes?
The agent calls sbs_check with the file pattern, finds CODE-001 through CODE-004, and loads the code security skill for details.
/sbs # Overview of all domains
/sbs access-controls # List 12 access control controls
/sbs SBS-DEP-005 # Full details for secret scanning control
/sbs-audit Check all access controls against this org
/sbs-fix Remediate SBS-CODE-004 findings in the logging module
/sbs-review Review the changes in the last commit
25 controls across 4 domains:
| Risk | Count | Controls |
|---|---|---|
| Critical | 4 | SBS-ACS-003, SBS-ACS-006, SBS-CODE-004, SBS-DEP-005 |
| High | 15 | SBS-ACS-001, 002, 004, 005, 007, 008, 011; SBS-CODE-003; SBS-DEP-001–004, 006; SBS-FILE-002 |
| Moderate | 6 | SBS-ACS-009, 010, 012; SBS-CODE-001, 002; SBS-FILE-001, 003 |
Regulation coverage: ISO 27001 (all 25), SOC 2 (17), NIST (15), HIPAA (7), GDPR (11), CCPA/CPRA (7)
This package follows a composable hybrid architecture:
- Skills are the single source of truth for SBS content
- Extension provides intelligence (detection, routing, tooling) — zero context cost
- Agents provide isolated workflows with their own context windows
- Each layer works independently — use only what you need
See docs/ARCHITECTURE_EVALUATION.md for the full design rationale.
When the SBS specification is updated:
- Re-scrape:
firecrawl download https://docs.securitybenchmark.org/ --format markdown --only-main-content --allow-subdomains -y - Update skills with new/modified control content
- Update
extensions/sbs/controls.tswith new control metadata - Update agent prompts if new domains are added
The Security Benchmark for Salesforce is maintained by an editorial board and contributors from the Salesforce and security practitioner communities. SBS is an independent initiative, not affiliated with Salesforce.
ISC