Checkmarx不正确的资源访问授权 [英] Checkmarx Improper Resource Access Authorization

查看:923
本文介绍了Checkmarx不正确的资源访问授权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Checkmarx安全工具来扫描我的代码,这就是说,当我对数据库执行"executeUpdate()"命令时,即不正确的资源访问授权".

I am using the Checkmarx security tool to scan my code, it is saying that when I execute executeUpdate() commands to the database that is "Improper Resource Access Authorization."

各种Google搜索都没有成功.

Various Googling with no success.

int rowInserted = preparedStatement.executeUpdate();

推荐答案

添加一些执行访问控制检查的代码,这些代码使用诸如" admin "," authoriz "或"允许"

Add some code that performs access control checks that makes use of words like "admin", "authoriz" or "allowed"

 if (user.equals("admin")){
    int rowInserted = preparedStatement.executeUpdate();
 }

这篇关于Checkmarx不正确的资源访问授权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