T09 · Insecure Skill Coding Practices
- Location
scripts/meeting_load.py:446- Finding
Unsanitized ICS Fields Allow Terminal Escape-Sequence Injection
- Content
View full analysis
4.0f}min {o['summary'][:40]} " f"({len(o['attendees'])}ppl)") ``` ### Technical Analysis ICS files must be treated as untrusted input because they can originate from external meeting organizers, shared calendars, or files supplied by another person. The application imports `SUMMARY` and attendee `CN` values and prints them without escaping terminal control characters. Truncating a string does not make it safe. ANSI CSI sequences and terminal OSC sequences can fit within the imposed output limits. Depending on terminal support and configuration, malicious values could: - Clear or rewrite displayed output. - Move the cursor and visually conceal legitimate results. - Display misleading audit recommendations. - Create deceptive c ...[truncated 1698 chars]- Remediation
View remediation
4.0f}min {safe_summary[:40]} " f"({len(o['attendees'])}ppl)") ``` 3. Apply the same protection to summaries, attendee names, attendee addresses, UIDs, filenames, and any future calendar-derived values printed by `stats`, `rank`, `prescribe`, `team`, and `list`. 4. Remove or visibly escape C0 and C1 controls, including ESC, BEL, carriage return, backspace, and newline. Consider escaping Unicode bidi-control and zero-width formatting characters to reduce visual spoofing. 5. Add regression tests containing representative hostile values: - `\x1b[2J` for screen clearing. - `\x1b]52;c;...` for clipboard operations. - OSC 8 hyperlink sequences. - Embedded carriage returns and newlines. - Unicode bidirectional override characters. 6. Document that calendar files are untrusted data and that all human-readable output must pass through the terminal-safe renderer. ]]>
