Skip to main content

Release from Quarantine REST API

The Release from Quarantine REST API is used when a repository component requires to be released from quarantine. All policy violations causing the component to be in quarantine will be waived and then the component will be released from quarantine.

Requesting a release from Quarantine

To release a component from quarantine the quarantine ID of the component needs to be supplied. The quarantine ID comes from Components in Quarantine REST API.

POST api/v2/repositories/quarantine/{quarantineId}/release

A sample request to release a component from Quarantine with a required comment

curl -u admin:admin123 -H "Content-Type: text/plain; charset=UTF-8" -X POST http://localhost:8070/api/v2/repositories/quarantine/21d7f6366c3c49eea03eaf416f37cd17/release -d "waiver comment"

Response

The response includes the newly waived policy violations that were required in order to release the component from quarantine. In the case where all proxy policy violations causing quarantine (fail action) were already waived, there will be no policy violations to list since they were already waived, the component is simply released from quarantine.

{
  "componentReleasedFromQuarantine":{
    "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"
        }
      },
      "quarantineTime":"2019-10-16T20:50:27.659+0000",
      "quarantineReleaseTime":"2019-10-16T20:52:27.659+0000"
    },
    "waivedPolicyViolations":[
      {
        "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."
              }
            ]
          }
        ]
      }
    ]    
  }
}

Item

Description

componentReleasedFromQuarantine

The component released from quarantine and the waived policy violations.

component

Component details

quarantineTime

The date/time when the component was quarantined

quarantineReleaseTime

The date/time when the component was released from quarantine

waivedPolicyViolations

List of newly waived policy violation details to release the component from quarantine.