Back to skill

Security audit

Session Recall

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be a local session-recall tool, but it copies private Copilot conversation history into a persistent local index and includes an optional recurring background sync task.

Install only if you are comfortable with your Copilot session history being copied into ~/SessionRecall as searchable local Markdown, JSON, and SQLite data. Avoid -InstallScheduler unless you deliberately want recurring background sync, and plan how to remove both the Windows scheduled task and the ~/SessionRecall data if you later change your mind. Do not share the generated SessionRecall directory or your Copilot session database.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T06 · System Persistence

Error
Location
scripts/install-session-recall-scheduler.ps1:8
Finding

Optional Installation of a Persistent Recurring Windows Scheduled Task

Content
View full analysis

Vulnerability Details

File Location: scripts/install-session-recall-scheduler.ps1, lines 8-28
Vulnerability Type: Persistent scheduled-task execution
Risk Level: High

powershell
$TaskName = "CopilotSessionRecallSync"

$Action = New-ScheduledTaskAction `
    -Execute "powershell.exe" `
    -Argument "-NoProfile -ExecutionPolicy Bypass -File `"$SkillScript`" sync-copilot --limit 200 --graph"

$Trigger = New-ScheduledTaskTrigger -Once -At (Get-Date).AddMinutes(1) `
    -RepetitionInterval (New-TimeSpan -Minutes $EveryMinutes)

$Settings = New-ScheduledTaskSettingsSet `
    -AllowStartIfOnBatteries `
    -DontStopIfGoingOnBatteries `
    -StartWhenAvailable

Register-ScheduledTask `
    -TaskName $TaskName `
    -Action $Action `
    -Trigger $Trigger `
    -Settings $Settings `
    -Description "Sync Copilot native sessions into the local Session Recall index and graph." `
    -Force | Out-Null

Technical Analysis

When installation is invoked with the documented -InstallScheduler option, install.ps1 calls this scheduler installer. The script registers a recurring Windows scheduled task that survives the original Skill execution and runs every 30 minutes by default.

The task starts PowerShell with -ExecutionPolicy Bypass and executes session-recall.ps1 sync-copilot --limit 200 --graph. Each run can read up to 200 sessions from the user's private Copilot session database and update persistent Markdown, JSON, SQLite, and graph data under ~/SessionRecall.

This behavior is optional and documented, and the audit found no evidence that it uploads session data or communicates with a remote endpoint. Nevertheless, it establishes cross-session execution persistence. The use of -Force can replace an existing task with the same name, while -ExecutionPolicy Bypass weakens a defense-in-depth control for every scheduled invocation. No corresponding uninstall mechanism is included.

...[truncated 1505 chars]

Remediation
View remediation

Remediation Suggestions

  1. Keep scheduled synchronization separate from the normal Skill installation and require explicit, informed confirmation immediately before registration.
  2. Display the exact task name, command, script path, interval, data source, and destination before creating the task.
  3. Remove -ExecutionPolicy Bypass; use a signed script and an appropriately restrictive execution policy where possible.
  4. Avoid unconditional -Force. Detect an existing same-named task and require separate confirmation before replacing it.
  5. Validate EveryMinutes against a safe minimum and maximum to prevent unexpectedly frequent background processing.
  6. Pin the scheduled action to trusted, access-controlled script files and verify their integrity before each execution.
  7. Provide a documented uninstall command or script using Unregister-ScheduledTask -TaskName "CopilotSessionRecallSync".
  8. Offer manual, on-demand synchronization as the default least-privilege mode.
  9. Clearly document that synchronization creates persistent copies of sensitive conversation content and provide a cleanup procedure for ~/SessionRecall.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'env' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'file_read' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'file_write' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · REFERENCE.md (reported line 17)May include surrounding context.

md
|---|---|
| 建立 `~\SessionRecall` 與 SQLite 索引 / Create `~\SessionRecall` and a SQLite index | 讀取別人的資料 / Touch anyone else's data |
| 從你的 `~\.copilot\session-store.db` 匯入最近 session / Import recent sessions from your own `~\.copilot\session-store.db` | 上傳資料 / Upload data |
| 只有指定 `-InstallScheduler` 時才安裝排程 / Install a schedule only with `-InstallScheduler` | 未經同意安裝背景排程 / Install a schedule without consent |

## 可以分享什麼?/ Sharing This Skill

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The tool stores conversation content, summaries, topics, and entities in plaintext Markdown, JSON, and SQLite under a predictable local directory without any user-facing warning, consent flow, or protection controls. Because session content may include secrets, credentials, internal code, or sensitive prompts, this creates a real confidentiality risk on shared machines, backed-up home directories, or systems with weak local access controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The sync routine automatically copies and ingests data from the user's native Copilot session-store database, including user prompts and assistant responses, into a second local persistence layer without an explicit warning at runtime. This increases the privacy blast radius because sensitive historical conversations are duplicated, reindexed, and made searchable/exportable, which can expose more data than the user expects.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The surrounding reporting flow documents a metadata-only agent-facing context path, yet read_raw_session_content explicitly reads the full backing markdown when available. While this raw content is used for report metrics rather than returned as recommended context, the documentation creates a misleading impression about handling of raw conversation content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The function returns fixed Chinese-language user-visible strings for search explanations regardless of user preference or locale. This enforces a specific language in output without offering a choice or documenting a locale-specific scope, which conflicts with the language/locale policy described for this audit.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The manifest describes a skill for recalling local Copilot CLI sessions and reconnecting past ideas. The benchmark command adds an evaluation utility for running JSONL test cases and computing retrieval metrics, which is a developer testing capability rather than an obvious end-user recall function.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.