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.
Checkmarx Remote Provider (ThreadFix 3.X)
You will learn
How to create Checkmarx as ThreadFix remote provider, how to obtain Scan data, as well as how data is parsed.
Prerequisites
Audience: IT Professional or End User
Difficulty: Advanced
Time needed: Approximately 10 minutes
Tools required: User must have Server Manager role
For general information & instructions on the use of Remote Providers within ThreadFix, please refer to this page's parent page: Remote Providers.
For information on REST API functionality for Remote Providers, please refer to the following: Remote Providers API
Introduction
Checkmarx's CxSAST is a tool that discovers and documents application layer security vulnerabilities. The following guide is only applicable to version 8.7 or newer.
Checkmarx User Account
Checkmarx requires that a user have Server Manager role to pull scan data from their instance via API.
API Usage
Authentication
ThreadFix authenticates using Checkmarx Token authentication, additional details care be found here.
/cxrestapi/auth/identity/connect/token
Fetch Applications (Versions > 8.7)
Get All Teams with the following:
/cxrestapi/auth/teams
Get Projects with the following:
/cxrestapi/projects
ThreadFix creates remote provider applications based on the results of both Get All Teams and Get Projects. The Remote provider application's name is the combination of the name of the project (from Get Projects) with the corresponding name of the team, i.e. Project Name (Team Name). The remote provider application’s native id is the same as the Checkmarx Project Id.
Get Scans (Version > 8.7) Steps:
Get Scans with the following:
Parameters
projectId = remoteProviderApplication.nativeId
scanStatus = "Finished"
last = 1 (Only if the Remote Provider is set to only pull the Most Recent Scan)
This endpoint was only introduced in Checkmarx 8.8. To account for this ThreadFix will check if this call returns a 2xx response code. If it does not, ThreadFix will make another call to fetch the scans using the ODATA Get Scans call noted below. If the result is valid it will continue on to Get Scan Stats
ODATA Get Scans
Most Recent Only
All Scans
Get Scan Stats with the following:
This call is executed per scan that is found in Get Scans.
Generate Report with the following:
Request Body:
i. reportType: XML
ii. scanId: Checkmarx Scan Id gathered from Get Scans
Check Report Status with the following:
This call executes every 5 seconds until one the following conditions occurs:
Status for a finished report:
1) CreatedStatus for a failed report:
1) Deleted
2) FailedThreadFix has been checking the status of the report for longer than 15 mins, at which point it stops checking and does not import any scans
Get Report with the following:
This report is then parsed and the scan's findings are created from this report.
Get Scan Logic
Using the data from Get Scans and Get Scan Stats:
ThreadFix compares the Engine Finished On date, if it exists otherwise ThreadFix will use the Finished On date, and compare it to the RemoteProviderApplication.lastImportTime.
Uses the statisticsCalculationDate to compare against the latest updated date for Checkmarx scans that have already been imported in the ThreadFix application.
Scan Import Logic
If the Engine Finished On/Finished On date is newer ThreadFix will import the scan
If the Engine Finished On/Finished On date is equal, ThreadFix checks the statisticsCalculationDate
If the statisticsCalculationDate is newer the scan is imported
If the statisticsCalculationDate is equal and force last scan is enabled the scan is imported
Otherwise, this scan is ignored
Multiple Mapped Remote Provider Applications
In order to make import determinations faster, in the event that a ThreadFix application has multiple Checkmarx Remote Provider Applications mapped, ThreadFix executes the Get Scans and Get Scan Stats calls for each of the mapped remote provider applications. In addition it also applies the above Scan Import Logic to the results. If any of the remote provider applications have scans that need to be imported, ThreadFix will then import for each of the mapped remote provider applications.
Table of Contents
- 1 You will learn
- 1.1 Prerequisites
- 1.2 Introduction
- 1.3 Checkmarx User Account
- 1.3.1 API Usage
- 1.3.1.1 Authentication
- 1.3.1.2 Fetch Applications (Versions > 8.7)
- 1.3.1.3 Get Scans (Version > 8.7) Steps:
- 1.3.1.4 Get Scan Logic
- 1.3.1.5 Scan Import Logic
- 1.3.1.6 Multiple Mapped Remote Provider Applications
- 1.3.1 API Usage
- 2 Table of Contents
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.