Skip to content

Latest commit

 

History

History
137 lines (114 loc) · 2.53 KB

漏洞影响范围查询.md

File metadata and controls

137 lines (114 loc) · 2.53 KB

漏洞影响范围查询

API接口

GET /sbom-api/queryVulImpact/{productName}

路径参数

productName: 查询的制品名 string 必需

查询参数

vulId: 漏洞编号 string 必需

HTTP状态码

200: OK
500: Internal Server Error

返回字段说明

nodes: 节点 list
    nodeType: 节点类型  string
    label: 标签   string
    x: x轴坐标 double
    y: y轴坐标 double
    id: id  string
    size: 节点大小  double
    elementId: 节点元素后端的UUID
edges:
    sourceID: 源id   string
    targetID: 目标id  string
    size: 边大小   double
节点类型 说明
vulnerability 漏洞
dependency 依赖组件
package 软件包
transitiveDep 传递性依赖

样例

请求-1

GET /sbom-api/queryVulImpact/openEuler-22.03-LTS-everything-x86_64-dvd.iso?vulId=CVE-2016-5004

返回-1

{
  "nodes": [
    {
      "nodeType": "vulnerability",
      "label": "CVE-2016-5004",
      "x": 0.0,
      "y": -1000.0,
      "id": "0",
      "size": 20.0,
      "elementId": null
    },
    {
      "nodeType": "package",
      "label": "pkg:rpm/[email protected]?arch=noarch&epoch=1&upstream=xmlrpc-3.1.3-2.oe2203.src.rpm",
      "x": 0.0,
      "y": 0.0,
      "id": "2",
      "size": 22.0,
      "elementId": "822eba06-9cb5-4ef7-9350-1dbdf433f98f"
    },
    {
      "nodeType": "transitiveDep",
      "label": "pkg:rpm/[email protected]?arch=noarch&epoch=0&upstream=rome-1.7.0-1.oe2203.src.rpm",
      "x": 0.0,
      "y": 500.0,
      "id": "3",
      "size": 20.0,
      "elementId": "b73cf1a7-59bf-480c-a312-740657550adc"
    },
    {
      "nodeType": "dependency",
      "label": "pkg:maven/org.apache.xmlrpc/[email protected]",
      "x": 0.0,
      "y": -500.0,
      "id": "1",
      "size": 20.0,
      "elementId": "55a99667-b9b3-4950-9257-be007da4afd7"
    }
  ],
  "edges": [
    {
      "sourceID": "0",
      "targetID": "1",
      "size": 1.0
    },
    {
      "sourceID": "1",
      "targetID": "2",
      "size": 1.0
    },
    {
      "sourceID": "2",
      "targetID": "3",
      "size": 1.0
    }
  ]
}

请求-2

GET /sbom-api/queryVulImpact/openEuler-22.03-LTS-everything-x86_64-dvd.iso?vulId=CVE-XXXX-YYYY

返回-2

{
    "nodes": [],
    "edges": []
}

返回目录