Default Definer Rights in Method Definition

Viewed 1042

In Checkmarx report, I'm getting the below:

Default Definer Rights in Method Definition.

It has highlighted a case statement(shown beow)

case when v_risk='RISK' then 'Y' else 'N'

Please let me know what the issue is and what needs to be done to resolve this? Note: authid current_user is already added in the package.

1 Answers

This finding can be solved by adding AUTHID CURRENT_USER clause in your procedure or function where your case statement is in

create or replace procedure sample_procedure
authid current_user
as
begin

...
case when v_risk='RISK' then 'Y' else 'N'
Related