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.
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.
- mediumHardcoded password
- mediumEmpty password
- lowNull password
- criticalHardcoded encryption key
- criticalEmpty encryption key
- mediumNull encryption key
- mediumHardcoded salt
- criticalEmpty salt
- mediumNull salt
- criticalHardcoded initialization vector
Cryptography
Weak hashing, weak HMAC and predictable random numbers.
- criticalWeak hashing algorithm
- criticalHMAC using weak hashing algorithm
- mediumWeak random number generator
Transport, cookies and hidden activity
Plain HTTP calls, cookie settings and undocumented network activity.
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
DerScanner SAST scans Apex with rules from its vulnerability database. They cover 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 that disable CRUD security.
Yes. The rule SOSL injection flags SOSL queries built from untrusted data, which can be used to bypass authentication or read all records the code can reach.
Disabling CRUD security opens the door to attacks and leaves validation to manual code. The rule Using an insecure method marks every call so that it can be reviewed.
Yes. Apex is one of the 43 supported languages. Apex, Java and JavaScript findings land in the same project, with one severity scale and one report format.
Most Apex rules list CWE identifiers and map to OWASP Top 10, OWASP ASVS and PCI DSS 4.0; many also map to HIPAA. The mapping is shown on each rule page in the vulnerability database.
Yes. DerScanner installs on-premise, including fully air-gapped networks, or runs in the cloud. Source code, scan results and reports stay on internal servers in an on-premise installation.
Yes. Request a free pilot on this page: the team gives you access and helps with the first scan. The pilot works in the cloud and on-premise.
Static analysis for other enterprise languages
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
Make Your Applications
Secure Today
Sign up for a personalized demo to see
how DerScanner can meet your Application Security needs

