Plasma Shield Configuration

Plasma Shield uses YAML rule files to define network-level blocking policies for AI agents.

Important: Plasma Shield operates at the network level. It blocks domains, URLs, and request patterns. It cannot block local exec commands — use OS-level controls (limited user permissions, containers, seccomp, AppArmor) for that.

Rule File Format

Important: Plasma Shield operates at the network level. It blocks domains, URLs, and request patterns. It cannot block local exec commands — use OS-level controls (limited user permissions, containers, seccomp, AppArmor) for that.

yaml
rules:
  - id: rule-identifier
    domain: "example.com"
    action: block
    description: "Why this rule exists"
    enabled: true

Rule Options

Important: Plasma Shield operates at the network level. It blocks domains, URLs, and request patterns. It cannot block local exec commands — use OS-level controls (limited user permissions, containers, seccomp, AppArmor) for that.

FieldTypeRequiredDescription
idstringYesUnique identifier for the rule
domainstringNo*Domain pattern to match
url_patternstringNo*URL pattern to match (for HTTP inspection)
actionstringYesAction to take (block)
descriptionstringNoHuman-readable explanation
enabledbooleanNoWhether the rule is active (default: true)

Rules are defined in YAML format under a top-level rules: key:

Domain Matching

Each rule supports the following fields:

  • example.com — exact match
  • *.example.com — matches subdomains (e.g., sub.example.com)
  • *keyword* — matches domains containing the keyword

URL Pattern Matching

*Either domain or url_pattern must be specified.

  • *env=*AWS_* — matches URLs with AWS credentials in query params
  • *api_key=* — matches URLs containing api_key=

Default Rules

Domain patterns support wildcards:

Dangerous Domains

IDDomainDescription
block-pastebinpastebin.comBlock pastebin (common for malware hosting)
block-temp-file-hosts*.temp.shBlock temporary file hosting services
block-transfer-shtransfer.shBlock file transfer service
block-0x00x0.stBlock anonymous file hosting

Cryptocurrency Mining

IDDomainDescription
block-crypto-pools*pool.comBlock common mining pool domains
block-xmr-mining*xmr*Block Monero mining domains
block-nicehash*.nicehash.comBlock NiceHash mining

C2 / Exfiltration Tunnels

IDDomainDescription
block-ngrok*.ngrok.ioBlock ngrok tunnels (common for C2)
block-serveoserveo.netBlock serveo tunnels
block-localtunnel*.loca.ltBlock localtunnel

Request Pattern Inspection

IDPatternDescription
block-sensitive-env-exfil*env=*AWS_*Block URLs containing AWS credentials in query params
block-api-key-exfil*api_key=*Block URLs with api_key in query params

Adding Custom Rules

URL patterns match against the full request URL:

yaml
rules:
  # Block a specific domain
  - id: block-my-domain
    domain: "untrusted-site.com"
    action: block
    description: "Block untrusted external site"
    enabled: true

  # Block all subdomains of a service
  - id: block-risky-service
    domain: "*.risky-service.io"
    action: block
    description: "Block risky cloud service"
    enabled: true

  # Block URL patterns (HTTP inspection)
  - id: block-token-exfil
    url_pattern: "*token=*"
    action: block
    description: "Prevent token leakage via URL params"
    enabled: true

  # Disable a rule temporarily
  - id: temporarily-disabled
    domain: "example.com"
    action: block
    description: "Currently disabled for testing"
    enabled: false

Best Practices

  1. Use descriptive IDs — Makes logs and debugging easier
  2. Always add descriptions — Document why each rule exists
  3. Test wildcards carefully*pool.com will match carpool.com too
  4. Use enabled: false — Disable rules temporarily instead of deleting them

Limitations

Plasma Shield ships with rules covering common threat categories:

  • Local exec commands (rm -rf /, curl | bash)
  • File system operations
  • Process spawning

Create a custom rules file (e.g., custom-rules.yaml) following the same format:

  1. Run agent as limited user (no root)
  2. Use Docker with --cap-drop=ALL --read-only
  3. Apply seccomp profiles to restrict syscalls
  4. Use AppArmor/SELinux for mandatory access control
  5. Restrict PATH to safe commands only

Plasma Shield is a network-level filter. It cannot protect against: