Back to skill

Security audit

mrmrmr

Security checks for vulnerabilities and agentic risk

Overview

This biomedical analysis skill appears purpose-aligned, but it handles credentials and LLM-derived data in unsafe ways that can expose tokens or execute unintended code.

Install only in an isolated research environment with non-sensitive inputs and disposable API tokens. Avoid the documented curl-to-sh installer, disable synonym expansion unless you provide and protect your own UMLS credential, do not use editable CSVs from untrusted sources, and expect disease/exposure terms and analysis results to be sent to external services.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (7)

T03 · Remote Payload Retrieval and Execution

Error
Location
mrmrmr/README.md:55
Finding

Remote Installer Downloaded and Executed Without Integrity Verification

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
mrmrmr/mragent/agent_workflow.py:1037
Finding

Remote LLM Output and Editable CSV Data Executed Through Python eval

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
mrmrmr/mragent/agent_tool.py:261
Finding

Untrusted Identifiers Paths and Credentials Interpolated Into Executable R Source

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
mrmrmr/mragent/agent_tool.py:376
Finding

OpenGWAS JWT Persisted in a Predictable Plaintext R Script

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
mrmrmr/mragent/agent_workflow.py:301
Finding

Hard-Coded UMLS API Credential Exposed and Transmitted in URL Query Strings

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
requirements.txt:1
Finding

Unpinned Dependencies and Automatic Runtime Package Installation

Content
View full analysis
=1.4.2 reportlab>=4.0.9 PyPDF2>=3.0.1 numpy>=1.19.5 biopython>=1.82 requests>=2.27.1 beautifulsoup4>=0.0.1 openai>=1.6.1 ollama>=0.1.8 ``` The generated R code installs packages automatically during analysis: ```r if (!requireNamespace("TwoSampleMR", quietly = TRUE)) { install.packages("TwoSampleMR") } if (!requireNamespace("ieugwasr", quietly = TRUE)) { install.packages("ieugwasr") } ``` The MRlap path does the same for additional packages: ```r if (!requireNamespace("httr", quietly = TRUE)) { install.packages("httr") } if (!requireNamespace("vcfR", quietly = TRUE)) { install.packages("vcfR") } if (!requireNamespace("MRlap", quietly = TRUE)) { install.packages("MRlap") } if (!requireNamespace("jsonlite", quietly = TRUE)) { install.packages("jsonlite") } ``` ### Technical Analysis Minimum-version constraints do not produce a reproducible dependency set and allow future, unaudited releases to be installed. No package hashes are provided. The automatic R installation behavior downloads and executes dependency code during a scientific analysis based on the runtime repository configuration. A compromised upstream account, package repository, transitive dependency, or mirror could therefore introduce code after the Skill itself has been audited. Runtime installation also unnecessarily grants the analysis process network and package-library write access. This finding does not establish that any named dependency is currently malicious; the risk arises from unrestricted future resolution and implicit installation. ### Attack Path 1. An upstream package, maintainer account, transitive dependency, or configured reposit ...[truncated 658 chars]
Remediation
View remediation

T07 · Tool Hijacking and Spoofing

Warning
Location
mrmrmr/web_demo.py:211
Finding

Web Demo Globally Replaces os.system and Routes Commands Through a Shell

Content
View full analysis
{st.session_state.r_output_text}', unsafe_allow_html=True ) return return_code else: return original_os_system(command) os.system = patched_os_system ``` ### Technical Analysis The web demo modifies the global `os.system` function for the entire Python process. Any imported module expecting normal `os.system` behavior instead invokes attacker-modifiable wrapper logic. This is a process-wide tool replacement rather than a scoped R execution helper. Commands containing the fragile substring `"R "` are sent to `subprocess.Popen` with `shell=True`. Shell metacharacters in such a command are consequently interpreted by the operating-system shell. This compounds the project's existing unsafe generated-R execution paths and makes security be ...[truncated 1095 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (94)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
- `MRlap` - sample overlap correction (optional)
  - `jsonlite` - JSON processing (required for MRlap)
- `OPENAI_API_KEY` environment variable must be set (OpenAI API key)
- `OPENGWAS_JWT` environment variable (optional, for OpenGWAS access token)

## Usage

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
- `MRlap` - sample overlap correction (optional)
  - `jsonlite` - JSON processing (required for MRlap)
- `OPENAI_API_KEY` environment variable must be set (OpenAI API key)
- `OPENGWAS_JWT` environment variable (optional, for OpenGWAS access token)

## Usage

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

The README recommends executing a remote installation script directly via 'curl ... | sh', which bypasses normal review of the downloaded content. If the remote server, CDN, or connection path is compromised, users could execute arbitrary shell commands on their systems with the privileges of the invoking user.

Content

Scanner excerpt · mrmrmr/README.md (reported line 58)May include surrounding context.

You need to follow the steps to install ollama and follow the ollama python support package:

shell
curl -fsSL https://ollama.com/install.sh | sh
pip install ollama

