Back to skill

Security audit

Bioinformatics Engineer Skill

Security checks for vulnerabilities and agentic risk

Overview

This bioinformatics workflow skill is coherent, but it gives unsafe templates for handling secrets and automatically inspecting user shell profiles, so users should review it before installing.

Install only if you are comfortable reviewing and adapting the templates. Replace `source .env` with a non-executing dotenv parser, avoid automatic shell-profile inspection unless the user explicitly consents, and treat generated logs as sensitive until redaction is reliable.

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 (3)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:20
Finding

Overbroad Inspection of User Shell Configuration

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:604
Finding

Arbitrary Shell Command Execution Through Sourced .env Files

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:612
Finding

Plaintext Secrets May Persist in Unredacted Pipeline Logs

Content
View full analysis
>(tee -i "$LOG_FILE") exec 2>&1 filter_sensitive() { local logfile="$1" grep -v -E "^(AWS_SECRET|PASSWORD|API_KEY|TOKEN|ENA_FTP_PASS|NCBI_API_KEY|REF_DB_PASS|LIMS_API_TOKEN)=" "$logfile" || true } echo "[$(date)] Step 1: QC started" bash scripts/01_qc.sh echo "[$(date)] Step 1: QC completed" echo "[$(date)] Step 2: Alignment started" bash scripts/02_align.sh echo "[$(date)] Step 2: Alignment completed" dvc add results/qc/ results/alignment/ LOG_CLEAN="logs/run_{task_name}_{YYYYMMDD}_clean.log" filter_sensitive "$LOG_FILE" > "$LOG_CLEAN" mv "$LOG_CLEAN" "$LOG_FILE" ``` ### Technical Analysis All standard output and standard error are first written to `LOG_FILE` without redaction. Filtering occurs only after the analysis and DVC commands complete. Because the surrounding template enables immediate termination on error with `set -e`, any failed analysis command may stop execution before the cleanup stage. Process termination, system shutdown, storage exhaustion, or manual interruption can produce the same result. The filtering expression is also incomplete. It removes only entire lines beginning with one of several exact key patterns followed immediately by `=`. It does not reliably handle: - `AWS_SECRET_ACCESS_KEY`, because the pattern expects `AWS_SECRET=` - Timestamped or prefixed log records - Authorization headers - Credentials embedded in URLs - Secret values printed without their variable names - Lowercase or unexpected variable names - JSON, YAML, traceback, or diagnostic output - Shell traces that contain expanded values Even after replacement, raw secret-bearing content may remain recoverable from snapshots, backups, process output, or storage artifacts. ### Attack Path 1. The pipel ...[truncated 1011 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (22)

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

md
*.log

# 密钥(Git 忽略!)
.env
.env.local

# IDE

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

md
*.log

# 密钥(Git 忽略!)
.env
.env.local

# IDE

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

md
*.log

# 密钥(Git 忽略!)
.env
.env.local

# IDE

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

md
*.log

# 密钥(Git 忽略!)
.env
.env.local

# IDE

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

md
*.log

# 密钥(Git 忽略!)
.env
.env.local

# IDE

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

md
*.log

# 密钥(Git 忽略!)
.env
.env.local

# IDE

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

md
*.log

# 密钥(Git 忽略!)
.env
.env.local

# IDE

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

md
*.log

# 密钥(Git 忽略!)
.env
.env.local

# IDE

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

md
*.log

# 密钥(Git 忽略!)
.env
.env.local

# IDE

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

md
*.log

# 密钥(Git 忽略!)
.env
.env.local

# IDE

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

md
*.log

# 密钥(Git 忽略!)
.env
.env.local

# IDE

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

md
*.log

# 密钥(Git 忽略!)
.env
.env.local

# IDE

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

md
*.log

# 密钥(Git 忽略!)
.env
.env.local

# IDE

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

md
*.log

# 密钥(Git 忽略!)
.env
.env.local

# IDE

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

md
*.log

# 密钥(Git 忽略!)
.env
.env.local

# IDE

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

md
# 密钥(Git 忽略!)
.env
.env.local

# IDE
.vscode/

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

md
# 密钥(Git 忽略!)
.env
.env.local

# IDE
.vscode/

Credential Access

High
Category
Privilege Escalation
Confidence
78% confidence
Finding

The skill instructs sourcing .env directly in the shell before DVC remote configuration. If .env is modified maliciously or contains shell metacharacters/command substitutions, 'source .env' will execute arbitrary shell code in the operator context, turning a secrets-loading step into code execution.

Content

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

4.3 DVC 远程存储配置

bash
# 从 .env 读取凭证
source .env

# S3

Credential Access

High
Category
Privilege Escalation
Confidence
78% confidence
Finding

This finding is part of the same unsafe pattern: loading a .env file via shell sourcing in order to use cloud-related variables. In a skill that routinely handles API keys and storage credentials, this creates a realistic path for command execution and possible secret exfiltration if the .env file is attacker-controlled or tampered with.

Content

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

bash
# 从 .env 读取凭证
source .env

# S3
dvc remote add -d myremote s3://${S3_BUCKET_NAME}/dvc-storage

Credential Access

High
Category
Privilege Escalation
Confidence
83% confidence
Finding

The provided run script template executes 'source .env' at runtime. In this skill context, the script is meant to be reused broadly for bioinformatics pipelines and may run with access to cloud credentials, databases, and HPC resources; sourcing an attacker-modified .env can therefore lead to arbitrary command execution and theft of those credentials.

Content

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

md
cd "$PROJECT_DIR"

# --- 加载密钥 ---
source .env

# --- 激活环境 ---
conda activate {env_name}

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown skill file imposes a single language/locale throughout the instructions, examples, prompts, and user interaction guidance. Under the policy, forcing a specific language without offering user choice is a natural-language policy violation unless the locale restriction is clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill repeatedly states that all paths should be project-root-relative and that absolute paths should trigger warnings, yet this section explicitly standardizes an external repository location as ~/experience-pipelines/ and /path/to/experience-pipelines. That is a direct contradiction in the skill's own guidance, not merely an omitted detail.

Content

No source excerpt is available for this finding.