Tutorials

API Security Testing with API Scan

Now that we have reviewed and locked down our contract, we are going to perform a conformance scan.

Dynamic Testing

API Contract Conformance Scan is a dynamic runtime analysis of your API to check that the behavior of the API conforms to the contract it advertises in its OpenAPI (formerly known as Swagger) definition.

You can run a scan on an API you have imported to 42Crunch Platform and deployed to find out if there are any mismatches between the API definition describing your API and what it actually does. If Conformance Scan testing finds any discrepancies, it reports the issues clearly so that you can fix them.

conf-dash (Custom)
wizard (Custom)
crunching-1 (Custom)
scan-complete (Custom)

Authentication in Conformance Scan

If you have defined security requirements in your API, Conformance Scan must provide the information to fulfill those requirements when it sends requests to the API. When you configure the scan, you must therefore fill in the details that Conformance Scan can use to authenticate.

The configuration wizard shows the security requirements defined on the root level in the OpenAPI (Swagger) definition of your API in a drop-down list. Each line on the list corresponds to a security requirement in the API definition, and the text lists the names of the security schemes and their types in that security requirement.

Now 42Crunch fuzzes the OpenAPI (Swagger) file by sending it requests outside of the contract: different paths, different verbs, different transports, different parameters. Each and every one of these requests are not compliant with the contract, and SHOULD get rejected.

In this particular case 61 requests that were invalid did not get rejected. All of these discrepancies are potential vulnerabilities that we were not aware of. So, the backend code somehow still works with these inputs that are not valid. Typically APIs are tested for scenarios within the design of the API – by fuzzing outside of the contract, we are able to find unknown vulnerabilities that could have led to a data breach.

Scan Report

Conformance Scan produces a scan report that provides valuable information on how well your API conforms to its API definition. The report summarizes what was scanned and how the scan went, including the API’s response times, the received HTTP status codes, as well as any unexpected response status codes and their reasons. Clicking a found issue provides further details on it.

Latest Resources

WEBINAR

Webinar Series - Defending APIs with Jim Manico

Defending APIs with Jim Manico – Episode 1

Episode 1: Request Forgery on the Web – CSRF & SSRF

November 10, 2022 | 9am PST | 5pm BST

Join Jim Manico, CEO of Manicode and Colin Domoney from 42Crunch, as they deliver a 2-part webinar series to help developers better defend APIs.

BLOG

Empathy for the API Developer

By Colin Domoney | July 25, 2022

Colin Domoney from 42Crunch, in his recent article on DevOps.com, addresses the disconnect between development and security teams and explains the key challenges facing developers in creating secure API code. Better understanding of the challenges on both sides can help create greater empathy which in turn can help […]

DataSheet

Datasheet Cover Images P1-02

Product Datasheet Addressing API Security Challenges

APIs are the core building block of every enterprise’s digital strategy, yet they are also the number one attack surface for hackers. 42Crunch makes developers’ and security practitioners' lives easier by protecting APIs, with a platform that automates security into the API development pipeline and gives full oversight of security policy enforcement at every stage of the API lifecycle.

Ready to Learn More?

Developer-first solution for delivering API security as code.