Back to skill

Security audit

agentic-paper-digest-skill

Security checks for vulnerabilities and agentic risk

Overview

The skill’s paper-digest purpose is coherent, but its install/run path gives mutable downloaded code and dotenv files too much local execution authority.

Install only if you are comfortable running code from the current upstream GitHub main branch with your user permissions. Prefer reviewing/pinning the exact repository commit first, avoid placing valuable secrets in .env, run it in an isolated workspace, and do not use stop_api.sh where unrelated services may be 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

Mutable Remote Repository Is Downloaded, Installed, and Executed Without Integrity Verification

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 else if [ -d "$PROJECT_DIR" ] && [ "$(ls -A "$PROJECT_DIR")" ]; then echo ">> Git not available. Using existing contents in $PROJECT_DIR" else 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 ``` ```bash source .venv/bin/activate echo ">> Installing Python deps" pip install -r requirements.txt ``` The retrieved package is subsequently executed by the wrappers: ```bash python -m paper_finder run --json "$@" ``` ```bash python -m paper_finder serve "$@" ``` ### Technical Analysis The bootstrap process retrieves the mutable `main` branch from a personal GitHub repository. It does not pin an immutable commit, verify a cryptographic checksum, validate a signature, or otherwise ensure that the downloaded content is the same content that was audited. After retrieval, `pip install -r requirements. ...[truncated 2126 chars]
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/run_cli.sh:23
Finding

Downloaded Dotenv Content Is Executed as Shell Code

Content
View full analysis
> Created .env from .env.example" fi ``` Both runtime wrappers execute that file using Bash `source`: ```bash ENV_FILE="${ENV_FILE:-.env}" if [ -f "$ENV_FILE" ]; then set -a # shellcheck disable=SC1090 source "$ENV_FILE" set +a fi ``` ### Technical Analysis A dotenv file is normally treated as declarative configuration. Bash `source`, however, parses the file as unrestricted shell code. Consequently, command substitutions, function definitions, redirections, pipelines, and arbitrary commands in `.env` execute with the wrapper's permissions. The default `.env` may be copied from `.env.example` in the mutable downloaded repository. This creates a direct execution chain from remotely controlled template content to local shell execution. The `ENV_FILE` override also allows any specified readable file to be sourced, increasing the risk of accidental or malicious execution. Merely reading approved configuration keys is necessary for the Skill. Executing the entire configuration file as shell code is not necessary and violates least-privilege design. ### Attack Path 1. An attacker modifies `.env.example` in the upstream repository to contain shell commands, for example a command substitution attached to an apparently legitimate variable. 2. The user runs `scripts/bootstrap.sh`. 3. If `.env` does not already exist, the malicious `.env.example` is copied to `.env`. 4. The user invokes `scripts/run_cli.sh` or `scripts/run_api.sh`. 5. The wrapper runs `source "$ENV_FILE"`. 6. Bash executes the embedded commands before launching `paper_fin ...[truncated 783 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/stop_api.sh:4
Finding

API Stop Script Can Force-Terminate 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 identifies processes using a shared TCP port or broad command-line patterns rather than tracking the specific server instance started by this Skill. `lsof -ti tcp:8000 | xargs kill -9` sends an unconditional `SIGKILL` to every process associated with port 8000. It does not verify that the process belongs to this project or was started by `run_api.sh`. The two `pkill -f` commands similarly match complete command lines and may terminate unrelated development or production processes whose arguments happen to match. Using `SIGKILL` also prevents graceful shutdown, cleanup, and database flushing. Stopping the Skill's own API server is legitimate, but terminating all processes on a common port or matching broad patterns exceeds the minimum authority necessary. ### Attack Path 1. An unrelated user application listens on TCP port 8000, or an unrelated process has a command line matching one of the `pkill -f` patterns. 2. The user invokes `scripts/stop_api.sh`, possibly based on the troubleshooting instructions. 3. `lsof` returns the unrelated process identifier, or `pkill` selects it by pattern. 4. The script sends `SIGKILL` or otherwise terminates the unrelated process. 5. The affected application stops immediately and cannot perform normal shutdown or state cleanup. A local attacker may also deliberately arrange for a victim-owned process to match the selection criteria where operating-system process permissions allow the invoking user to signal it. ### Impact Assessment The primary impact is denial of service and potential state c ...[truncated 430 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (13)

Credential Access

High
Category
Privilege Escalation
Confidence
79% confidence
Finding

The skill directs creation and auto-loading of a .env file containing SKILLBOSS_API_KEY, which introduces credential-handling risk if the workspace is shared, committed, logged, or exposed by other tools. In this context, the danger is increased because the skill also instructs cloning and running external code from a downloaded repository, so secrets stored in PROJECT_DIR may be accessible to that code or accidentally disclosed.

Content

