跳转到内容

组件

查询组件列表

基本信息

  • Path:{{ host }} /cleansourcesca-community/component/list
  • Method:POST

请求参数

Headers

参数名称参数值
Content-Typeapplication/json

Body

参数名称说明in是否必须类型schema
req组件列表查询参数bodytrueMappingComponentQueryReqMappingComponentQueryReq

schema属性说明

MappingComponentQueryReq

参数名称说明in是否必须类型schema
componentName组件名称bodyfalsestring
componentVersion组件版本bodyfalsestring
licenseTypeList许可证类型 [1, 2, 3],1:宽松型,2:弱传染性,3:强传染型bodyfalsearray
pageNumbodyfalseint32
pageSizebodyfalseint32
repairSuggestionLevel修复建议等级筛选项:全部(0),强烈建议修复(1)、建议修复(2)、可选修复(3)、无风险(4)bodyfalseint32
taskInstanceId任务实例IDbodytrueint64
vendor组件厂商bodyfalsestring
vulLevelList漏洞等级 ["CRITICAL", "HIGH", "MEDIUM", "LOW"]bodyfalsearray
riskType组件风险类型:全部(0),安全风险(1)、合规风险(2)bodyfalseint32
matchingWayFilterList【匹配方式】+【依赖方式】筛选项,枚举有3种: 文件(file),直接依赖(direct),传递依赖(indirect)bodyfalsearraystring

请求示例

json
{
	"componentName": "",
	"componentVersion": "",
	"licenseTypeList": [],
	"pageNum": 0,
	"pageSize": 0,
	"repairSuggestionLevel": 1,
	"taskInstanceId": 0,
	"vendor": "",
	"vulLevelList": []
}

响应数据

响应状态码

状态码说明schema
100000OKCommonResult
201Created
401Unauthorized
403Forbidden
404Not Found
100005系统异常
120003未找到任务执行实例
150000未找到组件信息
  • 操作成功响应状态码:100000

  • 错误码描述:

    • 100005:系统异常!

    • 120003:未找到任务执行实例

    • 150000:未找到组件信息

响应参数

参数名称说明类型schema
codestring
dataCommonPage«MappingComponentQueryResp»CommonPage«MappingComponentQueryResp»
messagestring
successboolean

schema属性说明

CommonPage«MappingComponentQueryResp»

参数名称说明类型schema
listarrayMappingComponentQueryResp
pageNumint32
pageSizeint32
totalint64
totalPageint32

MappingComponentQueryResp

参数名称说明类型schema
componentId组件IDstring
componentName组件名称string
componentVersion组件版本string
isEol组件是否停止维护,0:否;1:是int32
isExclusive是否只有CSSA独家漏洞,0:否;1:是int32
licenseRelationExpression许可证关系表达式arrayLicenseRelationExpressionItemDTO
licenseTypeList许可证类型信息arrayLicenseTypeDTO
repairSuggestionLevel修复建议等级:强烈建议修复(1)、建议修复(2)、可选修复(3)、无风险(4)int32
matchingWayList匹配方式 ["file"]array
programingLanguageList编程语言列表array
taskId任务IDint64
taskInstanceId任务实例IDint64
vendor组件厂商string
vulCriticalCount超危漏洞数int32
vulHighCount高危漏洞数量int32
vulLowCount低危漏洞数量int32
vulMediumCount中危漏洞数量int32
programingLanguageList编程语言列表["Python"]arraystring

LicenseTypeDTO

参数名称说明类型schema
licenseName组件许可证名称string
licenseType许可证类型 [1, 2, 3],1:宽松型,2:弱传染性,3:强传染型string
seriesName系列-名称string

LicenseRelationExpressionItemDTO

参数名称说明类型schema
level表达式项展示层级int32
type表达式项类别,license-许可证,logical-逻辑运算符,openBracket-左括号,closeBracket-右括号string
value表达式项值string
uid表达式项值唯一键string

成功响应示例

json
{
  "code": "100000",
  "message": "Operation succeeded.",
  "data": {
    "pageNum": 1,
    "pageSize": 1,
    "totalPage": 404,
    "total": 404,
    "list": [
      {
        "taskId": null,
        "taskInstanceId": null,
        "componentId": "afd6aed13591e9978301231d25a6a2d2",
        "componentName": "actuator-sofa-boot-starter",
        "componentVersion": "",
        "vendor": "com.alipay.sofa",
        "isEol": 0,
        "vulLowCount": 0,
        "vulMediumCount": 0,
        "vulHighCount": 0,
        "vulCriticalCount": 0,
        "repairSuggestionLevel": 4,
				"programingLanguageList": [
					"Java",
					"Python"
				],
        "licenseTypeList": [
          {
            "licenseName": "Linux-syscall-note",
            "licenseType": 4,
            "seriesName": null
          }
        ],
        "licenseRelationExpression": [
          {
            "level": 0,
            "type": "license",
            "value": "Linux-syscall-note",
            "uid": null
          }
        ]
      }
    ]
  },
  "success": true
}

失败响应示例

json
{
  "code": "100005",
  "message": "系统异常!",
  "data": null,
  "success": false
}

{
  "code": "120003",
  "message": "未找到任务执行实例",
  "data": null,
  "success": false
}

{
  "code": "150000",
  "message": "未找到组件信息",
  "data": null,
  "success": false
}

查询组件详情

基本信息

  • Path:{{ host }} /cleansourcesca-community/component/detail
  • Method:POST

请求参数

Headers

参数名称参数值
Content-Typeapplication/json

Body

参数名称说明in是否必须类型schema
req组件列表查询参数bodytrueMappingComponentQueryReqMappingComponentQueryReq

schema属性说明

MappingComponentQueryReq

参数名称说明in是否必须类型schema
componentId组件IDbodytruestring
taskInstanceId任务实例IDbodytrueint64

请求示例

json
{
	"componentId": "6b7042dcef71fbbfd174992f621b1ddc",
	"taskInstanceId": 32163
}

响应数据

响应状态码

状态码说明schema
100000OKCommonResult
201Created
401Unauthorized
403Forbidden
404Not Found
100005系统异常
120003未找到任务执行实例
150000未找到组件信息
  • 操作成功响应状态码:100000

  • 错误码描述:

    • 100005:系统异常!

    • 120003:未找到任务执行实例

    • 150000:未找到组件信息

响应参数

参数名称说明类型schema
codestring
dataComponentDetailRespComponentDetailResp
messagestring
successboolean

schema属性说明

ComponentDetailResp

参数名称说明类型schema
componentId组件IDstring
componentName组件名称string
componentVersion组件版本string
isEol组件是否停止维护,0:否;1:是int32
isExclusive是否只有CSSA独家漏洞,0:否;1:是int32
eolDate组件停止维护时间string
licenseRelationExpression许可证关系表达式arrayLicenseRelationExpressionItemDTO
programingLanguageList编程语言列表array
licenseTypeList许可证类型信息arrayLicenseTypeDTO
repairSuggestionLevel修复建议等级:强烈建议修复(1)、建议修复(2)、可选修复(3)、无风险(4)int32
taskId任务IDint64
taskInstanceId任务实例IDint64
vendor组件厂商string
vulCriticalCount超危漏洞数int32
vulHighCount高危漏洞数量int32
vulLowCount低危漏洞数量int32
vulMediumCount中危漏洞数量int32

LicenseTypeDTO

参数名称说明类型schema
licenseName组件许可证名称string
licenseType许可证类型 [1, 2, 3],1:宽松型,2:弱传染性,3:强传染型string
seriesName系列-名称string

LicenseRelationExpressionItemDTO

参数名称说明类型schema
level表达式项展示层级int32
type表达式项类别,license-许可证,logical-逻辑运算符,openBracket-左括号,closeBracket-右括号string
value表达式项值string
uid表达式项值唯一键string

成功响应示例

json
{
  "code": "100000",
  "message": "操作成功",
  "data": {
    "taskId": null,
    "taskInstanceId": null,
    "componentId": "6b7042dcef71fbbfd174992f621b1ddc",
    "componentName": "jmockit",
    "componentVersion": "1.40",
    "vendor": "org.jmockit",
    "isEol": 0,
    "eolDate": null,
    "isExclusive": 0,
    "vulLowCount": 0,
    "vulMediumCount": 2,
    "vulHighCount": 1,
    "vulCriticalCount": 0,
    "repairSuggestionLevel": 1,
    "licenseTypeList": [
      {
        "licenseName": "MIT",
        "licenseType": 4,
        "seriesName": null
      }
    ],
    "licenseRelationExpression": [
      {
        "level": 0,
        "type": "license",
        "value": "MIT",
        "uid": "1b508765-d142-4584-ad89-21c03cd338e0"
      }
    ],
    "matchingWayList": [],
    "dependencyWayList": [
      "direct"
    ],
    "programingLanguageList": [
      "Swift",
      "JavaScript",
      "HTML",
      "CSS",
      "Python",
      "Shell",
      "Ruby"
    ]
  },
  "success": true
}

失败响应示例

json
{
  "code": "100005",
  "message": "系统异常!",
  "data": null,
  "success": false
}

{
  "code": "120003",
  "message": "未找到任务执行实例",
  "data": null,
  "success": false
}

{
  "code": "150000",
  "message": "未找到组件信息",
  "data": null,
  "success": false
}

组件修复建议查询

