Salesforce code security

Salesforce Apex static code analysis

Scan Salesforce Apex code for SOSL injection, cross-site scripting, hardcoded passwords, keys and salts, and calls that disable CRUD security. Apex findings land in the same platform and report as the rest of your code.

Fix advice
Every finding with severity, fix recommendation and code location
43
languages in one platform, with one severity scale and one report format
On-premise
or cloud: choose where the source code and findings live

In short

DerScanner static application security testing (SAST) scans Apex, the programming language of the Salesforce platform. Its Apex rules are published in the DerScanner vulnerability database, and most of them map to CWE, OWASP Top 10 and PCI DSS 4.0.

The rules flag SOSL injection, cross-site scripting, hardcoded or empty passwords, keys, salts and initialization vectors, weak hashing and random numbers, plain HTTP, cookie settings, and calls to Configuration.disableTriggerCRUDSecurity().

Apex is scanned in the same platform as the other supported languages, on-premise, in air-gapped networks or in the cloud.

What the Apex rules check

The Apex rules focus on queries built from user input, output rendered in the browser, and secrets kept in the code. Each rule links to its description, CWE identifiers and fix recommendation.

Injection and disabled security

SOSL queries built from untrusted data, cross-site scripting in rendered output, and Configuration.disableTriggerCRUDSecurity(), which turns off CRUD security and leaves validation to manual code.

Passwords, keys and salts

Secrets written into the code or left empty or null.

Cryptography

Weak hashing, weak HMAC and predictable random numbers.

Transport, cookies and hidden activity

Plain HTTP calls, cookie settings and undocumented network activity.

See all Apex rules in the vulnerability database

Where Apex code runs

Apex runs on the Salesforce platform, next to customer and sales data. A query built from user input or a disabled security check can expose that data.

Teams that already scan Java or JavaScript can add Apex classes to the same static analysis project and get findings in the same format and severity scale.

How Apex code reaches the scanner

DerScanner reads source code as it is, from a repository or an archive. Apex classes kept in version control go into a static analysis project like any other language.

Scans can run from CI/CD pipelines such as Jenkins, TeamCity, Azure DevOps and GitLab CI, or through the CLI and Open API.

Questions buyers ask about Apex static code analysis

Try DerScanner on your own code, free

Scan your own Apex code and see what DerScanner finds in it.

Request a free pilot. We give you access and help with the first scan. It works in the cloud and on-premise.

Want to describe your project first? Take the 2-minute PoC survey

Get Started

Make Your Applications
Secure Today

Sign up for a personalized demo to see
how DerScanner can meet your Application Security needs

dashboard