Scanner excerpt · SKILL.md (reported line 77)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)**
- `SKILLBOSS_API_KEY`: required — authenticates all LLM calls via SkillBoss API Hub (`https://api.skillboss.co/v1/pilot`).
- `LITELLM_MODEL_RELEVANCE`, `LITELLM_MODEL_SUMMARY`: models for relevance and summarization (summary defaults to relevance model if unset). Leave unset to let SkillBoss API Hub auto-route.
- `LITELLM_TEMPERATURE_RELEVANCE`, `LITELLM_TEMPERATURE_SUMMARY`: lower for more deterministic output.

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

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
pip install -r requirements.txt

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

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
pip install -r requirements.txt

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

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 85)May include surrounding context.

sh
pip install -r requirements.txt

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

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill description is broad enough to match generic requests for summaries, JSON feeds, or paper-related workflows, which can cause over-invocation beyond the user's specific intent. In context, this is dangerous because invoking the skill triggers code bootstrap, network access, and local file/config modification, so an overly broad matcher increases the chance of unintended execution.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The skill explicitly directs use of an external API endpoint for all LLM calls, which means prompts, paper content, and potentially derived data are transmitted off-host. This is sensitive in context because the workflow also involves local configuration and user-supplied preferences, and users may not realize that all summarization/classification traffic leaves the environment.

Content

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

md
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)**
- `SKILLBOSS_API_KEY`: required — authenticates all LLM calls via SkillBoss API Hub (`https://api.skillboss.co/v1/pilot`).
- `LITELLM_MODEL_RELEVANCE`, `LITELLM_MODEL_SUMMARY`: models for relevance and summarization (summary defaults to relevance model if unset). Leave unset to let SkillBoss API Hub auto-route.
- `LITELLM_TEMPERATURE_RELEVANCE`, `LITELLM_TEMPERATURE_SUMMARY`: lower for more deterministic output.
- `LITELLM_MAX_RETRIES`: retry count for LLM calls.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The workflow instructs the agent to clone a repo, create or edit .env and JSON config files, and run scripts, but the skill lacks a clear upfront warning that it will create and modify local files. This can mislead users about the operational impact and increases the risk of unintended workspace changes or secret handling without informed consent.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
87% confidence
Finding

This step operationalizes the external transmission by instructing the user to set the API key/provider as part of the mandatory workflow, increasing the likelihood that the skill will send content to the third-party endpoint during normal use. In context, this makes the transmission more dangerous because it is not merely optional documentation; it is embedded in the required execution path.

Content

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

md
- **Time window (hours)** → set `WINDOW_HOURS` (or pass `--window-hours` to CLI) **only if the user cares**; otherwise keep default to 24h.
   - ASK THE USER TO FILL THE FOLLOWING PARAMETERS (explain the user why are their intent): `ARXIV_CATEGORIES`, `ARXIV_MAX_RESULTS`, `ARXIV_PAGE_SIZE`, `MAX_CANDIDATES_PER_SOURCE`.
     Ask whether to keep defaults and show the current values.
   - **Model/provider** → set `SKILLBOSS_API_KEY` (SkillBoss API Hub, `https://api.skillboss.co/v1/pilot`). The hub auto-routes to the best model. Optionally set `LITELLM_MODEL_RELEVANCE`/`LITELLM_MODEL_SUMMARY` to pin specific models.
   - **Do NOT ask by default**: timezone, quality vs cost, timeouts, PDF text, affiliation biasing, sources list. Use defaults unless the user requests changes.
3. **Confirm workspace path**: Ask where to clone/run. Default to `PROJECT_DIR="$HOME/agentic_paper_digest"` if the user doesn't care. Never hardcode `/Users/...` paths.
4. **Bootstrap the repo**: Run the bootstrap script (unless the repo already exists and the user says to skip).

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · 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"

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

sh
# Map SKILLBOSS_API_KEY to LiteLLM provider settings for SkillBoss API Hub
if [ -n "${SKILLBOSS_API_KEY:-}" ]; then
  export LITELLM_API_BASE="${LITELLM_API_BASE:-https://api.skillboss.co/v1}"
  export LITELLM_API_KEY="${SKILLBOSS_API_KEY}"
fi

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

sh
# Map SKILLBOSS_API_KEY to LiteLLM provider settings for SkillBoss API Hub
if [ -n "${SKILLBOSS_API_KEY:-}" ]; then
  export LITELLM_API_BASE="${LITELLM_API_BASE:-https://api.skillboss.co/v1}"
  export LITELLM_API_KEY="${SKILLBOSS_API_KEY}"
fi

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

This code creates a local .env file and then instructs the user to set SKILLBOSS_API_KEY, which indicates credential handling. While the script prints status messages, it does not explicitly warn the user that the generated file will hold sensitive secrets or should be protected from accidental exposure.

Content

No source excerpt is available for this finding.