Skip to content

ai-guard: read Antigravity permissions.allow, and correct the stale toolPermission validation note (from #202) #209

Description

@Ju571nK

Gap

#202's hardware verification turned up a second auto-approval path in agy 1.1.7 that the parser does not read. Headless mode names it in its own error text:

a tool required the "command" permission that headless mode cannot prompt for … Add an allow-rule under permissions.allow in settings.json (e.g. command(<target>))

Verified: {"permissions":{"allow":["command(echo)"]}} in ~/.gemini/antigravity-cli/settings.json auto-approved a call that is otherwise refused. This is the same class as the toolPermission finding the parser already emits, but per-command rather than global — and a broad entry (command(*), or one covering a destructive prefix) is a standing approval with no prompt.

Also from #202: a stale contract note

toolPermission still governs behaviouralways-proceed auto-approved on 1.1.7 — so the existing detection stays. But the parser's documented premise no longer holds: writing an unrecognized value produced no rejection and no rewrite, leaving the file byte-identical. The #158/PR#167 note that agy rejects unknown values and falls back to request-review should be corrected, and the effect of an unrecognized value is now unverified rather than known-safe. That also means the probing method used in #158 can no longer enumerate the accepted values, so the reported 4th value strict stays unconfirmed.

Work

Scope

Mechanism only. Parser + reason reuse (AutoApprovalEnabled fits) + tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:ai-spmAI Security Posture Management surfaceenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions