Skip to content

Commit 9c540c2

Browse files
author
David Curwin
committed
API testing documenation
1 parent 36ac79b commit 9c540c2

File tree

3 files changed

+72
-11
lines changed

3 files changed

+72
-11
lines changed

articles/defender-for-cloud/defender-partner-applications.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ ms.date: 11/15/2023
1010

1111
# Partner applications in Microsoft Defender for Cloud for API security testing (preview)
1212

13-
Microsoft Defender for Cloud supports third-party tools to help enhance the existing runtime security capabilities that are provided by Defender for APIs. Defender for Cloud supports proactive API security testing capabilities in early stages of the development lifecycle (including DevOps pipelines).
13+
Microsoft Defender for Cloud supports third-party tools to help enhance the existing runtime security capabilities that are provided by Defender for APIs. Defender for Cloud supports proactive API security testing capabilities in early stages of the development lifecycle (including source code repositories & CI/CD pipelines).
1414

1515
## Overview
1616

17-
The support for third-party solutions helps to further streamline, integrate, and orchestrate security findings from other vendors with Microsoft Defender for Cloud. This support enables full lifecycle API security, and the ability for security teams to effectively discover and remediate API security vulnerabilities before they are deployed in production.
17+
The support for third-party solutions helps to further streamline, integrate, and orchestrate security findings from partner solutions with Microsoft Defender for APIs. This support enables full lifecycle API security, and the ability for security teams to effectively discover and remediate API security vulnerabilities before they are deployed in production.
1818

1919
The security scan results from partner applications are now available within Defender for Cloud, ensuring that central security teams have visibility into the health of APIs within the Defender for Cloud recommendation experience. These security teams can now take governance steps that are natively available through Defender for Cloud recommendations, and extensibility to export scan results from the Azure Resource Graph into management tools of their choice.
2020