基本信息

  • Path:{{ host }} /cleansourcesca-community/component/suggest
  • Method:GET

请求参数

Headers

参数名称参数值
Content-Typemultipart/form-data

Body

参数名称说明in是否必须类型schema
componentId组件IDbodytruestring
taskInstanceId任务实例IDbodytrueint64
type升级建议类型(1:短期修复建议;2:长期修复建议)querytrueinteger

请求示例

form-data
componentId: "d36faaa15ad24f005e0e8be33cfb2118"
taskInstanceId: 32898
type: 1

响应数据

响应状态码

状态码说明schema
100000OKCommonResult
201Created
401Unauthorized
403Forbidden
404Not Found
100005系统异常
120003未找到任务执行实例
  • 操作成功响应状态码:100000

  • 错误码描述:

    • 100005:系统异常!

    • 120003:未找到任务执行实例

响应参数

参数名称说明类型schema
codestring
dataComponentSuggestResponseComponentSuggestResponse
messagestring
successboolean

schema属性说明

ComponentSuggestResponse

参数名称说明类型schema
classSigCompatibility类签名兼容性(0:不兼容,1:兼容)int32
eolSuggest组件EOL修复建议string
fieldSig类成员签名兼容性(0:不兼容,1:兼容)int32
licenseSuggest许可证修复建议string
methodSigCompatibility函数签名兼容性(0:不兼容,1:兼容)int32
overallCompatibility整体兼容性(0:不兼容,1:兼容)int32
runtimeEnvCompatibility运行环境兼容性(0:不兼容,1:兼容)int32
vulSuggest组件升级修复建议string
unrepairVulLevelCount未修复漏洞等级计数VulLevelCountResponseVulLevelCountResponse
repackVulLevelCount可修复漏洞等级计数VulLevelCountResponseVulLevelCountResponse

VulLevelCountResponse

参数名称说明类型schema
vulCriticalCount超危漏洞计数int32
vulHighCount高危漏洞计数int32
vulLowCount低危漏洞计数int32
vulMediumCount中危漏洞计数int32

成功响应示例

json
{
  "code": "100000",
  "message": "操作成功",
  "data": {
    "eolSuggest": null,
    "licenseSuggest": null,
    "vulSuggest": "建议升级至42.3.9版本",
    "runtimeEnvCompatibility": 0,
    "methodSigCompatibility": 0,
    "classSigCompatibility": 0,
    "fieldSig": 0,
    "overallCompatibility": 0,
    "unrepairVulLevelCount": {
      "vulLowCount": 0,
      "vulMediumCount": 0,
      "vulHighCount": 0,
      "vulCriticalCount": 0
    },
    "repackVulLevelCount": {
      "vulLowCount": 0,
      "vulMediumCount": 0,
      "vulHighCount": 3,
      "vulCriticalCount": 3
    }
  },
  "success": true
}

失败响应示例

json
{
  "code": "100005",
  "message": "系统异常!",
  "data": null,
  "success": false
}

{
  "code": "120003",
  "message": "未找到任务执行实例",
  "data": null,
  "success": false
}

查询使用组件的任务

基本信息

  • Path:{{ host }} /cleansourcesca-community/component/affected/task/list
  • Method: POST

请求参数

Headers

参数名称参数值
Content-Typeapplication/json

Body

参数名称说明in是否必须类型schema
param使用组件的项目列表查询bodytrueComponentTaskQueryRequestComponentTaskQueryRequest

schema属性说明

ComponentTaskQueryRequest

参数名称说明in是否必须类型schema
componentId组件IDbodytruestring
pageNum当前页码int32true
pageSize每页数据量int32true

请求示例

json
{
	"componentId": "d36faaa15ad24f005e0e8be33cfb2118",
	"pageNum": 1,
	"pageSize": 3
}

响应数据

响应状态码

状态码说明schema
100000OKCommonResult
201Created
401Unauthorized
403Forbidden
404Not Found
100005系统异常
  • 操作成功响应状态码:100000

  • 错误码描述:

    • 100005:系统异常!

响应参数

参数名称说明类型schema
codestring
dataCommonPage«ComponentTaskResponse»CommonPage«ComponentTaskResponse»
messagestring
successboolean

schema属性说明

CommonPage«ComponentTaskResponse»

参数名称说明类型schema
list结果集合arrayComponentTaskResponse
pageNum当前页码int32
pageSize每页数据量int32
total总数int64
totalPage总页数int32

ComponentTaskResponse

参数名称说明类型schema
createTime任务创建时间date-time
taskInstanceId任务实例IDint64
taskName任务名称string

成功响应示例

