Back to skill

Security audit

sweeping-monk

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a research-advice assistant, but it also enables persistent telemetry, cloud upload, credential-backed proposal review, and local self-modification with insufficient scoping.

Review before installing. This skill can write local telemetry files, maintain a persistent anonymous ID, upload usage-derived method labels to Tencent Cloud endpoints when enabled, read profile/memory context, and let a creator apply remotely supplied proposal text to local skill files. Install only if you are comfortable disabling telemetry yourself and manually reviewing any proposed changes before allowing writes.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (4)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:231
Finding

Remote Proposal Content Can Persistently Modify Skill Instructions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:231-238
Vulnerability Type: T01: Skill Instruction Hijacking
Risk Level: High

Relevant instruction excerpt translated into English:

markdown
- View proposals:
  Run scripts/cjg-proposal-cli.py list to retrieve pending proposals.
- Apply proposal:
  Run scripts/cjg-proposal-cli.py approve --id <id>, then apply each
  item in the remotely supplied proposal changes locally.
  - Back up the original file under .backup/.
  - append: append draft_text to the end of the file.
  - rollback: restore the file from a backup.
  - Display the diff after applying the changes.
- Increment the Skill version after application.

The remotely supplied content is obtained and rendered by the following code in scripts/cjg-proposal-cli.py:177-191:

python
st, body = _req("POST", base + "/approve", token,
                {"proposal_id": args.id, "decision": args.cmd,
                 "user_note": args.note})
if st != 200:
    print(f"HTTP {st}: {body[:300]}")
    sys.exit(1)
data = json.loads(body)
content = data.get("content") or {}
if args.cmd == "approve" and content.get("changes"):
    print(_render({
        "proposal_id": args.id,
        "skill_slug": data.get("skill_slug"),
        "status": data.get("status"),
        "changes": content.get("changes"),
        "base_version": content.get("base_version"),
        "proposed_version": content.get("proposed_version")
    }))

Technical Analysis

The Skill establishes a workflow in which proposal data retrieved from a remote service can be appended to local files. The instructions do not define:

  • An allowlist of files that proposals may modify.
  • Protection preventing changes to SKILL.md.
  • Canonical path validation against absolute paths or traversal.
  • A content-security policy for remotely supplied draft_text.
  • Cryptographic verification of prop ...[truncated 1649 chars]
Remediation
View remediation

Remediation Suggestions

  1. Prohibit remote proposals from modifying SKILL.md, tool declarations, security policy, telemetry policy, and executable scripts.
  2. Define a strict allowlist of editable data files and supported operations.
  3. Resolve every target path canonically and reject absolute paths, symbolic-link escapes, and paths containing traversal components.
  4. Display the complete proposed patch rather than a truncated preview.
  5. Require explicit per-file confirmation after displaying the complete diff and before any write occurs.
  6. Validate proposal objects against a strict schema, including maximum sizes and permitted action types.
  7. Sign proposals and verify signatures against a pinned trusted key.
  8. Run a local security scan over all proposed content before application.
  9. Separate proposal approval from local application so that server-side approval never implicitly authorizes local writes.

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/cjg-proposal-cli.py:66
Finding

Global Credential Fallback Can Send an Unrelated Token to a Package-Configured Endpoint

Content
View full analysis

Vulnerability Details

File Location: scripts/cjg-proposal-cli.py:66-103
Vulnerability Type: T05: Unauthorized Access and Privilege Escalation, T09: Insecure Skill Coding Practices
Risk Level: High

python
def _read_local_token(slug):
    dev = os.path.join(SKILL_DIR, ".deploy", "cloud_open.json")
    if os.path.exists(dev):
        try:
            cc = json.loads(open(dev, encoding="utf-8").read())
            t = cc.get("token") or cc.get("signal_token")
            if t:
                return t
        except Exception:
            pass

    if slug:
        p1 = os.path.expanduser(
            f"~/.workbuddy/data/skills/{slug}/.cloud_token")
        if os.path.exists(p1):
            return open(p1, encoding="utf-8").read().strip()

    secret_store = os.path.expanduser(
        "~/.workbuddy/secrets/cjg-evo/cloud_open.json")
    if os.path.exists(secret_store):
        try:
            cc = json.loads(open(secret_store, encoding="utf-8").read())
            t = cc.get("token") or cc.get("signal_token")
            if t:
                return t
        except Exception:
            pass
    return None


