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

Module Name:

gamma_generic

The supported format(CSV) looks like:

FileLineSeverityDescriptionRuleTag
src/main/java/com/mariten/kanatools/KanaConverter.java26LowThis issue is having low criticality.Custom RuleCWE=146;MISRA=444;CWE=123
src/main/java/com/mariten/kanatools/KanaConverter.java33HighThis issue is having High criticality.Rule-01Tag1
src/main/java/com/mariten/kanatools/KanaConverter.java45lowThis issue is having low criticality.custom Rule 3CWE=231;CWE=867
src/main/java/com/mariten/kanatools/KanaConverter.java25MediumThis issue is having medium criticality.custom Rule-04CWE=453
src/main/java/com/mariten/kanatools/KanaConverter.java 39MediumThis issue is having medium criticality.custom Rule 5NewTag;TagTest1
src/main/java/com/mariten/kanatools/KanaConverter.java43CriticalCritical 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:

Option 1: Run a remote scan.

  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

For more information regarding RemoteScan, please click here.

Option 2: 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
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.