SonarQube API 用于获取严重的安全漏洞
SonarQube API for getting critical security vulnerabilities
是否有可用的 SonarQube API 可以提供安全漏洞和特定严重性的错误(例如:Blocker)。
使用 GET api/issues/search 和 severities
参数。
Search for issues.
At most one of the following parameters can be provided at the same time: componentKeys and componentUuids.
Requires the 'Browse' permission on the specified project(s).
severities
optional
Comma-separated list of severities
Possible values
- INFO
- MINOR
- MAJOR
- CRITICAL
- BLOCKER
Example value: BLOCKER,CRITICAL
更新
为了只检索较新的问题,您可以使用:
sinceLeakPeriod
To retrieve issues created since the leak period.
If this parameter is set to a truthy value, createdAfter must not be set and one component id or key must be provided.
Possible values
- true
- false
- yes
- no
Default value: false
或
createdAfter
To retrieve issues created after the given date (inclusive).
Either a date (server timezone) or datetime can be provided.
If this parameter is set, createdSince must not be set
Example value: 2017-10-19 or 2017-10-19T13:00:00+0200
甚至
createdInLast
To retrieve issues created during a time span before the current time (exclusive). Accepted units are 'y' for year, 'm' for month, 'w' for week and 'd' for day. If this parameter is set, createdAfter must not be set
Example value: 1m2w (1 month 2 weeks)
请注意,这些参数是相互排斥的,sinceLeakPeriod
强制您指定一个组件。有关详细信息和示例,请参阅 API documentation。
是否有可用的 SonarQube API 可以提供安全漏洞和特定严重性的错误(例如:Blocker)。
使用 GET api/issues/search 和 severities
参数。
Search for issues.
At most one of the following parameters can be provided at the same time: componentKeys and componentUuids. Requires the 'Browse' permission on the specified project(s).
severities
optionalComma-separated list of severities
Possible values
- INFO
- MINOR
- MAJOR
- CRITICAL
- BLOCKER
Example value: BLOCKER,CRITICAL
更新
为了只检索较新的问题,您可以使用:
sinceLeakPeriod
To retrieve issues created since the leak period. If this parameter is set to a truthy value, createdAfter must not be set and one component id or key must be provided.
Possible values
- true
- false
- yes
- no
Default value: false
或
createdAfter
To retrieve issues created after the given date (inclusive). Either a date (server timezone) or datetime can be provided. If this parameter is set, createdSince must not be set
Example value: 2017-10-19 or 2017-10-19T13:00:00+0200
甚至
createdInLast
To retrieve issues created during a time span before the current time (exclusive). Accepted units are 'y' for year, 'm' for month, 'w' for week and 'd' for day. If this parameter is set, createdAfter must not be set
Example value: 1m2w (1 month 2 weeks)
请注意,这些参数是相互排斥的,sinceLeakPeriod
强制您指定一个组件。有关详细信息和示例,请参阅 API documentation。