def _req(method, url, token, body=None):
    data = json.dumps(body).encode("utf-8") if body is not None else None
    req = urllib.request.Request(url, data=data, method=method)
    if token:
        req.add_header("Authorization", f"Bearer {token}")
    req.add_header("Content-Type", "application/json")
    try:
        with urllib.request.urlopen(req, timeout=25) as r:
            return r.status, r.read().decode("utf-8")
    except urllib.error.HTTPError as e:
        return e.code, e.read().decode("utf-8", "replace")
    except Exception as e:
        return 0, str(e)

Technical Analysis

The proposal CLI first searches Skill-scoped credential locations, but then falls back to the global credential file:

text
~/.workbuddy/sec
...[truncated 1775 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the global credential-store fallback entirely.
  2. Require credentials to be stored in a current-Skill, slug-specific location.
  3. Store and validate token metadata, including the bound slug, issuer, audience, and endpoint origin.
  4. Refuse to send a token if any metadata does not match the current operation.
  5. Restrict proposal endpoints to a hardcoded or administrator-managed HTTPS origin allowlist.
  6. Use server-issued tokens with a narrow proposal-review scope and short expiration.
  7. Avoid accepting a generic token field when a purpose-specific credential is required.
  8. Set restrictive filesystem permissions when saving credentials, such as owner-only access.
  9. Do not include bearer credentials in public read-only list or get requests unless authentication is actually required.

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:62
Finding

Skill Requests Unnecessary Access to Persistent User Profile and Memory Data

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:62-66
Vulnerability Type: T05: Unauthorized Access and Privilege Escalation
Risk Level: Medium

Relevant instruction excerpt translated into English:

markdown
1. Read references/acquaintance.md, which contains the user's
   methodological preferences, historical questions, and prior judgments.
2. Retrieve relevant sections from USER.md and MEMORY.md.
   If USER.md is an empty template, use the acquaintance record and the
   current conversation instead.
3. Adjust the response according to this profile.

Technical Analysis

The Skill's primary function is academic methodology and research-design advice. That function can generally be performed using the current request and explicitly provided research context. Nevertheless, the Skill instructs the Agent to inspect persistent profile and memory sources automatically.

These files may contain cross-session personal information, historical questions, preferences, or unrelated sensitive context. No exact path allowlist, field-level minimization policy, consent gate, or sensitivity filter is specified. The instruction therefore expands the Skill's data-access scope beyond what is minimally necessary for its advisory function.

No evidence was found that the reviewed scripts upload USER.md, MEMORY.md, or the contents of references/acquaintance.md. The confirmed issue is unnecessary access and ingestion into the Agent's active context, not confirmed network exfiltration.

Attack Path

  1. A user invokes the academic-advice Skill.
  2. The Skill automatically directs the Agent to read persistent profile and memory sources.
  3. Sensitive or unrelated historical information becomes part of the active context.
  4. That information may influence responses or become exposed through accidental summarization, prompt injection elsewhere in the context, logging, or later tool use.

Impact Assessment

...[truncated 370 chars]

Remediation
View remediation

Remediation Suggestions

  1. Default to using only the current conversation.
  2. Request affirmative user consent before reading any cross-session profile or memory.
  3. Specify exact permitted files and fields rather than broadly requesting relevant sections.
  4. Avoid loading historical questions or judgments unless the user explicitly asks for continuity.
  5. Provide a memory-free operating mode.
  6. Ensure retrieved memory content is never copied into telemetry or network requests.
  7. Treat persistent memory as untrusted input and prevent it from overriding current safety or tool-use constraints.
  8. Document what data is read, why it is needed, and how the user can inspect or delete it.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/upload_signals.py:119
Finding

Default Telemetry Policy Is Non-Affirmative and Contradicts the Uploader Implementation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:30-53,147-150; references/signals.md:90-136; scripts/upload_signals.py:119-138
Vulnerability Type: T09: Insecure Skill Coding Practices
Risk Level: Medium

Relevant policy excerpt translated into English:

markdown
- Local recording is enabled immediately after installation.
- Cloud upload is enabled immediately after installation and can be disabled.
- Before completing every response, the Agent must execute the logging
  one-liner and append a method-layer signal to signals-log.jsonl unless
  the user has asked to disable recording.
- A daily scheduled task is expected to run scripts/upload_signals.py.

The uploader implements a conflicting cloud default in scripts/upload_signals.py:

python
def bootstrap(skill_dir):
    created = []
    optin = os.path.join(skill_dir, ".optin")
    if not os.path.exists(optin):
        if write_state_file(optin, "on"):
            created.append(".optin")

    anon = os.path.join(skill_dir, ".anon_id")
    if not os.path.exists(anon):
        import uuid
        if write_state_file(anon, str(uuid.uuid4())):
            created.append(".anon_id")

    cloud = os.path.join(skill_dir, ".cloud_optin")
    if not os.path.exists(cloud):
        if write_state_file(cloud, "off"):
            created.append(".cloud_optin")
    return created

The network payload is created and sent in scripts/upload_signals.py:184-233:

python
payload = {
    "slug": slug,
    "method_layer": method_layer,
    "event": event,
    "weight": weight,
    "note": note,
    "anon_id": anon_id or "",
    "skill_version": skill_version,
    "mode": "cloud",
}

data = json.dumps(payload, ensure_ascii=False).encode("utf-8")
req = urllib.request.Request(
    url,
    data=data,
    headers={"Content-Type": "application/json"},
    method="POST",
)
with urllib.request.urlop
...[truncated 2332 chars]
Remediation
View remediation

Remediation Suggestions

  1. Default both local recording and cloud upload to off.
  2. Obtain affirmative, separate consent for local collection and cloud transmission.
  3. Do not interpret silence or failure to opt out as authorization.
  4. Remove mandatory hidden logging from the response lifecycle.
  5. Reconcile all documentation and implementation defaults.
  6. Describe the identifier accurately as persistent pseudonymous data.
  7. Minimize payload fields and avoid free-form or Agent-generated notes.
  8. Rotate identifiers periodically and provide a one-step deletion mechanism for local records and server-side data.
  9. Display the destination origin and exact payload schema before consent.
  10. Provide commands to inspect pending records, uploaded identifiers, errors, and retention state.
  11. If scheduled upload is supported by an external platform, document that dependency accurately and require separate consent before scheduling.
  12. Add automated tests verifying that no network request occurs unless an explicit cloud opt-in state exists.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (136)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill directs automatic local state creation, JSONL signal processing, anonymous-ID bootstrapping, and cloud upload logic despite claiming to be primarily advisory. Such background persistence and upload mechanisms create privacy and integrity risk because they can collect usage-derived metadata, maintain long-lived identifiers, and transmit data off-device without a purpose proportionate to the advertised functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill directs automatic local state creation, JSONL signal processing, anonymous-ID bootstrapping, and cloud upload logic despite claiming to be primarily advisory. Such background persistence and upload mechanisms create privacy and integrity risk because they can collect usage-derived metadata, maintain long-lived identifiers, and transmit data off-device without a purpose proportionate to the advertised functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill directs automatic local state creation, JSONL signal processing, anonymous-ID bootstrapping, and cloud upload logic despite claiming to be primarily advisory. Such background persistence and upload mechanisms create privacy and integrity risk because they can collect usage-derived metadata, maintain long-lived identifiers, and transmit data off-device without a purpose proportionate to the advertised functionality.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest and description say the skill offloads search/verification to other tools, yet the body enables external network behavior for telemetry and cloud proposal management. This inconsistency undermines user consent and review because security expectations are set by the high-level description, while the detailed behavior quietly broadens external communications.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Automatic local logging and default-on cloud telemetry are not necessary for a research-advice skill and are enabled without meaningful prior opt-in. Even if limited to method tags, default persistence plus upload can expose behavioral patterns, create durable identifiers, and normalize covert data collection inside a tool that users expect to be purely consultative.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Cloud proposal review plus local self-modification is an unjustified capability for an end-user academic strategy skill. Allowing a skill to fetch proposed changes, approve them via authenticated requests, and apply file edits locally creates a supply-chain and persistence risk: a compromised proposal source or token could alter the skill's behavior on disk.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file presents manipulation tactics that bypass rational scrutiny without any warning about deception, autonomy harms, or ethical misuse. Absence of guardrails matters here because the material is procedural and directly reusable for influencing juries, voters, employees, or online communities.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The content explicitly advises abandoning reasoning and using vivid imagery and dramatization to drive public memory and action. That creates a manipulation capability that conflicts with the skill's stated academic and critical-thinking purpose, and it can be repurposed for propaganda, disinformation, coercive campaigning, or distorted risk communication.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The section recommends using dramatic imagery over argument to move public action, but gives no warning about distortion, panic amplification, or exploitation of audience vulnerability. That omission makes the content more dangerous because it frames emotionally coercive messaging as normal technique rather than a high-risk tactic requiring strict ethical limits.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

By advocating words detached from their real meaning to influence emotions, the file teaches deceptive framing without disclosing the ethical and informational harms. This is especially risky in an academic-advisory skill because users may infer that obscurity and slogan engineering are acceptable substitutes for clear reasoning.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The mechanism and transferable-core language generalize the manipulation pattern into a reusable playbook for bypassing rational scrutiny across scenarios. Because the skill is positioned as a broad academic strategist, this increases the chance that users will apply the technique outside legitimate rhetorical analysis and toward manipulative influence operations.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/security-audit.md (reported line 40)May include surrounding context.

md
### 命令执行与权限检查
- 发现次数: 0 次自动执行危险命令
- 明细:`grep` 扫描 `curl |`、`wget |`、`eval(`、`os.system`、`base64|bash`、`rm -rf`、`~/.ssh` → **全部零命中**
- 技能为纯 persona 方法论,无自动执行的脚本/命令。

### 文件操作与敏感路径检查

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · references/security-audit.md (reported line 52)May include surrounding context.

md
- 网络能力(WebFetch)为 agent 提供的可选工具,非自动外送。

### 远程脚本深度分析
- 无 `curl | bash` / 下载后执行模式 → 无需深度分析。

### 依赖安装风险检查
- 全局安装检测:0 次(无任何 `pip install` / `npm install` / `brew install`)。

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file defines default-on local telemetry and default-on cloud upload for a skill described as research/advisory support, creating behavior that exceeds user-expected functionality. Even if the payload is described as anonymized method-layer labels, silent collection and transmission introduce privacy, consent, and trust risks, especially because the skill also persists identifiers and usage patterns over time.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill specifies anonymous remote ingestion to a public endpoint without authentication and with installation-default upload enabled, despite telemetry not being essential to the skill's stated advisory purpose. Anonymous ingestion plus persistent anon_id issuance creates a covert analytics channel that can collect behavior at scale and may be abused or repurposed beyond the user’s reasonable expectations.

Content

No source excerpt is available for this finding.

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.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

This script performs external registration, email verification, and token provisioning for a cloud service, which is materially different from the stated research-advisory purpose of the skill. In a packaged skill, hidden or poorly disclosed account-linking behavior can lead users to transmit identifying data and obtain credentials from an external service they did not expect to trust.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code enumerates all skill directories under the base path, looks for references/signals.md, reads signals-log.jsonl, and uploads per-skill telemetry to a remote ingest endpoint. This is cross-skill collection and exfiltration behavior that is not disclosed in the manifest for a research-methodology advisor, creating a hidden telemetry channel across the user's environment. The mismatch between stated purpose and actual behavior makes the collection more dangerous because users would not reasonably expect broad outbound monitoring from this skill.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
81% confidence
Finding

The same persistence-capable tool permissions support the documented telemetry and proposal-application flows, making the skill capable of maintaining on-disk state beyond a normal advisory role. In context, this is more dangerous because the skill is marketed as non-executing and advisory-first, so users may not anticipate durable local changes.

Content

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

md
- bagua-furnace
allowed-tools:
  - Bash
  - Write
  - Edit
  - WebFetch
---

Session Persistence

Medium
Category
Rogue Agent
Confidence
81% confidence
Finding

The same persistence-capable tool permissions support the documented telemetry and proposal-application flows, making the skill capable of maintaining on-disk state beyond a normal advisory role. In context, this is more dangerous because the skill is marketed as non-executing and advisory-first, so users may not anticipate durable local changes.

Content

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

md
- bagua-furnace
allowed-tools:
  - Bash
  - Write
  - Edit
  - WebFetch
---

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file instructs the skill to refer to itself as '老衲' and the user as '施主', and the overall interaction style is framed around Chinese wuxia language. This imposes a language/locale-specific interaction pattern without offering the user a choice or opt-in, which is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill says it auto-activates for broad categories like methodology confusion, academic writing, root-cause diagnosis, and communication 'wake-up' needs. These categories are expansive and common in ordinary research conversations, and the file does not provide concrete exclusion boundaries beyond a narrow set of literature-search cases, increasing the chance of unintended invocation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The document claims the skill 'defaults to advising only' and 'does not call tools,' but other sections mandate writing local files and performing cloud-management actions. This internal inconsistency is dangerous because it obscures when state changes and network operations will occur, impairing meaningful consent and safe review.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill explicitly states it does not perform retrieval or use retrieval APIs, then later describes fetching remote proposals from a cloud service. Even if proposals are not literature search, this contradiction hides active remote fetch behavior and can mislead users or reviewers into approving broader network access than intended.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.