grithdocs

5. Argument length & structure

Oversized arguments, shell metacharacters in a path, and deep traversal.

Phase1, static
Score1.0 or 2.0
Sourcecrates/grith-proxy/src/filters/argument.rs
Confignone - the limits are compiled in

A small, deliberately soft signal: does the argument look like an argument? It returns on the first thing it finds, so at most one rule contributes.

RuleFires whenScore
path-injectiona path contains a shell metacharacter: ` $ ; & > < or a pipe2.0
path-traversala path contains ../../../ or the Windows equivalent2.0
path-too-longa path is longer than 4096 characters2.0
command-too-longa reconstructed command line is longer than 8192 characters2.0
url-too-longa URL is longer than 2048 characters1.0

Every path a call carries is checked. A rename checks the old path then the new one; a link checks the target first - the sensitive side - then the link path.

terminal
$ grith proxy test '{"type":"FileRead","path":"/home/u/projects/api/notes-$(cat /etc/shadow).txt"}'

Score:       2.0
Decision:    ALLOW

Filter Breakdown:
  + argument               2.0  [warning]  Path contains shell metacharacters

2.0 on its own is under the queue line, and that is the intent. This filter is not built to decide anything alone - it nudges a call that other filters have already found interesting. A git clone argument is usually a URL; a git clone argument that is 2KB of base64 is at minimum worth combining with whatever else fires.

Nothing here inspects content. Encoded payloads inside an argument are the job of secret-scan and egress-policy, which look for base64 runs and entropy bursts.

See also

Last updated: 2026-08-24Edit this page on GitHub →