This guide explains how to deactivate a Kiuwan rule and create a custom model.
Understanding rules and models
When you run a Kiuwan analysis, Kiuwan applies a set of rules to your source code. These rules detect various vulnerabilities and code quality issues, for example, SQL injections or path-traversal vulnerabilities.
Check which model your application uses
If you are using Kiuwan Local Analyzer GUI:
-
Click Advanced to see which model you are using.
A window will be displayed like this:
- Check the Analysis model field value:
- If set to Automatic, CQM is used by default.
- If another model is used, its name will be displayed.
If you are using Kiuwan website:
- Go to Application Management.
- Find your application and select Model from the drop-down menu on the right.
- A window opens with the Model associated with your application:
Create a new model based on CQM model
If you are using CQM and you want to modify it (for example, deactivating a rule), you must follow these steps:
- Create your custom model (most probably as a copy of CQM) - To create your custom model, please follow the instructions detailed at Advanced Model Management
-
Find the rule and deactivate it - Go to the Rules tab of your custom model and find the rule using the filters (Rules Management)
A rule is identified by two fields:
-
By name: For example, “Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')”
-
By rule code: For example, OPT.JAVA.SEC_JAVA.SqlInjectionRule
-
By name: For example, “Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')”
- Click the green circle to deactivate or activate it.
-
Publish your model - All the changes to the model are saved in a Draft version.
To make the changes publicly available, click Publish and provide a version tag.
Once published, any new analysis of an application associated with this model will use this latest version.
-
Associate your application to your custom model and run the analysis again - Find your application in Application Management, click Model, and select the created model.
Now, when you run the analysis of the application, your custom model is used.
Create a new custom model when I already have one
If you are already using a custom model:
- Follow step 2 (Find the rule and deactivate it)
- Publish your model as described above in step 4.
- Re-run your analysis.