5. Argument length & structure
Oversized arguments, shell metacharacters in a path, and deep traversal.
| Phase | 1, static |
| Score | 1.0 or 2.0 |
| Source | crates/grith-proxy/src/filters/argument.rs |
| Config | none - 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.
| Rule | Fires when | Score |
|---|---|---|
path-injection | a path contains a shell metacharacter: ` $ ; & > < or a pipe | 2.0 |
path-traversal | a path contains ../../../ or the Windows equivalent | 2.0 |
path-too-long | a path is longer than 4096 characters | 2.0 |
command-too-long | a reconstructed command line is longer than 8192 characters | 2.0 |
url-too-long | a URL is longer than 2048 characters | 1.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.
$ 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 metacharacters2.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
- 8. Command structure analysis
- 10. Egress policy - shape signals on outbound arguments