Scan your whole stack
From OX Research Newsroom
Are you using pcb-guardrails?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.2.2
pcb-guardrails was last scanned on 26 Nov 2026 at version 0.2.2. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.2.2 LATEST | 26 Nov 2026 | No rules fired |
Findings for v0.2.2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.2.2; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Verification guardrails for AI-assisted PCB design — independent checks of what the fab actually receives (Gerber + drill vs. schematic netlist), each born from a real failure.
An AI agent (or a tired human) can produce a board whose design database looks perfect while the files sent to the fab are wrong: a pour that was never filled, a layer that was not exported, a PCB that drifted from the schematic, a via whose drill went missing. CAD-internal checks (DRC, ERC) look at the database. This tool looks at the deliverable, rebuilds it from scratch, and compares it with the schematic.
A via whose drill went missing from the export. The board file still has the via, so the CAD tool sees the net as connected:
$ pcb-guardrails netcheck demo/novia/gerbers --netlist demo/novia/board.net.xml --pcb demo/novia/board.kicad_pcb
pads 5, schematic nets with pads 2, copper layers 2, drill files 1
OPEN 1 / SHORT 0 / NO-COPPER 0 / BREAKOUT 0 / VIA-NO-HOLE 1 / pads of parts not in the schematic 0 / copper islands without pads 0
OPEN B: R1.1 | R2.2
VIA-NO-HOLE via (0.3 mm drill) at [15.0, -14.0] in the board data has no plated hole in the drill files
FAIL
Inner planes plotted before the zones were filled. The Gerbers are valid files; they just have no ground plane:
$ pcb-guardrails fill demo/plane --min In1.Cu=0.8 --min In2.Cu=0.8
board area 600.0 mm2
F.Cu copper 0.2%
In1.Cu copper 0.0% FAIL (need >= 80%)
In2.Cu copper 0.0% FAIL (need >= 80%)
B.Cu copper 0.2%
FAIL
Both are real output on synthetic boards (no real design involved). Reproduce them from a clone with
python examples/demo.py demo; the same export without the faults (demo/good) passes.
| Command | Catches | How |
|---|---|---|
netcheck |
OPEN (a net split into pieces), SHORT (two nets on one piece of copper), NO-COPPER (a pad with no copper in the files), BREAKOUT (a plated hole only partly covered by copper on a layer: a shifted or mis-registered layer), VIA-NO-HOLE (a via of the board with no drill hit, e.g. a lost stitching via), no-connect pins touching a net | Parses the Gerber copper layers and Excellon drills into geometry, joins copper through plated holes, and compares the resulting pieces with the schematic netlist. The CAD tool's connectivity engine is never used. Pad positions come from the .kicad_pcb; its nets are ignored. |
fill |
Pours / planes missing from the Gerbers (e.g. zones never filled before plotting — this exports cleanly, with no error) | Copper area per layer relative to the board area; fail below --min LAYER=RATIO. |
dfm |
Values below your fab's minimums; copper outside the board | Measures trace widths, gaps between conductors and within one conductor, copper-to-edge, drill sizes, hole-to-hole, hole-to-edge, via and PTH annular rings, silk line widths. Judges them only against a rules file you fill in (--rules). Copper entirely off the board, or crossing the board edge, fails with or without rules (see Board edge). |
freeze |
A frozen file rewritten or changed by a later tool run (a "save" that dropped nets, a regenerated board, a re-export into the upload folder) | freeze record stores a SHA-256 and a fingerprint of what each file means; freeze check reports SAME / EQUIVALENT (bytes differ, geometry or content identical: new UUIDs, dates, aperture numbers, item order) / CHANGED / MISSING / NEW. |
wrongnet |
A track or via touching a pad of another net in the .kicad_pcb (a track end on the neighbouring pad of a mirrored footprint) |
Real pad shapes (rect, roundrect, oval, trapezoid, custom; absolute angles) against track and via copper, per copper layer; net-tie footprints respected. Database-side; netcheck sees the same short in the Gerbers. |
libcheck |
A symbol or footprint that does not exist on disk, a disabled library, a symbol pin with no footprint pad | Resolves Library:Name through the project and global sym-lib-table / fp-lib-table (nested tables, ${VARS}), reads the .kicad_sym / .kicad_mod, compares pin and pad numbers. On a parts list before generation, or on a schematic. |
dnp |
A DNP decision that did not reach the schematic or board; alternatives fitted together | Compares the DNP flag per part across parts.csv, .kicad_sch and .kicad_pcb; --exclusive A,B groups. Unclear values in the parts list (DNP?, see D1) stop the check. |
layers |
Wrong or missing files in the upload folder | Shows how each file was classified (X2 FileFunction, falling back to Protel/KiCad extensions). |
Every check is proven by tests that inject one fault each into a small synthetic board — a deleted trace, an extra trace, a removed via drill, a missing layer file, a shifted layer, a schematic that changed after layout, a no-connect pin tied to a net, a clear-polarity cut, an unsupported Gerber feature — and assert it is reported.
| Code | Meaning |
|---|---|
| 0 | all checks passed; for fill / dfm run without limits, measured only: the output says MEASURED ONLY — not judged and the JSON has "judged": false (dfm still fails on copper outside the board) |
| 1 | a check failed |
| 2 | the input could not be checked (unsupported Gerber feature, missing file, bad arguments). Never read this as "probably fine". |
Unknown Gerber constructs stop the check with exit 2 instead of being skipped: a checker that ignores what it does not understand will report a broken board as clean.
From PyPI:
pip install pcb-guardrails
Or a tagged release from GitHub:
pip install "git+https://github.com/Y-Watanabe11/pcb-guardrails@v0.2.2"
From a clone, for development:
pip install -e ".[dev]" # with pytest
Requires Python ≥ 3.10, shapely ≥ 2 and sexpdata.
kicad-cli sch export netlist --format kicadxml -o board.net.xml board.kicad_sch
pcb-guardrails layers fab/gerbers
pcb-guardrails netcheck fab/gerbers --netlist board.net.xml --pcb board.kicad_pcb --json netcheck.json --net-csv nets.csv
pcb-guardrails fill fab/gerbers --min In1.Cu=0.8 # a solid inner ground plane
pcb-guardrails dfm fab/gerbers --pcb board.kicad_pcb --rules my_fab_rules.json
Any CAD tool that exports an IPC-D-356 netlist (the test netlist fabs use for electrical test) can be checked:
pcb-guardrails netcheck fab/gerbers --ipc356 board.ipc # instead of --netlist and --pcb
--ipc356-offset DX,DY
(mm). The offset used is printed.A01 or bottom), 367 (non-plated hole,
ignored), N/C pads (must sit alone on their copper), UNITS CUST 0. Anything else (other units, blind /
buried via records 307 / 027, conductor records) is exit 2.export_d356.cpp and KiCad 10.0.4 files, the
EAGLE ipc-d-356.ulp), not from the IPC standard, which is sold by IPC. The fields after column 32 are read by
their letters because the exporters place them in different columns; the drill size is not used because they
write it in different units.REF#n.--pcb as well for a KiCad board to honour net ties; without it a net-tie footprint shows as SHORT.# parts.csv: ref,symbol,footprint,dnp (see examples/parts.example.csv)
pcb-guardrails libcheck --parts parts.csv --kicad-share <KiCad's folder with symbols/ and footprints/> \
--global-tables <KiCad's user config folder> # before generating
pcb-guardrails libcheck --parts parts.csv --sch board.kicad_sch --kicad-share ... --global-tables ...
pcb-guardrails dnp --parts parts.csv --sch board.kicad_sch --pcb board.kicad_pcb --exclusive R1,R2
pcb-guardrails wrongnet board.kicad_pcb
KiCad sets its library variables (KICAD10_SYMBOL_DIR ...) at run time and does not store them, so libcheck
needs --kicad-share (it maps KICADnn_SYMBOL_DIR to <dir>/symbols, ..._FOOTPRINT_DIR to <dir>/footprints)
or --var NAME=PATH. On macOS that folder is /Applications/KiCad/KiCad.app/Contents/SharedSupport and the user
config folder ~/Library/Preferences/kicad/<version>. An unresolved variable, or a library that is not in the
project table when no global tables were given, is exit 2, never "missing".
pcb-guardrails freeze record fab/gerbers board.kicad_pcb board.kicad_sch -o freeze.json # at the freeze
pcb-guardrails freeze check freeze.json # after every tool run; exit 1 on any rewrite or change
pcb-guardrails freeze check freeze.json --allow-equivalent # accept rewrites that changed nothing real
Folders are recorded non-recursively (hidden files skipped) and new files in them are reported. Paths are stored relative to the record, so commit it next to the files. What the fingerprint ignores:
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.