How the risk score is worked out
Every change gets one risk score from 0 to 100 and a tier (low, medium, high or critical). The score does not depend on who wrote the change, and your repository policy decides what a score does (approve, hold or block), not how it is worked out.
The score is a weighted sum of three parts, rounded to a whole number:
| Part | Weight | What it measures |
|---|---|---|
| Code hazards | 40% | Reliability and security problems the rules find in the code you changed. |
| Blast radius | 35% | How much could be affected if the change goes wrong. |
| Change meaning | 25% | An AI review of what the change does to contracts: removed or renamed fields and endpoints, schema changes, new required configuration. |
score = 0.40 × code hazards + 0.35 × blast radius + 0.25 × change meaning, and each part is itself a number from 0 to 100.
Code hazards
Section titled “Code hazards”GroundZero reads the diff with 15 reliability rules (JavaScript, TypeScript and Go code, and SQL migration files). Every finding adds the points of its rule, and the total is capped at 100. The same rule firing twice on the same line counts once.
| Rule | What it catches | Severity | Level | Points |
|---|---|---|---|---|
gz-insecure-tls-skip-verify |
TLS certificate verification turned off. | Error | Critical | 45 |
gz-go-missing-body-close |
A Go HTTP response body that is never closed. | Error | Critical | 40 |
gz-missing-tx-rollback |
A database transaction with no rollback when something fails. | Error | Critical | 40 |
gz-pool-ceiling-missing |
A database or Redis connection pool with no max. |
Error | Critical | 40 |
gz-raw-sql-concatenation |
SQL built by joining strings instead of using parameters. | Error | Critical | 40 |
gz-sql-table-lock-ddl |
A migration that holds a table lock while it works (an index built without CONCURRENTLY, a column type change, SET NOT NULL, a constraint checked on the spot). |
Error | Critical | 40 |
gz-sql-not-null-without-default |
A migration that adds a NOT NULL column with no default. |
Error | Critical | 35 |
gz-sync-io-in-event-loop |
Synchronous file work or heavy crypto inside a request handler. | Error | High | 25 |
gz-infinite-retry-no-jitter |
A retry loop with a fixed delay, no jitter or no limit. | Warning | High | 25 |
gz-missing-http-timeout |
An outbound HTTP request with no timeout. | Warning | High | 25 |
gz-unbounded-promise-all |
Promise.all over a collection that can grow without limit. |
Warning | High | 25 |
gz-unhandled-floating-promise |
A promise that is neither awaited nor handled. | Warning | High | 20 |
gz-sql-missing-lock-timeout |
Column DDL with no lock_timeout. |
Warning | Medium | 15 |
gz-swallowed-catch-empty |
An empty catch that drops the error. |
Warning | Medium | 15 |
gz-unbounded-buffer-alloc |
Buffer.allocUnsafe with no size check. |
Warning | Medium | 15 |
A finding’s level is critical for an error worth 35 points or more, high for any other error or any rule worth 20 points or more, and medium otherwise. The level is what block_on_severity in your policy matches (together with the severity itself, error or warning).
The rules themselves are not configurable per repository. You can leave files or whole rules out with ignore_paths
and ignore_rules, which removes their findings from this part (see
Ignoring files and rules).
Blast radius
Section titled “Blast radius”Blast radius starts at 10 and adds points for what the change touches. The total is capped at 100.
| What it looks at | Points added |
|---|---|
| 5 to 9 files changed | +15 |
| 10 to 19 files changed | +25 |
| 20 or more files changed | +40 |
| Exported symbol removed | +20, and +10 more if it still has callers |
| Exported signature changed | +15 |
| 1 to 4 callers of the changed symbols, direct or indirect | +6 |
| 5 to 9 callers | +12 |
| 10 to 19 callers | +18 |
| 20 or more callers | +25 |
| Service tier 1 (most critical) | +30 |
| Service tier 2 (the default) | +15 |
| Service tier 3 | +5 |
| Service tier 4 | +0 |
A changed file path containing auth, database, db, migration, gateway, payment, security, session or token |
+20 |
The symbol and caller rows come from GroundZero’s own reading of the code and its calls, so they count only what it can
see. The service tier is the tier in your repository policy; set it to 1 for the services where a bad change costs
the most.
Change meaning
Section titled “Change meaning”An AI model reads the diff together with the findings above and the changed symbols, and scores from 0 to 100 how likely the change is to break something that depends on it. Benign fixes, comments and test files score low. New required configuration or altered data access paths score higher. Removed or renamed public fields, destructive schema changes and other breaking changes score highest. See Security and data for what is sent to the model.
If the AI review does not answer within its time limit, GroundZero asks the same question with a built-in rule-based reading, so a change always gets a score. A destructive schema change or a removed export that still has callers scores high with it, and a change that only touches comments or tests scores close to zero.
From score to tier
Section titled “From score to tier”| Tier | Score |
|---|---|
| Low | 0 to 29 |
| Medium | 30 to 59 |
| High | 60 to 79 |
| Critical | 80 to 100 |
What each tier does to the check depends on your policy. With the defaults, a low score is approved, a medium score gets a neutral check, and a high or critical change needs sign-off. See How the result is decided.
Two worked examples
Section titled “Two worked examples”A small change to a database client. It touches 3 files in a standard (tier 2) service, one of them
src/db/pool.ts, where a new Pool has no max (40 points, one finding). The AI review finds nothing breaking and
gives 15.
- Code hazards: 40.
- Blast radius: 10 (start) + 15 (tier 2) + 20 (a
dbpath) = 45. - Change meaning: 15.
- Score: 0.40 × 40 + 0.35 × 45 + 0.25 × 15 = 35.5, rounded to 36, a medium change. The check is neutral and does not block the merge.
A risky migration in a tier 1 service. It touches 6 files, including db/migrations/0042_add_column.sql, which adds
a NOT NULL column without a default (35) and builds an index without CONCURRENTLY (40); it sets a lock_timeout, so
no other rule fires. The AI review gives 70.
- Code hazards: 35 + 40 = 75.
- Blast radius: 10 + 15 (6 files) + 30 (tier 1) + 20 (a
migrationpath) = 75. - Change meaning: 70.
- Score: 0.40 × 75 + 0.35 × 75 + 0.25 × 70 = 73.75, rounded to 74, a high change. It is below the default block
threshold of 80, but the default policy requires sign-off for high-risk changes, so the check is
action_requireduntil someone with permission approves it.
Seeing the breakdown in the console
Section titled “Seeing the breakdown in the console”The change pane shows how a change’s score adds up, under its score tiles:
- One bar and three rows, one per part: the part’s own score, its weight and the points it adds (“75 of 100 × 40%, +30.0”).
- The fix that lowers the score most. GroundZero works the score out again without each hazard finding and names the one that moves it most, with the tier it would land in (“Fixing Table-locking DDL would lower the score to 58, medium”). Only code hazards are offered: their effect on the score is exact, and the AI review’s is not. It says nothing about the check’s result, which your policy decides.
- Why 74? opens a list of every term behind the score: each finding, each blast radius term (including the service tier) and the AI review, with what each adds to the score, and the rounding at the end.
The panel beside the lanes on Home shows the same bar in small and the same fix, and pointing at the score on a card in the lanes shows the bar and the three parts without opening it. A change evaluated before this was added, or a release, shows no breakdown.
What does not change the score
Section titled “What does not change the score”- Who wrote the change. A person, an AI agent and a bot get the same score for the same diff. Authorship can change the verdict only if you ask it to in your policy (see Changes written by AI agents).
- Your thresholds.
block_thresholdandauto_approve_thresholddecide what a score does, not what it is. - What does change it: the code in the diff, the files it touches, the
tierof the service, andignore_pathsandignore_rules, which remove findings from the code hazards part.