Back to skill

Security audit

Authorship CRediT Gen

Security checks for vulnerabilities and agentic risk

Overview

This is a local authorship contribution-statement formatter with some overstated documentation and output-format risks, but no hidden execution, persistence, credential access, or exfiltration behavior was found.

Install only if you need a local CRediT contribution-statement formatter. Do not treat it as an authority for fair author order, ICMJE compliance, or dispute resolution, and review any XML output carefully before sending it to journal or metadata systems.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/main.py:226
Finding

Unescaped User Input Enables XML Injection

Content
View full analysis
') lines.append(f' {author.name}') if author.affiliation: lines.append(f' {author.affiliation}') for role_code in author.roles: role = CREDIT_ROLES[role_code] lines.append(f' ') lines.append(f' {role["en"]}') lines.append(f' ') ``` ### Technical Analysis The XML output is constructed through direct string interpolation. The `author.name` and `author.affiliation` fields originate from command-line, interactive, or JSON input and are inserted into XML without escaping XML metacharacters such as `<`, `>`, `&`, single quotes, and double quotes. An attacker can therefore terminate the expected element and introduce arbitrary XML elements or attributes into the generated document. For example, an author name containing: ```text Aliceattacker-controlled value ``` would produce attacker-controlled XML structure rather than a literal author name. The role name is selected from the fixed `CREDIT_ROLES` dictionary and is not directly attacker-controlled, but the author name and affiliation fields are sufficient to exploit the issue. ### Attack Path 1. An attacker prepares a JSON input file or command-line author value containing XML markup in the author name or affiliation. 2. The victim invokes the script with XML output, for example: ```bash python scripts/main.py --input malicious.json --format xml --output contributions.xml ``` 3. `generate_xml()` interpolates the malicious value directly into the XML document. 4. The generated file contains attack ...[truncated 1123 chars]
Remediation
View remediation
`, `&`, quotes, and attempted closing tags. Parse the resulting output with a standards-compliant XML parser and verify that injected markup remains literal text. 5. Document that XML output must not be treated as trusted merely because it was generated by this script. Downstream consumers should also use hardened XML parsers and avoid enabling external-entity resolution. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill’s declared purpose and its documented behavior are not tightly aligned, especially around local file I/O and operational capabilities that go beyond a purely descriptive authorship-assistance skill. In agentic settings, this mismatch can cause the system to invoke the skill with broader authority than a user expects, leading to silent handling of sensitive contributor data or unintended file operations.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill advertises executable paths and examples that read inputs and generate output artifacts, but it declares no explicit tool scope such as allowed-tools or permissions. That creates an authorization gap where an agent may infer file read/write behavior from documentation instead of an explicit policy, increasing the chance of unintended local file access or data export.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The examples reference classes and methods that may not exist in the packaged implementation, which can mislead an agent or operator into using undocumented execution paths or making unsafe assumptions about available functionality. Security-wise, documentation drift reduces auditability and can conceal what code is actually run when handling potentially sensitive authorship data.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The core capability section advertises analysis, validation, export, and multi-format output functions without evidence that they map to the declared script-based implementation. This overstatement can cause agents to attempt unsupported operations, potentially exposing contributor information through unintended export paths or producing unauditable outputs that users may trust incorrectly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest-like JSON sets "language": "zh", which imposes a specific language/locale setting. Under the policy rules, this is a natural-language policy violation unless the file offers user opt-in or clearly documents why the locale restriction is required.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The code is centered entirely on a static CRediT role dictionary and emits contribution statements from those roles. There is no representation of ICMJE authorship criteria, no checks for qualifying contributions, and no logic to generate or justify authorship assignments under those guidelines.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest describes a decision-support skill for determining fair authorship assignments under ICMJE guidelines and helping resolve disputes. In code, the generator only validates role codes and renders user-supplied author/role information as text, JSON, XML, or bilingual output; it contains no logic for author ordering, fairness assessment, ICMJE evaluation, or dispute resolution.

Content

No source excerpt is available for this finding.

Tainted flow: 'filename' from input (line 349, user input) → open (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/main.py (reported line 350)May include surrounding context.

python
save = input("\nSave to file? (y/n): ")
    if save.lower() == 'y':
        filename = input("Filename: ")
        with open(filename, 'w', encoding='utf-8') as f:
            f.write(output)
        print(f"Saved to: {filename}")

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code restricts the --language argument to en only, which imposes a specific language choice rather than offering the user a locale option. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless clearly justified, and no such justification appears in the file.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The summary 'Use when working with authorship credit gen' is overly broad and does not meaningfully constrain when the skill should activate. Broad activation conditions can cause the agent to invoke this skill outside its intended authorship-credit context, increasing the chance of inappropriate handling of unrelated user inputs or unnecessary exposure to any unsafe instructions contained in the skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

This markdown file documents behavior that creates structured authorship artifacts and later shows export/output operations, which can affect sensitive professional attribution data. While the README discusses confirming inputs and outputs, it does not explicitly warn users that contributor information may be written to files or should be reviewed for sensitivity before sharing.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The documentation specifies a concrete CLI contract using --contributions, --guidelines, and --output, which goes beyond the earlier generic guidance to run python scripts/main.py and inspect --help. If the script does not actually expose these options, this is an intent-code divergence because the comments instruct users to rely on behavior the code may not provide.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
60% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
dataclasses