StackHawk



Policy Management: Speed Up Scans and Cover Special Test Cases

Omar Alkhalili   |   Feb 6, 2023

LinkedIn
X (Twitter)
Facebook
Reddit
Subscribe To StackHawk Posts

When HawkScan scans an application, it uses a scan policy to determine which vulnerability tests to run against that app. Scan policies are a collection of enabled and disabled plugins, and plugins can be thought of as individual vulnerability tests. The plugins that are enabled in the scan policy will be run when HawkScan uses that scan policy to scan an application.

With default settings, HawkScan will run its default scan policy with a curated selection of plugins based on their quality and general applicability for use with any application. We also provide scan policies for other use cases, such as scanning against OpenAPI/REST, GraphQL, or SOAP applications, or scanning for the Log4Shell vulnerability. Traditionally, this has been configured from the StackHawk YAML configuration file. Now scan policy settings can be managed directly for each application within the StackHawk Platform. Not only can scan policies be selected for use with HawkScan, but now they can be customized by allowing fine-tuned control over which plugins are enabled and disabled within the scan policy.

Visual learner? Jump to the video overview

Selecting a Scan Policy

Scan policies can be set for an application on the settings page for that application. For example, if we are scanning an application with a REST API, we can select the OpenAPI/REST API scan policy, which will run a selection of enabled plugins customized for REST applications. Within the application’s settings, we can change the policy from ” HawkScan Default ” to ” OpenAPI/REST API.

Policy Management: Speed Up Scans and Cover Special Test Cases - Picture 1

Now subsequent scans against this application will use the OpenAPI/REST API scan policy. For best results, it is suggested to specify an OpenAPI spec in your StackHawk YAML configuration when running this application scan policy. More on that here .

Customizing a Scan Policy

To customize a scan policy, we can select any of the available scan policies and click the ” Customize Policy ” button. As an example, I will use the ” HawkScan Default ” scan policy for a scan against a vulnerable Django app .

Policy Management: Speed Up Scans and Cover Special Test Cases - Picture 2

This will bring us to a page that shows us all available active and passive plugins that can be run with HawkScan. Checking or unchecking one of the plugins will enable or disable that plugin. When customizing a policy, there will already be some plugins that are enabled. In this example, I will enable a plugin that is disabled by default in the HawkScan default scan policy called ” Source Code Disclosure – File Inclusion ” (ID 43). This test detects vulnerability to directory traversal attacks. I will also disable a plugin called ” Proxy Disclosure ” (ID 40025) due to that plugin sometimes experiencing false positives.

First I find these plugins in the active plugins list and check/uncheck them.

Policy Management: Speed Up Scans and Cover Special Test Cases - Picture 3
Policy Management: Speed Up Scans and Cover Special Test Cases -  Picture 3

Toggling these check boxes will save the application scan policy. By backing out to the application settings page, the application scan policy will now be labeled as customized.

Policy Management: Speed Up Scans and Cover Special Test Cases - Picture 5

Now it’s time to run a scan. If we run a scan against this application, it will use the customized scan policy. Below you can see that the plugin added to the scan policy fired an alert as the corresponding vulnerability was discovered in the app.

What is SOC 2 Security Testing and Why is it Important? - Picture 6

I hope you enjoyed reading about our new Scan Policy Management feature. If you’d like to learn more, check out our docs on this feature.

📺 Watch a Quick Demo

FEATURED POSTS

7 Best DAST Tools of 2024

Dive into thebasic building blocks of Dynamic Application Security Testing, and why it's a critical part of modern security testing practices, and how it differs from other security testing methods.

Running StackHawk in CI/CD

What does it mean to run StackHawk in your development pipeline? Learn about continuous integration (CI) and continuous delivery (CD), and how StackHawk makes it easy to automate security testing as part of software delivery.

Security Testing for the Modern Dev Team

See how StackHawk makes web application and API security part of software delivery.

Watch a Demo

StackHawk provides DAST & API Security Testing

Get Omdia analyst’s point-of-view on StackHawk for DAST.

"*" indicates required fields

More Hawksome Posts