Flex and ActionScript command-line options

Use the following command-line options to translate Flex files. You can also specify this information in the properties configuration file (fortify-sca.properties) as noted in each description.

Flex and ActionScript option Description

-flex-sdk-root <dir>

Specifies the location of the root of a valid Flex SDK. This directory must contain a frameworks folder that contains a flex-config.xml file. It must also contain a bin folder that contains an MXMLC executable.

Equivalent property name:
com.fortify.sca.FlexSdkRoot

-flex-libraries <libs>

Specifies a semicolon-separated (Windows) or a colon-separated (non-Windows) list of library names to which you want to link. In most cases, this list includes flex.swc, framework.swc, and playerglobal.swc (usually found in frameworks/libs/ in your Flex SDK root).

You can specify SWC or SWF files as Flex libraries (SWZ is not currently supported).

Equivalent property name:
com.fortify.sca.FlexLibraries

-flex-source-roots <dirs>

Specifies a semicolon-separated (Windows) or a colon-separated (non-Windows) list of root directories where MXML sources are located. Normally, these contain a subfolder named com.

For example, if the Flex source root specified is foo/bar/src, then foo/bar/src/com/fortify/manager/util/Foo.mxml is transformed into an object named com.fortify.manager.util.Foo (an object named Foo in the package com.fortify.manager.util).

Equivalent property name:
com.fortify.sca.FlexSourceRoots

The -flex-sdk-root and –flex-source-roots options are primarily for MXML translation, and are optional if you are scanning pure ActionScript. Use –flex-libraries for to resolve all ActionScript linked libraries.

OpenText SAST translates MXML files into ActionScript, and then runs them through an ActionScript parser. The generated ActionScript is simple to analyze; not rigorously correct like the Flex runtime model. Consequently, you might get parse errors with MXML files. For instance, the XML parsing might fail, translation to ActionScript might fail, and the parsing of the resulting ActionScript might also fail. If you see any errors that do not have a clear connection to the original source code, notify Customer Support.

Flex and ActionScript Properties