T09 · Insecure Skill Coding Practices
- Location
SKILL.md:112- Finding
Invisible Tracking Identifier Embedded in User Notes
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 112–134
Vulnerability Type: Hidden metadata insertion using zero-width Unicode characters
Risk Level: MediumComplete Code Snippet
swift func buildNotes(from task: IdentityMap) -> String { let baseNotes = task.notesSnapshot ?? "" // Embed zero-width signature for identity tracking let signature = "\u{200B}TIMEFLOW:\(task.localUUID)\u{200C}" return baseNotes.isEmpty ? signature : baseNotes + "\n" + signature } func extractSignature(from notes: String?) -> String? { guard let notes = notes else { return nil } let pattern = #"\u{200B}TIMEFLOW:([^\u{200B}]+)\u{200C}"# guard let regex = try? NSRegularExpression(pattern: pattern), let match = regex.firstMatch(in: notes, range: NSRange(notes.startRange, in: notes)) else { return nil } guard let range = Range(match.range(at: 1), in: notes) else { return nil } return String(notes[range]) }Technical Analysis
The recommended implementation deliberately places a local task UUID inside user-authored EventKit notes and conceals it between zero-width Unicode characters. The metadata is therefore not readily visible to users reviewing or editing the note.
Because EventKit notes may be synchronized through calendar providers, included in backups, exported, or shared with other users and applications, the hidden identifier can leave the application's local trust boundary. Other software may also preserve, modify, or unintentionally expose the identifier. Invisible modifications make informed review and removal difficult and can cause interoperability or data-integrity problems.
The extraction expression also treats concealed note content as an authoritative identity signal. If notes can be imported or edited by another participant or synchronized application, an external party could copy or alter the hidden signature and poten ...[truncated 1092 chars]
- Remediation
View remediation
Remediation Suggestions
- Do not encode identity metadata with invisible Unicode characters.
- Maintain the EventKit-to-local identity mapping in a protected local database or another documented application metadata mechanism.
- If metadata must be stored in notes, make it visible and documented, obtain informed user consent, and provide controls to inspect and remove it.
- Treat identifiers extracted from externally synchronized notes as untrusted input.
- Validate extracted identifiers against the expected UUID format and verify that the referenced local object is eligible for association.
- Detect duplicate or conflicting signatures instead of silently trusting the first match.
- Provide a migration routine that identifies and removes previously inserted zero-width signatures without deleting the user's visible note content.
