CVA is a licensed SAP tool to scan custom code for potential security issues.
CVA is built in code inspector and analysis is run via the ATC tool.
Questions that will be answered in this blog are:
- What checks does CVA perform?
- How to activate CVA?
- Is CVA licensed?
- Where to find more information on CVA?
Activating CVA
SAP CVA Code Vulnerability Analysis is a licensed tool. You need to activate it before you can use it. To activate run program RSLIN_SEC_LICENSE_SETUP:
The activation refers to OSS note 1855773 – Security checks for customer-specific ABAP programs which explains the license, restrictions, etc.
Call to SAP: if you really think security is important for your customers and their custom programs, don't ask money for CVA tool, but allow free usage!
Check the bug fix OSS notes below. Apply them before your first run.
Checks in detail
The SAP CVA checks can be seen in SCI variant SLIN_SEC:
And then open the variant and click the information button for details:
A full list of checks can also be found on this SAP blog.
And per netweaver version the checks are listed in OSS note 1921820 – SAP Code Vulnerability Analyzer – support package planning.
Setting up ATC variant and run
Start transaction ATC and press Schedule Run:
First create a new variant and refer to SCI variant SLIN_SEC:
Now schedule the run for your Z code:
The run can take a few hours.
More on ATC set up and running can be found in this blog.
Run results
Start transaction ATC and go to the results part:
Select your run:
The ATC result screen will show, but list can be very long:
Both Z programs and user exits will be shown (starting with S or X).
Press the Statistics View button top right to get a better overview:
The result list is now sorted per security item:
Don't let yourself be impressed by high numbers of the first run. Most issues are in old code: consider clean up. Focus on the priority 1 and priority 2 first. Finetune result set for priority 3 to lower the numbers.
Now you can zoom in to the issue per item by clicking on the line:
The details show the issue: hard coded user name. Clicking on the underlined code name in column Object Name will zoom into the code point to fix:
In this case hard coded break for a user. Fix is easy: delete the line of code.
Remote analysis
It is possible to use ATC remote analysis (see blog) for CVA. The full setup is explained in this SAP online help link. See also OSS note 2232083 – ATC/CI: SAP NetWeaver Application Server add-on for code vulnerability analysis – remote check runs – installation.
Checking license usage
Run program RSLIN_SEC_LICENSE_SETUP to check license usage:
Or run this from transaction SLIN_ADMIN.
SAP reference material
Generic presentation on SAP CVA can be found on this link.
CVA FAQ: follow this link.
CVA full list of checks: follow this link.
CVA as part of CI/CD development pipeline: follow this link.
ABAP code security issues explained: follow this link.
Bug fix and improvement notes
Bug fix and improvement OSS notes:
- 2540692 – Termination ASSERTION_FAILED in extended program check and CVA
- 2586349 – Termination ASSERTION_FAILED in extended program check and CVA
- 2700384 – Improved program analysis in CVA
- 2872724 – Termination ASSERTION_FAILED in SAP Code Vulnerability Analyzer
- 2943345 – Termination ITAB_LINE_NOT_FOUND in CVA
- 2990342 – Termination ASSERTION_FAILED in SAP Code Vulnerability Analyzer
- 2994926 – Termination ITAB_LINE_NOT_FOUND in extended program check and SAP Code Vulnerability Analyzer
- 2998008 – CVA: Authorization object S_RFC for check 11A2 – “Potentially missing authorization check in an RFC function module”
- 3016369 – CVA: Improvements for 11A1 and 11A2 checks
- 3041255 – CVA: Improvement of 1163-check
- 3068215 – CVA: SQL Injection (1101) message because of FREE_SELECTIONS_INIT
- 3109562 – CVA/SLIN: Internal extensions and update of virtual resources interface for central check system
- 3118790 – Termination ITAB_LINE_NOT_FOUND in extended program check and SAP Code Vulnerability Analyzer
- 3196737 – Termination ASSERTION_FAILED in extended program check and SAP Code Vulnerability Analyzer
- 3199666 – CVA: Improvements for 110A check
- 3220428 – Incomplete results for CVA checks
- 3229225 – Termination ASSERTION_FAILED in extended program check and SAP Code Vulnerability Analyzer
- 3229786 – Termination ASSERTION_FAILED in extended program check and SAP Code Vulnerability Analyzer
- 3230003 – Termination ASSERTION_FAILED in SAP Code Vulnerability Analyzer
- 3232321 – Proper ATC check failure for missing license
- 3242585 – Termination ASSERTION_FAILED in SAP Code Vulnerability Analyzer
- 3246810 – CVA: Improvements for 11A1 and 11A2 checks
- 3256689 – CVA: Missing or incorrect error message in transactions ATC when starting the CVA check for BSP applications
- 3265763 – Termination ASSERTION_FAILED in SAP Code Vulnerability Analyzer
- 3267929 – Termination ITAB_LINE_NOT_FOUND in CVA
- 3272764 – Incomplete results for CVA checks
- 3273370 – Termination ASSERTION_FAILED in extended program check and SAP Code Vulnerability Analyzer
- 3277303 – Termination ASSERTION_FAILED in extended program check and SAP Code Vulnerability Analyzer
- 3282388 – Termination ITAB_LINE_NOT_FOUND in extended program check and SAP Code Vulnerability Analyzer
- 3298332 – Termination ASSERTION_FAILED or ITAB_LINE_NOT_FOUND in extended program check and SAP Code Vulnerability Analyzer
- 3299378 – Termination ASSERTION_FAILED or ITAB_LINE_NOT_FOUND in extended program check or SAP Code Vulnerability Analyzer
- 3303874 – Abbruch ITAB_LINE_NOT_FOUND in der Erweiterten Programmprüfung und im CVA
- 3306896 – Termination ASSERTION_FAILED in SAP Code Vulnerability Analyzer
- 3312299 – Termination ASSERTION_FAILED in extended program check and SAP Code Vulnerability Analyzer
- 3314316 – Termination ASSERTION_FAILED in extended program check
- 3315151 – Termination ASSERTION_FAILED in SAP Code Vulnerability Analyzer
- 3315780 – Unjustified message MES 0601 for extended program check
- 3318635 – CVA 0821: New allowed user name SAP_WFRT and incomplete results
- 3319920 – CVA: ATC Check Failure for BSP-Application
- 3320099 – CVA: New checks for incorrect validation via CL_ABAP_DYN_PRG
- 3324588 – Termination ITAB_LINE_NOT_FOUND in CVA