Back to skill

Security audit

Intern Report

Security checks for vulnerabilities and agentic risk

Overview

The main internship-report generator is local and mostly coherent, but the package also includes an unrelated script that can persist raw command arguments without disclosure.

Review this skill before installing. The documented intern.sh generator appears local and purpose-aligned, but avoid using the bundled script.sh with sensitive arguments unless its logging is removed or clearly documented. Expect Chinese-language output unless the publisher adds locale controls.

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
scripts/script.sh:35
Finding
Undocumented Persistent Logging of Raw Command Arguments<![CDATA[ ## Vulnerability Details **File Location**: `scripts/script.sh`, lines 5–7 and 35–76 **Vulnerability Type**: Plaintext persistence of potentially sensitive command arguments **Risk Level**: Medium ### Vulnerable Code ```bash DATA_DIR="${INTERN_REPORT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/intern-report}" DB="$DATA_DIR/data.log" mkdir -p "$DATA_DIR" ``` ```bash _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } cmd_query() { echo " Query: $*" _log "query" "${1:-}" } cmd_import() { echo " Importing: $1" _log "import" "${1:-}" } cmd_export() { echo " Exporting to: ${1:-stdout}" _log "export" "${1:-}" } cmd_transform() { echo " Transforming: $1 -> $2" _log "transform" "${1:-}" } cmd_validate() { echo " Validating schema..." _log "validate" "${1:-}" } cmd_stats() { echo " Records: $(wc -l < "$DB" 2>/dev/null || echo 0)" _log "stats" "${1:-}" } cmd_schema() { echo " Fields: id, name, value, timestamp" _log "schema" "${1:-}" } cmd_sample() { [ -f "$DB" ] && head -5 "$DB" || echo "No data" _log "sample" "${1:-}" } cmd_clean() { echo " Cleaning data..." _log "clean" "${1:-}" } cmd_dashboard() { echo " Total: $(wc -l < "$DB" 2>/dev/null || echo 0) records" _log "dashboard" "${1:-}" } ``` ### Technical Analysis The script creates a persistent data directory under the invoking user's home directory, or at a caller-controlled location supplied through `INTERN_REPORT_DIR`. Its `_log` function appends command names and raw first arguments to `history.log`. Arguments to commands such as `query`, `import`, `export`, and `transform` may contain sensitive query content, filenames, directory structures, project identifiers, or other user-provided information. These values are stored without redaction, explicit consent, retention limits, or restrictive permission initialization. The resulting permissions depend on the invoking process's `uma ...[truncated 1790 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `scripts/script.sh` if it is unrelated to the declared internship-report functionality. 2. If the utility is intentional, document its purpose, storage location, logged fields, and retention behavior in `SKILL.md`. 3. Disable history logging by default and require an explicit opt-in option. 4. Do not store raw command arguments. Record only non-sensitive operational metadata, such as the command name and a success or failure status. 5. If argument logging is essential, redact credentials, tokens, personal information, query contents, and sensitive path components before writing. 6. Create files with restrictive permissions: ```bash umask 077 mkdir -p -- "$DATA_DIR" touch -- "$DATA_DIR/history.log" chmod 600 -- "$DATA_DIR/history.log" ``` 7. Validate `INTERN_REPORT_DIR` before use and reject unsafe or unexpectedly shared destinations. 8. Add log rotation, maximum retention limits, and an explicit command for securely deleting stored history. 9. Clearly notify users before persistent data is created and provide a no-logging mode. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (4)

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
This code formats dates and weekdays specifically in Chinese and the generated reports, prompts, and help text throughout the script are all fixed to Chinese. Because the skill does not provide any user opt-in or alternative locale, it enforces a specific language policy through natural-language output.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The script logs user-supplied command arguments to a persistent local history file without any notice, redaction, or opt-in control. Users may pass file paths, identifiers, query terms, or other sensitive operational data as arguments, and those values will be stored under a predictable location in the user's data directory where they may be retained longer than expected or exposed to other local processes/users depending on filesystem permissions.

Natural-Language Policy Violations

Low
Confidence
82% confidence
Finding
The natural-language description is presented bilingually and appears to assume Chinese-language output for key functionality, but it does not explicitly let the user choose a preferred language or state that the skill is intentionally limited to Chinese-speaking users. Under the policy for locale/language constraints, skills should either provide opt-in choice or clearly justify a fixed language scope.

Natural-Language Policy Violations

Low
Confidence
96% confidence
Finding
This markdown file presents all instructions, examples, and guidance exclusively in Chinese. Under the policy scope provided, forcing a specific language without user opt-in can be a natural-language policy violation when no justification or alternative language option is given.

Static analysis

No suspicious patterns detected.