Apex and Visualforce translation prerequisites

To translate Apex and Visualforce projects, make sure that all the source code to scan is available on the same machine where you have installed OpenText SAST.

To scan your custom Salesforce® app, download it to your local computer from your Salesforce organization (org) where you develop and deploy it. The downloaded version of your app consists of:

  • Apex classes in files with the .cls extension
  • Visualforce web pages in files with the .page extension
  • Apex code files called database “trigger” functions in files with the .trigger extension
  • Visualforce component files in files with the .component extension
  • Objects in files with the .object extension

Use the Ant Migration Tool available on the Salesforce website to download your app from your org in the Salesforce cloud to your local computer. Make sure that the project manifest files are set up correctly for the specified target in your build.xml file. For example, the following package.xml manifest file provides OpenText SAST with all classes, custom objects, pages, and components.


<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns=http://soap.sforce.com/2006/04/metadata>
 <types>
 <members>*</members>
 <name>ApexClass</name>
 </types>
 <types>
 <members>*</members>
 <name>ApexTrigger</name>
 </types>
 <types>
 <members>*</members>
 <name>ApexPage</name>
 </types>
 <types>
 <members>*</members>
 <name>ApexComponent</name>
 </types>
 <types>
 <members>*</members>
 <name>CustomObject</name>
 </types>
 <version>55.0</version>
</Package>

Configure the retrieve targets using the Ant Migration Tool documentation. If your organization uses any apps from the app exchange, make sure that these are downloaded as packaged targets.