TrustShell — Pre-Execution Security Gate
Stop the command before it becomes the incident.
TrustShell is a pre-execution cybersecurity tool that analyzes shell commands, scripts, and terminal screenshots before they are run.
Instead of waiting for an attack or destructive mistake to happen, TrustShell examines the intended action first and produces an explainable SAFE, REVIEW, or BLOCK decision.
The Problem
Developers, students, automation systems, and AI agents increasingly work with powerful terminal commands. A single unsafe command can expose credentials, download malicious content, escalate privileges, destroy files, or execute untrusted code.
Most security tools focus on detecting what has already happened.
TrustShell focuses on the moment before execution.
How It Works
A user enters a command or script, or uploads a terminal screenshot.
TrustShell then:
1. Detects
A deterministic security engine analyzes the input against 27 rules spanning dangerous behaviors such as:
- remote downloads
- remote execution
- privilege escalation
- destructive operations
- secret/credential access
- persistence
- obfuscation
- suspicious command chaining
- sensitive filesystem access
2. Explains
TrustShell extracts the exact evidence responsible for each finding, assigns severity and confidence, and maps relevant behaviors to MITRE ATT&CK techniques.
3. Decides
The system produces an explainable:
SAFE
REVIEW
or
BLOCK
decision with a 0–100 risk score.
4. Recommends
Instead of stopping at "dangerous", TrustShell explains why the behavior matters and provides a safer alternative or workflow.
AI + Gemma
TrustShell includes a Gemma reasoning layer designed to complement the deterministic security engine.
Gemma 4 E2B is used through local inference in the project's reproducible Gemma implementation. The model analyzes the supplied command as data, identifies semantic security risks, explains findings, and generates structured recommendations.
The deterministic engine remains an independent security baseline.
This creates a deliberate architecture:
Deterministic Security Checks + Gemma Reasoning ↓ Explainable Security Decision
Gemma is never allowed to execute commands, generate fabricated execution results, or override a deterministic critical security finding.
Multimodal Analysis
TrustShell also accepts terminal screenshots.
A screenshot can be analyzed to identify visible command content and feed it into the same pre-execution security workflow.
Safety by Design
TrustShell is intentionally a static analysis system.
User-supplied commands are never executed.
The application contains no arbitrary shell execution, eval, exec, or child-process execution mechanisms.
Raw commands and screenshots are not persisted as scan history.
Product Experience
The application includes:
- polished responsive scanner
- command, script, and screenshot modes
- deterministic security analysis
- risk scoring
- evidence highlighting
- MITRE ATT&CK mapping
- attack-chain visualization
- AI reasoning layer
- safer-action recommendations
- local scan history
- deterministic demo scenarios
- graceful AI fallback when hosted model access is unavailable
Why It Matters
TrustShell is designed for the increasingly common situation where a developer—or an AI system acting on a developer's behalf—is about to perform a potentially dangerous terminal action.
Its goal is simple:
Don't discover the security problem after execution.
Catch it before execution.
Technology
TrustShell was built with React, TypeScript, Vite, Supabase Edge Functions, Gemma 4, Hugging Face tooling, and MITRE ATT&CK technique mapping.
The public repository contains the implementation and technical documentation.
Future Direction
TrustShell can evolve from a standalone analyzer into a zero-trust terminal gateway for developer tools and AI agents, where every proposed shell action is evaluated before execution.
TrustShell
Stop the command before it becomes the incident.
Built With
- ai
- analysis
- att&ck
- css
- cybersecurity
- developer
- edge
- face
- functions
- gemma
- html
- hugging
- javascript
- learning
- machine
- mitre
- react
- static
- supabase
- tailwind
- tools
- typescript
- vite

Log in or sign up for Devpost to join the conversation.