Chaining Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The use of a shell pipe into 'sh' is a classic command-chaining risk because untrusted network content is immediately interpreted by the shell. In practice, any compromise of the fetched content results in direct code execution, making the README materially more dangerous than a simple link to installation instructions.

Content

Scanner excerpt · mrmrmr/README.md (reported line 58)May include surrounding context.

You need to follow the steps to install ollama and follow the ollama python support package:

shell
curl -fsSL https://ollama.com/install.sh | sh
pip install ollama

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · mrmrmr/mragent/agent_tool.py (reported line 197)May include surrounding context.

python
# 获取OpenGWAS数据库中的GWAS ID
def get_gwas_id(keyword):
    def remove_newlines(lst):
        # Remove /n from each string in a list
        return [s.replace('\n', '') for s in lst]

    data = []

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The OpenGWAS JWT token is embedded directly into the generated R source code and written to disk in test.R before execution. This exposes a sensitive credential to local users, logs, backups, crash reports, or later accidental commits, and combines with the code-injection risk from generated-script execution.

Content

No source excerpt is available for this finding.

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Confidence
97% confidence
Finding

This function generates an R script by interpolating untrusted inputs such as Exposure_id, Outcome_id, path, and gwas_token directly into code, writes it to disk, and then executes it via os.system. Even though the shell command itself is constant, the executed script content is attacker-controllable, enabling arbitrary R code execution and potentially arbitrary file writes or command execution from within R.

Content

Scanner excerpt · mrmrmr/mragent/agent_tool.py (reported line 382)May include surrounding context.

python
with open('test.R', 'w', encoding='utf-8') as f:
        f.write(r_script_run)

    os.system('R --slave --no-save --no-restore --no-site-file --no-environ -f  test.R --args')


@timer

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The second MR tool repeats the credential-handling issue by embedding the OpenGWAS JWT in a generated R file on disk and then executing it. This creates both credential exposure and an easy path for code injection through interpolated values.

Content

No source excerpt is available for this finding.

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Confidence
97% confidence
Finding

This second workflow has the same core issue: untrusted values are inserted into an R program and then executed through os.system. An attacker controlling identifiers, path, or token values could break out of string context in the generated R code, run arbitrary R statements, overwrite files, or exfiltrate secrets.

Content

Scanner excerpt · mrmrmr/mragent/agent_tool.py (reported line 483)May include surrounding context.

python
with open('test.R', 'w', encoding='utf-8') as f:
        f.write(r_script_run)

    os.system('R --slave --no-save --no-restore --no-site-file --no-environ -f  test.R --args')


@timer

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Confidence
96% confidence
Finding

The MRlap workflow also constructs an executable R script from attacker-influenced inputs, including Exposure_id, Outcome_id, path, N_exposure, and N_outcome, then runs it. Because those values are embedded into code and file paths, this can lead to arbitrary code execution in R, path traversal, and uncontrolled downloading/writing of files.

Content

Scanner excerpt · mrmrmr/mragent/agent_tool.py (reported line 672)May include surrounding context.

python
with open('test.R', 'w', encoding='utf-8') as f:
        f.write(r_script_run)

    os.system('R --slave --no-save --no-restore --no-site-file --no-environ -f  test.R --args')


def get_synonyms(term, api_key):

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

A hard-coded UMLS API token is embedded directly in the source and used for live synonym lookups. Anyone with code access can reuse the credential for unrelated authenticated requests, causing credential leakage, abuse of the external account, and loss of control over billed or rate-limited API activity.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill silently uses a hard-coded third-party credential to perform network requests for synonym expansion without user disclosure. In this context, that is more dangerous because the workflow is an automated agent pipeline that may run in trusted environments, so embedded secrets can be unintentionally redistributed and abused at scale.

Content

No source excerpt is available for this finding.

eval() call detected

High
Category
Dangerous Code Execution
Confidence
99% confidence
Finding

The code calls eval() on Outcome_id values loaded from CSV data that is derived from earlier LLM output and other external sources. An attacker who can influence the CSV contents or upstream model output can turn this into arbitrary Python code execution when step9 runs, making this a direct code execution sink rather than a mere parsing issue.

Content

Scanner excerpt · mrmrmr/mragent/agent_workflow.py (reported line 1041)May include surrounding context.

python
Outcome_id = Outcome_id.to_numpy()[0]
                Exposure_id = Exposure_id.to_numpy()[0]
                print(Outcome_id, Exposure_id)
                Outcome_id_list = eval(Outcome_id)
                Exposure_id_list = eval(Exposure_id)
                print(Outcome_id_list, Exposure_id_list)

eval() call detected

High
Category
Dangerous Code Execution
Confidence
99% confidence
Finding

This eval() call executes Exposure_id content as Python code after reading it from persisted workflow data. Because that content can be influenced by LLM responses, external services, or edited files, it creates a straightforward arbitrary code execution path in a security-sensitive automation pipeline.

Content

Scanner excerpt · mrmrmr/mragent/agent_workflow.py (reported line 1042)May include surrounding context.

