Skip to content

roebi/agent-security-skills

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agent Security Skills

A comprehensive collection of security-focused skills for LLM agents interacting with shell environments. These skills implement a defense-in-depth strategy across six security layers, protecting against prompt injection, malicious commands, and unsafe operations.

Overview

When LLM agents execute shell commands, they face unique security challenges. This repository provides a structured approach to securing agent-shell interactions through layered security controls.

Architecture

┌─────────────────────────────────────────┐
│  Layer 1: Prompt Injection Defense      │  ← Input validation
├─────────────────────────────────────────┤
│  Layer 2: Command Validation            │  ← Whitelist & syntax checks
├─────────────────────────────────────────┤
│  Layer 3: Path Sandboxing               │  ← Filesystem isolation
├─────────────────────────────────────────┤
│  Layer 4: Network Trust Verification    │  ← URL & checksum validation
├─────────────────────────────────────────┤
│  Layer 5: Malware Protection            │  ← Virus scanning
├─────────────────────────────────────────┤
│  Layer 6: Audit Logging                 │  ← Complete traceability
└─────────────────────────────────────────┘

Security Skills

The repository contains seven core skills:

  1. security-01-prompt-defense.md - Detects and prevents prompt injection attacks
  2. security-02-command-validation.md - Validates commands against whitelist and security policies
  3. security-03-path-sandbox.md - Enforces filesystem boundaries and path restrictions
  4. security-04-network-trust.md - Verifies URLs, checksums, and download sources
  5. security-05-malware-scan.md - Scans files for malware and suspicious patterns
  6. security-06-audit-log.md - Maintains complete audit trail of all operations
  7. security-apply.md - Orchestrates all security layers (main entry point)

Quick Start

For LLM Integration

Add these skills to your LLM agent's skill directory:

# Clone the repository
git clone https://github.com/roebi/agent-security-skills.git

# Copy skills to your agent's skill directory
cp agent-security-skills/skills/*.md /path/to/your/agent/skills/
cp agent-security-skills/policies/*.yml /path/to/your/agent/policies/

Usage Pattern

The security-apply.md skill should be triggered before ANY shell command execution:

User Request → security-apply.md → All 6 layers check → Execute or Deny

Sorgfaltspflicht (Duty of Care)

These skills implement the principle of Sorgfaltspflicht - the duty of care. Before executing any command, the agent must:

  • ✓ Understand what the command does
  • ✓ Verify it matches user's actual intent
  • ✓ Assess potential risks
  • ✓ Obtain appropriate confirmations
  • ✓ Ensure reversibility where possible

Examples

See the examples directory for:

  • Safe download workflows
  • Command execution patterns
  • Prompt injection test cases
  • Security policy configurations

Configuration

Security policies are defined in YAML files under policies:

  • command-whitelist.yml - Approved commands and their risk levels
  • trusted-domains.yml - Verified download sources
  • security-config.yml - Global security settings

Contributing

Contributions are welcome! Please ensure:

  1. New skills follow the naming pattern: security-XX-skillname.md
  2. All cross-references are accurate
  3. Examples demonstrate both safe and unsafe scenarios
  4. Documentation is clear and comprehensive

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Compatibility

These skills are designed to work with:

  • LLM agents with shell/bash tool access
  • Systems supporting standard Linux commands
  • Environments with ClamAV or similar malware scanners
  • Logging frameworks that support structured output

Security Considerations

While these skills significantly improve security, they are not foolproof:

  • Always run agents in isolated environments
  • Regularly update malware definitions
  • Review audit logs periodically
  • Keep security policies current
  • Consider using additional sandboxing (containers, VMs, LiteBox)

Related Projects

Support

For questions, issues, or suggestions, please open an issue on GitHub.


Created by: @roebi
Version: 1.0.0
Last Updated: March 2026

About

agent security skills - a 6 layer security skill system

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors