Back to skill

Security audit

oldglycine-paper-add-citations

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly aligned with adding paper citations, but it can automatically change project bibliography files using unvalidated remote metadata and its documentation overstates what the code safely does.

Review this skill carefully before installing. Use it only in a disposable branch or backup copy of a paper project, inspect proposed references before compiling, pin dependencies in a virtual environment, and do not rely on the documented backup or citation-insertion behavior unless the implementation is fixed.

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
reference/TOOL.MD:6
Finding

Unpinned Third-Party Python Dependencies

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
reference/TOOL.MD:52
Finding

Untrusted Scholar Metadata Written to BibTeX Without Validation or Escaping

Content
View full analysis
= num_references // len(keywords): break if 'bib' in pub: papers.append(pub['bib']) return papers ``` The returned fields are then interpolated directly into a BibTeX file: ```python def add_to_bib(bib_file, papers): # Read existing bib entries existing_entries = set() if os.path.exists(bib_file): with open(bib_file, 'r', encoding='utf-8') as f: bib_database = bibtexparser.load(f) for entry in bib_database.entries: if 'ID' in entry: existing_entries.add(entry['ID']) # Add new entries new_entries = [] for paper in papers: if 'ID' not in paper: # Generate ID from title title = paper.get('title', '').replace(' ', '_').lower()[:30] paper['ID'] = title if paper['ID'] not in existing_entries: new_entries.append(paper) existing_entries.add(paper['ID']) # Write back to bib file if new_entries: with open(bib_file, 'a', encoding='utf-8') as f: for entry in new_entries: f.write('@article{' + entry['ID'] + ',\n') for key, value in entry.items(): if key != 'ID': f.write(f' {key} = {{{value}}},\n') f.write('}\n\n') ``` ### Technical Analysis Publication metadata obtained through a remot ...[truncated 2485 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The top-level description says the tool 'inserts citation markers in key sections,' implying modification of TeX source files. However, the code shown only reads TeX files, searches Google Scholar, appends entries to custom.bib, and writes ADD.MD; there is no logic that edits .tex files to insert citations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The tool automatically appends entries to a project's BibTeX file and creates/overwrites a report file, but the description does not clearly warn users that project files will be modified. In a research or Overleaf context, silent modification of source files can lead to accidental repository changes, data integrity issues, or unintended commits, especially when run on trusted project directories.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This note describes behavior centered on section-aware citation insertion. The implementation never parses section boundaries such as Introduction, Related Work, or Method, and never writes back to any .tex file, so the documented intent contradicts the actual code.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation promises a detailed report, which suggests listing added references or other substantive details. In reality, the report generation code writes only 'Total {new_count} citations' to ADD.MD, so the stated output materially overstates what the tool produces.

Content

No source excerpt is available for this finding.