Components in Quarantine REST API - v2

NEW IN RELEASE 78

The Components in Quarantine API is used to report on all repository components that are quarantined.  The resulting list is intended to be used to detail the violations keeping the component in quarantine, in which the component can be released from quarantine with the Release Component from Quarantine REST API.

Requesting a list of components in quarantine

GET api/v2/reports/components/quarantined

A sample request to list the components in quarantine is done by issuing the following curl command:

curl -u admin:admin123 -X GET http://localhost:8070/api/v2/reports/components/quarantined

Response

Each repository containing quarantined components is listed along with the components and policy violations triggering quarantine. In the case where all policy violations causing quarantine have been waived but the component has not been released from quarantine, there will be no policy violations.

{
  "componentsInQuarantine":[
    {
      "repository":{
        "repositoryId":"579729e6b3134c0bb40de1ac077288be",
        "publicId":"maven-central",
        "format":"maven2"
      },
      "components":[
        {
          "component":{
            "packageUrl":"pkg:maven/tomcat/tomcat-util@5.5.23?type=jar",
            "hash":"1249e25aebb15358bedd",
            "componentIdentifier":{
              "format":"maven",
              "coordinates":{
                "artifactId":"tomcat-util",
                "classifier":"",
                "extension":"jar",
                "groupId":"tomcat",
                "version":"5.5.23"
              },
              "quarantineId":"21d7f6366c3c49eea03eaf416f37cd17",
              "quarantineTime":"2019-10-16T20:52:27.659+0000"
            }
          },
          "policyViolations":[
            {
              "policyId":"775a6e88799040c5bb2dd8f020124d07",
              "policyName":"Security-High",
              "policyViolationId":"12ba38f6d38b4f2585c5f3415f094af4",
              "threatLevel":9,
              "constraintViolations":[
                {
                  "constraintId":"5244a1a9d0374a459144e8d93d192051",
                  "constraintName":"High risk CVSS score",
                  "reasons":[
                    {
                      "reason":"Found security vulnerability CVE-2017-5647 with severity 7.5."
                    },
                    {
                      "reason":"Found security vulnerability CVE-2017-5647 with severity 7.5."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
ItemDescription
componentsInQuarantineList of repositoies and their components that have been quarantined
repositoryRepository details
componentsList of components and their policy violations
componentComponent details.  Learn more about Components
quarantineIdThe ID to release the component from quarantine
quarantineTimeThe date/time when the component was quarantined
policyViolationsList of policy violation details that currently cause the component to be in quarantine.  Learn more about Policy Violations