---
title: "ArtifactBoundaryGuard certifies different config…"
description: "GHSA-c93v-fh7f-873f: ArtifactBoundaryGuard certifies different config and files than the build ships (High). Affected and fixed versions of qwed-infra."
url: https://qwedai.tech/security/advisories/ghsa-c93v-fh7f-873f
---

[Security](https://qwedai.tech/security) · [Advisories](https://qwedai.tech/security/advisories) · GHSA-c93v-fh7f-873f

# ArtifactBoundaryGuard certifies different config and files than the build ships (High)

high Fixed in 0.4.0 GHSA-c93v-fh7f-873f · Published 13 November 2026

## Summary

ArtifactBoundaryGuard (`qwed_infra/guards/artifact_boundary_guard.py`, `_check_build_config`) reads only `pyproject.toml` and only the package dir, but hatchling builds from more configuration and more files. Three gaps let forbidden content ship (including secrets and executed build-time code) while the guard reports VERIFIED/ADMIT.

## Affected

qwed-infra <= 0.3.0 (verified on main @ b3098be = v0.3.0; PoCs built with hatchling 1.28.0). No patched version yet.

## Details

1.  `hatch.toml` ignored: only `pyproject.toml` is loaded, but hatchling merges `hatch.toml` over `[tool.hatch]`. PoC: clean `pyproject.toml` + `hatch.toml` with `[build.targets.wheel.force-include] "secrets/.env"="mypkg/.env" > guard VERIFIED/ADMIT, wheel contains` mypkg/.env`. With a hooks table in` hatch.toml`, build-time code runs (canary written). Control (same force-include in` pyproject.toml\`) is BLOCKED.
2.  `[project]` readme/license-files never inspected: the `[project]` table is never read. PoC: `license-files = ["deploy/*", ".env"]`, `readme = {file=".env"}` > guard VERIFIED/ADMIT, wheel ships `dist-info/licenses/.env` and `dist-info/licenses/deploy/id_ed25519` (a private key); METADATA contains `DB_PASSWORD`, displayed publicly on PyPI. Variant: `readme = ../host_credentials` ships paths outside the project root.
3.  `[tool.hatch.version] source = "code"` and `[tool.hatch.metadata.hooks.*]` never read. PoC: version source `code` with `path = "tools/ver.py"` > guard VERIFIED/ADMIT, hatchling executes `tools/ver.py` during the build (canary written).

## Impact

Secrets/private keys ship in wheels, build-time code executes, and PyPI-visible metadata leaks secrets — all under a VERIFIED/ADMIT verdict.

## Fix direction

Read the whole hatchling configuration (`hatch.toml`, `[project]` readme/license-files, version source, metadata hooks) and reject unmodelled keys; allowlist readme/license-files to root README\*/LICENSE\* (no `..`, no absolute paths) and scan them. Long term: certify the built wheel RECORD, not the source tree.

## CWE

CWE-693 (Protection Mechanism Failure); secret-shipping aspect CWE-538.

[All advisories](https://qwedai.tech/security/advisories)

Affected and fixed

qwed-infra

Affected <= 0.3.0 Fixed in 0.4.0

[View on GitHub](https://github.com/QWED-AI/qwed-infra/security/advisories/GHSA-c93v-fh7f-873f)
