Skip to main content
In this walkthrough, we’ll adapt our Dynamic Application Security Testing (DAST) with OWASP ZAP to ignore a specific warning—“Unexpected Content-Type”—so that the Jenkins build can proceed uninterrupted.

1. Identify the Unexpected-Content-Type Warning

Run the standard ZAP API scan:
You’ll see:
Normally this requires a code fix, but for demo purposes we’ll instruct ZAP to ignore this rule.

2. Generate and Customize the ZAP Rule Configuration

ZAP supports three levels for each rule:
  1. Generate the default config:
  2. Open zap_default.conf—you’ll see lines like:
  3. Modify or add the entry for rule 100001 with single tabs:
  4. Save this as zap_ignore_rules.
Be sure to use single tab separators. Mixing spaces or multiple tabs will cause parsing errors.

3. Update Your Jenkins Pipeline

In your Jenkinsfile, add the -c zap_ignore_rules flag to the DAST stage:

4. (Optional) Front-End Cosmetic Change for Demo

Add extra rockets in index.html to visualize a change in your application:

5. Commit, Merge, and Sync with Argo CD

  1. Commit your changes and open a Pull Request.
  2. After merge, confirm in Jenkins:
The image shows a Jenkins pipeline interface for a project named "solar-system" under "Gitea-Organization," displaying various stages of a CI/CD process, including unit testing, code coverage, and deployment steps. It also includes a prompt asking if the pull request is merged and ArgoCD is synced, with options to confirm or abort.
  1. In Argo CD, sync the solar-system application:
The image shows the Argo CD dashboard displaying two applications: "bitnami-sealed-secrets" and "solar-system-argo-app," with their respective statuses and details. The interface includes options to sync, refresh, or delete the applications.
  1. Once synced, inspect the updated replica set and pods:
The image shows an Argo CD application dashboard with a visual representation of a deployment pipeline, indicating the sync status and health of various components in a Kubernetes environment.

6. Troubleshoot Token-Parsing Errors

If you see:
Then your zap_ignore_rules likely has spaces instead of tabs.
Open the file in an editor and ensure exactly one <TAB> between each field:
Recommit and rerun the pipeline.

7. Verify Final DAST Results

A successful DAST stage shows:
Open the HTML report to confirm the ignored rule no longer blocks your build:
The image shows a ZAP Scanning Report detailing security alerts for various websites, with a summary indicating low and informational risk levels.

Summary & Next Steps

In this lesson, we:
  • Ran OWASP ZAP DAST against our API
  • Generated and customized an ignore-rules file
  • Updated our Jenkins pipeline to use -c zap_ignore_rules
  • Published the HTML report in Jenkins
  • Synced changes via Argo CD
  • Troubleshot tab-delimited config errors
Next, we’ll explore integrating serverless deployments with AWS Lambda.

Watch Video

Practice Lab