Back to skill

Security audit

Kcc Office Ai Agents

Security checks for vulnerabilities and agentic risk

Overview

This skill is not clearly malicious, but it asks an agent to use persistent memory, read private account/workspace context, self-modify instructions, and commit or push changes with weak user control.

Install only in a sandboxed workspace with no email, calendar, social, production, or remote Git write credentials unless you explicitly want that access. Require approval before memory promotion, instruction-file edits, commits, pushes, and any account checks, and validate agent role names before running the scripts.

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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (4)

T01 · Skill Instruction Hijacking

Error
Location
agents/komi/AGENTS.md:7
Finding

Persistent Startup Workflow Overrides the Agent's Current Session Behavior

Content
View full analysis
Remediation
View remediation

T02 · Agent Memory Poisoning

Error
Location
agents/komi/AGENTS.md:31
Finding

Unreviewed Content Can Be Promoted into Persistent Agent Instructions

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
agents/komi/AGENTS.md:65
Finding

Autonomous Instructions Exceed Least-Privilege Requirements and Permit Unapproved External Changes

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/onboard-agent.sh:7
Finding

Unsanitized Agent Role Allows Directory Traversal and Writes Outside the Intended Workspace

Content
View full analysis
/dev/null || true # Copy role-specific files if they exist if [ -d "../${AGENT_ROLE}" ]; then cp -r "../${AGENT_ROLE}/"* "${AGENT_DIR}/" 2>/dev/null || true fi # Initialize memory directory mkdir -p "${AGENT_DIR}/memory" ``` From `scripts/setup-agent.sh:7-19`: ```bash AGENT_ROLE="${1:-unknown}" AGENT_DIR="./agents/${AGENT_ROLE}" echo "🔧 Setting up KCC Office v2 AI Agent: ${AGENT_ROLE}" # Check if agent workspace exists if [ ! -d "${AGENT_DIR}" ]; then echo "❌ Agent workspace not found. Run onboard-agent.sh first." exit 1 fi # Create ONBOARDING.md to signal the agent to start onboarding cat > "${AGENT_DIR}/ONBOARDING.md" << 'EOF' ``` From `scripts/shutdown-agent.sh:7-25`: ```bash AGENT_ROLE="${1:-unknown}" AGENT_DIR="./agents/${AGENT_ROLE}" echo "🛑 Initiating shutdown of KCC Office v2 AI Agent: ${AGENT_ROLE}" # Check if agent workspace exists if [ ! -d "${AGENT_DIR}" ]; then echo "❌ Agent workspace not found" exit 1 fi # Check if agent is currently onboarded if [ ! -f "${AGENT_DIR}/ONBOARDING.md" ]; then echo "ℹ️ Agent is not currently in onboarding state" # Still perform cleanup tasks fi # Create SHUTDOWN signal file touch "${AGENT_DIR}/SHUTDOWN.md" ``` The same unvalidated path construct ...[truncated 2196 chars]
Remediation
View remediation
&2; exit 2 ;; esac ``` 2. If extensible role names are required, enforce a strict pattern such as `^[a-z][a-z0-9_-]*$` and reject slashes, backslashes, dots, and empty values. 3. Resolve both the base directory and destination with a canonicalization utility such as `realpath`. 4. Verify that the canonical destination starts with the canonical `agents/` directory followed by a path separator. 5. Create the canonical base directory before validation and fail closed if canonicalization fails. 6. Use non-clobbering file creation or require confirmation before replacing an existing `ONBOARDING.md`. 7. Apply the same centralized validation function to all scripts that accept `AGENT_ROLE`. 8. Determine paths relative to the script's own directory rather than the caller's current working directory. 9. Add automated tests covering `../`, absolute paths, symbolic links, whitespace, shell metacharacters, and unknown roles. 10. Consider rejecting symbolic-link destinations to prevent a validated path from being redirected during file creation. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (17)

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The declared description presents a broad autonomous multi-agent collaboration system with persistent context and self-improvement capabilities for several office roles. The supplied code chunk is much narrower: it is a local bash heartbeat script for a single agent role that checks whether certain files/directories exist, counts unchecked checklist items and context markers, and prints reminders. It does not coordinate multiple agents, maintain persistent context, modify memory files, remediate errors, or perform autonomous self-improvement. While the script is thematically related to agent maintenance within KCC Office v2, the actual behavior is a diagnostic/status checklist rather than the declared system capabilities, so this is a material description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description presents a full AI agent collaboration system with autonomous behavior, inter-agent collaboration, persistent context, and self-improvement. The supplied code chunk only performs local filesystem setup for an agent workspace: creating directories, copying base and optional role-specific files, and printing onboarding guidance. While this may support the larger system as an initialization utility, the code itself does not implement the described primary capabilities. Therefore the description materially overstates what this code chunk actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description presents a broad AI agent collaboration system with autonomous operation, persistent context, and self-improvement capabilities. The supplied code chunk is much narrower: it is a status-reporting shell script for a single agent directory. It inspects local files, determines a simple state based on marker files, counts memory files, checks file presence, and outputs the first few lines of selected files. This is materially different from the declared primary purpose and includes filesystem-reading/reporting behavior not reflected in the description. While status reporting could be a supporting component of a larger system, this specific code chunk does not itself implement collaboration, autonomy, persistent context handling, or self-improvement.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
72% confidence
Finding

The skill describes autonomous, proactive, and search-based agent behaviors, which imply potential network or external access, but it does not declare any explicit tool scope or permissions boundary. Missing scope declarations make it harder for users and runtimes to understand or constrain what the skill may access, increasing the chance of over-privileged execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill explicitly promotes persistent memory across sessions, including logs and recovery buffers, but does not warn users that their interactions may be stored long-term. This creates privacy and compliance risk because users may disclose sensitive information without informed consent or retention boundaries.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The memory design instructs agents to capture exchanges into persistent shared logs and working buffers, which creates a strong risk of storing secrets, personal data, and sensitive business content in natural language form. Shared memory across multiple agents further increases exposure because information disclosed to one role may become visible to all roles or be reused out of context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill advertises proactive and autonomous behaviors that may monitor workspace state, initiate actions, or alter files without a user request, yet it provides no warning or control model. That lack of transparency can lead to unauthorized changes, surprise data handling, and excessive agent authority in a user environment.

Content

No source excerpt is available for this finding.

Indirect Prompt Extraction

Medium
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains patterns that could indirectly extract system prompts through rephrasing, translation, summarization, or side-channel techniques.

Content

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

md
### ⚡ Proactive Behaviors
- Anticipates office needs before being asked
- Reverse prompting: Suggests improvements humans haven't considered
- Proactive check-ins: Monitors office health and reaches out when needed
- Growth loops: Tracks patterns and identifies automation opportunities

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Daily raw capture files and office-wide shared memory imply broad, continuous storage of interaction content with no stated restrictions on sensitive data. This creates an unnecessary archive of potentially confidential conversations, increasing breach impact, insider access risk, and accidental prompt-context leakage between agents.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · agents/komi/AGENTS.md (reported line 51)May include surrounding context.

md
## Red Lines

- Don't exfiltrate private data. Ever.
- Don't run destructive commands without asking.
- `trash` > `rm` (recoverable beats gone forever)
- When in doubt, ask.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Line L057 states that all task-completion reports must follow a Chinese-language instruction ('Gasol 明確要求') and presents it as a mandatory policy. This imposes a language preference without offering user choice or clarifying that it only applies when interacting with that specific user/context.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

This section explicitly authorizes proactive actions without asking, including reading and organizing memory files, checking project state, updating documentation, and committing/pushing its own changes. In an agent with persistent context and access to user/workspace data, this increases the risk of unauthorized data access, unintended modifications, and external transmission through git push without contemporaneous user approval.

Content

Scanner excerpt · agents/komi/AGENTS.md (reported line 199)May include surrounding context.

md
- Nothing new since last check
- You just checked &lt;30 minutes ago

**Proactive work you can do without asking:**

- Read and organize memory files
- Check on projects (git status, etc.)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The heartbeat checklist explicitly instructs the agent to 'Commit and push your own technical changes if needed' without requiring user approval, review gates, branch restrictions, or confirmation prompts. In an autonomous multi-agent system with persistent context and self-improvement behavior, this can enable unsupervised code changes to be propagated to a remote repository, increasing the risk of accidental breakage, policy violations, or malicious/prompt-injected modifications being published.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file explicitly defines the agent identity and behavior in Chinese, which can steer all downstream interactions into a specific language without checking the user's preference. In a multi-agent office system, this can reduce usability, cause miscommunication, and override user intent, especially when technical or operational tasks require clarity across languages.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The communication and role descriptions are written in Chinese and present communication preferences as fixed expectations, with no indication that another language can be used. This may violate a language/locale policy when a skill constrains interaction to a specific language without explicit user choice or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
65% confidence
Finding

The description states that Komi receives tasks from a specific human, 'Gasol', which hard-codes a user/context assumption into the skill narrative. This can be a natural-language policy issue if the skill is expected to support broader users without requiring a fixed identity or explicit opt-in to that office-specific setup.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This markdown file contains a natural-language statement entirely in Traditional Chinese: '此檔案由 Komi (CTO) 維護,用於追蹤技術參考和工具資訊。' In the absence of any opt-in, bilingual alternative, or justification that this skill is region-specific, this can be read as a locale/language constraint that may conflict with organizational language-choice policy.

Content

No source excerpt is available for this finding.