json
{
  "code": "100000",
  "message": "操作成功",
  "data": {
    "pageNum": 1,
    "pageSize": 3,
    "totalPage": 6,
    "total": 16,
    "list": [
      {
        "taskId": 16010,
        "taskInstanceId": 32377,
        "taskName": "test",
        "createTime": "2025-06-16T14:24:10.000+08:00"
      },
      {
        "taskId": 16102,
        "taskInstanceId": 32469,
        "taskName": "sofa_bin_sim_mmkv_20250623080331786",
        "createTime": "2025-06-23T16:03:32.000+08:00"
      },
      {
        "taskId": 16356,
        "taskInstanceId": 32723,
        "taskName": "sofa_bin_sim_mmkv_20250627182247173",
        "createTime": "2025-06-27T18:22:47.000+08:00"
      }
    ]
  },
  "success": true
}

失败响应示例

json
{
  "code": "100005",
  "message": "系统异常!",
  "data": null,
  "success": false
}

组件升级版本漏洞列表查询

基本信息

  • Path:{{ host }} /cleansourcesca-community/component/suggest/vul/list
  • Method:POST

请求参数

Headers

参数名称参数值
Content-Typeapplication/json

Body

参数名称说明in是否必须类型schema
queryParam查询组件升级建议版本漏洞列表入参bodytrueComponentVulListParamComponentVulListParam

schema属性说明

ComponentVulListParam

参数名称说明in是否必须类型schema
componentId组件IDbodytruestring
pageNum当前页码int32true
pageSize每页数据量int32true
suggestType升级建议类型(1:短期修复建议;2:长期修复建议)bodytrueint32
taskInstanceId任务实例IDbodyfalseint64
vulLevel筛选的漏洞风险等级(不传默认为全部,CRITICAL:超危;HIGH:高危;MEDIUM:中危;LOW:低危)bodyfalsearray
vulRepairType漏洞修复类型(1:可修复的漏洞,2:未修复的漏洞)bodytrueint32

请求示例

json
{
	"componentId": "d36faaa15ad24f005e0e8be33cfb2118",
	"pageNum": 1,
	"pageSize": 10,
	"suggestType": 1,
	"taskInstanceId": 32898,
	"vulLevel": ["HIGH"],
	"vulRepairType": 1
}

响应数据

响应状态码

状态码说明schema
100000OKCommonResult
201Created
401Unauthorized
403Forbidden
404Not Found
100005系统异常
120003未找到任务执行实例
  • 操作成功响应状态码:100000

  • 错误码描述:

    • 100005:系统异常!

    • 120003:未找到任务执行实例

响应参数

参数名称说明类型schema
codestring
dataCommonPage«ComponentSuggestVulListResponse»CommonPage«ComponentSuggestVulListResponse»
messagestring
successboolean

schema属性说明

CommonPage«ComponentSuggestVulListResponse»

参数名称说明类型schema
list结果集合arrayComponentSuggestVulListResponse
pageNum当前页码int32
pageSize每页数据量int32
total总数int64
totalPage总页数int32

ComponentSuggestVulListResponse

参数名称说明类型schema
isExclusive是否为CSSA独家漏洞(0:不是,1:是)int32
num漏洞编号(可能是cve编号,也可能是cssa编号)string
vulLevel漏洞风险等级(CRITICAL:超危;HIGH:高危;MEDIUM:中危;LOW:低危)string
vulName漏洞名称string
vulType漏洞编号类型(cssa、cve)string
componentId当前漏洞所属组件IDstring

成功响应示例

json
{
  "code": "100000",
  "message": "操作成功",
  "data": {
    "pageNum": 1,
    "pageSize": 10,
    "totalPage": 1,
    "total": 3,
    "list": [
      {
        "num": "CVE-2022-21724",
        "vulName": "PostgreSQL JDBC Driver 安全漏洞",
        "vulType": "cve",
        "vulLevel": "HIGH",
        "isExclusive": 0,
        "componentId": "d36faaa15ad24f005e0e8be33cfb2118"
      },
      {
        "num": "CVE-2020-13692",
        "vulName": "PostgreSQL 代码问题漏洞",
        "vulType": "cve",
        "vulLevel": "HIGH",
        "isExclusive": 0,
        "componentId": "d36faaa15ad24f005e0e8be33cfb2118"
      },
      {
        "num": "CVE-2022-31197",
        "vulName": "PostgreSQL JDBC Driver SQL注入漏洞",
        "vulType": "cve",
        "vulLevel": "HIGH",
        "isExclusive": 0,
        "componentId": "d36faaa15ad24f005e0e8be33cfb2118"
      }
    ]
  },
  "success": true
}

失败响应示例

json
{
  "code": "100005",
  "message": "系统异常!",
  "data": null,
  "success": false
}

{
  "code": "120003",
  "message": "未找到任务执行实例",
  "data": null,
  "success": false
}