Skip to content

guardrails: env -u / env -i prefixes false-positive under value-blind config-env shape guard (over-block, fail-safe) #1013

Description

@kyle-sexton

Split from PR #903 review thread (lib/hook-utils.sh:694 discussion). Under the value-blind reposture, a command like env -u AV git --config-env=alias.rh=AV rh or env -i ... is shape-blocked even though the unset/cleared env var means the alias cannot resolve — a false positive.

Direction: OVER-block (fail-SAFE) — the guard refuses something harmless; it never lets something dangerous through. Deferrable per the defer-forbidden direction test (operating-procedures: under-counting/over-blocking is fail-safe).

Post-reposture the over-block persists by design (the guard deliberately never reads env values), so the fix space is narrow: either model env -u/-i prefixes as a shape-level exception, or document as an accepted limitation of value-blindness. Origin: PR #903 review finding (reviewer identified the pre-reposture ambient-lookup mechanism; the reposture changed the mechanism but preserved the over-block).

Repro: with guardrails active, env -u AV git --config-env=alias.rh=AV status style invocations refuse despite AV being unset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.priority: mediumReal value, no hard deadline; normal backlog flow.status: readyTriaged, unblocked, and fully specified; eligible to pick up.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions