Skip to main content

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:

  • Java

  • J2SE

  • J2EE

  • JSP

  • JavaScript

  • VBScript

  • PL\SQL

  • HTML5

  • Java = 2

  • JavaScript = 8

  • VBScript = 64

  • PLSQL = 8192 // PL/SQL

  • ASP.NET

  • JavaScript

  • VBScript

  • PL\SQL

  • HTML5

  • CSharp = 1

  • VB.NET = 32

  • ASP = 128

  • JavaScript = 8

  • VBScript = 64

  • PLSQL = 8192 // PL/SQL

  • ASP

  • JavaScript [**]

  • VBScript

  • PL\SQL

  • HTML5

  • ASP = 128

  • JavaScript = 8

  • VBScript = 64

  • PLSQL = 8192 // PL/SQL

  • VB6

VB6 = 256

  • C/C++

CPP = 4

  • PHP

JavaScript

  • PHP = 512

  • JavaScript = 8

  • Apex

Apex = 16

  • Ruby

Ruby = 1024

  • JavaScript/Typescript

JavaScript = 8

  • Perl

Perl = 2048

  • Android (Java)

  • Objective C

  • Swift

Objc = 4096 // Objective C

  • Python

  • JavaScript

  • VB script

  • PL\SQL

  • Python = 16384

  • JavaScript = 8

  • Groovy

  • JavaScript

  • VB script

  • PL\SQL

  • Groovy = 32768

  • JavaScript = 8

  • Scala

  • GO Language

  • Kotlin

  • Cobol

  • RPG