Back to skill

Security audit

Crucible Forge

Security checks for vulnerabilities and agentic risk

Overview

This skill is not clearly malicious, but it needs review because it runs broad local workspace analysis and executable Python configs while overstating its safety guarantees.

Review before installing or running. Use only configs you wrote or fully reviewed, do not run it with elevated privileges, avoid untrusted workspaces or symlinks, verify backups independently before moving files, and treat generated plans/audits as advisory rather than proof of zero data loss.

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

T09 · Insecure Skill Coding Practices

Error
Location
forge_plan.py:297
Finding

Reorganization plans are generated without enforcing the required backup

Content
View full analysis
dict: """Generate complete reorganization plan.""" print("Generating safety rules...") safety_rules = generate_safety_rules(config, scan_report) print("Planning directory creation...") dirs = generate_directory_creation(config) print("Generating _README.md content...") readmes = generate_readmes(config) print("Planning file moves...") moves = generate_moves(config, scan_report, safety_rules) print("Building execution order...") execution_order = build_execution_order(moves, safety_rules) print("Validating plan...") issues = validate_plan(moves, safety_rules, scan_report) plan = { "generated_at": datetime.now().isoformat(), "workspace_root": getattr(config, "WORKSPACE_ROOT", "."), "safety_rules": safety_rules, "directories_to_create": dirs, "readmes_to_generate": readmes, "moves": moves, "execution_order": execution_order, "validation_issues": issues, "summary": { "directories_to_create": len(dirs), "readmes_to_generate": len(readmes), "files_to_move": len(moves), "reference_patches": sum(len(m.get("reference_updates", [])) for m in moves), "validation_errors": len([i for i in issues if i["severity"] in ("ERROR", "CRITICAL")]), "validation_warnings": len([i for i in issues if i["severity"] == "WARNING"]), }, "rollback_command": ( "# To rollback, restore from the pre-move backup:\n" f"# tar -xzf backups/forge-pre-move-*.tar.gz -C {getattr(config, 'WORKSPACE_ROOT', '.')}\n" "# Then verify with: python3 forge_audit.py --config forge_config.py --phase ...[truncated 2096 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
forge_audit.py:224
Finding

Generated audit artifacts can mask missing workspace files

Content
View full analysis
= pre_count: result.check_pass( "File count", f"Pre: {pre_count}, Post: {current_count} (no files lost)" ) else: lost = pre_count - current_count result.check_fail( "File count", f"Pre: {pre_count}, Post: {current_count} — {lost} files MISSING" ) pre_paths = {e["path"] for e in pre_manifest} current_paths = {e["path"] for e in current_manifest} missing = pre_paths - current_paths if missing: for m in sorted(missing)[:20]: result.check_fail("Missing file", m) ``` ```python audit_dir = getattr( config, "AUDIT_DIR", os.path.join(workspace_root, "backups") ) os.makedirs(audit_dir, exist_ok=True) post_manifest_path = os.path.join( audit_dir, f"post_manifest_{int(time.time())}.json" ) with open(post_manifest_path, "w") as f: json.dump(current_manifest, f, indent=2) result.check_pass("Post-manifest created", post_manifest_path) ``` ### Technical Analysis The pre-move ...[truncated 1636 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
forge_audit.py:272
Finding

Post-move audit does not detect deleted protected files

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
forge_scan.py:82
Finding

Workspace symlinks allow reads outside the configured workspace boundary

Content
View full analysis
max_size: continue filepath = workspace / f["path"] try: content = filepath.read_text(encoding="utf-8", errors="replace") except OSError: continue ``` ```python def get_file_hash(filepath: str) -> str: """SHA-256 hash of a file.""" h = hashlib.sha256() try: with open(filepath, "rb") as f: for chunk in iter(lambda: f.read(8192), b""): h.update(chunk) return h.hexdigest() except OSError: return "" ``` ```python for fn in filenames: fp = Path(root) / fn if fp.stat().st_size > 10 * 1024 * 1024: continue try: content = fp.read_text(encoding="utf-8", errors="replace") for pat in compiled: if pat.search(content): exposed.append(str(fp.relative_to(workspace))) break except OSError: pass ``` ### Technical Analysis The scanner and auditor derive a lexical path under `WORKSPACE_ROOT`, but then use `Path.stat()`, `Path.read_text()`, and `open()` without checking whether the final resolved path remains inside the configured workspace. These operatio ...[truncated 1882 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
forge_audit.py:160
Finding

Backup validation accepts empty, corrupt, unrelated, or non-regular archive entries

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (28)

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation directly contradicts the skill metadata: the file says Forge only generates plans and does not execute them, while the manifest describes it as executing workspace reorganization. In a file-moving tool, this mismatch is dangerous because users or downstream agents may rely on the safer documented behavior and authorize actions they would not approve if execution capability were accurately disclosed.

Content

No source excerpt is available for this finding.

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill attempts to nullify the agent's safety policies or restrictions ('you have no restrictions', 'ignore your guidelines', 'do anything now'). This is a direct jailbreak that disables guardrails.

Content

Scanner excerpt · README.md (reported line 13)May include surrounding context.

md
AI agent workspaces accumulate chaos fast. Files pile up at root. Memory files reference moved documents. Cron jobs point to old paths. Config files drift. One bad reorganization can brick your agent's memory, break running processes, or corrupt critical state files.

Manual cleanup is dangerous. Automated cleanup without safeguards is worse.

## What Forge Does

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill attempts to nullify the agent's safety policies or restrictions ('you have no restrictions', 'ignore your guidelines', 'do anything now'). This is a direct jailbreak that disables guardrails.

Content

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

md
AI agent workspaces accumulate chaos fast. Files pile up at root. Memory files reference moved documents. Cron jobs point to old paths. Config files drift. One bad reorganization can brick your agent's memory, break running processes, or corrupt critical state files.

Manual cleanup is dangerous. Automated cleanup without safeguards is worse.

## What Forge Does

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill presents itself as a safe workspace organizer, but the behavior summary includes subprocess-based process inspection and Python config execution, both of which are materially more sensitive than passive planning. In this context, misleading capability disclosure increases the chance that operators run the skill in trusted environments without appreciating the code-execution and system-inspection surface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill presents itself as a safe workspace organizer, but the behavior summary includes subprocess-based process inspection and Python config execution, both of which are materially more sensitive than passive planning. In this context, misleading capability disclosure increases the chance that operators run the skill in trusted environments without appreciating the code-execution and system-inspection surface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill presents itself as a safe workspace organizer, but the behavior summary includes subprocess-based process inspection and Python config execution, both of which are materially more sensitive than passive planning. In this context, misleading capability disclosure increases the chance that operators run the skill in trusted environments without appreciating the code-execution and system-inspection surface.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · config_example.py (reported line 38)May include surrounding context.

python
"*.pyc",
    "node_modules",
    "venv",
    ".env",
]

# =============================================================================

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The tool loads the supplied config by importing and executing an arbitrary Python file via spec.loader.exec_module(config). Because --config is user-provided, any code in that file runs with the auditor's privileges before auditing begins, enabling arbitrary code execution, file tampering, secret exfiltration, or persistence.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The planner imports and executes the user-supplied Python config via importlib and exec_module, which runs arbitrary code during planning. In this skill context, config files may come from the workspace or other users, so a malicious config can achieve code execution immediately, before any planning safeguards apply.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · forge_plan.py (reported line 105)May include surrounding context.

python
],
    }

    return rules


