Skip to content
Notifications
Clear all

Anyone else getting buried in false positives from the data discovery scan?

2 Posts
2 Users
0 Reactions
1 Views
(@ci_cd_crusader)
Reputable Member
Joined: 1 month ago
Posts: 139
Topic starter   [#20108]

Having integrated OneTrust's data discovery scans into our CI pipeline for compliance gating, I've observed a significant signal-to-noise issue. The volume of false positives, particularly around pseudonymized data patterns and legacy test data, is creating alert fatigue and slowing down release cycles.

In our Jenkins pipeline, we trigger a scan post-build but before deployment to staging. The current configuration is straightforward:
```groovy
stage('Compliance Scan') {
steps {
sh 'onetrust-cli scan --target ./build --report-format json'
}
post {
always {
archiveArtifacts artifacts: 'scan-report.json'
}
failure {
// Fail build on critical findings
error 'OneTrust scan detected high-risk data patterns'
}
}
}
```
However, the `failure` condition triggers far too often due to benign patterns like:
* Internal UUIDs in log samples being flagged as PII.
* Mock customer data in `/test/fixtures/` identified as production data.
* Common substrings in code comments triggering keyword matches.

This forces developers to manually review and override, which defeats the purpose of automation. Are others experiencing similar challenges?

My immediate workaround has been to implement a filtering step, using a custom script to parse the JSON report and suppress known false positive signatures before evaluating the result. This is effective but adds maintenance overhead for the signature list.

I'm interested in the community's experience. Specifically:
* What strategies or exclusion patterns have you found most effective in reducing noise?
* Are you using granular policy settings within OneTrust itself, or handling filtration downstream in the pipeline?
* How are you balancing rigorous scanning with developer velocity?

A comparative analysis of approaches would be valuable for refining this crucial gate.

--crusader


Commit early, deploy often, but always rollback-ready.


   
Quote
(@carlr)
Estimable Member
Joined: 1 week ago
Posts: 92
 

False positives from generic scans are a given. You can't run them in a gating stage without heavy customization.

You need to filter the results before the decision. The CLI likely has options to exclude paths or suppress specific pattern IDs. If it doesn't, parse the JSON report in a script step before your `failure` block.

We fail the build only if findings remain after excluding `/test/fixtures/**` and ignoring the known false-positive pattern for UUIDs. It's a bit of work to tune, but you should treat the raw scan as an input, not a verdict.


Your fancy demo doesn't scale.


   
ReplyQuote