Back to skill

Security audit

diffraction-scatter-background-substract

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed X-ray data background-subtraction toolkit that reads user-selected scientific data files and writes processed outputs.

Install only if you intend to process local SAXS/WAXS/XRD-style image or curve data. Review output paths before running batch commands, especially commands that write into an output directory or open a GUI preview.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documented purpose is narrowly framed as X-ray background subtraction and related correction workflows, but the described behavior also includes an interactive comparison GUI and capabilities that are not clearly tied to the stated task boundary. Description-behavior mismatch is dangerous because it weakens operator expectations and reviewability, making it easier for a skill to be invoked in contexts the user did not intend.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill advertises operational behavior that reads user-provided files and writes output files, but it does not declare any explicit tool scope or permission boundary. In an agent environment, this creates ambiguous authority: the model may invoke the skill on sensitive local data or write files in unintended locations without a clearly documented least-privilege contract.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger list is extremely broad and includes generic terms such as background subtraction, baseline correction, transmission, format conversion, and batch processing, which can match many unrelated user requests. Overbroad routing can cause unintended activation on arbitrary uploaded files or non-XRD tasks, increasing the chance of unnecessary file access, incorrect advice, or execution of the wrong workflow.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest describes this skill as a toolkit for background subtraction on X-ray diffraction/SAXS/WAXS/XRD images and curves, including baseline estimation and transmission-corrected subtraction. This file also implements process_phys_fit, which simulates a background curve from physical attenuation parameters using a separate BGsub.core.phys_fit module, expanding behavior from subtracting/estimating background from data into physics-model simulation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The loader docstring explicitly states input is loaded as a 1D curve file, and the pipeline processes Curve1D objects throughout. This does not match the manifest description that presents the skill as covering 2D image processing as well as 1D curve processing, at least for this pipeline component.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The description and activation guidance are presented bilingually in English and Chinese, including an instruction in Chinese to trigger the skill in listed scenarios, but there is no indication that language choice is user-selectable. This can conflict with a language/locale policy requiring user choice rather than imposing a specific language format.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code file contains natural-language text in both Chinese and English, including the top-level module description, but does not explain whether bilingual output is required or user-selectable. Under the stated policy, language or locale constraints should be explicitly justified or offered as an opt-in choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The file includes bilingual documentation content, specifically Chinese text, but does not indicate that language usage is optional, configurable, or required for a region-specific purpose. Under the stated policy, forcing a specific language or locale without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The module header states the three modes are MORPH_1D, FIT_1D, and T_BG_SUBTRACT, but the docstrings for process_morph_1d and process_fit_1d label them as 'Mode 3' and 'Mode 4'. This contradicts the file's own documented mode enumeration and can mislead maintainers about which intent each handler serves.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The top-level documentation includes a fixed bilingual Chinese description, and the class/docstring pattern continues throughout the file. This suggests the skill is authored to present content in a specific language without any indication that users can choose their preferred language or locale.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The code checks whether a path is a 1D curve file, implying different behavior depending on file type, yet both branches set ProcessMode.MORPH_1D. This creates a misleading intent signal in the implementation because the conditional suggests type-aware handling that is not actually performed.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest describes the skill as a background subtraction toolkit for X-ray diffraction images and curves. Example 3 presents directory-wide TIFF-to-EDF conversion as a primary capability on its own, which is a broader data conversion operation rather than background subtraction or correction behavior itself.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest scope is focused on SAXS/WAXS/XRD background subtraction for 2D images and 1D curves. Example 9 introduces launching a silx CompareImages popup window for interactive visual comparison, which is an additional visualization/GUI capability not conveyed by the described toolkit purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

This file consistently mandates Chinese/English bilingual wording throughout the skill documentation, but does not state that language presentation is configurable or based on user preference. Under the policy rule, forcing a specific language or locale without user opt-in can be considered a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file’s natural-language strings and documentation are consistently hard-coded in Chinese/English form, and the script does not provide any option for the user to select a preferred language or locale. Under the policy rule, forced language behavior without opt-in can be a locale-policy concern even when the intent is inclusive.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file description and CLI help text are bilingual, but the script consistently emits Chinese-first output strings and does not provide any option to select output language or locale. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.