Skip to content

refactor(types): ReviewIssue::new constructor and table-driven secret tests (#610) - #615

Merged
ajianaz merged 2 commits into
developfrom
refactor/issue-ctor-tables-610
Oct 9, 2026
Merged

ajianaz merged 2 commits into
developfrom
refactor/issue-ctor-tables-610

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

What

  • ReviewIssue::new(file, line, severity, title) plus chainable with_type / with_body / with_fix (test-only) / with_rule_id. All 38 hand-built struct literals (production: rules merge, index scanner; plus tests) now use it. Serde derive untouched.
  • New src/engine/secret_heuristics_tests.rs: one table (CASES, 66 rows) run end-to-end (deterministic::run -> merge -> postprocess), plus KNOWN_GAPS (15 rows) pinning current behaviour of unfixed false positives/negatives.

Why

Adding a ReviewIssue field (like rule_id/also_matches) touched ~46 sites. Now it is one place. The table makes secret-heuristic regressions visible per language/row. Part of #610 step 2; no user-visible change and no detection logic changed.

Testing

cargo fmt, cargo clippy --all-targets -- -D warnings, full cargo test x3 green.

Known gaps pinned (need issues): env-var reads / call expressions flagged as secrets (js, py, rs, java, kt); ${VAR} interpolation in env/.properties/sh flagged; Go := and var x string = not flagged; unquoted YAML value and quoted JSON keys not flagged; SQL PASSWORD '<lit>' not flagged.

Refs #610

🤖 Generated with Claude Code

@ajianaz
ajianaz merged commit 93da10c into develop Oct 9, 2026
14 checks passed
@ajianaz
ajianaz deleted the refactor/issue-ctor-tables-610 branch October 16, 2026 00:44
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.

1 participant