sonarqube - 在 SonarQube 中的项目上自动设置 Checkmarx 配置
问题描述
亲爱的 stackoverflow 社区;
我使用:SonarQube 6.7.6 和 Checkmarx 插件:8.60.0
我需要在安全分析期间使用 Checkmarx 信息在 SonarQube 中配置我的项目,以便在 SonarQube 分析步骤中,它可以检索它们并使用所有 Checkmarx 分析数据填充项目。
如为 Checkmarx SonarQube 插件配置项目中所述。
我可以手动完成,但最好是我的管道自动完成。例如,我如何通过 Rest Api 在 SonarQube 分析(服务器网址、用户名、密码等)之前设置此项目配置,或使用一些分析属性,以便可以自动获取它们。
我在 SonarQube 上找不到 Rest Api 来做到这一点。
谁能帮我 ?
非常感谢。沃宁
解决方案
Checkmarx 设置可以通过多次发布调用在 SonarQube 中进行配置
邮政/api/settings/set?component=${sonarProjectKey}
component=${sonarProjectKey}
key=checkmarx.server.credentials.secured
value={
cxServerUrl: ${cxServerUrl},
cxUsername: ${cxUser},
cxPassword: ${cxPassword}
}
component=${sonarProjectKey}
key=checkmarx.server.project_name.secured
value=${projectName}
component=${sonarProjectKey}
key=checkmarx.server.remediation
value=${minutes}
获取相应的键和值
得到/api/settings/values?keys=checkmarx.server.remediation&component=${sonarProjectKey}
推荐阅读
- r - 获取 tall 数据集中分组值之间的差异
- javascript - 如何通过jquery将两个js数组传递给PHP
- c# - opengl 最简单的帧缓冲示例是什么?
- numpy - 根据网格在 3D 中排序点
- apexcharts - 如何将 ApexCharts 烛台图表与同一图表中的多条线结合起来
- r - 在 R 中使用 AND 和 OR 布尔运算符检测字符串
- database - 表 DDL 元数据的最后修改时间
- php - 使用 xpath 获取元素的最小/最大值
- java - Spring-Boot:错误注入多个bean
- ms-access - System.Data.Odbc.OdbcException (0x80131937) 发布后,我无法使用 Odbc 功能读取、删除和写入访问 mdb 文件