Skip to content

Avoid DUMMY Authorization Checks ​

ErrorSecurity & Robustness#EC NO_DUMMY_AUTHRemote Enabled

Overview ​

Avoid AUTHORITY-CHECK with the DUMMY addition.

ATC Finding Message: AUTHORITY-CHECK DUMMY never checks the field; supply FIELD and evaluate sy-subrc

Rationale ​

The DUMMY addition turns AUTHORITY-CHECK into a no-op: the runtime accepts the statement without evaluating the authorization object, so the protected operation runs for every user. Such dummy checks are frequently added to satisfy scanners or to unblock a test and then remain in production. Remove the DUMMY addition and evaluate sy-subrc so the authorization is genuinely enforced.

Non-Compliant ​

abap
AUTHORITY-CHECK OBJECT 'Z_FI_BUKRS'
  ID 'BUKRS' DUMMY.

Compliant ​

abap
AUTHORITY-CHECK OBJECT 'Z_FI_BUKRS'
  ID 'BUKRS' FIELD lv_bukrs.
IF sy-subrc <> 0.
  RAISE EXCEPTION NEW zcx_no_authorization( ).
ENDIF.

Suppression ​

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

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

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

Technical Details ​

Released under the MIT License.