Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

pcb-guardrails

Latest version: v0.2.2

Overview

Last scanned
26 Nov 2026
Published
26 Nov 2026
PyPI package Publisher: Y-Watanabe11
0 Stars
0 Forks
1 Versions
Python Repo language

Scan summary

pcb-guardrails was last scanned on 26 Nov 2026 at version 0.2.2. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 26 Nov 2026.
  • Findings: No rules fired in version 0.2.2.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
0.2.2 LATEST 26 Nov 2026 No rules fired

No rules fired in 0.2.2

Findings

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.

README

The publisher’s own README, as collected from the registry.

pcb-guardrails

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.

What it checks

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.

Exit codes (stable, for agents and CI)

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.

Install

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.

Quick start (KiCad)

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
Other CAD tools: IPC-D-356

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
  • The nets are the board's, as exported with the layout, not the schematic's. A board that drifted away from its schematic is not caught in this mode; the KiCad mode compares with the schematic.
  • The IPC file's origin often differs from the Gerbers' (KiCad writes it relative to the drill / place origin). The offset is found by putting the IPC file's plated holes onto the drill hits: at least 90 % must land, and no other offset may come within 10 points. Otherwise it is exit 2; give the offset with --ipc356-offset DX,DY (mm). The offset used is printed.
  • Read: records 317 (through-hole pad, via), 327 (surface pad, top 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.
  • The format comes from two exporters and their output (KiCad's 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.
  • Net names are limited to 14 characters and references to 6. Nets whose names fill the field are reported as possibly cut short (two different nets cut to one name are read as one net); pads whose cut reference and pin repeat with different nets are kept apart as REF#n.
  • Pass --pcb as well for a KiCad board to honour net ties; without it a net-tie footprint shows as SHORT.
  • The IPC file says nothing about symbol pins. A footprint pad with no symbol pin (a MOSFET's drain tab) carries an unconnected net of its own and shows as SHORT with the copper it joins; the KiCad mode reads the symbol's pins and makes it a warning. A pad number one part repeats with a different net on each copy (KiCad does this for an unconnected thermal pad and its vias), joined by the footprint's copper, is a warning, not a SHORT.
Before and after generating a schematic / board
# 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".

Design freeze
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:

OX Radar and Response Center

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.

Where it’s listed

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).

  • pypi-releases pcb-guardrails

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Frame 2085668439 (1)
Group 1261154229