The generic module is used to import code issues from a file. Regardless of language or combination of languages, if you get your code issues data into the generic format as specified by this module, it will be imported and correctly applied.

Module Name:

gamma_generic

The supported format looks like:

FileSeverityLineDescriptionRuleTag
src/main/java/com/mariten/kanatools/KanaConverter.javaLow26This issue is having low criticality.Custom Rule{"CWE":"146"};{"MISRA":"444"};{"CWE":"123"}
src/main/java/com/mariten/kanatools/KanaConverter.javaHigh33This issue is having High criticality.Rule-01Tag1
src/main/java/com/mariten/kanatools/KanaConverter.javalow45This issue is having low criticality.custom Rule 3{"CWE":"231"};{"CWE":"867"}
src/main/java/com/mariten/kanatools/KanaConverter.javaMedium25This issue is having medium criticality.custom Rule-04{"CWE":"453"}
src/main/java/com/mariten/kanatools/KanaConverter.java Medium39This issue is having medium criticality.custom Rule 5NewTag;TagTest1
src/main/java/com/mariten/kanatools/KanaConverter.javaCritical43Critical custome Rule 8NewTag;TagTest1;Tag_123

Supported severity types :
Critical, High, Medium, Low and Info

Supported input tag formats :

only tag name=   tag1

multiple tag with only name = tag2;tag3

name and value =   “{“CWE”:”330″}”

multiple tag with name and value=  “{“CWE”:”330″};{“CWE”:”200″}”

Usage

There are two ways to run gamma-generic module:

Step 1: Through API

  1. By specifying the path of the CSV file where it is located:
    To specify a path, use the following API:
    POST - api/v1/repositories/{repositoryUid}/config/{moduleType}/{moduleName}
    Refer to this link to get additional information.
  2. By uploading a zip file: Here, the CSV file is zipped and send to API.
    To upload zip use following API:
    POST - api/v1/repositories/{repositoryUid}/upload/{moduleName}
    Refer to this link to get additional information.
  3. Commit CSV files in the source code and then give the relative file path

Step 2: Run scan to get the generic code issues on UI.

  1. Any CSV file name will work

2. By Providing CSV PATH relative to base directory

3. In a remote scan, multiple CSV files can be given with comma-separated paths

Note:
Please refer API documentation to get detailed information on each of these APIs.
Currently, we are supporting this generic module through API and remote scan as well.