Back to skill

Security audit

Agentic Paper Digest Skill

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent paper-digest purpose, but its installer and wrappers create review-worthy risk by executing mutable remote code, sourcing dotenv files as shell code, and force-killing broad local processes.

Install only if you are comfortable running code from the current state of the publisher's GitHub repository. Prefer pinning the repo to a reviewed commit, reviewing requirements before pip install, replacing dotenv source with safe parsing, keeping API keys out of transcripts and version control, and avoiding stop_api.sh unless you have confirmed nothing else important is using port 8000.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/bootstrap.sh:5
Finding

Unpinned Remote Repository Is Downloaded, Installed, and Executed

Content
View full analysis
/dev/null 2>&1; then if [ -d "$PROJECT_DIR/.git" ]; then echo ">> Updating repo in $PROJECT_DIR" git -C "$PROJECT_DIR" pull --ff-only else echo ">> Cloning repo into $PROJECT_DIR" git clone "$REPO_URL" "$PROJECT_DIR" fi ``` ```bash echo ">> Git not available. Downloading zip to $PROJECT_DIR" mkdir -p "$PROJECT_DIR" tmp_zip="$(mktemp -t agentic_paper_digest.XXXXXX).zip" if command -v curl >/dev/null 2>&1; then curl -L "$ZIP_URL" -o "$tmp_zip" elif command -v wget >/dev/null 2>&1; then wget -O "$tmp_zip" "$ZIP_URL" else "$PY_BIN" - "$ZIP_URL" "$tmp_zip" <<'PY' import sys import urllib.request url, out = sys.argv[1], sys.argv[2] urllib.request.urlretrieve(url, out) PY fi tmp_dir="$(mktemp -d)" if command -v unzip >/dev/null 2>&1; then unzip -q "$tmp_zip" -d "$tmp_dir" else "$PY_BIN" - "$tmp_zip" "$tmp_dir" <<'PY' import sys import zipfile zipfile.ZipFile(sys.argv[1]).extractall(sys.argv[2]) PY fi src_dir="$tmp_dir/agentic_paper_digest-main" if [ ! -d "$src_dir" ]; then echo "Downloaded archive did not contain expected folder: $src_dir" exit 1 fi cp -R "$src_dir/." "$PROJECT_DIR/" ``` ```bash echo ">> Installing Python deps" pip install -r requirements.txt ``` ### Technical Analysis The bootstrap process retrieves the effective application payload from the mutable default branch of a personal GitHub repository. Neither the Git path nor the ZIP ...[truncated 1895 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/run_cli.sh:23
Finding

Dotenv Configuration Files Are Executed as Shell Code

Content
View full analysis
> Created .env from .env.example" fi ``` Both execution wrappers then source the selected file: ```bash ENV_FILE="${ENV_FILE:-.env}" if [ -f "$ENV_FILE" ]; then set -a # shellcheck disable=SC1090 source "$ENV_FILE" set +a fi ``` ### Technical Analysis The shell `source` command does not implement a restricted dotenv parser. It interprets the entire file as Bash code, including command substitutions, redirections, function definitions, pipelines, and arbitrary commands. The initial `.env` may be copied from `.env.example` in the mutable remote repository. In addition, the caller can select another path through `ENV_FILE`. A file represented as application configuration can therefore execute commands before the Python application starts. Using `set -a` is sufficient to export variables after safe parsing, but it does not make `source` safe. The wrappers must treat dotenv content as untrusted data rather than executable shell syntax. ### Attack Path 1. An attacker introduces shell commands into the upstream `.env.example`, modifies an existing local `.env`, or persuades the user to set `ENV_FILE` to an attacker-controlled file. 2. The bootstrap script copies the remote `.env.example` to `.env` when no `.env` exists. 3. The user starts the CLI or API wrapper. 4. The wrapper invokes `source "$ENV_FILE"`. 5. Bash executes the attacker's commands before `paper_finder` starts. 6. Those commands run in the same user context and can read or alter credentials, files, and application state. ### Impact Assessment Exploitation permits arbitrary sh ...[truncated 318 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/stop_api.sh:4
Finding

API Stop Script Can Force-Kill Unrelated Processes

