T09 · Insecure Skill Coding Practices
- Location
scripts/alphafold_agent.py:38- Finding
Predictable Output Files Permit Local File Overwrite Through Symbolic Links
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is framed as a drug-discovery AlphaFold and docking agent, but the implementation uses mock scientific outputs while presenting them as usable structure, pocket, and docking results.
Review this carefully before installing. It may be acceptable only as a demo scaffold, not as a source of scientific evidence. Do not use its reported structures, binding sites, or docking affinities for drug-discovery decisions unless the mock paths are replaced with validated implementations and outputs are clearly labeled with provenance. Run it only in a controlled working directory because it writes predictable output files and performs external HTTP requests.
scripts/alphafold_agent.py:38Predictable Output Files Permit Local File Overwrite Through Symbolic Links
scripts/alphafold_agent.py:32Unbounded External HTTP Requests Can Cause Resource Exhaustion and Indefinite Blocking
scripts/alphafold_agent.py:43Unvalidated FASTA and SMILES Inputs Permit Crashes and Computational Resource Exhaustion
The documented behavior materially overstates what the skill actually does, including mocked structure prediction, fake binding-site detection, and non-docking presented as docking. In a drug-discovery workflow, this can mislead downstream agents or users into treating placeholder outputs as scientifically valid, causing unsafe decisions, wasted resources, or bad experimental prioritization.
The module description and workflow overstate core capabilities that are actually mocked. Because this skill is positioned for protein structure and docking tasks, the mismatch is especially dangerous: users may trust it for scientific inference when it cannot perform the claimed analyses.
The function claims to perform ESMFold prediction but instead writes a hard-coded mock PDB. In a scientific or drug-design workflow, this can mislead downstream users and agents into making decisions based on fabricated structural data, creating integrity and safety risks.
The code advertises binding-site detection but returns a fixed pocket regardless of input structure. This is dangerous because it can produce false scientific conclusions and contaminate downstream prioritization, docking, or medicinal chemistry decisions.
The docking routine does not dock against the protein at all; it derives a fake affinity from ligand molecular weight and saves only a ligand image. In this domain, presenting such output as docking results is materially misleading and may drive invalid compound selection or experimental follow-up.
The skill advertises capabilities that require network access and file writing but does not declare an explicit tool scope or permission boundary. That makes the runtime trust model ambiguous and can lead to over-privileged execution, especially in agent platforms where undeclared capabilities may be inherited or loosely enforced.
The trigger list includes broad terms like structure, target, binding site, and fold, which can cause the skill to activate in unrelated conversations. Unintended invocation is risky here because the skill has network and file-writing behavior and may inject misleading scientific outputs into contexts that did not request this specialized analysis.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
},
"return_type": "polymer_entity"
}
resp = requests.post(self.rcsb_url, json=query)
if resp.ok:
hits = resp.json()['result_set']
if hits:
The method sends an HTTP request to RCSB and then downloads a PDB file and writes it to the local filesystem, but there is no confirmation prompt, user-facing log, or warning in this file indicating that network access and file creation will occur. Because these operations may affect privacy, connectivity expectations, or local files, they should be disclosed to the user.
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.
if hits:
pdb_id = hits[0]['rcsb_id'][:4].lower()
pdb_url = f'https://files.rcsb.org/download/{pdb_id}.pdb'
with open(f'{pdb_id}.pdb', 'w') as f:
f.write(requests.get(pdb_url).text)
return f'{pdb_id}.pdb'
return None
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.
pdb_id = hits[0]['rcsb_id'][:4].lower()
pdb_url = f'https://files.rcsb.org/download/{pdb_id}.pdb'
with open(f'{pdb_id}.pdb', 'w') as f:
f.write(requests.get(pdb_url).text)
return f'{pdb_id}.pdb'
return None
The code writes an esm_fold.pdb file to disk as part of fallback prediction, but there is no visible disclosure, prompt, or warning that a local file will be created. Even though file output may be part of the workflow, this file itself does not communicate that side effect to the user.
The docking routine saves docked.png to the current directory, but the code provides no user-facing notice that an output image file will be created. This is a filesystem side effect that should be made explicit.