Back to skill

Security audit

Archive Project

Security checks for vulnerabilities and agentic risk

Overview

This archive skill is mostly coherent, but it can copy and permanently retain sensitive session transcripts with unsafe selection and incomplete redaction safeguards.

Install only if you are comfortable with a Review-level skill that reads session transcripts and stores sanitized copies long term. Prefer the ClawHub/OpenClaw install path, require an explicit session identifier before archiving, manually inspect sanitized output before any Git commit, avoid storing unnecessary client contact details, and do not approve deletion unless the exact source files are shown.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
Findings (3)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:32
Finding

Mutable Remote Payload Is Downloaded Without Integrity Verification

Content
View full analysis
Remediation
View remediation
" ARCHIVE="$(mktemp)" trap 'rm -f "$ARCHIVE"' EXIT curl --fail --show-error --location \ "https://github.com/KaigeGao1110/ArchiveProject/archive/refs/tags/v${VERSION}.zip" \ --output "$ARCHIVE" printf '%s %s\n' "$EXPECTED_SHA256" "$ARCHIVE" | sha256sum --check - ``` ]]>

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:92
Finding

Ambiguous Transcript Selection Can Access and Archive an Unrelated Private Session

Content
View full analysis
/dev/null | head -1) fi # Fallback: if no key provided or not found, use most recent transcript if [ -z "$MAIN_SESSION_PATH" ] || [ ! -f "$MAIN_SESSION_PATH" ]; then MAIN_SESSION_PATH=$(ls -t "${SESSION_DIR}"*.jsonl 2>/dev/null | head -1) fi ``` The selected file is subsequently copied at line 105: ```bash cp "$MAIN_SESSION_PATH" "workspace/projects//session_transcript.jsonl" ``` The procedure may later delete the selected source after approval at lines 176-180: ```bash rm -f "${SESSION_DIR}$(basename "$MAIN_SESSION_PATH")" for CHILD_ID in ; do rm -f "${SESSION_DIR}${CHILD_ID}.jsonl" done ``` ### Technical Analysis The Skill needs access to the transcript associated with the project being archived. However, when a session key is absent, incorrect, or not found, it silently chooses the most recently modified JSONL file from the entire configured session directory. File modification time does not establish that a transcript belongs to the requested project. Another active agent, background process, or unrelated conversation may have created or updated the newest file. The initial `grep -l ... | head -1` selection is also ambiguous when several transcripts contain the same key because it accepts the first match rather than requiring a unique match. This violates least privilege: instead of accessing only a positively identified project transcript, the workflow may read any transcript in the configured directory. Sanitization does not eliminate this boundary violation and cannot guarantee removal of every confidential detail. ### Attack Path ...[truncated 1345 chars]
Remediation
View remediation
&2 exit 1 fi MAIN_SESSION_PATH="${SESSION_DIR}${SESSION_KEY}.jsonl" if [ ! -f "$MAIN_SESSION_PATH" ]; then echo "Error: exact session transcript not found." >&2 exit 1 fi ``` ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/sanitize_transcript.py:91
Finding

Best-Effort Sanitization Can Leave Credentials and Sensitive Data in Committed Archives

Content
View full analysis
Any: """ Recursively sanitize a value, preserving structure. - Strings are redacted - Dicts preserve keys, redact values - Lists sanitize each element """ if isinstance(value, str): return redact_text(value, strict=strict) elif isinstance(value, dict): return {k: sanitize_value(v, strict=strict) for k, v in value.items()} elif isinstance(value, list): return [sanitize_value(item, strict=strict) for item in value] else: return value ``` Malformed JSONL records pass through best-effort redaction in the default mode: ```python except json.JSONDecodeError as e: if strict: redacted = redact_text(line) raise RuntimeError( f"JSON parse error on line {line_num} " f"(line was sanitized before error): {e}\nSanitized: {redacted[:200]}" ) # Non-JSON lines are still sanitized before being passed through output_handle.write(redact_text(line) + '\n') ``` The workflow then replaces the original archive copy with the sanitizer output: ```bash python3 scripts/sanitize_transcript.py \ workspace/projects//session_transcript.jsonl \ -o workspace/projects//session_transcript_sanitized.jsonl mv workspace/projects//session_transcript_sanitized ...[truncated 2355 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
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (10)

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The README states that all deliverables are written in English regardless of client language preference. This is a language-policy constraint without user opt-in or a documented justification, which violates the stated policy requirements.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/sanitize_transcript.py (reported line 42)May include surrounding context.

python
(
        r'\b(ghp|gho|ghu|ghs|ghr)_[A-Za-z0-9_]{36,}\b',
        '[REDACTED-GITHUB-TOKEN]',
        'GitHub personal access tokens (ghp_, gho_, ghu_, ghs_, ghr_)',
    ),
    (
        r'\b(github_pat_[A-Za-z0-9_]{22,})\b',

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/sanitize_transcript.py (reported line 62)May include surrounding context.

python
(
        r'\b(ghp|gho|ghu|ghs|ghr)_[A-Za-z0-9_]{36,}\b',
        '[REDACTED-GITHUB-TOKEN]',
        'GitHub personal access tokens (ghp_, gho_, ghu_, ghs_, ghr_)',
    ),
    (
        r'\b(github_pat_[A-Za-z0-9_]{22,})\b',

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/sanitize_transcript.py (reported line 67)May include surrounding context.

python
(
        r'\b(ghp|gho|ghu|ghs|ghr)_[A-Za-z0-9_]{36,}\b',
        '[REDACTED-GITHUB-TOKEN]',
        'GitHub personal access tokens (ghp_, gho_, ghu_, ghs_, ghr_)',
    ),
    (
        r'\b(github_pat_[A-Za-z0-9_]{22,})\b',

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README advertises broad natural-language triggers like "archive this" and "can we archive this," which can easily match ordinary conversation rather than an explicit user command. In a skill that archives transcripts and updates memory/git state, accidental invocation could cause unintended collection, persistence, and commit of sensitive workspace data.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

git clone https://github.com/KaigeGao1110/ArchiveProject.git ~/.openclaw/skills/archive-project

Or download directly

curl -L https://github.com/KaigeGao1110/ArchiveProject/archive/refs/heads/main.zip -o /tmp/archive-project.zip unzip /tmp/archive-project.zip -d ~/.openclaw/skills/ mv ~/.openclaw/skills/ArchiveProject-main ~/.openclaw/skills/archive-project

text

Session Persistence

Medium
Category
Rogue Agent
Confidence
97% confidence
Finding

The skill is designed to persist full session transcripts and child subagent transcripts into a long-term project archive, materially increasing retention of potentially sensitive conversations, secrets, and operational metadata. Even with sanitization, transcripts are high-risk artifacts because redaction can miss edge cases, and the archive centralizes sensitive history in a durable location.

Content

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

Archive Flow

Step 1: Create project archive directory

text
workspace/projects/<project-name>/

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The reference section states the sanitization script is 'Non-destructive: Original file is never modified' (L353-L355). However, the prescribed archive procedure immediately moves the sanitized file over the original transcript path (L151-L155), resulting in the original archived copy being replaced. This is a direct contradiction in the skill documentation about whether the original transcript remains intact.

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

"Can I delete the EFS session files for this project? They are already backed up in the archive."

Only proceed if the user explicitly approves. Never auto-delete without asking.

If approved:

bash

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The template explicitly instructs storing client contact information in long-term archive records without a clear data-minimization rule, consent requirement, or retention limit. This can cause unnecessary persistence of personal data and broaden the blast radius if the archive is later accessed or exposed.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.generated_source_template_injection

User-controlled placeholder is embedded directly into generated source code.

Critical
Code
suspicious.generated_source_template_injection
Location
SKILL.md:94