【问题标题】:Improper Resource Access Authorization in JPA repositoryJPA 存储库中的资源访问授权不正确
【发布时间】:2020-01-20 09:46:48
【问题描述】:

我有以下 JPA 存储库代码:

@RepositoryRestResource(path="attributes",itemResourceRel="attribute",excerptProjection=AttributeHeaderProjection.class,exported = false)
public interface AttributeHeaderDataRestRepository extends JpaRepository<AttributeHeader, String> {

    @Query(" SELECT HDR FROM AttributeHeader HDR, AttributeObject OBJ "
            + "WHERE HDR.attribute=OBJ.attribute "
            + " AND OBJ.objName= ?1 ")
    List<AttributeHeader> byName( String name);
}

我来了

“资源访问授权不当”

上述代码的 CheckMarx 问题。

如何解决此类 CheckMarx 问题?

【问题讨论】:

标签: spring-boot jpa repository checkmarx


【解决方案1】:

能否请您从存储库级别删除 @RepositoryRestResource 并使其成为可能工作的普通 jpa 存储库。

【讨论】:

  • 这无济于事。
猜你喜欢
  • 1970-01-01
  • 2018-10-11
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-01-31
  • 1970-01-01
  • 2013-05-31
相关资源
最近更新 更多