Skip to main content

Rules

Every finding names the rule that produced it. This is the complete catalog; the same definitions ship machine-readably in capabilities and in every JSON meta block.

Architecture

RuleSeverityFires when
circular-dependencyhighAn elementary dependency cycle A -> … -> A exists among modules
unresolved-importmediumAn import names a path inside the repository that resolves to no file. Asset and loader-query specifiers are excluded — a bundler rule, not ovecc, resolves those
boundary rules (your name)configurableAn import crosses a [[rules.boundaries]] declaration with allowed = false
banned-import/<name>configurableAn import matches a [[rules.banned_imports]] pattern

Architecture contract

Every verdict from .ovecc/architecture.toml. These fire in architecture diff and architecture check, and land in violations and gate at each index.

RuleSeverityFires when
architecture/divergencehighA component imports another its depends_on does not declare
architecture/forbidden-dependencyhighA component imports another its cannot_depend_on forbids outright
architecture/restricted-accesshighA component imports another whose consumed_by does not admit it. An empty consumed_by admits nobody
architecture/required-dependencyhighA file of a component with must_depend_on imports the required component nowhere. Files that import nothing are exempt
architecture/interface-bypasshighA component imports another's internals instead of its declared interface files
architecture/slice-isolationhighTwo slices of a slices = true component import each other (the @x public-API exception aside)
architecture/capabilitymediumA component uses an ambient capability its deny_capabilities forbids
architecture/complexity-budgetmediumA function exceeds the component's max_cyclomatic / max_cognitive budget
architecture/coverage-floormediumA component's line coverage is under its min_coverage. Silent when no tracefile was indexed
architecture/deprecated-usemediumA dependency the contract marks deprecated is still imported
architecture/external-denymediumA component imports an external package its external_deny bans
architecture/unassignedlow/highIndexed files match no component's paths, per the contract's unassigned policy
architecture/absencelowA declared depends_on edge no import implements (contract hygiene; never gates)
architecture/behavioral-couplinglowTwo components the contract declares independent, that no import connects, keep changing in the same commits. Advisory — tune with coupling in the contract

mode = "warn" caps every one of these at Low, so nothing gates.

Security (code)

RuleSeverityFires when
security/secretcriticalA hardcoded credential — provider pattern (AWS, Stripe, …) or high-entropy value in a secret-named binding
security/evalhighDynamic code execution: eval, new Function
security/command-exechighOS command execution (exec / execSync / spawn on a child-process module; os.system / subprocess.*; exec.Command; process::Command)
security/weak-hashmediumObsolete hashing algorithm (MD5 / SHA-1)
security/corsmediumPermissive CORS: origin: "*" or setHeader("Access-Control-Allow-Origin", "*")

Taint flows

RuleSeverityFires when user-controlled input may reach…
taint/evalcritical…dynamic code execution
taint/commandcritical…OS command execution
taint/writeshigh…a database write (injection candidate)
taint/readsmedium…a database read

Taint findings are explicit reachability over-approximations — see how to read them.

Dependencies

RuleSeverityFires when
audit/osvper advisory (default high)A declared dependency matches a known OSV advisory
unlisted-dependencymediumA package is imported but missing from every package.json (phantom dependency)
unused-dependencylowA manifest dependency is never imported (opt-in: [index] detect_unused_deps)
unused-dev-dependencylowA devDependency is never imported, invoked by a script, or config-loaded (opt-in)
unused-optional-dependencylowAn optionalDependency is never imported or invoked by a script (opt-in)

Dead code

RuleSeverityFires when
unused-exportlowAn export is reachable but imported by no reachable module
unused-typelowA type-only export (interface/type alias) is never imported
unused-filelowA file is reachable from no entry point and imported by nothing

Code health

RuleSeverityFires when
complexitymedium/highA function exceeds the cyclomatic/cognitive complexity thresholds
long-functionlow/mediumA function exceeds the unit-size thresholds (75 / 150 source lines)
long-parameter-listlow/mediumA function has too many parameters (7 / 10)

Code smells

Structural smells over the resolved call graph and symbol table.

RuleSeverityFires when
feature-envylow/mediumA function's resolved calls predominantly target one other module (≥ 5 calls, ≥ 3× its own-module calls, ≥ half of all its resolved calls)
large-classlow/mediumA class/struct/enum has too many methods in one file (20 / 30)
data-clumpslow/mediumThe same group of ≥ 3 parameter names recurs across ≥ 3 functions — the group wants to be a parameter object

Hygiene

RuleSeverityFires when
stale-suppressionlowAn ovecc-ignore comment suppresses no finding — it would silently swallow the next real finding on its line

Suppressing findings

Inline, per line: // ovecc-ignore, // ovecc-ignore-next-line, or # ovecc-ignore in Python — the finding is dropped at index time. Per repository: the baseline ratchet. Auto-fixable rules are remediated by ovecc fix.