Vulnerability Endpoints
  • 26 Oct 2021
  • 1 Minute to read
  • Dark
    Light
  • PDF

Vulnerability Endpoints

  • Dark
    Light
  • PDF

Article Summary

The vulnerability endpoints provide data on known vulnerabilities and what vulnerabilities may affect a given product.

Get Affected Projects - Returns all of a team's projects that are affected by a specified vulnerability.
Get Vulnerability - Returns the data of a given vulnerability.
Get Vulnerabilities - Returns the vulnerabilities that affect a given product.


Get Affected Projects

The v1/report/getAffectedProjects endpoint returns all of a team's projects are affected by a specified vulnerability and the total number of vulnerabilities affecting each of those projects.

Endpoint
v1/report/getAffectedProjects
Request Method
GET
Parameter
Description
id
Your team ID.
external_id
The vulnerability name. (e.g., CVE-2019-10744, NPM-755)

Request Example:

curl -H "Authorization: Bearer TOKEN" \
https://api.ionchannel.io/v1/report/getAffectedProjects?id=TEAM_ID&external_id=CVE-2019-10744

Response Example:

{
  "data": [
    {
      "id": "abcd1234-ab12-ab12-ab12-abcde123456",
      "name": "Project Name 1",
      "version": "n/a",
      "vulnerabilities": 21
    },
    {
      "id": "abcd1234-ab12-ab12-ab12-abcde123456",
      "name": "Project Name 2",
      "version": "3.0.0",
      "vulnerabilities": 6
    }
  ],
  "meta": {
    "total_count": 0,
    "offset": 0
  }
}

Get Vulnerability

The v1/report/getAffectedProjects endpoint returns the information of a single vulnerability and the products affected by that vulnerability.

Endpoint
v1/vulnerability/getVulnerability
Request Method
GET
Parameter
Description
external_id
The vulnerability name. (e.g. NPM-123, CPE-2021-1234)

Request Example

curl -H "Authorization: Bearer TOKEN" \
https://api.ionchannel.io/v1/vulnerability/getVulnerability?external_id=CVE-2020-8203

Response Example


Get Vulnerabilities

The v1/vulnerability/getVulnerabilities endpoint allows you to search for vulnerabilities affecting a specified product and returns data on those vulnerabilities.

Endpoint
v1/vulnerability/getVulnerabilities
Request Method
GET
Parameter
Description
product
The name of the product to be used in the vulnerability search.
version
The version of the product to be used in the vulnerability search.
offset
(optional) An integer to indicate the position of the first vulnerability to be returned (e.g., an offset of 10 will not return the first 10 vulnerabilities). The default offset is 0.
limit
(optional) An integer to set the maximum number of vulnerabilities to return. The default limit is 10.

Request Example

curl -H "Authorization: Bearer TOKEN" \
https://api.ionchannel.io/v1/vulnerability/getVulnerabilities?product=lodash&version=4.17.19&offset=0&limit=10

Response Example


Was this article helpful?