As we reach the end of September 2024, ThreadFix version 3.x on-premises has officially reached its End-of-Life. Therefore, there is no longer support or updates for this version of the product. We have fully transitioned our product and development teams to focus ThreadFix SaaS and migrating all customers over from the on-premises versions. Our Customer Success and Support teams are here to help you in migrating to ThreadFix SaaS and maximizing the value you see from this improved offering from Coalfire. This is the next phase of ThreadFix and our team is looking forward to continuing to support you on this journey.
Multiple File Scan Upload 3.0 - API
/rest/{version}/applications/{appId}/upload/multi
Descriptor | Value |
---|---|
HTTP Method | POST |
Description | Uploads multiple files to the app with the given appId. If uploading the files as a single scan, the files must all be from the same scanner (such as all w3af scans). |
Required Permission | Upload Scans |
Version Introduced | 2.3.0 |
Changes in 2.4.5 | Starting with Version 2.4.5, this call adds the scans to the Scan Upload Queue, and returns an entirely different response. The scans have not finished importing into an application at the time the call returns; if automation is using this call, make sure to use the legacy version or adjust the automation accordingly. |
Changes in 2.5 | The new Links section includes a link to the endpoint which can be hit to check the status of the scan after it’s been added to the queue. |
Request Header Parameters
Parameter | Value | Required | Description |
---|---|---|---|
Accept | String | Yes | A value of ‘application/json’ must be provided. |
Request POST Data Parameters
Parameter | Value | Required | Description |
---|---|---|---|
file | File | Yes | A scan to upload to the application in ThreadFix. This parameter can be used multiple times but must be used at least once. |
bulkUpload | Boolean | No | Set to False if not provided. True = Upload the files as separate scan files. False = Upload the files as a single scan. |
Sample Call:
curl --insecure -H 'Accept: application/json' -H "Authorization: APIKEY {apiKey}" -X POST -F 'bulkUpload=false' -F file[]=@path/to/file/w3af-scan.xml -F file[]=@path/to/scanfile/w3af-scan2.xml http://localhost:8080/threadfix/rest/latest/applications/1/upload/multi
Sample Output (v2.4.5 through latest):
{
   "message": "",
   "success": true,
   "responseCode": -1,
   "object": "Scan upload process started.",
   "links": [
       {
           "method": "GET",
           "rel": "related",
           "href": "http://localhost:8080/threadfix/rest/applications/1/pendingScan/3/status"
       }
   ]
}
Sample Output (legacy through v2.4.2.1):
Values for importTime are returned as Epoch time in milliseconds.
{
   "message": "",
   "success": true,
   "responseCode": -1,
   "object": {
       "id": 3,
       "importTime": 1309962639000,
       "numberClosedVulnerabilities": 0,
       "numberNewVulnerabilities": 13,
       "numberOldVulnerabilities": 0,
       "numberResurfacedVulnerabilities": 0,
       "numberTotalVulnerabilities": 13,
       "numberRepeatResults": 0,
       "numberRepeatFindings": 0,
       "numberInfoVulnerabilities": 2,
       "numberLowVulnerabilities": 0,
       "numberMediumVulnerabilities": 6,
       "numberHighVulnerabilities": 5,
       "numberCriticalVulnerabilities": 0,
       "findings": [
           {
               "id": 5,
               "longDescription": null,
               "attackString": null,
               "attackRequest": "",
               "attackResponse": "",
               "nativeId": "b0f20dd0cf08dbea8da5744fcbdd1ebf",
               "displayId": null,
               "surfaceLocation": {
                   "id": 5,
                   "parameter": "username",
                   "path": "/demo/SQLI2.php"
               },
               "sourceFileLocation": null,
               "dataFlowElements": null,
               "calculatedUrlPath": "/demo/SQLI2.php",
               "calculatedFilePath": "",
               "dependency": null,
               "vulnerabilityType": "SQL injection vulnerability",
               "severity": "High"
           },
Â
…{items omitted for brevity}…
Â
           {
               "id": 19,
               "longDescription": null,
               "attackString": null,
               "attackRequest": "",
               "attackResponse": "",
               "nativeId": "6b689bcc7e473e60f859d3ebfca19bf0",
               "displayId": null,
               "surfaceLocation": {
                   "id": 19,
                   "parameter": "cookie",
                   "path": "/demo/XSS-cookie.php"
               },
               "sourceFileLocation": null,
               "dataFlowElements": null,
               "calculatedUrlPath": "/demo/XSS-cookie.php",
               "calculatedFilePath": "",
               "dependency": null,
               "vulnerabilityType": "Permanent cross site scripting vulnerability",
               "severity": "High"
           }
       ],
       "scannerName": "w3af"
   }
}
www.threadfix.it | www.coalfire.com
Copyright © 2024 Coalfire. All rights reserved.
This Information Security Policy is CoalFire - Public: Distribution of this material is not limited.