Skip to content

[HIGH][SECURITY] Corrupt or unreadable config silently disables enforcement while the banner still prints ENFORCING #60

Description

@Aniketvish0

Migrated from armoriq/conmap-auto#710.

Fix lands in: armoriq/armorclaude and armoriq/armorcodex. Filed here because conmap-auto is this session's tracker for CLI/SDK work.

Line refs are from origin/main: armorclaude @ 688bbc3 (AC), armorcodex @ 72d9e13 (AX).

Three variants.

(a) AC scripts/lib/policy.mjs:52-77 + scripts/lib/fs-store.mjs:12-16 — a SyntaxError parsing policy.json returns an all-allow default. It also disables the intent gate, because the resulting permissive policy is detected as "frictionless" (engine.mjs:84-91, 875-876). One corrupt byte removes both policy denial and the plan gate, with no signal.

(b) AX plugins/armorcodex/scripts/lib/policy.mjs:237 + fs-store.mjs:9-19 — same chain, terminating in return {allowed:true}. handleSessionStart (AX engine.mjs:162-167) still prints ArmorCodex active (ENFORCING…) because it reads only config.mode.

(c) AC config.mjs:90-98 / AX config.mjs:75 — an unreadable credentials file is swallowed, leaving apiKey:"", which silently disables audit, crypto verification, observability and intent-minting (AX engine.mjs:611-614, config.mjs:106,165-168) while the same banner prints.

Ask

  • Fail closed on unparseable policy.
  • Make the banner reflect the enforcement state actually achieved, not the configured mode.
  • Log all three at error level.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsecuritySecurity vulnerability or concern

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions