Exclude test/ and examples/ from the Checkmarx scan - #239
Merged
Conversation
The toolbox default filter assumes a Maven layout (**/src/test/**), which does not match this repo. Pass the new cx_extra_filters input so the PHP test suite and the example scripts stay out of SAST, IaC and SCA results. The secrets block is unchanged: the org secrets keep their CX_CONN_EXT_* names and are mapped into the names the reusable workflow declares. Requires unzerdev/unzer-tech-toolbox#13. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WtZY4exVNimKHWnqfxuMDW
Ryouzanpaku
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to unzerdev/unzer-tech-toolbox#13 — merge that one first.
Why
The toolbox's default scan filter is
!tools/**,!docs/**,!**/src/test/**/*. That last pattern assumes a Maven layout. This repo is a PHP library withtest/andexamples/at the root, so neither the test suite nor the example scripts are excluded today — they go into SAST, IaC and SCA results as if they were shipped code.What
Passes the new
cx_extra_filtersinput added in toolbox#13:The toolbox appends this to its default filter and applies the result to all three scanners.
Not changed
The
secrets:block stays exactly as it is. The org secrets keep theirCX_CONN_EXT_*names, mapped into theCX_CLIENT_ID/CX_CLIENT_SECRETnames the reusable workflow declares — that mapping is the correct pattern and never needed touching. Toolbox#13 fixes the other side of it.paths-ignoreon the push trigger already skipstest/**andexamples/**, but that only decides whether a scan runs, not what it scans — and it does not apply topull_requestat all. This change covers both.Testing
The scan can only be exercised by running it. Once toolbox#13 is merged, the
pull_requesttrigger on this PR will scan with the new filters — worth checking the run log for the[UTB] Appending caller filters: !test/**,!examples/**line and confirming the finding count drops.🤖 Generated with Claude Code
https://claude.ai/code/session_01WtZY4exVNimKHWnqfxuMDW