Specifying a Code Language for Scanning
Notice
The following options are provided for Checkmarx One users from Settings → SAST → LanguageMode
primary - scans one primary language
multi - scans multiple primary languages
In this context, the term “primary code language” refers to the main language used in a program being scanned. The term “secondary code language” refers to any scripting or supportive code language used in the program. The table below, lists common primary code languages and the secondary code languages commonly associated with them. The table also lists the number codes used to specify the languages.
The following code language scanning options are available:
One Primary Code Language
Scans projects for the primary language type with the most files in the project. The associated secondary languages will also be scanned.
For example, with the one primary code language option setting a project with 100 Java files, 50 Python files, and 60 JavaScript files, will only have the Java and JavaScript files scanned.
All Primary Code Languages
Scans all code languages, including all the associated secondary languages.
For example, with the all primary code languages option setting, for the same project described above containing 100 Java files, 50 Python files, and 60 JavaScript files, all the languages, Java, Python, and JavaScript will be scanned.
Matching Sets of Code Languages
Scans projects for one or more matching sets of code language types. Either primary or secondary languages or both can be specified using the Language IDs listed in the table below. When specifying sets, sets are separated by semi-colons (;) and languages within the sets are separated by commas (,).
For example, with the matching sets of code language option setting, if the following sets of Language IDs, are specified: 2,8;4,2048; a project with 100 Java files, 75 C++ files, 25 Perl files, 50 Python files, and 60 JavaScript files, will only have the Java, JavaScript, C++ and Perl files scanned.
Selected Code Languages
Scans projects for one or more selected code language types. Either primary or secondary languages or both can be specified using the Language IDs listed in the table below.
For example, with the selected code language option setting, if the Language IDs, 8 and 16384 are specified, the project with 100 Java files, 50 Python files, and 60 JavaScript files, will only have the JavaScript and Python files scanned.
The following code languages can be scanned using CxSAST:
Primary Languages | Secondary Languages | Language IDs: |
---|---|---|
|
|
|
|
|
|
|
|
|
| VB6 = 256 | |
| CPP = 4 | |
| JavaScript |
|
| Apex = 16 | |
| Ruby = 1024 | |
| JavaScript = 8 | |
| Perl = 2048 | |
| ||
| Objc = 4096 // Objective C | |
|
|
|
|
|
|
| ||
| ||
| ||
| ||
|