DescribeScanResultsByEngine - 获取任务结果信息
查询任务结果列表的接口,用于获取某次扫描的 SAST 或 SCA 详细结果。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
yundun-codesec:DescribeScanResultsByEngine |
get |
*全部资源
|
无 | 无 |
请求语法
GET /v1/projects/{projectId}/scans/{scanId}/results/{engine} HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| projectId |
integer |
是 |
项目 ID。 |
1 |
| scanId |
integer |
是 |
任务 ID。 |
1 |
| engine |
string |
是 |
类型取值:
枚举值:
|
sca |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| nextToken |
string |
否 |
分页 Token,首页不传 nextToken 省略或为空字符串,翻页原样回传把上一次响应的 nextToken 值不做任何修改地传入下一次请求,响应中 nextToken 为空,已到最后一页 |
eyJ0IjoiMjAyNi0wNy0xNlQwNzo1MzozOC4wMjFaIiwiaSI6MTAwMDQ0OH0 |
| maxResults |
integer |
否 |
每页数量。默认 10,最大支持 50 |
50 |
| baselineState |
string |
否 |
按增量扫描 baseline 状态过滤,可选 new / unchanged / absent / updated 枚举值:
|
unchanged |
| packageName |
string |
否 |
仅 engine=sca 时生效,按组件名模糊查询。 |
app10000006824_fulljoin_61b2c_global_ad_budget_ctrl_v1.5.jar |
| lang |
string |
否 |
语言取值:
|
zh |
| lifecycleStatus |
string |
否 |
仅 SAST 合法,逗号分隔的 new/recurrent/fixed 集合;包含 fixed 时加入当前快照反查的本次修复项,SCA/空值/重复 query 键/开关关闭时传入为 InvalidFilter。 |
new,recurrent |
| dispositionStatus |
string |
否 |
仅 SAST 合法,按项目漏洞当前人工处置过滤;SCA 传入返回 InvalidFilter。 枚举值:
|
pending |
| severity |
string |
否 |
仅 SAST 合法,严重度桶单值筛选,区分大小写;SCA 传入返回 InvalidFilter。 枚举值:
|
HIGH |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| requestId |
string |
Id of the request |
9A1F403F-0A85-5578-8B7C-55E3E9408659 |
| items |
array<object> |
结果列表。 |
|
|
array<object> |
结果信息。 |
||
| projectFindingId |
integer |
关联项目漏洞主键,未合并/上线前/身份不可用时为 null 或省略;不是任务 finding.id,仅 SAST 响应。 |
123456 |
| displayId |
string |
项目显示编号 SAST-{project_finding_id};无关联时为 null 或省略,仅 SAST 响应。 |
SAST-123456 |
| similarityId |
string |
原值持久化的 AgentRun findings[].id,当前实际长度为 72 字符的 opaque 上游 ID,有效值为 1–128 字符;similarity_id 仅为存储兼容字段名,不使用上游 similarity_id,不 hash、不截断或按标题等 fallback。缺失或非法身份为 null 或省略,仅 SAST 响应。 |
9e107d9d372bb6826bd81d3542a419d6 |
| lifecycleStatus |
string |
实际检出项为本任务 new/recurrent;fixed 查询为当前项目快照反查。null/省略表示上线前、尚未合并或身份不可用,不替代 status/baseline_state,仅 SAST 响应。 枚举值:
|
new |
| dispositionStatus |
string |
关联项目漏洞的当前人工处置(不是历史任务处置);无关联为 null 或省略,仅 SAST 响应。 枚举值:
|
pending |
| dispositionRevision |
integer |
关联项目漏洞当前处置版本;有效版本从 1 开始,用于 If-Match,无关联为 null 或省略,仅 SAST 响应。 |
1 |
| detectedInScan |
boolean |
true=本任务实际检出项,false=lifecycle_status=fixed 查询返回的项目快照修复项;false 不应打开本任务 finding 详情,仅 SAST 响应,开关关闭时省略。 |
true |
| id |
integer |
项目 ID |
934 |
| scanId |
integer |
任务 ID。 |
3176 |
| category |
string |
分类, pds 会根据文件的后缀名和 mime-type 对文件进行分类,主要分类有 doc, image, audio, video |
SQL Injection |
| ruleId |
string |
规则 ID。 |
java-sqli-001 |
| severity |
string |
严重等级取值:
|
high |
| title |
string |
问题标题。 |
SQL Injection Risk |
| description |
string |
问题描述。 |
User input is directly concatenated into an SQL statement, which may lead to SQL injection. |
| status |
string |
状态取值:
|
completed |
| source |
string |
来源。 |
todo_open_dingoj06pvqfeayy3lkr |
| confidence |
number |
规则置信度 0–1,SAST 常见,无则省略。 |
1 |
| cweId |
string |
关联 CWE 编号。 |
CWE-601 |
| owaspCategory |
string |
OWASP 类目。 |
A01:2021-Broken Access Control |
| filePath |
string |
文件路径。 |
aone2/2247063/1767838276141/Artifacts_EBookingApps_Pipeline_V2_Staging_131.tgz |
| startLine |
integer |
起始行号。 |
1 |
| endLine |
integer |
结束行号。 |
1 |
| codeSnippet |
string |
主展示位置附近代码片段(SAST)。 |
1 |
| createdAt |
string |
发现记录创建时间(RFC3339) |
2026-07-28T03:36:31.573Z |
| taintFlow |
array<object> |
SAST 污点分析调用链,描述敏感数据从污染源(source)到危险汇聚点(sink)的完整传播路径。(仅 engine=sast ) |
|
|
object |
传播路径。 |
||
| step |
integer |
步骤序号,从 0 开始递增。 |
1 |
| kind |
string |
污点传播链中的角色类型:
|
source |
| file |
string |
文件路径。 |
src/main/java/com/example/UserService.java |
| line |
integer |
行号。 |
111 |
| code |
string |
代码。 |
stmt.executeQuery(sql); |
| note |
string |
备注信息。 |
Sink: SQL query executed |
| taintFlowSummary |
string |
污点调用链的文字总结(仅 engine=sast )。 |
User input flows from HTTP parameter into SQL query executio |
| itemSummary |
string |
该条 finding 的简短总结。与 description 区分,更偏向结论句。 |
User input is used to construct SQL queries without sanitization |
| remediationSuggestion |
string |
修复建议说明。 |
Use PreparedStatement with parameterized queries instead of string concatenation |
| remediationCodeExample |
string |
修复示例代码。 |
String sql = \"SELECT * FROM users WHERE name = ?\";\nPreparedStatement ps = conn.prepareStatement(sql);\nps.setString(1, username);\nResultSet rs = ps.executeQuery(); |
| projectName |
string |
项目名称 |
cdp2cdl_cdp_sha_nprd |
| baselineState |
string |
按增量扫描 baseline 状态过滤,可选 new / unchanged / absent / updated |
new |
| scaComponent |
object |
SCA 组件信息(仅 engine=sca) |
|
| packageName |
string |
组件坐标。 |
org.apache.logging.log4j:log4j-core |
| version |
string |
组件版本。 |
2.14.1 |
| introPaths |
array |
SCA 组件信息中的依赖引入路径列表。(仅 engine=sca 响应中出现) |
|
|
string |
依赖引入路径信息 |
pom.xml:dependencies:org.apache.logging.log4j:log4j-core |
|
| isDirect |
boolean |
是否为直接依赖。 |
false |
| remediation |
string |
组件级修复建议。 |
Upgrade log4j-core to version 2.17.1 or later |
| cveDetails |
array<object> |
SCA 发现中某个组件关联的 CVE 详情列表。 |
|
|
object |
CVE 详情。 |
||
| cveId |
string |
关联 CWE 编号。 |
CVE-2021-44228 |
| cvss |
number |
CVSS 分值。 |
1 |
| cweId |
string |
关联 CWE 编号(可无或空串)。 |
CWE-79 |
| severity |
string |
严重等级取值:
|
critical |
| description |
string |
描述 |
Apache Log4j2 JNDI features do not protect against attacker-controlled LDAP and other JNDI-related endpoints. |
| fixedVersion |
string |
修复目标版本(可无或空串)。 |
1 |
| cvssVersion |
string |
CVSS 版本。 |
v2.0 |
| references |
array |
引用信息 |
|
|
string |
引用列表 |
https://nvd.nist.gov/vuln/detail/CVE-2021-44228 |
|
| cveCount |
integer |
CVE 条数。 |
1 |
| purl |
string |
Package URL(组件在该次扫描内的唯一坐标)。 |
pkg:npm/glob-parent@3.1.0 |
| ecosystem |
string |
组件生态(npm / maven / pypi / go 等)。 |
maven |
| componentType |
string |
组件类型(library / application / framework 等) |
library |
| scope |
string |
依赖作用域(runtime /required / optional / dev 等)。 |
runtime |
| declaredIn |
string |
声明该依赖的清单文件。 |
node_modules/semver |
| license |
object |
许可证判定结果。 |
|
| concluded |
string |
最终采信的许可证表达式(SPDX 表达式,可含 OR / AND);仅标识串,不带全称与 OSI / FSF 标注 |
AFL-2.1 OR BSD-3-Clause |
| detected |
array<object> |
实际扫到的许可证列表。 |
|
|
object |
许可证信息。 |
||
| name |
string |
许可证全称。 |
ISC License |
| isOsiApproved |
boolean |
是否经 OSI 批准。 |
true |
| isFsfLibre |
boolean |
是否被 FSF 列为自由许可证。整键缺失表示未标注,与显式 false 含义不同。 |
true |
| spdxId |
string |
SPDX 许可证标识(无法判定为 NOASSERTION;可能是非规范写法如 Apache 2.0) |
AFL-2.1 |
| totalCount |
integer |
总条数 |
2 |
| maxResults |
integer |
每页数量。 |
10 |
| scanId |
integer |
任务 ID。 |
3088795 |
| projectId |
integer |
项目 ID |
1234567 |
| engine |
string |
类型取值:
枚举值:
|
sca |
| nextToken |
string |
分页 Token,首页不传 nextToken 省略或为空字符串,翻页原样回传把上一次响应的 nextToken 值不做任何修改地传入下一次请求,响应中 nextToken 为空,已到最后一页 |
eyJ0IjoiMjAyNi0wNy0xNlQwNzo1MzozOC4wMjFaIiwiaSI6MTAwMDQ0OH0 |
示例
正常返回示例
JSON格式
{
"requestId": "9A1F403F-0A85-5578-8B7C-55E3E9408659",
"items": [
{
"projectFindingId": 123456,
"displayId": "SAST-123456",
"similarityId": "9e107d9d372bb6826bd81d3542a419d6",
"lifecycleStatus": "new",
"dispositionStatus": "pending",
"dispositionRevision": 1,
"detectedInScan": true,
"id": 934,
"scanId": 3176,
"category": "SQL Injection",
"ruleId": "java-sqli-001",
"severity": "high",
"title": "SQL Injection Risk",
"description": "User input is directly concatenated into an SQL statement, which may lead to SQL injection.",
"status": "completed",
"source": "todo_open_dingoj06pvqfeayy3lkr",
"confidence": 1,
"cweId": "CWE-601",
"owaspCategory": "A01:2021-Broken Access Control",
"filePath": "aone2/2247063/1767838276141/Artifacts_EBookingApps_Pipeline_V2_Staging_131.tgz",
"startLine": 1,
"endLine": 1,
"codeSnippet": "1",
"createdAt": "2026-07-28T03:36:31.573Z",
"taintFlow": [
{
"step": 1,
"kind": "source",
"file": "src/main/java/com/example/UserService.java",
"line": 111,
"code": "stmt.executeQuery(sql);",
"note": "Sink: SQL query executed"
}
],
"taintFlowSummary": "User input flows from HTTP parameter into SQL query executio",
"itemSummary": "User input is used to construct SQL queries without sanitization",
"remediationSuggestion": "Use PreparedStatement with parameterized queries instead of string concatenation",
"remediationCodeExample": "String sql = \\\"SELECT * FROM users WHERE name = ?\\\";\\nPreparedStatement ps = conn.prepareStatement(sql);\\nps.setString(1, username);\\nResultSet rs = ps.executeQuery();",
"projectName": "cdp2cdl_cdp_sha_nprd",
"baselineState": "new",
"scaComponent": {
"packageName": "org.apache.logging.log4j:log4j-core",
"version": "2.14.1",
"introPaths": [
"pom.xml:dependencies:org.apache.logging.log4j:log4j-core"
],
"isDirect": true,
"remediation": "Upgrade log4j-core to version 2.17.1 or later",
"cveDetails": [
{
"cveId": "CVE-2021-44228",
"cvss": 1,
"cweId": "CWE-79",
"severity": "critical",
"description": "Apache Log4j2 JNDI features do not protect against attacker-controlled LDAP and other JNDI-related endpoints.",
"fixedVersion": "1",
"cvssVersion": "v2.0",
"references": [
"https://nvd.nist.gov/vuln/detail/CVE-2021-44228"
]
}
],
"cveCount": 1,
"purl": "pkg:npm/glob-parent@3.1.0",
"ecosystem": "maven",
"componentType": "library",
"scope": "runtime",
"declaredIn": "node_modules/semver",
"license": {
"concluded": "AFL-2.1 OR BSD-3-Clause",
"detected": [
{
"name": "ISC License",
"isOsiApproved": true,
"isFsfLibre": true,
"spdxId": "AFL-2.1"
}
]
}
}
}
],
"totalCount": 2,
"maxResults": 10,
"scanId": 3088795,
"projectId": 1234567,
"engine": "sca",
"nextToken": "eyJ0IjoiMjAyNi0wNy0xNlQwNzo1MzozOC4wMjFaIiwiaSI6MTAwMDQ0OH0"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParameter.%s | Invalid parameter:%s. | 无效的参数:%s。 |
| 400 | NotFound.%s | The resource does not exist. | 资源不存在。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。