CRITICAL
Rule Definition
Access to a file whose name dset is injected into a program from outside is a serious security risk. Any names passed to a program from outside must be checked thoroughly before being used.
Remediation
Access to a file whose name dset is injected into a program from outside is a serious security risk. Any names passed to a program from outside must be checked thoroughly before being used.
Violation Code Sample
DATA file TYPE string VALUE `/usr/test.Z`.
OPEN DATASET file FOR OUTPUT IN BINARY MODE
FILTER 'gzip'.
...
CLOSE DATASET file.
OPEN DATASET file FOR INPUT IN BINARY MODE
FILTER 'gzip -d'.
...
CLOSE DATASET file.
Reference
https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapopen_dataset_os_addition.htm
Related Technologies
Technical Criterion
CWE-78 - Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.