Content
View full analysis
/dev/null 2>&1; then lsof -ti tcp:8000 | xargs kill -9 2>/dev/null || true fi pkill -f "uvicorn.*paper_finder.webapp" 2>/dev/null || true pkill -f "paper_finder serve" 2>/dev/null || true ``` ### Technical Analysis The script does not record or verify the process identifier of the API server it starts. Instead, it force-kills every accessible process listening on TCP port 8000 and then performs broad matches against complete process command lines. Port ownership does not establish that a process belongs to this Skill. Similarly, `pkill -f` can match unrelated commands containing the specified text. The unconditional use of `SIGKILL` prevents target processes from flushing data, releasing resources cleanly, or running shutdown handlers. This behavior exceeds the minimum privilege and scope necessary to stop the Skill's own API server. ### Attack Path 1. An unrelated application listens on TCP port 8000, or its command line contains `paper_finder serve` or matches `uvicorn.*paper_finder.webapp`. 2. The user runs `scripts/stop_api.sh`. 3. `lsof` supplies all matching port-owner PIDs to `kill -9`, or `pkill -f` matches the unrelated command. 4. The unrelated process is terminated without graceful shutdown or identity verification. ### Impact Assessment The issue can cause denial of service against unrelated processes owned by the invoking user. Abrupt termination may also result in incomplete writes, database corruption, lost in-memory state, or interrupted work. The script does not demonstrate the ability to kill processes that the invoking account is not already authorized to signal. ]]>
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The documented ability to stop the API server introduces process-management behavior unrelated to simple paper fetching/summarization, yet this is not reflected in the skill's stated purpose. Hidden or under-disclosed process control is risky because it may terminate local services unexpectedly or affect unrelated workloads if implemented broadly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documented ability to stop the API server introduces process-management behavior unrelated to simple paper fetching/summarization, yet this is not reflected in the skill's stated purpose. Hidden or under-disclosed process control is risky because it may terminate local services unexpectedly or affect unrelated workloads if implemented broadly.

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

md
## Configuration
Config files live in `PROJECT_DIR/config`. Environment variables can be set in the shell or via a `.env` file. The wrappers here auto-load `.env` from `PROJECT_DIR` (override with `ENV_FILE=/path/to/.env`).

**Environment (.env or exported vars)**
- `OPENAI_API_KEY`: required for OpenAI models (litellm reads this).
- `LITELLM_API_BASE`, `LITELLM_API_KEY`: use an OpenAI-compatible proxy/provider.
- `LITELLM_MODEL_RELEVANCE`, `LITELLM_MODEL_SUMMARY`: models for relevance and summarization (summary defaults to relevance model if unset).

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 · scripts/bootstrap.sh (reported line 81)May include surrounding context.

sh
## Configuration
Config files live in `PROJECT_DIR/config`. Environment variables can be set in the shell or via a `.env` file. The wrappers here auto-load `.env` from `PROJECT_DIR` (override with `ENV_FILE=/path/to/.env`).

**Environment (.env or exported vars)**
- `OPENAI_API_KEY`: required for OpenAI models (litellm reads this).
- `LITELLM_API_BASE`, `LITELLM_API_KEY`: use an OpenAI-compatible proxy/provider.
- `LITELLM_MODEL_RELEVANCE`, `LITELLM_MODEL_SUMMARY`: models for relevance and summarization (summary defaults to relevance model if unset).

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 · scripts/bootstrap.sh (reported line 82)May include surrounding context.

sh
## Configuration
Config files live in `PROJECT_DIR/config`. Environment variables can be set in the shell or via a `.env` file. The wrappers here auto-load `.env` from `PROJECT_DIR` (override with `ENV_FILE=/path/to/.env`).

**Environment (.env or exported vars)**
- `OPENAI_API_KEY`: required for OpenAI models (litellm reads this).
- `LITELLM_API_BASE`, `LITELLM_API_KEY`: use an OpenAI-compatible proxy/provider.
- `LITELLM_MODEL_RELEVANCE`, `LITELLM_MODEL_SUMMARY`: models for relevance and summarization (summary defaults to relevance model if unset).

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 · scripts/bootstrap.sh (reported line 80)May include surrounding context.

sh
echo ">> Installing Python deps"
pip install -r requirements.txt

if [ ! -f ".env" ] && [ -f ".env.example" ]; then
  cp .env.example .env
  echo ">> Created .env from .env.example"
fi

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill requires shell execution and network access but does not declare any explicit tool scope or allowed-tools boundary. That increases the chance an agent invokes it with broader-than-necessary capabilities, especially since the workflow includes downloading code and running local scripts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The activation criteria are broad enough to match common requests for summaries or JSON feeds, which could trigger a skill that performs network access, downloads code, and executes shell scripts in contexts where a simple answer would suffice. Over-broad routing increases unintended execution risk rather than direct code exploitability.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs creation and use of a .env containing API credentials but does not warn about secret handling, accidental logging, or committing the file. In an agentic environment, that omission raises the chance credentials are exposed through transcripts, shell history, workspace files, or version control.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The bootstrap script downloads code from GitHub and later installs dependencies from that retrieved repository, creating a software supply-chain risk if the remote repository, branch, or network path is compromised. Although this is a common installer pattern and uses HTTPS, it does not verify a pinned commit, checksum, or signature before trusting and executing downloaded content.

Content

Scanner excerpt · scripts/bootstrap.sh (reported line 32)May include surrounding context.

sh
echo ">> Git not available. Downloading zip to $PROJECT_DIR"
    mkdir -p "$PROJECT_DIR"
    tmp_zip="$(mktemp -t agentic_paper_digest.XXXXXX).zip"
    if command -v curl >/dev/null 2>&1; then
      curl -L "$ZIP_URL" -o "$tmp_zip"
    elif command -v wget >/dev/null 2>&1; then
      wget -O "$tmp_zip" "$ZIP_URL"

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This script can terminate any process bound to TCP port 8000 as well as any process whose command line matches the specified patterns, which is broader than the paper-digest skill's stated need to fetch and summarize papers. In a shared developer machine or multi-service environment, this can kill unrelated applications and cause denial of service or data loss, especially because it uses SIGKILL and performs no ownership, workspace, or identity checks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Force-killing all processes listening on port 8000 without warning or confirmation is unsafe because port 8000 is commonly used by many unrelated local services. Using kill -9 prevents graceful shutdown, increasing the risk of interrupted work, corrupted temporary state, or loss of unsaved data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Pattern-based pkill against command lines can match more processes than intended, including unrelated programs whose arguments happen to contain the same text. In the context of a paper-digest skill, undisclosed process termination is unnecessary and expands the skill's ability to disrupt the host beyond its expected function.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The skill explains that it bootstraps a repository, fetches remote paper data, may call external LLM providers, and writes local data/config files, but it presents these as operational steps without a consolidated warning about their impact on the user's system and privacy. For a markdown skill description, the lack of an explicit warning may leave users unaware of network transmissions and local persistence.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The guidance says 'If using openAI's model, defualy to gpt-5-mini,' which imposes a default provider/model preference in the instructions rather than presenting a neutral choice. This is a mild natural-language policy concern because it nudges a specific provider/model without explicit user selection, even though alternative providers are mentioned elsewhere.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.