Delivering code in production with debug features activated is security-sensitive. It has led in the past to the following vulnerabilities:
The DEBUG
and DUMP
statements are useful during development and debugging, but could expose sensitive information to
attackers and should not be included in production code.
Ask Yourself Whether
- the code or configuration enabling the application debug features is deployed on production servers or distributed to end users.
- the application runs by default with debug features activated.
There is a risk if you answered yes to any of those questions.
Recommended Secure Coding Practices
Do not enable debug features on production servers or applications distributed to end users.
Sensitive Code Example
H*-------------------------------------------------------------------------
H DATEDIT(*YMD) DEBUG(*YES)
H**************************************************************************
C SR990 BegSR
C 'CVTERR' DUMP DUMP for error
C Move *on *INLR
Compliant Solution
H*-------------------------------------------------------------------------
H DATEDIT(*YMD)
H**************************************************************************
C SR990 BegSR
C Move *on *INLR
See