Back to skill

Security audit

Knowledge Collector

Security checks for vulnerabilities and agentic risk

Overview

The skill has a legitimate internal knowledge-collection purpose, but it can store and share chat or folder contents without a reliable confirmation step.

Review before installing in any workplace chat or shared knowledge-base environment. Require explicit opt-in for monitored channels, preview and approval before every stored entry, folder allowlists, exclusion rules for private/source/secret-bearing files, redaction checks, retention limits, and clear reviewer/access-control configuration.

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/collector.py:251
Finding

Content Is Persisted Without the Documented User Confirmation

Content
View full analysis

Vulnerability Details

File Location: scripts/collector.py:156 and scripts/collector.py:251-260; related documented confirmation requirement at SKILL.md:42-45 and README.md:42-44
Vulnerability Type: Missing confirmation and consent enforcement before persistent storage
Risk Level: Medium

Vulnerable Code

At scripts/collector.py:156, the complete input is appended to the generated record without redaction:

python
content += f"\n\n## Original Content\n\n{raw_text}\n"

At scripts/collector.py:251-260, storage occurs immediately after processing, without checking for user approval:

python
classification = classify(input_text)

metadata = extract_metadata(input_text)

markdown_content = fill_template(classification, metadata, input_text, title)

entity_id = save_to_domain_kit(markdown_content, classification, metadata)

The documented workflow in SKILL.md:42-45 requires a preview and user confirmation before storage, but collect() has no confirmation parameter or approval-state check.

Technical Analysis

The collection operation combines content preparation and persistent commitment into one unconditional execution path. Any caller invoking collect() causes the input to be classified, embedded in a Markdown record, and written through save_to_domain_kit().

Because fill_template() appends the entire original input, the stored record may include source code, internal project identifiers, operational details, credentials accidentally included in text, or unrelated group-chat content. No redaction, sensitive-data detection, authorization check, or explicit consent gate is applied.

The issue is particularly relevant to the documented automatic group-chat workflow: keyword matching may select a technical message, after which the current implementation can persist it without the author reviewing the generated record. This is a consent-boundary and privacy-control failure ...[truncated 1523 chars]

Remediation
View remediation

Remediation Suggestions

  1. Separate record preparation from persistent commitment:

    • Implement a preparation function that performs classification, metadata extraction, and template generation.
    • Return the generated preview without writing to storage.
    • Implement a separate commit function that accepts a server-generated approval token.
  2. Enforce confirmation in code rather than relying on conversational instructions:

    python
    def collect(input_text, source_type="manual", title=None, confirmed=False):
        preview = prepare_entry(input_text, source_type, title)
        if not confirmed:
            return {"status": "awaiting_confirmation", "preview": preview}
        return commit_entry(preview)
    
  3. Do not allow automatic group-chat detection to persist content directly. Require the message author or an authorized moderator to approve each proposed entry.

  4. Bind approval to the exact preview using a record identifier or cryptographic digest so content cannot change between preview and commitment.

  5. Apply sensitive-data controls before preview and storage:

    • Detect likely secrets, credentials, personal data, and restricted project identifiers.
    • Redact or reject sensitive content.
    • Avoid retaining the complete raw message unless explicitly required and approved.
  6. Add authorization checks for both submission and approval, and record the submitter, approver, source type, approval time, and content digest in provenance metadata.

  7. Add tests verifying that:

    • Unconfirmed records are never written.
    • Rejected records are never written.
    • Automatic chat detection only creates a preview.
    • Modified previews require renewed approval.
    • Sensitive-content policies are enforced before commitment.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (20)

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1)May include surrounding context.

md
---
name: knowledge-collector
description: "Collect and catalogize equipment institute knowledge from group chats, manual entries, or batch i..."
tags: [domain-specific, plc, file-based, template-based, api-integration]

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger conditions are broad enough to activate on ordinary phrases and on keyword matches in group chats, which can cause the skill to process content without clear, informed user intent. In this skill's context, that means technical chat messages may be extracted, classified, stored, and forwarded to reviewers automatically, creating a real privacy and unauthorized data-ingestion risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill describes automatic listening to group-chat messages, metadata extraction, storage, and reviewer notification, but does not warn users that their messages may be monitored and redistributed. Because the content appears to involve internal equipment, PLC, project, and protocol knowledge, silent collection could expose sensitive operational or proprietary information to unintended recipients.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README says the AI will automatically recognize technical content shared in group chats and prompt to record it, but it does not define clear triggers, scope limits, or consent boundaries. In a workplace setting, this can lead to unintended processing of chat content, accidental collection of sensitive internal information, and user confusion about when the skill activates.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The bulk import feature allows importing a local path such as D:\projects\my_docs\ and lists support for code and document formats, but the README provides no warning about scanning sensitive files, secrets, proprietary source code, or personal data. Because the tool is designed to ingest and redistribute knowledge internally, over-collection from local directories could expose confidential content to a broader audience.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The batch import workflow scans a user-supplied folder path and ingests matching file contents, but the skill does not clearly warn users that local files will be read and stored. In practice this can lead to accidental ingestion of sensitive source code, documents, or internal PDFs from overly broad directories, especially when the feature is described as a simple import action.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This JSON defines core classification categories and matching terms entirely in Chinese, which can force a specific language/locale behavior if used by the skill for routing or interpretation. The file provides no indication that Chinese-only operation is optional, user-selected, or justified as a region-specific constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document gives actionable electrical and industrial troubleshooting steps such as grounding changes, cable replacement, rerouting wiring, and adding ferrites, but it omits basic safety prerequisites like lockout/tagout, de-energization, ESD precautions, qualified-person requirements, and verification before re-energizing. In an industrial automation context, operators may apply these steps directly on live equipment or implement grounding changes incorrectly, creating risks of shock, equipment damage, or unsafe machine behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language descriptions and CLI help text entirely in Chinese, starting with the module docstring and continuing through user-facing output. Under the policy rule, forcing a specific language without opt-in is a locale/language policy violation because the skill does not offer any language choice or explain that it is intended only for a Chinese-speaking environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The printed status messages, argument descriptions, and saved-report notification are all presented only in Chinese. Because these strings directly affect user interaction and no alternate locale or opt-in mechanism is provided, they represent the same language-policy issue in operational output.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module docstring and user-facing descriptions are entirely in Chinese and describe the skill's supported entry points and behavior without indicating that the skill is China/Chinese-specific or that another language is available. Under the policy, forcing a specific language without opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring and all user-facing notification text are written only in Chinese, and the code constructs notifications exclusively in Chinese. This indicates a fixed language behavior without any visible user opt-in or locale selection, which matches the language/locale policy violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The markdown template uses Chinese section headings and field labels throughout, which imposes a specific language on generated content. There is no indication that the language is optional, user-selected, or required for a documented region-specific purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown template is written with fixed Chinese headings such as '基本信息', '功能描述', and '使用说明', which imposes a specific language on generated skill content. The file does not indicate that Chinese is optional, user-selected, or required for a justified region-specific purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown template uses Chinese section headings and field labels throughout, which effectively forces a specific language/locale for users of the skill. The file does not indicate that this is optional, user-selectable, or justified as a region-specific template.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The README presents all invocation instructions and example commands in Chinese only, such as '记录一条知识' and '导入知识', with no indication that users may choose another language. This can constitute a language/locale policy issue when no opt-in or explicit region-specific justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The JSON configuration uses only Chinese-language keys and category values for reviewer groups, directions, and types. If this skill is intended for general use, that hardcoded locale can violate a language-choice policy because the file provides no indication of user opt-in or a documented region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This Python file contains natural-language docstrings and user-facing console messages entirely in Chinese, beginning with the module docstring and continuing throughout the test output. Under the policy, a skill should not force a specific language unless it offers user opt-in or clearly documents a justified region-specific constraint, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown template uses Chinese section headings and field labels throughout, which effectively forces a specific language for the skill content. The policy allows locale constraints only when they are optional, user-selected, or clearly justified, none of which is present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown template uses Chinese section headings and field labels throughout, which imposes a specific language on users without any opt-in or alternative locale. That matches the language/locale policy concern for natural-language content because the file does not indicate that the template is region-specific or optional by language.

Content

No source excerpt is available for this finding.