Back to skill

Security audit

Conversation Rehearsal

Security checks for vulnerabilities and agentic risk

Overview

The skill is a real conversation rehearsal tool, but it can reuse browser sessions, expose tokens, and automatically send sensitive rehearsal audio to Feishu, so it needs Review before install.

Install only if you are comfortable with this skill accessing SenseAudio credentials, possibly using a logged-in Chrome session, creating or managing authorized voice clones, storing rehearsal transcripts/audio locally, and sending generated audio to Feishu. Prefer explicit API keys and prepared clone voice IDs, disable Chrome/browser-session fallback, keep Feishu sending off unless you confirm the destination, and treat generated files as sensitive.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (4)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/senseaudio_platform_token.py:78
Finding

Implicit Chrome credential extraction and cookie-authenticated workspace operations

Content
View full analysis
Tuple[str, str]: script = """ (() => { const collect = storage => { const items = []; for (let i = 0; i < storage.length; i += 1) { const key = storage.key(i); items.push({ key, raw: storage.getItem(key) || '', storage: storage === window.localStorage ? 'localStorage' : 'sessionStorage' }); } return items; }; return JSON.stringify({ href: window.location.href, localStorage: collect(window.localStorage), sessionStorage: collect(window.sessionStorage), }); })() """ raw = apple_script(script) if not raw: return "", "" payload = json.loads(raw) for storage_name in ("localStorage", "sessionStorage"): for item in payload.get(storage_name, []): if not isinstance(item, dict): continue key = str(item.get("key", "")) raw_value = str(item.get("raw", "")) token = parse_zustand_payload(raw_value, key) if token: return token, f"{storage_name}:{key}" return "", "" ``` `scripts/senseaudio_platform_token.py:112-131`: ```python def resolve_platform_token( explicit_token: str = "", *, token_env: str = DEFAULT_PLATFORM_TOKEN_ENV, allow_chrome: bool = True, ) -> Tuple[str, str]: token = explicit_token.strip() if token: return token, "explicit" token = os.getenv(token_env, "").strip() if token: return token, f"env:{token_env}" if allow_chrome: try: token, key = ...[truncated 7041 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/senseaudio_platform_token.py:135
Finding

Resolved bearer token is disclosed in plaintext through standard output

Content
View full analysis
int: parser = argparse.ArgumentParser(description="Resolve a SenseAudio workspace platform token from env or Chrome.") parser.add_argument("--token", default="") parser.add_argument("--token-env", default=DEFAULT_PLATFORM_TOKEN_ENV) parser.add_argument("--no-chrome", action="store_true") args = parser.parse_args() token, source = resolve_platform_token( args.token, token_env=args.token_env, allow_chrome=not args.no_chrome, ) result = { "resolved": bool(token), "source": source, "token": token, } print(json.dumps(result, ensure_ascii=False, indent=2)) return 0 ``` ### Technical Analysis The command-line entry point emits the complete resolved bearer token as JSON. Standard output is commonly captured by agent runtimes, terminal recording, continuous integration systems, process supervisors, diagnostic bundles, or centralized log collectors. Once captured, the token can persist substantially longer than the original process. The token is not needed in the user-facing result. Returning only whether resolution succeeded and the credential source would satisfy the operational requirement without disclosing the secret. ### Attack Path 1. The resolver obtains a token from a command-line argument, environment variable, or Chrome storage. 2. The complete token is assigned to the JSON field named `token`. 3. The JSON object is printed to standard output. 4. An orchestrator, log collector, shell transcript, or adjacent process records the output. 5. A party with access to those records extracts the bearer token. 6. The token is replayed against SenseAudio workspace endpoints until it expires or is revoked. ### Impact Assessment An attacker obtaining ...[truncated 349 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/run_live_rehearsal_session.py:122
Finding

Sensitive rehearsal transcripts and raw responses are stored without restrictive permissions

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/send_rehearsal_counterparts_to_feishu.py:35
Finding

Unpinned ancestor-path dependency is dynamically imported and executed

Content
View full analysis
Any: current = Path(__file__).resolve() for parent in current.parents: candidate = parent / skill_name / "scripts" / script_name if candidate.exists(): spec = importlib.util.spec_from_file_location(alias, candidate) if spec and spec.loader: module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) return module raise SystemExit(f"could not locate {skill_name}/scripts/{script_name}") feishu_sender = load_helper_module("audioclaw-skills-voice-reply", "feishu_audio_sender.py", "rehearsal_feishu_sender") ``` ### Technical Analysis The Feishu sender searches every ancestor of the current script for a sibling path named `audioclaw-skills-voice-reply/scripts/feishu_audio_sender.py`. The first matching file is imported and executed without checking its owner, permissions, cryptographic hash, package identity, or expected installation root. Importing a Python module executes its top-level code. Therefore, if an attacker can create or replace a matching file at an earlier searched ancestor location, invoking Feishu delivery executes attacker-controlled Python within the Skill process. That process may have access to environment credentials, local configuration, transcripts, audio, and Feishu application secrets. The external helper and shared modules were not included in the audited artifact, so their own behavior could not be reviewed. The vulnerability here is the unverified discovery and execution mechanism, not a claim that the absent dependency is itself malicious. ### Attack Path 1. An attacker obtains write access to a search ...[truncated 976 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (48)

Tainted flow: 'request' from os.getenv (line 80, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/senseaudio_counterpart_tts.py (reported line 91)May include surrounding context.

python
method="POST",
        )
        try:
            with urllib.request.urlopen(request, timeout=120) as response:
                audio_bytes, trace_id, extra_info, chunk_count = parse_sse_audio(response)
                return audio_bytes, trace_id, extra_info, chunk_count, model
        except urllib.error.HTTPError as exc:

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill includes token-resolution behavior that accesses browser state and uses AppleScript/Chrome automation to obtain platform authentication, which is far outside the expected function of a conversation rehearsal tool. Browser/session token scraping can expose account credentials, bypass normal authentication UX, and enable unauthorized access to workspace resources.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill includes token-resolution behavior that accesses browser state and uses AppleScript/Chrome automation to obtain platform authentication, which is far outside the expected function of a conversation rehearsal tool. Browser/session token scraping can expose account credentials, bypass normal authentication UX, and enable unauthorized access to workspace resources.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill includes token-resolution behavior that accesses browser state and uses AppleScript/Chrome automation to obtain platform authentication, which is far outside the expected function of a conversation rehearsal tool. Browser/session token scraping can expose account credentials, bypass normal authentication UX, and enable unauthorized access to workspace resources.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill includes token-resolution behavior that accesses browser state and uses AppleScript/Chrome automation to obtain platform authentication, which is far outside the expected function of a conversation rehearsal tool. Browser/session token scraping can expose account credentials, bypass normal authentication UX, and enable unauthorized access to workspace resources.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

The skill explicitly references a local credential file and states that a login token may be replaced with a real sk-... secret from ~/.audioclaw/workspace/state/senseaudio_credentials.json. Accessing and substituting secrets from local credential storage is a direct credential-handling vulnerability because it can exfiltrate or misuse more privileged API keys than the caller intended to provide.

Content

Scanner excerpt · SKILL.md (reported line 132)May include surrounding context.

md
Practical rule:
- `scripts/run_live_rehearsal_session.py`, `scripts/run_complete_rehearsal_service.py`, and `scripts/senseaudio_counterpart_tts.py` now default to `SENSEAUDIO_API_KEY`
- If the host app injects `SENSEAUDIO_API_KEY` as a login token such as `v2.public...`, the shared bootstrap replaces it with the real `sk-...` value from `~/.audioclaw/workspace/state/senseaudio_credentials.json` before the rehearsal call starts

## Resources

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/run_complete_rehearsal_service.py (reported line 145)May include surrounding context.

python
outdir = Path(args.outdir)
    outdir.mkdir(parents=True, exist_ok=True)
    env = os.environ.copy()
    notes: list[str] = []
    clone_artifacts: dict = {}

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/run_live_rehearsal_session.py (reported line 216)May include surrounding context.

python
outdir = Path(args.outdir)
    outdir.mkdir(parents=True, exist_ok=True)
    env = os.environ.copy()
    notes: list[str] = []
    clone_artifacts: dict = {}

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

This script exposes full voice-clone workspace management capabilities: creating clones, listing slots, listing available voices, and reselecting slots. That exceeds the stated conversation-rehearsal purpose and enables account-level voice cloning operations that could be misused for unauthorized impersonation, especially because the browser-session path can act with an already authenticated web session.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This code enumerates Chrome local/session storage for senseaudio.cn and extracts authentication tokens from authenticated browser state. That is credential harvesting behavior, and it is broader than the stated rehearsal functionality, making it dangerous because it can silently recover user auth material without an explicit login flow or consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script outputs the recovered platform token in plaintext JSON to stdout after sourcing it from environment variables or Chrome storage. This creates immediate secret exfiltration risk because tokens can be captured by logs, calling processes, terminal history, CI systems, or any upstream orchestrator invoking the script.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill advertises broad operational capabilities including environment access, file access, network calls, and shell execution, but does not declare any explicit tool scope or permission boundaries. In a skill that also references credential files, browser-derived tokens, cloning workflows, and external message delivery, the lack of scope declaration increases the chance of over-privileged execution and misuse beyond user expectations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Proactively sending generated audio to Feishu or linked chats broadens the skill from private rehearsal into external communication. Given the likely sensitivity of workplace rehearsal content, this can leak internal topics, personal performance concerns, or voice content to external systems or unintended recipients.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Defaulting to --send-feishu-audio during ongoing rehearsal causes external transmission of generated counterpart audio without a fresh, explicit warning or approval at the point of sharing. That is dangerous because users may assume a rehearsal session is local/private while the skill silently exports content to a chat platform.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill documents credential-file access and API key substitution behavior without clear user-facing disclosure or safeguards. In a skill context, silently reading stored credentials and replacing a provided token with a more privileged secret can violate least surprise and expand the blast radius if the skill is abused.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Browser/session token scraping and workspace clone-management automation are unrelated to the narrow user expectation of conversation rehearsal. Because these features can access authenticated sessions and manage voice assets, they materially increase the attack surface and the consequences of prompt abuse or operator error.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
91% confidence
Finding

The phrase 'automatically send each generated counterpart turn' delegates an external action to the agent without requiring approval for each send decision. This creates autonomous outbound behavior that can continue across turns ('sticky') and may result in repeated unintended transmissions or mode persistence beyond what the user expected.

Content

Scanner excerpt · agents/openai.yaml (reported line 4)May include surrounding context.

yaml
interface:
  display_name: "Conversation Rehearsal"
  short_description: "Simulate high-pressure conversations with ASR, TTS, and debriefing"
  default_prompt: "Use $senseaudio-conversation-rehearsal to design and run a realistic rehearsal for this difficult conversation, then review what went wrong and how to improve it. Once the user starts rehearsal mode, treat that as voice mode by default: begin with a spoken opening turn, automatically send each generated counterpart turn one by one as Feishu audio messages instead of replying with file paths, and keep voice replies sticky across later rehearsal turns until the user explicitly asks to switch back to text-only replies."

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The default prompt uses the vague trigger 'Once the user starts rehearsal mode' without defining what explicit user action constitutes consent to switch into voice behavior. That ambiguity can cause the agent to enter audio mode and change delivery behavior based on inference rather than a clear opt-in, increasing the risk of unintended recording, synthesis, or message transmission in a sensitive conversation-rehearsal context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The prompt instructs the agent to automatically send generated counterpart turns as Feishu audio messages without first presenting a clear warning or obtaining explicit consent for outbound transmission. Because this skill is designed for high-pressure workplace conversations that may include sensitive personnel or business information, automatic external messaging materially raises privacy, confidentiality, and accidental-disclosure risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The design explicitly includes voice reply ASR and later proposes storing memory of the user's recurring weak points, but it does not mention any user-facing notice, consent flow, retention limit, or handling policy for sensitive audio/transcript data. In a coaching and performance-review context, these recordings and inferred weaknesses can contain highly sensitive employment and behavioral information, so omission of privacy controls creates meaningful risk of overcollection, misuse, or user surprise.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

Core scenario goals, pressure styles, and risk points are defined only in Chinese, and the generated blueprint content will therefore be Chinese-centered by default. There is no natural-language indication that users may choose another language or that the locale restriction is intentional and justified for a region-specific use case.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script serializes voice_sample_path, authorized_voice_id, and clone_consent into the output JSON and also prints the same structure to stdout. In a voice-cloning workflow, these fields are privacy- and compliance-relevant metadata, and echoing them to logs or artifacts can unnecessarily expose sensitive file locations and authorization details to downstream systems, operators, or log collectors.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/run_complete_rehearsal_service.py (reported line 43)May include surrounding context.

python
def run_python(script: Path, args: list[str], env: dict) -> dict:
    command = [sys.executable, str(script), *args]
    result = subprocess.run(command, capture_output=True, text=True, check=False, env=env)
    if result.returncode != 0:
        message = result.stderr.strip() or result.stdout.strip() or f"{script.name} failed"
        raise RuntimeError(message)

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script can create and enumerate cloned voices through platform-token and browser-session automation paths that bypass a clearly bounded public API workflow. In a voice rehearsal skill, this expands capability from playback into identity-sensitive voice cloning, increasing risk of unauthorized impersonation, privacy violations, and misuse of whatever account is active in the browser or token source.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script performs authorized-clone creation and browser-session fallback without presenting any direct user-facing warning or confirmation at the point of execution. Because voice cloning is highly sensitive and can affect biometric identity and consent, silent execution materially increases the chance of deceptive or unauthorized use.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.