Back to skill

Security audit

Table 1 Generator

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward local clinical table generator, with manageable dependency and CSV-output cautions but no hidden or purpose-mismatched behavior.

Install and run this in a virtual environment, consider pinning dependency versions before use, and avoid opening generated CSVs from untrusted datasets in spreadsheet software unless formula-like cells have been neutralized. Because this handles clinical research data, keep input and output files in an appropriate protected workspace.

Vulnerability Patterns
  • 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
  • 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 (2)

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding
Unpinned Third-Party Dependencies Create a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `requirements.txt:1-3` **Related Installation Instruction**: `SKILL.md:141-145` **Vulnerability Type**: Unpinned dependencies and non-reproducible package resolution **Risk Level**: Medium ### Vulnerable Code `requirements.txt:1-3`: ```text numpy pandas scipy ``` `SKILL.md:141-145`: ```text # Python dependencies pip install -r requirements.txt ``` ### Technical Analysis The project declares `numpy`, `pandas`, and `scipy` without exact versions or package integrity hashes. Consequently, each installation can resolve to different package versions based on the package index state at installation time. Although the named packages are legitimate and no malicious dependency is present in the audited files, the configuration does not provide reproducible or integrity-verified installations. If a future release, package index response, configured mirror, or transitive dependency is compromised, users following the documented installation command could retrieve and execute unreviewed code. Python package installation and subsequent imports can execute package-controlled code with the privileges of the user running `pip` or the application. ### Attack Path 1. A dependency release, transitive dependency, package index, or configured package mirror is compromised. 2. The attacker publishes or serves a malicious version that satisfies the unrestricted dependency declaration. 3. A user follows the documented `pip install -r requirements.txt` instruction. 4. Package resolution selects the malicious or compromised version. 5. Attacker-controlled code executes during installation or when the package is imported by `scripts/main.py`. This path requires compromise or malicious control of an upstream package-distribution component; the audited repository itself does not retrieve packages from an unusual source. ### Impact Assessment Successful exploitation could execute arbitrary code with the operating-system ...[truncated 392 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every direct dependency to an explicitly reviewed version, for example: ```text numpy==<reviewed-version> pandas==<reviewed-version> scipy==<reviewed-version> ``` 2. Generate a lock file that includes all transitive dependencies. 3. Record cryptographic hashes and install with hash verification: ```bash python -m pip install --require-hashes -r requirements.txt ``` 4. Use a controlled package index or approved internal mirror. 5. Integrate dependency vulnerability and provenance scanning into release workflows. 6. Regularly update pinned versions through a reviewed process rather than allowing installations to resolve automatically to the newest available releases. 7. Install and run the project in a least-privileged virtual environment or container. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/main.py:178
Finding
Attacker-Controlled CSV Content Can Reach Spreadsheet Cells Without Formula Neutralization<![CDATA[ ## Vulnerability Details **File Location**: `scripts/main.py:125-132, 178-199` **Vulnerability Type**: CSV/spreadsheet formula injection **Risk Level**: Medium ### Vulnerable Code `scripts/main.py:125-132` propagates an input-controlled column name into the output table: ```python if var_type == "continuous": results, test = self.summarize_continuous(var, group_var) table_rows.append({ "Variable": var, "Type": "Continuous", "Statistics": results, "P-value": test }) ``` `scripts/main.py:178-199` writes the propagated value to CSV without spreadsheet formula neutralization: ```python if args.output: # Flatten for CSV output flat_rows = [] for row in table: flat_row = { "Variable": row["Variable"], "Type": row["Type"], "P-value": row["P-value"] } if isinstance(row["Statistics"], list): for i, stat in enumerate(row["Statistics"]): for key, val in stat.items(): flat_row[f"Group{i}_{key}"] = val else: for key, val in row["Statistics"].items(): flat_row[key] = val flat_rows.append(flat_row) df = pd.DataFrame(flat_rows) df.to_csv(args.output, index=False) print(f"Table saved to: {args.output}") ``` ### Technical Analysis The input CSV controls dataset column names and values. For a column detected as continuous, its original name is assigned directly to the `Variable` output field. The resulting dataframe is then exported with `to_csv()` without checking for strings beginning with spreadsheet formula indicators such as `=`, `+`, `-`, or `@`. CSV escaping performed by pandas protects the CSV file structure, but it does not neutralize spreadsheet formulas. If the generated file is opened in spreadsheet software, a formula-like cell may be interpreted as an active expression rather than inert text. Actual effects depend on the spreadsh ...[truncated 1498 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Treat every string derived from input column names, categories, group values, or cell values as untrusted before spreadsheet-oriented export. 2. Neutralize strings whose first significant character is `=`, `+`, `-`, or `@`. A common approach is to prefix the value with an apostrophe before CSV serialization. 3. Apply the sanitization centrally to every string cell rather than only to the `Variable` field. For example: ```python def neutralize_spreadsheet_formula(value): if not isinstance(value, str): return value stripped = value.lstrip() if stripped.startswith(("=", "+", "-", "@")): return "'" + value return value df = df.map(neutralize_spreadsheet_formula) df.to_csv(args.output, index=False) ``` 4. Preserve a separate trusted display-name mapping if exact original headers are required for analysis. 5. Document that CSV output should be treated as untrusted when generated from externally supplied datasets. 6. Add tests covering formula indicators, leading whitespace, tabs, carriage returns, malicious headers, category values, and group names. 7. Where practical, use an output format and library that explicitly writes cells as text and disables formula interpretation. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (6)

Unpinned Dependencies

Low
Category
Supply Chain
Content
numpy
pandas
scipy
Confidence
97% confidence
Finding
The dependency on numpy is unpinned, so installations may resolve to different versions over time, reducing build reproducibility and potentially pulling in a vulnerable or breaking release. In a clinical-research automation skill, this is mainly a supply-chain hygiene issue rather than an immediate exploit path, but it still increases risk because results and runtime behavior can change unexpectedly.

Unverifiable Dependency: numpy has 16 known advisory(ies) (CVE-2014-1859 (Numpy arbitrary file write via symlink attack); CVE-2021-41495 (NumPy NULL Pointer Dereference); CVE-2021-33430 (NumPy Buffer Overflow (Disputed)) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
92% confidence
Finding
Numpy has known advisories, and because no version is pinned, there is no way to verify whether deployments will install a safe or affected release. This is dangerous because environments may resolve to different versions, leaving downstream users unknowingly exposed to historical or future vulnerabilities.

Unpinned Dependencies

Low
Category
Supply Chain
Content
numpy
pandas
scipy
Confidence
97% confidence
Finding
The dependency on pandas is unpinned, which allows future installs to pick arbitrary newer or older compatible releases. This creates supply-chain and reproducibility risk, especially for data-processing code used to generate research tables where silent behavior changes could affect outputs.

Unverifiable Dependency: pandas has 1 known advisory(ies) (CVE-2020-13091 (** DISPUTED ** pandas through 1.0.3 can unserialize and execute commands from an)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
89% confidence
Finding
Pandas has at least one known advisory, and the absence of version pinning means the installed package cannot be verified as patched or unaffected. In a data-analysis skill, this is mostly a dependency governance issue, but it still creates avoidable uncertainty around the security posture of deployed environments.

Unpinned Dependencies

Low
Category
Supply Chain
Content
numpy
pandas
scipy
Confidence
97% confidence
Finding
The dependency on scipy is unpinned, making builds non-reproducible and exposing consumers to unexpected upstream changes or vulnerable releases. While this file alone does not prove exploitation, it is a real weakness in dependency management and increases supply-chain exposure.

Unverifiable Dependency: scipy has 4 known advisory(ies) (CVE-2013-4251 (SciPy creates insecure temporary directories); CVE-2013-4251 (The scipy.weave component in SciPy before 0.12.1 creates insecure temporary dire); CVE-2023-25399 (A refcounting issue which leads to potential memory leak was discovered in scipy) +1 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
91% confidence
Finding
Scipy has known advisories, and without a pinned version the manifest cannot establish whether installations are safe. This weakens supply-chain assurance and can lead to inconsistent deployments across systems, even if no direct exploit is evident from this file alone.

Static analysis

No suspicious patterns detected.