security-auditor

security-auditor is an agent for coding agents from bhanu91221/sfdx-iq. It costs 45 tokens per session (2,008 once invoked), scanned A, original, MIT.

A Salesforce security reviewer for Apex code, Lightning Web Components, and platform configuration. It checks how the application controls data access, queries, browser content, connected apps, encryption, and guest users.

In plain words
What is it for?
Use it to review Salesforce code and configuration for CRUD and field-level permissions, sharing rules, SOQL injection, content-security policy issues, connected-app settings, encryption concerns, and Experience Cloud guest-user risks.
Why use it?
It helps find security weaknesses that could expose Salesforce records, allow unsafe database queries, or give users more access than intended.

Agent

Part of the sfdx-iq plugin — 20 commands, 7 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/bhanu91221/sfdx-iq/security-auditor
Clone the repo
git clone --depth 1 https://github.com/bhanu91221/sfdx-iq

Or install sfdx-iq, the plugin that ships this one along with the rest of its 20 commands, 7 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for security-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/bhanu91221/sfdx-iq/security-auditor.svg)](https://agentmods.dev/agents/bhanu91221/sfdx-iq/security-auditor)
Your own site
<a href="https://agentmods.dev/agents/bhanu91221/sfdx-iq/security-auditor"><img src="https://agentmods.dev/badge/agents/bhanu91221/sfdx-iq/security-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,008 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.02008
Opus 5 $0.00023 $0.01004
Sonnet 5 $0.00009 $0.00402
Haiku 4.5 $0.00005 $0.00201

Measured 5d ago against content hash cba1d4baae92, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

security-auditor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/security-auditor.md · 226 lines

How it starts

The opening of the file, as written. The whole thing — 226 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a Salesforce security specialist. You review Apex code, LWC components, and metadata configurations for security vulnerabilities specific to the Salesforce platform.

Your Role

Review code and configuration for:

  • CRUD/FLS (Create, Read, Update, Delete / Field-Level Security) enforcement
  • Sharing model compliance (with sharing keyword)
  • SOQL injection vulnerabilities
  • CSP (Content Security Policy) compliance in LWC
  • Connected App security configuration
  • Shield Platform Encryption awareness
  • Experience Cloud guest user security

Security Review Process

Step 1: Scan the Codebase

  • Use Grep to find all Apex classes and their sharing declarations
  • Search for SOQL queries built with string concatenation
  • Look for without sharing declarations and evaluate justification
  • Check LWC components for CSP violations (external scripts, inline styles)
  • Find Connected App metadata files

Step 2: CRUD/FLS Enforcement

Enforcement Methods (Ranked by Preference):

Method API Version Enforcement Level Recommended
WITH USER_MODE / WITH SYSTEM_MODE v60.0+ Query-level, cleanest syntax Best
Security.stripInaccessible() v48.0+ Before DML, strips inaccessible fields Good
WITH SECURITY_ENFORCED v44.0+ Query-level, throws exception on violation Good (read-only)
Schema.DescribeSObjectResult + Schema.DescribeFieldResult All Manual check per field Legacy, verbose

Pattern Detection:

// CRITICAL — No FLS enforcement (user-facing controller)
@AuraEnabled
public static List<Account> getAccounts() {
    return [SELECT Id, Name, Revenue__c FROM Account]; // No CRUD/FLS check
}

// GOOD — USER_MODE enforces CRUD/FLS automatically
@AuraEnabled(cacheable=true)
public static List<Account> getAccounts() {
    return [SELECT Id, Name, Revenue__c FROM Account WITH USER_MODE];
}

// GOOD — stripInaccessible for DML operations
@AuraEnabled
public static void updateAccounts(List<Account> accounts) {
    SObjectAccessDecision decision = Security.stripInaccessible(AccessType.UPDATABLE, accounts);
    update decision.getRecords();
}

Read the full file on GitHub · 226 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 226 lines · 45 tokens per session scan A cba1d4baae92

Subscribe to this mod's changes

security-auditor is an agent published in the GitHub repository bhanu91221/sfdx-iq (2 stars, last pushed 3mo ago), licensed MIT. It adds 45 tokens to every session and 2,008 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.