Rule scopes
Rules exist at three levels and inherit downward:- Organization (global) — applies to every connected repository. Ideal for security baselines like
no-hardcoded-secrets. - Repository — enabled per repository from the dashboard or committed as markdown in the repo.
- Library — curated community best practices you can opt into with one click.
Anatomy of a rule
Rules are YAML. A deterministic rule targets AST patterns and attaches a message the reviewer posts on violation:Match against structure, not text:
ast_call matches call targets and argument shapes, so the rule fires regardless of whitespace, variable names, or formatting your team’s linter rewrites.Categories in the catalog
The built-in catalog ships 13 rules across five categories:- Security — parameterized SQL, hardcoded secrets (entropy + token regexes), injection-prone eval
- Architecture — multi-tenant query scoping (
tenant_id/organization_idfilters), layering boundaries - Performance — unbounded goroutine/async spawns, N+1 query shapes in loops
- Reliability — error swallowing, missing timeouts on outbound calls
- Code Style — formatting-independent conventions enforced by AST shape
scandrix rules list in the CLI.
Dry Run previews
Before enforcing a rule change, run a Dry Run: the rule is evaluated against recent historical PRs and you see exactly which comments would have fired.1
Edit or create the rule
Change severity, narrow a match, or add a new rule.
2
Run Dry Run
Click Dry Run in the dashboard (or
scandrix rules dry-run <id> --since 30d).3
Review the diff of comments
ScanDrix shows would-be findings per historical PR, with a false-positive rate for the change.
4
Promote
Happy with the signal? Promote the rule to active. Otherwise keep iterating — Dry Runs never touch live PRs.