@@ -29,13 +29,15 @@ This feature requires a GitHub connector in Defender for Cloud. See [how to onbo
2929
| Release state | Preview <br> The [Azure Preview Supplemental Terms](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) include other legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.|
3030
| Required/preferred environmental requirements | APIs within source code repository, including API specification files such as OpenAPI, Swagger. |
3131
| Clouds | Available in commercial clouds. Not available in national/sovereign clouds (Azure Government, Microsoft Azure operated by 21Vianet). |
32-
| Source code management systems | GitHub-supported versions: GitHub Free, Pro, Team, and GitHub Enterprise Cloud. This also requires a license for GitHub Advanced Security (GHAS). |
32+
| Source code management systems | [GitHub Enterprise Cloud](https://docs.github.com/enterprise-cloud@latest/admin/overview/about-github-enterprise-cloud). This also requires a license for GitHub Advanced Security (GHAS). <br> <br > [Azure DevOps Services](https://azure.microsoft.com/products/devops/) |
3333

3434
## Supported applications
3535

36-
| Logo | Partner name | Description | Enablement Guide |
37-
|----------|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------|
38-
| :::image type="content" source="media/defender-partner-applications/42crunch-logo.png" alt-text="42Crunch logo."::: | [42Crunch](https://aka.ms/APISecurityTestingPartnershipIgnite2023) | Developers can proactively test and harden APIs within their CI/CD pipelines through static and dynamic testing of APIs against the top OWASP API risks and OpenAPI specification best practices. | [42Crunch onboarding guide](onboarding-guide-42crunch.md) |
36+
| Partner name | Description | Enablement Guide |
37+
|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------|
38+
| [42Crunch](https://aka.ms/APISecurityTestingPartnershipIgnite2023) | Developers can proactively test and harden APIs within their CI/CD pipelines through static and dynamic testing of APIs against the top OWASP API risks and OpenAPI specification best practices. | [42Crunch onboarding guide](onboarding-guide-42crunch.md) |
39+
| [StackHawk](https://aka.ms/APISecurityTestingPRStackHawk) | StackHawk is the only modern DAST and API security testing tool that runs in CI/CD, enabling developers to quickly find and fix security issues before they hit production. | [StackHawk onboarding guide](https://aka.ms/APISecurityTestingOnboardingGuideStackHawk) |
40+
| [Bright Security](https://aka.ms/APISecurityTestingPRBrightSecurity) | Bright Security’s dev-centric DAST platform empowers both developers and AppSec professionals with enterprise grade security testing capabilities for web applications, APIs, and GenAI and LLM applications. Bright knows how to deliver the right tests, at the right time in the SDLC, in developers and AppSec tools and stacks of choice with minimal false positives and alert fatigue. | [Bright Security onboarding guide](https://aka.ms/APISecurityTestingOnboardingGuideBrightSecurity) |
3941

4042
## Next steps
4143

311 KB
Loading

articles/defender-for-cloud/onboarding-guide-42crunch.md

Lines changed: 64 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to use 42Crunch with Microsoft Defender.
44
ms.date: 11/15/2023
55
author: dcurwin
66
ms.author: dacurwin
7-
ms.topic: overview
7+
ms.topic: how-to
88
---
99

1010
# 42Crunch technical onboarding guide
@@ -26,17 +26,23 @@ Because the quality of the API specification largely determines the scan coverag
2626
2727
Through relying on the 42Crunch [Audit](https://42crunch.com/api-security-audit) and [Scan](https://42crunch.com/api-conformance-scan/) services, developers can proactively test and harden APIs within their CI/CD pipelines through static and dynamic testing of APIs against the top OWASP API risks and OpenAPI specification best practices. The security scan results from 42Crunch are now available within Defender for Cloud, ensuring central security teams have visibility into the health of APIs within the Defender for Cloud recommendation experience, and can take governance steps natively available through Defender for Cloud recommendations.
2828

29-
## Connect your GitHub repositories to Microsoft Defender for Cloud
29+
## Connect your DevOps environments to Microsoft Defender for Cloud
3030

31-
This feature requires a GitHub connector in Defender for Cloud. See [how to onboard your GitHub organizations](quickstart-onboard-github.md).
31+
This connecting your DevOps environment to Defender for Cloud.
32+
33+
See [how to onboard your GitHub organizations](quickstart-onboard-github.md).
34+
35+
See [how to onboard your Azure DevOps organizations](quickstart-onboard-devops.md).
3236

3337
## Configure 42Crunch Audit service
3438

3539
The REST API Static Security Testing action locates REST API contracts that follow the OpenAPI Specification (OAS, formerly known as Swagger) and runs thorough security checks on them. Both OAS v2 and v3 are supported, in both JSON and YAML format.
3640

3741
The action is powered by [42Crunch API Security Audit](https://docs.42crunch.com/latest/content/concepts/api_contract_security_audit.htm). Security Audit performs a static analysis of the API definition that includes more than 300 checks on best practices and potential vulnerabilities on how the API defines authentication, authorization, transport, and request/response schemas.
3842

39-
Install the 42Crunch API Security Audit plugin within your CI/CD pipeline through completing the following steps:
43+
### For GitHub environments
44+
45+
Install the 42Crunch API Security Audit plugin within your CI/CD pipeline by completing the following steps:
4046

4147
1. Sign in to GitHub.
4248
1. Select a repository you want to configure the GitHub action to.
@@ -69,7 +75,7 @@ To create a new default workflow:
6975

7076
You now verified that the Audit results are showing in GitHub Code Scanning. Next, we verify that these Audit results are available within Defender for Cloud. It might take up to 30 minutes for results to show in Defender for Cloud.
7177

72-
## Navigate to Defender for Cloud
78+
**Navigate to Defender for Cloud**:
7379

7480
1. Select **Recommendations**.
7581
1. Select **All recommendations**.
@@ -80,12 +86,65 @@ The selected recommendation shows all 42Crunch Audit findings. You completed the
8086

8187
:::image type="content" source="media/onboarding-guide-42crunch/api-recommendations.png" alt-text="Screenshot showing API summary." lightbox="media/onboarding-guide-42crunch/api-recommendations.png":::
8288

89+
### For Azure DevOps environments
90+
91+
1. Install the [42Crunch Azure DevOps extension](https://marketplace.visualstudio.com/items?itemName=42Crunch.42c-cicd-audit-freemium) on your organization.
92+
1. Create a new pipeline in your Azure DevOps project. For a tutorial for creating your first pipeline, see [Create your first pipeline](/azure/devops/pipelines/create-first-pipeline).
93+
1. Edit the created pipeline, by copying in the following workflow:
94+
95+
```yml
96+
trigger:
97+
branches:
98+
include:
99+
- main
100+
101+
jobs:
102+
- job: run_42crunch_audit
103+
displayName: 'Run Audit'
104+
pool:
105+
vmImage: 'ubuntu-latest'
106+
steps:
107+
- task: UsePythonVersion@0
108+
inputs:
109+
versionSpec: '3.11'
110+
addToPath: true
111+
architecture: x64
112+
- task: APISecurityAuditFreemium@1
113+
inputs:
114+
enforceSQG: false
115+
sarifReport: '$(Build.Repository.LocalPath)/42Crunch_AuditReport.sarif'
116+
exportAsPDF: '$(Build.Repository.LocalPath)/42Crunch_AuditReport.pdf'
117+
- task: PublishBuildArtifacts@1
118+
displayName: publishAuditSarif
119+
inputs:
120+
PathtoPublish: '$(Build.Repository.LocalPath)/42Crunch_AuditReport.sarif '
121+
ArtifactName: 'CodeAnalysisLogs'
122+
publishLocation: 'Container'
123+
```
124+
125+
1. Run the pipeline.
126+
1. To verify the results are being published correctly in Azure DevOps, validate that *42Crunch-AuditReport.sarif* is being uploaded to the Build Artifacts under the *CodeAnalysisLogs* folder.
127+
1. You have completed the onboarding process. Next we verify that the results show in Defender for Cloud.
128+
129+
**Navigate to Defender for Cloud**:
130+
131+
1. Select **Recommendations**.
132+
1. Select **All recommendations**.
133+
1. Filter by searching for **API security testing**.
134+
1. Select the recommendation **AzureDevOps repositories should have API security testing findings resolved**.
135+
136+
The selected recommendation shows all 42Crunch Audit findings. You completed the onboarding for the 42Crunch Audit step.
137+
138+
:::image type="content" source="media/onboarding-guide-42crunch/azure-devops-recommendation.png" alt-text="Screenshot showing Azure DevOps recommendation." lightbox="media/onboarding-guide-42crunch/azure-devops-recommendation.png":::
139+
83140
## Configure 42Crunch Scan service
84141
85142
API Scan continually scans the API to ensure conformance to the OpenAPI contract and detect vulnerabilities at testing time. It detects OWASP API Security Top 10 issues early in the API lifecycle and validates that your APIs can handle unexpected requests.
86143
87144
The scan requires a nonproduction live API endpoint, and the required credentials (API key/access token). [Follow these steps](https://github.com/42Crunch/apisecurity-tutorial) to configure the 42Crunch Scan.
88145
146+
Refer to the **azure-pipelines-scan.yaml** in the tutorial for the ADO specific tasks.
147+
89148
## FAQ
90149
91150
### How does 42Crunch help developers identify and remediate API security issues?

0 commit comments

Comments
 (0)