Skip to main content
Glama
glatinone

Secops Toolkit MCP

by glatinone

assess_shell_command

Analyze shell commands for hidden malicious constructs that bypass pattern-based security guards by detecting shell expansions like command substitution, variable injection, and obfuscation.

Instructions

Assess a shell command for constructs that look benign to naive string matching but execute something else once a shell actually expands them.

Closes the bypass class GuardFall (2026-06) confirmed against 10 of 11 popular open-source AI coding agents (Aider, Cline, Goose, Plandex, and others): their command-safety guards check the raw string a model wrote, not what the shell rewrites it into via quote removal, backslash escapes, command substitution, and variable/IFS expansion. Never executes the command or any part of it.

Tokenizes with real POSIX quote-removal rules so quote-fragmented or backslash-obfuscated commands (r'm' -rf /) normalize to what actually runs (rm -rf /) before any check. Flags command substitution ($(...), backticks, recursively assessed), unquoted variable expansion, IFS manipulation, ANSI-C quoting, a fetch or encoded-payload decode piped straight into an interpreter (curl ... | sh, base64 -d | sh), setuid grants (chmod +s, install -m 4755), and in-place credential-file overwrites (sed -i/tee targeting ~/.aws/credentials and similar). Also flags the shell-level shape of Cursor's DuneSlide disclosure (CVE-2026-50548/50549): a symlink whose target or link name lands on a sensitive path (ln -s ~/.ssh/id_rsa ./notes.txt), and a cd into a sensitive directory chained with a further command that would act on relative paths inside it (cd ~/.aws && cat credentials). Also flags Cursor's Terminal Tool Allowlist Bypass (CVE-2026-22708): export/typeset/declare/readonly/ local assigning a behavior-redirecting variable (PAGER, BROWSER, PYTHONWARNINGS, PERL5OPT) that a later, separately- approved command would then respect, plus zsh's zero-click ${(e):-...} forced-parameter-expansion construct. Returns risk (safe, suspicious, or dangerous), per-segment findings, and bypassed_raw_pattern_match -- concrete evidence a normalized segment caught something the raw text alone would have missed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description details that the tool never executes the command, tokenizes with POSIX rules, and returns risk levels and findings. It also explains the types of dangerous constructs flagged (e.g., command substitution, variable expansion, symlink attacks). Since no annotations are provided, the description fully carries the burden of behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is thorough and well-structured, starting with the overarching purpose, then detailing specific attack classes, and ending with output fields. While slightly long, every sentence adds value, making it appropriately detailed for a complex tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the tool's purpose, behavior, output (risk, findings, bypassed_raw_pattern_match), and specific attack patterns. It is complete for an agent to understand when and how to use the tool, especially given the complexity and the existence of an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The only parameter is 'command', which is a string. The description adds meaning by explaining it is a shell command to assess, but the schema is minimal (0% coverage). Given the single obvious parameter, the description is adequate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool assesses shell commands for constructs that bypass naive string matching, listing specific attack classes (GuardFall, DuneSlide, Terminal Tool Bypass). It is distinct from sibling tools (e.g., refang_ioc, extract_iocs) which deal with IOCs, not shell commands.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implicitly tells when to use the tool (when you need to detect obfuscated shell commands) but does not explicitly state when not to use it or name alternatives. However, the specificity makes usage clear, and no sibling tool performs similar analysis.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/glatinone/secops-toolkit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server