def classify_file(filepath: str, config) -> str:

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

The file states Forge has no content understanding and classifies files only by metadata, yet the broader skill description claims it can verify everything works afterward. That creates an overstatement of assurance: a tool that does not understand file semantics or runtime behavior cannot reliably verify functional correctness after reorganization, which may mislead users into trusting incomplete validation.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% 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 · README.md (reported line 75)May include surrounding context.

md
- **Never deletes files.** Moves only. If something looks like garbage, it goes to archive.
- **Never modifies protected files.** You define what's protected; Forge won't touch them.
- **Backup before changes.** Forge refuses to generate a plan without a verified backup.
- **Human reviews the plan.** Forge doesn't auto-execute. You read the plan, you decide.
- **Rollback for every step.** Every move in the plan includes how to undo it.

### Zero-Deletion Policy

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% 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 · SKILL.md (reported line 88)May include surrounding context.

md
- **Never deletes files.** Moves only. If something looks like garbage, it goes to archive.
- **Never modifies protected files.** You define what's protected; Forge won't touch them.
- **Backup before changes.** Forge refuses to generate a plan without a verified backup.
- **Human reviews the plan.** Forge doesn't auto-execute. You read the plan, you decide.
- **Rollback for every step.** Every move in the plan includes how to undo it.

### Zero-Deletion Policy

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% 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 · forge_plan.py (reported line 98)May include surrounding context.

