Skip to content

ACOMMONS-245 Exclude boolean casts from secret classification - #612

Merged
daniel-teuchert-sonarsource merged 2 commits into
masterfrom
codex/secret-classifier-boolean-exclusions
Nov 9, 2026
Merged

daniel-teuchert-sonarsource merged 2 commits into
masterfrom
codex/secret-classifier-boolean-exclusions

Conversation

@daniel-teuchert-sonarsource

Copy link
Copy Markdown
Contributor

Exclude (bool)True and (bool)False from hardcoded-secret candidates using an anchored, case-insensitive pattern in the existing boolean literal group. Add both values to the shared validation corpus, plus prefix/suffix near-misses that must remain candidates.

Validation: direct Java compilation and assertion checks passed for the shared positive/negative corpus, category classification, pattern coverage, and boolean case variants. Focused Maven tests could not run because required Sonar dependencies are not cached locally.

The commit hook flagged an unchanged synthetic credential in the existing sample corpus (secrets:S8136); the hook was bypassed for this commit.

@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod Bot changed the title Exclude boolean casts from secret classification ACOMMONS-245 Exclude boolean casts from secret classification Nov 9, 2026
@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

ACOMMONS-245

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gitar-bot

gitar-bot Bot commented Nov 9, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Excluding exact CODESYS boolean casts changes secret classification; a genuine value in that form could be omitted from hardcoded-secret findings.

Excludes (bool)True and (bool)False from hardcoded-secret candidates via an anchored, case-insensitive pattern in the existing boolean literal group, with shared corpus entries and prefix/suffix near-misses that must still be flagged. No issues found.

Verification Rules 2/2 met Repos 10 inspected

Functional validation No results

Rules 2 passed 1 not applicable

✅ Internal artifact registries
✅ Repository license compliance

Broader impact Repos 10 inspected
Cross-repo 10 repositories inspected 0 open impacts

SonarSource/SonarJS Inspected
SonarSource/sonar-dotnet Inspected
SonarSource/sonar-xml Inspected
SonarSource/sonar-python Inspected
SonarSource/sonar-flex Inspected

5 more repositories

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqube-next

sonarqube-next Bot commented Nov 9, 2026

Copy link
Copy Markdown

@daniel-teuchert-sonarsource
daniel-teuchert-sonarsource merged commit 9decbed into master Nov 9, 2026
11 checks passed
@daniel-teuchert-sonarsource
daniel-teuchert-sonarsource deleted the codex/secret-classifier-boolean-exclusions branch November 9, 2026 12:36
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