securityterminal | Skill Performance & Reviews | TopRankSkills

TopRank Skills

Home / Skills / tools / securityterminal

securityterminal

maintained by mgreenly

star 1 account_tree 0 verified_user MIT License
bolt View GitHub

name: security/terminal description: Terminal Security security skill

Terminal Security

Terminal emulators interpret escape sequences that can be weaponized. LLM responses are untrusted.

ikigai Application

ANSI escape injection:

  • LLM responses may contain malicious escape sequences
  • Attackers can: change terminal title, redefine keys, write to arbitrary screen positions
  • Some terminals vulnerable to escape sequences that execute commands

Sanitization strategy:

  • Strip or escape control characters (0x00-0x1F, 0x7F) except safe ones
  • Allowlist: \n, \r, \t for formatting
  • Escape or strip: \x1b (ESC), \x9b (CSI)
  • Consider: pass through only after validation

Safe display patterns:

// Filter control chars before display
for (size_t i = 0; i < len; i++) {
    if (data[i] < 0x20 && data[i] != '\n' && data[i] != '\t') {
        continue;  // Skip control char
    }
    output_char(data[i]);
}

Raw mode considerations:

  • Restore terminal state on exit (even on crash)
  • Handle SIGINT/SIGTERM to cleanup
  • Don't leak raw mode to child processes

Review red flags: Unsanitized LLM output to terminal, missing escape filtering, no terminal cleanup on error paths.

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!

Skill Details

GitHub Stars 1
GitHub Forks 0
Created Jan 2026
Last Updated 4 months ago
tools tools system admin

Related Skills

docker-expert
chevron_right
caffeine
chevron_right
telnyx-network
chevron_right
discord-governance
chevron_right
plex

plex

openclaw
star 2.4k
chevron_right

Build your own?

Join 12,000+ developers contributing to the Claude ecosystem.