Skip to content

feat: implement hard limits for scan control and fix last-line detection bug#363

Merged
cx-leonardo-fontes merged 21 commits intoAST-75295-custom-rulesfrom
Implement-hard-limits
Jan 15, 2026
Merged

feat: implement hard limits for scan control and fix last-line detection bug#363
cx-leonardo-fontes merged 21 commits intoAST-75295-custom-rulesfrom
Implement-hard-limits

Conversation

@cx-leonardo-fontes
Copy link
Copy Markdown
Contributor

New Limit Flags
--max-findings: Caps the total number of findings across the entire scan. When the limit is reached, the scan stops early and reports results up to that limit. Set to 0 (default) to disable.
--max-rule-matches-per-fragment: Limits the number of regex matches per rule per fragment (e.g., file, chunked file, page). Useful for preventing excessive matches in large files. Set to 0 (default) to disable.
--max-secret-size: Ignores secrets larger than the specified size in bytes. Helps filter out false positives from large binary blobs or encoded content. Set to 0 (default) to disable.

Bug Fix
Fixed last-line detection: Secrets on the last line of files without a trailing newline are now correctly detected. The fix adds a virtual newline marker in the location calculation logic, removing the previous CxFileEndMarker workaround.

@github-actions
Copy link
Copy Markdown

kics-logo

KICS version: v1.7.13

Category Results
HIGH HIGH 0
MEDIUM MEDIUM 0
LOW LOW 0
INFO INFO 0
TRACE TRACE 0
TOTAL TOTAL 0
Metric Values
Files scanned placeholder 16
Files parsed placeholder 16
Files failed to scan placeholder 0
Total executed queries placeholder 53
Queries failed to execute placeholder 0
Execution time placeholder 1

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 13, 2026

Logo
Checkmarx One – Scan Summary & Details53855571-2e33-43de-af13-1e6f302bf81e

Great job! No new security vulnerabilities introduced in this pull request

@cx-leonardo-fontes cx-leonardo-fontes marked this pull request as ready for review January 14, 2026 16:33
@cx-leonardo-fontes cx-leonardo-fontes requested a review from a team as a code owner January 14, 2026 16:33
@cx-leonardo-fontes cx-leonardo-fontes merged commit 4bca7fd into AST-75295-custom-rules Jan 15, 2026
12 checks passed
@cx-leonardo-fontes cx-leonardo-fontes deleted the Implement-hard-limits branch January 15, 2026 15:43
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