Back to skill

Security audit

Shift Handover Summarizer

Security checks for vulnerabilities and agentic risk

Overview

The skill is a local EHR handover summarizer with no signs of exfiltration or persistence, but its implementation does not enforce the shift, department, or timezone boundaries it documents for sensitive clinical data.

Review before installing or using with real patient data. Treat outputs as generated from the entire supplied JSON file, not as guaranteed limited to the requested shift or department, unless you pre-filter records yourself. Avoid installing the provided requirements on modern Python unless the unnecessary dependencies are removed or locked through a trusted process.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/main.py:139
Finding

Shift and Department Boundaries Are Not Enforced

Content
View full analysis
ShiftSummary: """Generate shift handover summary""" patient_summaries = [] critical_count = 0 for record in patient_records: patient_summary = self._analyze_patient(record) patient_summaries.append(patient_summary) ``` ```python parser.add_argument("--records", "-r", required=True, help="Patient records JSON file path") parser.add_argument("--shift-start", "-s", required=True, help="Shift start time (ISO 8601)") parser.add_argument("--shift-end", "-e", required=True, help="Shift end time (ISO 8601)") parser.add_argument("--department", "-d", help="Department name") args = parser.parse_args() # Read patient records with open(args.records, "r", encoding="utf-8") as f: patient_records = json.load(f) # Create summarizer summarizer = ShiftHandoverSummarizer( shift_start=args.shift_start, shift_end=args.shift_end, department=args.department, include_vitals=not args.no_vitals, include_medications=not args.no_medications, include_procedures=not args.no_procedures ) # Generate summary summary = summarizer.generate_summary(patient_records) ``` ### Technical Analysis The CLI accepts shift-start, shift-end, and department restrictions, but these values are not used to filter the supplied EHR records. `generate_summary()` processes every patient object in the input and `_analyze_patient()` processes every nested record without parsing or comparing its timestamp against the requested shift period. The department argument is similarly used only as report metadata. No patient or record department field is compared with the requested department. This conflicts with the documented workflow, which states that reco ...[truncated 1422 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/main.py:493
Finding

Timezone Validation and Documented UTC Handling Are Missing

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unnecessary Unpinned Dependencies Shadow Standard-Library Modules

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill declares executable usage of a local script and output file handling, implying file read/write capability, but it does not declare any explicit tool scope such as permissions or allowed-tools. In an agent environment, this can cause the skill to run with broader-than-expected filesystem access, increasing the chance of unintended access to sensitive EHR data or writing summaries to unsafe locations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The initializer hard-codes language: str = "zh-CN", which imposes a specific language/locale by default. Under the policy rules, forcing a locale without offering user choice or documenting a justified regional constraint is a natural-language policy violation.

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
enum

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 2)May include surrounding context.

text
dataclasses
enum

Static analysis

No suspicious patterns detected.