← Back to blog Feature · November 2026

What bugweg Checks on Every Pull Request

Published · Bugweg team · drafted with AI, reviewed by a human · 4 min read

bugweg runs one check on every single pull request and a deeper set of passes on riskier diffs — here's exactly what runs when. Secrets Detection scans every PR, no exceptions. The Behavioral Contract Validator only kicks in on MEDIUM-tier-and-up diffs. And a .bugweg.yml file in your repo controls what counts as an issue at all, on top of either.

Secrets Detection: bugweg's only check that runs on every PR

Secrets Detection is the one check that runs on literally every pull request, including LOW-tier PRs that are docs-only or image-only and skip bugweg's LLM review entirely. It's a regex and Shannon-entropy scan looking for hardcoded AWS-, GitHub-, Slack- and Stripe-shaped credentials and private key blocks. If it finds a match, bugweg reports a description of the credential type it detected — the matched value itself is not stored or echoed back.

The deeper pass: contract checking on riskier diffs

Not every PR gets the same scrutiny beyond that baseline. The Behavioral Contract Validator is a dedicated pass that kicks in on MEDIUM-tier-and-up PRs — it extracts function and type signatures from every changed file using tree-sitter, running in an isolated sandbox, then runs a separate Sonnet call whose only job is contract consistency: signature mismatches, unhonored return types, call sites that weren't updated to match a changed signature, and violated nullability contracts. This runs alongside bugweg's general bug-finding review, which still does its own folded-in contract check as a fallback, so the dedicated pass is additive, not a replacement.

This is available on Team and Enterprise, and during the free trial — it's not included in Developer. In bugweg's own internal test on a pull request with two nullability violations, the Validator flagged both and suggested a fix for each. Like any AI review, it can still miss issues or flag ones that aren't real, so treat its findings as a strong second opinion, not a substitute for a type checker.

One gap the feature started with was narrow vision: it originally only saw callers inside the PR's own diff, missing anyone calling the changed function from a file the PR didn't touch. That's now closed by reusing Dependency Blast Radius's own call-site search to find callers outside the diff, and walking up to two hops further — a caller's caller, and one hop beyond that — with a guard against circular call chains looping the search forever. In an internal test on a 3-file call chain, bugweg correctly found a function's direct caller and that caller's own caller, correctly terminated a circular chain instead of looping, and correctly came back empty for a function with no callers anywhere. The scan still has a bounded file and call-site budget per hop, the same tradeoff Blast Radius's own search makes, so a very large or very deep repo won't surface every caller at every level — and the whole thing remains an LLM judgment call, not static type analysis.

.bugweg.yml: Controlling What Counts as an Issue

Where the tiers above decide what runs, a .bugweg.yml file in the repo decides what counts. Teams can add one to exclude paths using glob patterns, or override severity per bug type — so a pattern you don't consider worth flagging in a generated-code directory, say, doesn't have to carry the same weight it would elsewhere. The config file is read from the PR's own base commit on every review, which means a pull request can't change the rules that are judging it: if someone tries to loosen severity in the same PR that trips the rule, bugweg is still reviewing against the old config. Edits to .bugweg.yml only take effect once that PR merges, so any change to what bugweg enforces goes through the same review process as the code it governs.

Three checks, three different triggers: Secrets Detection runs on every PR with no exceptions, the Behavioral Contract Validator runs only on MEDIUM-tier-and-up PRs on Team and Enterprise (and during the trial), and .bugweg.yml sits underneath both, read from the base commit so a PR can't rewrite the rules it's judged by.

Put together, the shape is simple even if the mechanics aren't: a secrets check that never skips a PR, a contract-consistency pass that only spins up once a diff is risky enough to warrant it, and a config file that lets a team narrow or reweight what bugweg flags, with the one guardrail that the config itself can't dodge review. If you're deciding whether bugweg fits your repo, that's the actual question to ask next: which of your PRs are MEDIUM-tier or higher, and what would you put in an exclude list on day one.

Keep reading: bugweg features · how bugweg works · Bug Autopsy Template for Recurring Bugs · Secrets Detection on Every PR, Even the Trivial Ones

See it on your own repo. 3 free PR reviews per developer. A card is required to start and you are not charged during the trial. See pricing for what happens after.

Install on GitHub
Back