Skip to content

Add alert filter for false positive management - #1229

Merged
Ben-Hodgkiss merged 1 commit into
mainfrom
remove-PII-false-positive
Jul 13, 2026
Merged

Add alert filter for false positive management#1229
Ben-Hodgkiss merged 1 commit into
mainfrom
remove-PII-false-positive

Conversation

@Ben-Hodgkiss

@Ben-Hodgkiss Ben-Hodgkiss commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

We have a high security scan alert for PII data in this repo. This is a false positive due to use of strings for dates etc - these are incorrectly flagged as potential credit card data. This is not data we collect.

This PR filters this alert out as a false positive so it no longer is included in the weekly reports.

Added/updated tests?

We encourage you to keep the code coverage percentage at 80% and above. Please refer to the Digital Land Testing Guidance for more information.

  • Yes
  • No, and this is why: Solely change to ZAP scan YAML
  • I need help with writing tests

Summary by CodeRabbit

  • Bug Fixes
    • Alerts matching rule 10062 are now classified as false positives.
    • Traditional Markdown and JSON reports no longer include false-positive confidence results.

Added alert filter to manage false positive alerts.
@Ben-Hodgkiss
Ben-Hodgkiss requested a review from pooleycodes July 13, 2026 14:24
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

ZAP configuration now marks rule 10062 as a false positive and excludes false-positive confidence entries from traditional Markdown and JSON reports.

Changes

ZAP report configuration

Layer / File(s) Summary
Alert filtering and report confidence configuration
zap.yaml
Adds a rule-specific False Positive risk override and removes falsepositive from the confidence lists for Markdown and JSON reports.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Poem

A rabbit hops through YAML bright,
Rule one-zero-zero-six-two takes flight.
False positives fade from view,
Markdown and JSON reports renew.
Nibble, commit, and close the night!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding an alert filter to manage false positives.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch remove-PII-false-positive

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 70.98% 2540 / 3578
🔵 Statements 70.14% 2679 / 3819
🔵 Functions 64.13% 506 / 789
🔵 Branches 63.92% 1249 / 1954
File CoverageNo changed files found.
Generated in workflow #1555 for commit 10146b5 by the Vitest Coverage Report Action

@Ben-Hodgkiss
Ben-Hodgkiss merged commit 797367b into main Jul 13, 2026
5 checks passed
@Ben-Hodgkiss
Ben-Hodgkiss deleted the remove-PII-false-positive branch July 13, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants