Turn any AI agent into an AI Scientist. The #1 Agent Skills library for science, used by 250,000+ scientists worldwide. 177 ready-to-use validated skills plus 100+ scientific databases covering biology, chemistry, medicine, and drug discovery. Compatible with Cursor, Claude Code, Codex, Pi, Antigravity, and the open Agent Skills standard.
Python agent-skillsai-scientistbioinformaticschemoinformaticsclaudeclaude-skillsclaudecodeclinical-researchcomputational-biologydata-analysisdrug-discoverygenomicsmaterials-sciencemetabolomicsproteomicsscientific-computingscientific-visualization
fix(security): replace shell=True with safe subprocess patterns in documentation
marovoleb6a6d698db6b
diff --git a/scientific-skills/alphafold-database/SKILL.md b/scientific-skills/alphafold-database/SKILL.mdindex 4d555969..9aaa3047 100644--- a/scientific-skills/alphafold-database/SKILL.md+++ b/scientific-skills/alphafold-database/SKILL.md@@ -238,14 +238,21 @@ print(f"Found {len(results)} high-confidence human proteins")**Download by Species:**+> ⚠️ **Security Note**: The example below uses `shell=True` for simplicity. In production environments, prefer using `subprocess.run()` with a list of arguments to prevent command injection vulnerabilities. See [Python subprocess security](https://docs.python.org/3/library/subprocess.html#security-considerations).+```pythonimport subprocess+import shlexdef download_proteome(taxonomy_id, output_dir="./proteomes"):"""Download all AlphaFold predictions for a species"""+ # Validate taxonomy_id is an integer to prevent injection+ if not isinstance(taxonomy_id, int):+ raise ValueError("taxonomy_id must be an integer")+pattern = f"gs://public-datasets-deepmind-alphafold-v4/proteomes/proteome-tax_id-{taxonomy_id}-*_v4.tar"- cmd = f"gsutil -m cp {pattern} {output_dir}/"- subprocess.run(cmd, shell=True, check=True)+ # Use list form instead of shell=True for security+ subprocess.run(["gsutil", "-m", "cp", pattern, f"{output_dir}/"], check=True)# Download E. coli proteome (tax ID: 83333)download_proteome(83333)diff --git a/scientific-skills/modal/references/web-endpoints.md b/scientific-skills/modal/references/web-endpoints.mdindex 063ded19..5b08f867 100644--- a/scientific-skills/modal/references/web-endpoints.md+++ b/scientific-skills/modal/references/web-endpoints.md@@ -131,6 +131,8 @@ def flask_app():For frameworks with custom network binding:+> ⚠️ **Security Note**: The example below uses `shell=True` for simplicity. In production environments, prefer using `subprocess.Popen()` with a list of arguments to prevent command injection vulnerabilities.+```python@app.function()@modal.concurrent(max_inputs=100)@@ -138,7 +140,8 @@ For frameworks with custom network binding:def my_server():import subprocess# Must bind to 0.0.0.0, not 127.0.0.1- subprocess.Popen("python -m http.server -d / 8000", shell=True)+ # Use list form instead of shell=True for security+ subprocess.Popen(["python", "-m", "http.server", "-d", "/", "8000"])```## Streaming Responses