python
Exposure_id = Exposure_id.to_numpy()[0]
                print(Outcome_id, Exposure_id)
                Outcome_id_list = eval(Outcome_id)
                Exposure_id_list = eval(Exposure_id)
                print(Outcome_id_list, Exposure_id_list)

                # 创建文件夹

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code sends MR analysis inputs and full result tables to an external LLM via llm_chat() without any consent, warning, redaction, or data-classification check. In a biomedical/research workflow, these inputs may contain unpublished, proprietary, or otherwise sensitive analysis data, creating a real confidentiality and compliance risk once transmitted to third-party model providers.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

This duplicate match points to the same underlying weakness: command execution through Popen(..., shell=True). Because the application overrides os.system globally, the dangerous pattern affects a broad execution surface and can turn otherwise indirect inputs into shell metacharacter injection opportunities.

Content

Scanner excerpt · mrmrmr/web_demo.py (reported line 218)May include surrounding context.

python
def patched_os_system(command):
    if 'R ' in command:
        # 使用subprocess代替os.system来捕获输出
        process = subprocess.Popen(
            command,
            shell=True,
            stdout=subprocess.PIPE,

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

This duplicate match points to the same underlying weakness: command execution through Popen(..., shell=True). Because the application overrides os.system globally, the dangerous pattern affects a broad execution surface and can turn otherwise indirect inputs into shell metacharacter injection opportunities.

Content

Scanner excerpt · mrmrmr/web_demo.py (reported line 218)May include surrounding context.

python
def patched_os_system(command):
    if 'R ' in command:
        # 使用subprocess代替os.system来捕获输出
        process = subprocess.Popen(
            command,
            shell=True,
            stdout=subprocess.PIPE,

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · run_mragent.py (reported line 34)May include surrounding context.

python
def get_api_keys() -> Dict[str, Optional[str]]:
    """Get API keys from environment variables"""
    return {
        "openai_api_key": os.environ.get("OPENAI_API_KEY"),
        "opengwas_jwt": os.environ.get("OPENGWAS_JWT"),

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · run_mragent.py (reported line 151)May include surrounding context.

python
def get_api_keys() -> Dict[str, Optional[str]]:
    """Get API keys from environment variables"""
    return {
        "openai_api_key": os.environ.get("OPENAI_API_KEY"),
        "opengwas_jwt": os.environ.get("OPENGWAS_JWT"),

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill advertises capabilities that imply filesystem, environment, shell, and network access, but it does not declare any explicit tool scope or permissions boundary. This creates an authorization ambiguity where a host may grant broader-than-expected execution privileges, increasing the blast radius if the skill or its dependencies behave unsafely.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill sends user-provided biomedical terms to external services including PubMed, OpenGWAS, and an LLM provider, but the description does not clearly warn users that their inputs will leave the local environment. In biomedical contexts, disease, exposure, or study terms may encode sensitive research interests or potentially sensitive health-related information, so lack of disclosure creates privacy and compliance risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README instructs users to provide an LLM API key and a GWAS token and describes literature scanning and online GWAS usage, but it does not clearly warn that user-supplied disease, exposure, and outcome terms may be transmitted to third-party services. In a biomedical context, those inputs can be sensitive research topics or patient-related terms, so the lack of explicit disclosure can lead to unintended external data sharing.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
81% confidence
Finding

The skill explicitly depends on the OpenGWAS API, which means user queries and analysis parameters may be sent to an external service. External transmission is not inherently malicious, but in this medical-research workflow it creates confidentiality and compliance risk if users assume processing is local or submit sensitive inputs.

Content

Scanner excerpt · mrmrmr/README.md (reported line 66)May include surrounding context.

md
You need to get the **GWAS token** for the OpenGWAS data.

- [OpenGWAS API](https://api.opengwas.io/)

## Usage

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code defines credential variables and passes them into an agent configured with a remote base URL, which implies network transmission to an external service. There is no confirmation prompt, user-facing log, or explanatory comment warning that API keys and request data may be used in outbound requests.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
93% confidence
Finding

The script explicitly configures a third-party API endpoint and then runs an agent workflow, which may transmit prompts, research inputs, or tokens to an external service. In a skill context, this is security-relevant because users may not realize their data is leaving the local environment, and the custom endpoint increases supply-chain and data-handling risk versus a trusted default.

Content

Scanner excerpt · mrmrmr/agent_workflow_demo.py (reported line 11)May include surrounding context.

python
# openai
    agent = MRAgent(outcome='back pain', AI_key=AI_key, model='MR',
                    num=50, bidirectional=True, introduction=False, LLM_model='gpt-4o',
                    base_url="https://api.gpt.ge/v1/", gwas_token=mr_key,
                    mr_quality_evaluation=True, mr_quality_evaluation_key_item=['4b', '4e', '6e', '10d'], mrlap=True)
    agent.run(step=[1, 2, 3, 4, 5, 6, 7, 8])
    agent.run(step=[9])