Skip to content

Avoid Dangerous & Dynamic Native Statements ​

WarningSecurity & Robustness#EC DANGEROUS_STMTRemote Enabled

Overview ​

Dangerous Statements (abaplint dangerous_statement).

ATC Finding Messages:

  • Dangerous statement detected; avoid dynamic/unmanaged language construct
  • Avoid RAISE SHORTDUMP; prefer graceful class-based exceptions
  • Avoid native ASSERT in production logic; raise an exception instead

Rationale ​

Dynamic report generation, kernel calls, native SQL, and production ASSERT or RAISE SHORTDUMP bypass the ABAP runtime and its security model. They are not available in ABAP Cloud and can introduce injection risks or portability problems. Use supported ABAP SQL and class-based APIs instead.

Non-Compliant ​

abap
EXEC SQL.
  SELECT * FROM /dmo/customer INTO :wa.
ENDEXEC.

Compliant ​

abap
SELECT customer_id FROM /dmo/customer INTO TABLE @lt_customer_ids.

Configuration & Thresholds ​

This check can be fine-tuned directly in the ATC Check Variant Editor (CHKV) in Eclipse ADT:

Parameter NameData TypeDefault Value
CHECK_EXEC_SQLBooleantrue
CHECK_KERNEL_CALLBooleantrue
CHECK_SYSTEM_CALLBooleantrue
CHECK_SYNTAX_CHECKBooleantrue
CHECK_INSERT_REPORTBooleantrue
CHECK_GENERATE_DYNPROBooleantrue
CHECK_GENERATE_REPORTBooleantrue
CHECK_GENERATE_SUBROUTINEBooleantrue
CHECK_DELETE_REPORTBooleantrue
CHECK_DELETE_TEXTPOOLBooleantrue
CHECK_INSERT_TEXTPOOLBooleantrue
CHECK_DELETE_DYNPROBooleantrue
CHECK_EXPORT_DYNPROBooleantrue
CHECK_EDITOR_CALLBooleantrue
CHECK_DYNAMIC_SQLBooleantrue
CHECK_RAISE_SHORTDUMPBooleantrue
CHECK_PROD_ASSERTBooleantrue
IGNORE_RAP_QUERY_PROVIDERBooleantrue

Suppression ​

To suppress findings for this rule, append the pseudo-comment to the statement:

abap
" Standard pseudo-comment:
... "#EC DANGEROUS_STMT

" SAP CI_ prefix format:
... "#EC CI_DANGEROUS_STMT

Technical Details ​

Released under the MIT License.