Ir al contenido

Security Scan Report

This content is for the 1.0 version. Switch to the latest version for up-to-date documentation.

Esta página aún no está disponible en tu idioma.

ToolVersionPurpose
Salesforce Code Analyzer v5LatestApex/LWC security analysis
PMD (incl. AppExchange rules)v5Code quality & security
ESLintv5JavaScript/LWC analysis
RetireJSv5Vulnerable JS libraries
Partner Security Portal (Checkmarx)LatestMandatory source scan
Terminal window
# Install Salesforce CLI
npm install -g @salesforce/cli
# Install Code Analyzer v5 plugin
sf plugins install @salesforce/plugin-code-analyzer
Terminal window
# Run all rules with HTML output
sf code-analyzer run --workspace force-app --output-file docs/scan-results.html
# Run AppExchange-specific rules
sf code-analyzer run --rule-selector AppExchange --workspace force-app --output-file docs/scan-appexchange.html
# Run Security-tagged rules only
sf code-analyzer run --rule-selector Security --workspace force-app --output-file docs/scan-security.html
# Fail on High or Critical (CI/CD)
sf code-analyzer run --rule-selector AppExchange --workspace force-app --severity-threshold 2 --output-file docs/scan-appexchange.html
  • isCreateable() check before INSERT
  • isUpdateable() check before UPDATE
  • isDeletable() check before DELETE
  • Field-level permissions via Permission Sets
  • Bind variables used for user input
  • String.escapeSingleQuotes() for dynamic queries
  • Object names derived from Salesforce IDs (not user input)
  • with sharing on main controllers
  • without sharing only where documented and necessary
  • Share records respect OWD settings
  • No eval() or dynamic script execution
  • User input sanitized before display
  • No hardcoded credentials
CheckStatusNotes
HTTP CalloutsN/APackage makes no external calls
Named CredentialsN/ANot used
External ObjectsN/ANot used
Remote Site SettingsN/ANot required
CSP ViolationsPassNo Content-Security-Policy violations
ClassCoverageStatus
ObjectTeamMemberController>75%Pass
TeamMemberWizardController>75%Pass
ShareRecordQueueable>75%Pass
SharingRecalculationBatch>75%Pass
ExpiredTeamMemberCleanupBatch>75%Pass
ObjectTeamMemberTriggerHandler>75%Pass
PostInstallHandler>75%Pass
Overall>75%Pass
Terminal window
# Run all tests with coverage
sf apex run test --code-coverage --result-format human --target-org [ORG_ALIAS]
# Run specific test class
sf apex run test --tests ObjectTeamMemberTest --code-coverage --result-format human --target-org [ORG_ALIAS]

Scanner Commands Reference (Code Analyzer v5)

Section titled “Scanner Commands Reference (Code Analyzer v5)”
Terminal window
# List available rules
sf code-analyzer rules
# List AppExchange rules only
sf code-analyzer rules --rule-selector AppExchange
# Run with specific rule selector
sf code-analyzer run --rule-selector Security --workspace force-app
# Export to various formats
sf code-analyzer run --workspace force-app --output-file results.html
sf code-analyzer run --workspace force-app --output-file results.sarif