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:
File | Severity | Line | Description | Rule | Tag |
---|---|---|---|---|---|
src/main/java/com/mariten/kanatools/KanaConverter.java | Low | 26 | This issue is having low criticality. | Custom Rule | {"CWE":"146"};{"MISRA":"444"};{"CWE":"123"} |
src/main/java/com/mariten/kanatools/KanaConverter.java | High | 33 | This issue is having High criticality. | Rule-01 | Tag1 |
src/main/java/com/mariten/kanatools/KanaConverter.java | low | 45 | This issue is having low criticality. | custom Rule 3 | {"CWE":"231"};{"CWE":"867"} |
src/main/java/com/mariten/kanatools/KanaConverter.java | Medium | 25 | This issue is having medium criticality. | custom Rule-04 | {"CWE":"453"} |
src/main/java/com/mariten/kanatools/KanaConverter.java | Medium | 39 | This issue is having medium criticality. | custom Rule 5 | NewTag;TagTest1 |
src/main/java/com/mariten/kanatools/KanaConverter.java | Critical | 43 | Critical | custome Rule 8 | NewTag;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
- 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. - 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. - 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.
- 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
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.