Back to skill

Security audit

music-with-comfyui

Security checks for vulnerabilities and agentic risk

Overview

This music-generation skill uses a user-configured server with disclosed data sharing and cleanup, though automatic deletion can stop after repeated failures.

Use a ComfyUI server you trust and HTTPS for remote connections, since it receives your prompts, lyrics, and optional API key. Use --keep to retain server-side audio. Automatic deletion requires a separate server plugin and stops after three failures until purge_fail_hints is reset to 0; verify cleanup if retention matters. This review covers the bundled files, not separately installed server plugins or models.

Vulnerability Patterns
  • 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
  • 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)

T09 · Insecure Skill Coding Practices

Warning
Location
music_with_comfyui.py
Finding

Remote audio deletion is enabled without explicit executable consent

Content
View full analysis

Impact

The server-side generated audio is removed even when the caller requested only generation and retrieval. A local copy remains; the evidence does not establish deletion of unrelated files or total loss of the audio.

Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (8)

Code capability 'env' detected in music_with_comfyui.py but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'env' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

Code capability 'network' detected in music_with_comfyui.py but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'network' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

Music generation defaults to English without a documented user language choice or opt-in.

Medium
Category
Output Handling
Confidence
86% confidence
Finding

The music generation parameters explicitly set the language to English (en). The file provides no user opt-in or documented locale-specific justification for this language requirement.

Content

No source excerpt is available for this finding.

Automatic remote cleanup is persistently disabled after three failures without a user opt-out.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

After three cleanup exceptions, a persisted counter prevents deletion attempts on subsequent runs even while purge_remote remains enabled. Temporary failures can therefore become indefinite server-side retention of generated audio, including sung sensitive lyrics; documentation and runtime warnings mitigate surprise but do not preserve the configured cleanup policy.

Content

No source excerpt is available for this finding.

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · LICENSE (reported line 24)May include surrounding context.

text
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

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

md
## When to Use (Recognizing the Request)

This skill fires whenever the user asks to **write, compose, arrange, or make a song / melody / music track**, in any language — even if no genre or length is given. Common trigger phrases include, but are not limited to:

- **English:** "make me a song", "make up a song", "compose", "compose a song/track", "write a song", "arrange a song", "write some music", "make a melody", "produce a track", "write me a tune"
- **中文:** "写歌", "作曲", "编一首歌", "编一个歌", "编个曲", "编曲", "做首歌", "帮写首歌", "生成一首歌", "来首原创"

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · music_with_comfyui.py (reported line 669)May include surrounding context.

python
override = {}
    for flag_name in ("bpm", "keyscale", "language", "timesignature", "cfg_scale",
                      "temperature", "top_p", "top_k", "min_p", "generate_audio_codes"):
        override[flag_name] = getattr(args, flag_name, None)

    if args.prompt:
        tags = args.prompt

The audio-generation workflow fixes the output language to English without an explicit user choice.

Low
Category
Output Handling
Confidence
90% confidence
Finding

The text-to-audio node hardcodes its language parameter to "en", imposing English on generated vocals. The file provides no user language selection, opt-in, or documented justification for restricting the output language.

Content

No source excerpt is available for this finding.