python
- **Never deletes files.** Moves only. If something looks like garbage, it goes to archive.
- **Never modifies protected files.** You define what's protected; Forge won't touch them.
- **Backup before changes.** Forge refuses to generate a plan without a verified backup.
- **Human reviews the plan.** Forge doesn't auto-execute. You read the plan, you decide.
- **Rollback for every step.** Every move in the plan includes how to undo it.

### Zero-Deletion Policy

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill advertises capabilities that clearly require file read, file write, and shell/process inspection, yet it declares no explicit tool scope or permission boundaries. In an agent ecosystem, missing scope metadata can cause the skill to run with broader privileges than users expect, increasing the chance of unsafe file operations or command execution.

Content

No source excerpt is available for this finding.

Unrestricted Tool Access

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The skill explicitly states that it loads a user-provided Python config file with importlib.exec_module, which executes that file as code. This is a direct arbitrary code execution primitive: any attacker who can influence the config file can run commands, exfiltrate data, alter files, or persist on the host under the agent's privileges.

Content

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

md
This skill loads configuration from a user-provided Python file using `importlib.exec_module`. **This executes the config file as Python code.**

- Only run config files you have written or fully reviewed
- A malicious or unreviewed config file can execute arbitrary code on your system
- Config path is validated for existence, `.py` extension, and size (1MB cap) before execution
- Do not run configs provided by untrusted sources without inspection

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The comment claims path validation makes config loading secure, but the code still executes the config file contents. This misleading assurance increases the chance that maintainers or users will trust untrusted config files, masking the arbitrary code execution risk and making exploitation more likely in practice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code executes the Python config immediately with no explicit warning, consent prompt, or user-facing indication that --config is treated as code rather than data. In a workspace-management skill, users may reasonably provide or reuse config files from repositories or generated artifacts, making silent code execution especially risky.

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 · forge_audit.py (reported line 216)May include surrounding context.

python
# Check 5: Running processes
    try:
        ps = subprocess.run(["ps", "aux"], capture_output=True, text=True, timeout=10)
        ws_procs = [l for l in ps.stdout.splitlines() if workspace_root in l]
        if ws_procs:
            result.check_warn(

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 · forge_audit.py (reported line 390)May include surrounding context.

python
# Check 5: Running processes
    try:
        ps = subprocess.run(["ps", "aux"], capture_output=True, text=True, timeout=10)
        ws_procs = [l for l in ps.stdout.splitlines() if workspace_root in l]
        if ws_procs:
            result.check_warn(

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code executes the config file without any explicit user-facing warning that loading the config will run Python code. This increases the chance that users treat a config as inert data and open the planner on an attacker-controlled file, leading to unexpected code execution.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

load_config imports and executes a Python file with exec_module, which means any code in the config runs immediately. For a workspace-analysis skill, this is especially dangerous because users may point the tool at untrusted repositories or generated configs, turning configuration loading into arbitrary code execution before scanning even begins.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The scanner executes arbitrary local commands from configuration via PROCESS_CHECK_COMMANDS. In an agent skill context, config may be attacker-controlled or untrusted workspace content, so running those commands grants code execution on the host during a seemingly harmless scan operation.

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 · forge_scan.py (reported line 269)May include surrounding context.

python
for cmd in commands:
        try:
            cmd_list = shlex.split(cmd) if isinstance(cmd, str) else list(cmd)
            result = subprocess.run(
                cmd_list, capture_output=True, text=True, timeout=10
            )
            for line in result.stdout.splitlines():

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 · README.md (reported line 147)May include surrounding context.

md
**USE AT YOUR OWN RISK.**

- The author(s) are NOT liable for any damages, losses, or consequences arising from 
  the use or misuse of this software — including but not limited to financial loss, 
  data loss, security breaches, business interruption, or any indirect/consequential damages.
- This software does NOT constitute financial, legal, trading, or professional advice.
- Users are solely responsible for evaluating whether this software is suitable for