Safeguard
Developer Tools•

How do you set fail, warn and ignore levels on a DAST baseline scan?

How to decide which DAST rules fail a build, which only warn, and which to ignore, using a config file and a staged rollout that keeps developers on side.

Safeguard Security Team
7 min read

Generate the default config, which marks every rule as a warning, then move rules to fail one small group at a time, starting with rules whose findings are rarely wrong. Mark known noise as ignore with a written reason, and review the file on a schedule.

What a baseline scan is

A baseline scan is a short, low-impact check meant for every build. The ZAP documentation describes its baseline script as running the spider against the target for one minute by default, then waiting for passive scanning to finish before reporting. It says the script performs no actual attacks, runs for a few minutes at most, and is intended to be ideal for CI/CD, even against production sites. The docs distinguish it from the full scan script, which runs an active scan and can run for a long time.

The three levels

By default the ZAP baseline treats every alert as a warning. A config file can change any rule to one of these.

LevelMeaningEffect on the build
FailA finding from this rule is a build breakerPipeline stops
WarnReported but allowedPipeline continues
IgnoreNot reportedNone

The script also has an option to generate a default config file with every rule set to warn, which is the right place to start. Other tools have similar gates, sometimes called thresholds or break-the-build rules.

A staged rollout

  1. Generate the default file and commit it next to the pipeline definition.
  2. Run in warn-only mode for two weeks. Collect the alerts on a stable branch.
  3. Sort the alerts. Group by rule. Note how often each is a real issue.
  4. Promote the clearest rules to fail. Pick rules for things such as missing security headers on a page you control, where the fix is a config line and the finding is rarely wrong.
  5. Ignore with a reason. If a rule is wrong for your stack, set it to ignore and put the reason in a comment, with a review date.
  6. Announce the change a week before a new fail rule goes live.
  7. Review the file every quarter. New rules appear, and old ignores may no longer be needed.

A starting rule of thumb

Finding typeSuggested starting level
Clear, cheap fix, rarely wrongFail
Real but needs design discussionWarn, with a ticket
Wrong for your architectureIgnore, with a reason and review date
New rule you have not seen results fromWarn

What baseline scans cannot do

Because a baseline scan does not attack, it cannot find flaws that need crafted input, such as injection. It reads what the app already returns: headers, cookies, some leaks in responses. Pair it with a periodic active scan on staging for deeper checks.

Avoid these problems

  • Failing builds on day one, which teaches teams to bypass the check.
  • Ignoring a rule with no reason, which nobody can later defend.
  • Letting the file sit unreviewed for a year.
  • Treating a clean baseline as a clean application.

A worked example

A team adds a baseline scan to a pipeline for a web service. In the first two weeks they leave every rule at warn and gather results from 40 builds. They then sort alerts by rule.

Rule categoryTimes raisedReal issue in a sampleDecision
Missing anti-clickjacking header40Yes, every timeFail after notice
Cookie without secure attribute38YesFail after notice
Server version in a response header40Yes, low impactWarn, fix when convenient
Cache control directives36Mixed, some pages are publicWarn, review per path
A rule for a technology not in the stack12NoIgnore, reason recorded
Suspicious comments in script25Mostly noIgnore for vendor files, warn for own code

The counts are illustrative. The sorting method is the point: frequency, accuracy and cost to fix decide the level.

What the notice looks like

Before a rule becomes a build breaker, tell the teams. A short message does the job: which rule, what a finding means, how to fix it, the date it starts to fail builds and who to ask for help. A week of notice avoids surprise failures and the bypass habit that follows.

Handling exceptions

Some pages will always trigger a rule for good reasons, such as a public page with relaxed caching. Do not weaken the rule for the whole site. Record a path-level exception with a reason, an owner and a review date.

Exception fieldExample
RuleCache control
PathPublic marketing pages
ReasonContent is public and cached by design
OwnerWeb team
Review dateNext quarter

A progress file for known issues

The ZAP baseline script also accepts a progress file that lists issues already being addressed. That lets a team keep a rule at fail while known items are being worked on, without blocking every build. Whatever tool you use, look for an equivalent mechanism, and make sure each entry has an owner and an end date.

What not to automate

Do not use a baseline scan as proof that the application is secure. It reads what the app returns and nothing more. Keep a calendar for the deeper active scans on staging, and for manual review of the high-risk features. Remember also that the baseline script has a maximum time option: if the passive scan does not finish in the time given, report that clearly rather than showing an empty result as a pass.

Where Safeguard fits

Gate rules on a web scan are one control among several. Safeguard provides policies and gates for dependency findings from SBOM and dependency scanning, and a free scan at gold.safeguard.sh/scan.

Try it yourself

Click through it at your own pace, or open it full screen.

Watch how a gate decides whether a pull request passes, and compare it with fail and warn levels.

Quick check

Should new rules start as fail?

No. Start them as warn, learn how often they are right, then promote.

Does a passing baseline mean no injection flaws?

No. A baseline scan does not attack, so it will not find flaws that need crafted input.

Who should approve a change from warn to fail?

The owner of the service and the security contact together, with notice to the teams affected, so the change is deliberate and recorded.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.