Skip to content

Exclude test/ and examples/ from the Checkmarx scan - #239

Merged
sixer1182 merged 1 commit into
mainfrom
feature/security-scan-align-toolbox
Sep 8, 2026
Merged

Exclude test/ and examples/ from the Checkmarx scan#239
sixer1182 merged 1 commit into
mainfrom
feature/security-scan-align-toolbox

Conversation

@sixer1182

Copy link
Copy Markdown
Member

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 with test/ and examples/ 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_filters input added in toolbox#13:

with:
  cx_extra_filters: "!test/**,!examples/**"

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 their CX_CONN_EXT_* names, mapped into the CX_CLIENT_ID / CX_CLIENT_SECRET names the reusable workflow declares — that mapping is the correct pattern and never needed touching. Toolbox#13 fixes the other side of it.

paths-ignore on the push trigger already skips test/** and examples/**, but that only decides whether a scan runs, not what it scans — and it does not apply to pull_request at all. This change covers both.

Testing

The scan can only be exercised by running it. Once toolbox#13 is merged, the pull_request trigger 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

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
@sixer1182
sixer1182 requested a review from a team as a code owner September 8, 2026 09:15
@sixer1182
sixer1182 merged commit 57cca14 into main Sep 8, 2026
5 of 7 checks passed
@sixer1182
sixer1182 deleted the feature/security-scan-align-toolbox branch September 8, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants