← Back to list

securityterminal
by mgreenly
An AI Coding Agent
⭐ 1🍴 0📅 Jan 24, 2026
SKILL.md
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,\tfor 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.
Score
Total Score
60/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon