Back to skill

Security audit

GSwitch

Security checks for vulnerabilities and agentic risk

Overview

GSwitch is a coherent multi-agent engineering workflow, but it gives agents production deployment, broad spawning, and persistent shared-memory powers without enough user approval or data-retention controls.

Install only if you are prepared to restrict deployment credentials, require fresh user approval before any production action, set finite agent timeouts and spawn budgets, and review or disable shared-memory logging for sensitive projects.

Vulnerability Patterns
  • 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
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
roles/release.md:79
Finding

Autonomous Production Deployment Without Explicit User Authorization

Content
View full analysis

Vulnerability Details

File Location: roles/release.md:79-80
Related Locations: SKILL.md:77-79; roles/qa.md:50-54
Vulnerability Type: Deployment authorization and privilege-boundary weakness
Risk Level: High

Vulnerable Code Snippet

markdown
### Phase 6: Ship (Release)
- `/ship` - Deploy to production
- QA passed before deploy
markdown
5. All issues fixed → Re-test
6. QA passes → Spawn Release to deploy
7. **Notify Coordinator ({username}-ceo)** - tell what you did
markdown
### Step 3: Deploy
- Execute deployment
- Monitor progress

Technical Analysis

The workflow treats an internal QA result as sufficient authorization for a production deployment. It does not require explicit confirmation from the user immediately before deployment, constrain the release agent to an approved environment, define an allowlist of deployment operations, or require validation of the identity and integrity of the QA approval.

The release agent may therefore use whatever ambient deployment credentials and tools are available to the host agent. This conflates quality approval with authorization to modify production infrastructure. Although the instructions require QA to pass first, QA approval is not an adequate security boundary or substitute for authorization by the system owner.

Attack Path

  1. A user task, project artifact, test result, or other untrusted content influences the QA agent's assessment.
  2. The QA agent records a passing result or is otherwise induced to continue the workflow.
  3. Under roles/qa.md, the QA agent spawns the release agent automatically.
  4. The release agent follows roles/release.md and executes a deployment.
  5. If ambient production credentials are available, production resources are modified without a separate user authorization checkpoint.

Impact Assessment

Successful exploitation could cause unauthorized production changes within the scope of credentials available to the release ...[truncated 482 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require explicit, fresh user confirmation immediately before every production deployment.
  2. Separate QA approval from release authorization and verify both as distinct, authenticated decisions.
  3. Default release operations to a dry run or staging environment.
  4. Allowlist deployment environments, repositories, branches, commands, and resource scopes.
  5. Use short-lived, least-privilege deployment credentials that cannot access unrelated projects or environments.
  6. Display the exact version, commit, target environment, planned commands, and rollback procedure before requesting approval.
  7. Reject approvals originating only from shared memory or untrusted project content; use signed or otherwise integrity-protected workflow state.
  8. Maintain immutable deployment audit logs and require automatic rollback or a manual stop when verification fails.

T09 · Insecure Skill Coding Practices

Warning
Location
config/recommended-settings.json:6
Finding

Unbounded Runtime Combined With Recursive High-Fan-Out Agent Spawning

Content
View full analysis

Vulnerability Details

File Location: config/recommended-settings.json:6-9
Related Locations: SKILL.md:44-48; SKILL.md:114-116
Vulnerability Type: Uncontrolled resource consumption through unsafe orchestration limits
Risk Level: Medium

Vulnerable Code Snippet

json
"subagents": {
  "maxSpawnDepth": 5,
  "maxChildrenPerAgent": 10,
  "maxConcurrent": 16,
  "runTimeoutSeconds": 0
}

The configuration is used with workflow instructions such as:

markdown
1. Write to shared memory (INCLUDE file paths!)
2. Spawn next agent for workflow
3. If issues found → spawn related agent to fix
4. QA is the FINAL gate before Release

Technical Analysis

The recommended configuration permits a spawn depth of five, up to ten children per agent, sixteen concurrent agents, and an unlimited runtime. Multiple role definitions direct agents to spawn repair, review, retest, or downstream agents. No workflow-wide budget, cycle detection, retry ceiling, or mandatory human checkpoint is defined.

A nominal depth limit prevents infinite structural recursion, but it does not prevent very large execution trees, repeated top-level workflows, long-running child tasks, or substantial concurrent resource use. Setting runTimeoutSeconds to 0 removes an important containment control.

Attack Path

  1. A task or project repeatedly produces ambiguous failures, failed checks, or conflicting role conclusions.
  2. Reviewer, QA, security, design, or engineering agents spawn other agents to address the reported issues.
  3. Repair agents trigger re-review or re-verification, producing further descendants or repeated workflow invocations.
  4. Up to sixteen tasks execute concurrently, with a potentially large branching tree.
  5. Because no runtime timeout or global budget is configured, tasks may continue consuming model tokens, API quota, CPU, memory, browser capacity, and external service resources until manually stopped or another platform limit is reached ...[truncated 586 chars]
Remediation
View remediation

Remediation Suggestions

  1. Set a finite per-agent runtime and a shorter idle timeout.
  2. Reduce spawn depth, maximum children, and concurrency to the minimum required.
  3. Enforce workflow-wide limits for agents, retries, runtime, tokens, browser sessions, and monetary cost.
  4. Add cycle detection using task identifiers and prevent duplicate repair/retest chains.
  5. Require user approval before retries beyond a small fixed threshold or before high-fan-out spawning.
  6. Propagate cancellation from the parent to every descendant.
  7. Apply exponential backoff and fail closed when agents repeatedly disagree or tests remain inconclusive.
  8. Expose active-agent and cost telemetry and provide an immediate workflow-wide stop control.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:121
Finding

Persistent Shared-Memory Logging Lacks Data Minimization, Isolation, and Retention Controls

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:121-132
Related Locations: SKILL.md:33-38; roles/ceo.md:109-125; roles/designer.md:97-116; roles/em.md:86-105; roles/qa.md:96-115; roles/release.md:101-121; roles/reviewer.md:83-102; roles/security.md:86-105
Vulnerability Type: Persistent storage of potentially sensitive operational information
Risk Level: Medium

Vulnerable Code Snippet

markdown
## Shared Memory

All agents share: `/path/to/GSwitch/shared-memory/{username}/`

**Format:** YYYY-MM-DD.md
**Rule:** APPEND ONLY, NEVER OVERWRITE
markdown
## Shared Memory Format

Each agent appends:

```markdown
### {username}-role | HH:MM
- 任務:[Task description]
- 結果:[Success/Failure]
- 發現:[Issues if any]
- 檔案位置:[Project file path]
- 下一步:[Next step]
---
text

### Technical Analysis

Every role is instructed to append task descriptions, findings, decisions, and project file paths to a common persistent directory. The append-only rule encourages indefinite accumulation, while the documented design provides no permissions model, project isolation, content redaction, sensitivity classification, retention limit, encryption requirement, or secure deletion procedure.

The stored content is not explicitly instructed to contain credentials, and the audited files do not contain hardcoded secrets. Nevertheless, agents processing sensitive tasks may copy confidential project details, absolute paths, security findings, or user-provided data into the shared files. Because all agents use the same per-user location, one role may gain access to information produced by another role even when that information is unnecessary for its task.

### Attack Path

1. An agent handles a project containing confidential names, absolute paths, vulnerability details, user data, or other sensitive operational context.
2. Following the mandatory completion workflow, it appends those details to the daily shared-memory file.
3. The information remains
...[truncated 913 chars]
Remediation
View remediation

Remediation Suggestions

  1. Store only minimal identifiers and status information; do not persist raw prompts, credentials, tokens, personal data, source code, or detailed vulnerability evidence by default.
  2. Replace absolute paths with project-scoped identifiers or redacted relative paths.
  3. Create separate memory stores for each user, project, environment, and trust boundary.
  4. Apply restrictive filesystem ownership and permissions so each role can access only necessary records.
  5. Encrypt sensitive records at rest and protect encryption keys separately.
  6. Define short retention periods and implement secure deletion rather than unconditional append-only retention.
  7. Add automated secret and sensitive-data scanning before every write.
  8. Require explicit user consent before persisting sensitive task context.
  9. Treat stored memory as untrusted input when read later and prevent entries from acting as executable instructions.
  10. Maintain access logs for shared-memory reads and writes.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (17)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file describes a workflow where the Release role 'Deploys to production' but does not include any warning about the potential impact on user systems, data, or live environments. For markdown files, deployment behavior that can affect system integrity should be accompanied by an explicit warning or disclosure.

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 includes a production deployment phase ('/ship - Deploy to production') but provides no warning, approval requirement, or safeguards around system-impacting actions. In an agentic workflow, this can normalize autonomous release behavior and lead to unintended changes to live systems, outages, or unauthorized deployment if invoked without clear human confirmation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs the agent to persist task details to a shared-memory file after completing any task, but it does not disclose this storage behavior to the user or require consent. This can cause sensitive project details, user requests, or internal reasoning summaries to be written to disk unexpectedly, creating privacy and data-handling risks across sessions or users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The mandated shared-memory entry format forces fields such as '任務', '結果', and '建議' in a specific language without checking the user's language preference. While not typically a direct security exploit, this can mislead users about what is being stored, reduce transparency, and increase the chance that persistence happens without meaningful user understanding or review.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The shared-memory template requires several fields to be written using Traditional Chinese labels such as '任務', '結果', and '主要決定'. This is a natural-language locale constraint in the skill instructions, and the file does not provide opt-in, alternatives, or a justification that the role is region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The required shared-memory format uses fixed Traditional Chinese field labels such as '任務', '結果', and '主要決定', which imposes a specific language on outputs. There is no opt-in, language choice, or documented reason for this locale constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The role instructs the agent to append data to a specific local filesystem path in shared memory without any explicit warning, consent step, or boundary on what path values may be used. In an agent setting, write instructions to local files can cause unintended persistence, tamper with audit logs, or be abused if path components such as {username} are influenced by untrusted input.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The shared-memory template requires entries such as '任務', '結果', and '下一步', which imposes a specific language format. Because the file does not provide user opt-in, alternatives, or a documented region-specific reason, this is a natural-language locale policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file directs the skill to ship to production, perform rollbacks, and manage releases, which can affect system availability and integrity. While operational steps are listed, the description does not explicitly warn the user that the skill may make production changes or cause downtime.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The instruction to 'Apply automatic fixes where possible' authorizes code modification without requiring explicit user approval, review gates, or even a warning that files may be changed. In an agent skill, this can lead to unintended or unsafe edits, especially if the reviewer role misclassifies issues or makes security-relevant changes autonomously.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The shared-memory template forces several user-visible fields to be written in Chinese (e.g. 任務, 結果, 發現漏洞, 檔案位置) without any opt-in, alternative locale, or justification that this role is region-specific. This is a natural-language locale policy issue because the file mandates a specific language for operational output.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
74% confidence
Finding

The README presents core instructions in both English and Traditional Chinese, but it does not state whether language selection is optional or user-driven. Under the language/locale policy rule, skills should avoid imposing or assuming a language/locale without user opt-in or clear justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The shared-memory format instructs agents to record project file paths, but does not warn that paths may reveal usernames, repository layout, internal infrastructure conventions, or sensitive locations. In a multi-agent shared log, this increases the risk of unnecessary disclosure and can aid lateral movement or targeted follow-on actions if the memory is exposed.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The shared memory template uses Chinese field labels only, which implies a fixed language requirement for agent outputs. The file does not offer a language choice or explain that this locale constraint is optional or region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file directs the agent to append task outputs to a shared-memory file path and lists 'exec for file operations' as a tool, which implies writing project data to disk. The description does not include any warning about persistent storage of task details, file paths, or potential impacts on user data/privacy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The shared-memory output format uses Traditional Chinese field labels such as "任務", "結果", and "檔案位置", which imposes a specific language on generated content. The file does not offer a language choice or justify the locale constraint as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The required append format uses Chinese labels such as '任務', '結果', and '檔案位置', which imposes a specific language in the skill instructions. There is no opt-in, alternative locale, or justification that this role is intended only for a Chinese-language environment.

Content

No source excerpt is available for this finding.