# Checks that block

A failing check only stops code from reaching main when main requires that check to pass. Otherwise it's a warning, and the code can still be merged.

Source: https://ha-barkley.github.io/security/controls/blocking-checks/

From HASC, the Home Assistant Security Controls for integrations, cards and apps. A community catalog, not an official Home Assistant or Open Home Foundation project.

Each control has an ID, cited as HASC-CI-4, and a level from 1 to 3. "Level marker" means anyone can check the control from outside the project, and levels are graded on those controls only.

> **From the 2026 sweep.** Of the 909 apps that run a security check, 86 (9.5%) require one that blocks on what it finds. Another 35 require a scan to run but not to pass, because CodeQL's analysis job passes whatever it finds. The [Marketplace report](https://ha-barkley.github.io/marketplace/2026/security-basics/) has more on this.

## Controls

### GATE-1: For CodeQL, require code scanning results

*Level 2 (or a required check) · Level marker*

In your main branch ruleset, turn on *Require code scanning results*, add CodeQL, and set it to block on security alerts of "High or higher". Requiring "Analyze (python)" only proves the scan ran.

### GATE-2: Require your other checks by job name

*Level 2 (or code scanning) · Level marker*

*Require status checks to pass* → add `dependency-review`, `pip-audit`, `ruff-security`, `hassfest` and `marketplace` from the workflows in [Checks in CI](https://ha-barkley.github.io/security/controls/ci/). A check only shows up in the list after it has run once.

### GATE-3: Make sure each check can fail

*Level 2 · Level marker*

Remove `continue-on-error: true`, `|| true` and `--exit-zero` from security steps. Some tools report without failing unless you ask them to. Trivy, for example, needs `exit-code: 1`.

### GATE-4: Work through pull requests, even alone

*Level 2 · Level marker*

Push to a branch, open a pull request and merge it when the checks are green. It takes a minute longer and it's the only way the required checks see your code first.

### Check it worked

Open a pull request with a failing check. The merge button should be blocked and say which required check failed.

Barkley doesn't check this yet.
