Back to skill

Security audit

teamai

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for TeamAI setup and sync, but it needs Review because it can install and execute tools, persist credentials and hooks across AI agents, and includes an unsafe HTTP binary download path.

Install only if you trust the TeamAI publisher, the team repo, and the provider CLIs it configures. Review any push or env change before publishing, restrict setup to only the AI tools you want where possible, avoid broad long-lived tokens, and treat the TGit gf install path as unsafe unless it is moved to HTTPS with checksum or signature verification.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Error
Location
references/provider-tgit.md:36
Finding

Unauthenticated Remote Binary Download and Execution

Content
View full analysis

Vulnerability Details

File Location: references/provider-tgit.md, lines 36–53
Vulnerability Type: Unauthenticated remote payload retrieval and execution
Risk Level: High

Vulnerable Code

bash
# pick the tarball for this machine's OS/arch (darwin|linux × x64|arm64)
os=$(uname -s | tr '[:upper:]' '[:lower:]')          # darwin | linux
arch=$(uname -m); [ "$arch" = "x86_64" ] && arch=x64; [ "$arch" = "aarch64" ] && arch=arm64
dir="${TEAMAI_HOME:-$HOME/.teamai}/gf"

# download + extract from the Tencent-internal mirror (same URL teamai uses)
mkdir -p "$dir"
curl -fsSL "http://mirrors.tencent.com/repository/generic/gongfeng-cli/files/channels/stable/gf-${os}-${arch}.tar.gz" | tar xz -C "$dir"

# verify exactly as teamai does: the binary exists and is executable
test -x "$dir/gf/bin/gf" && echo "gf installed OK" || echo "gf install FAILED"

The extracted binary is subsequently executed:

bash
"${TEAMAI_HOME:-$HOME/.teamai}/gf/gf/bin/gf" auth login

Technical Analysis

When the Tencent TGit workflow is selected, the Skill requires the Agent to download a platform-specific archive over plaintext HTTP. The network response is streamed directly into tar and extracted into the TeamAI directory.

Plaintext HTTP provides neither transport confidentiality nor server authentication. A network-path attacker can therefore replace or modify the archive in transit. The post-download check only confirms that the expected path exists and is executable; it does not validate a cryptographic digest, publisher signature, or other proof of authenticity.

The workflow subsequently executes the extracted gf binary during authentication. As a result, attacker-controlled network content crosses the network-to-code trust boundary and runs under the current user’s account.

Attack Path

  1. The user invokes the setup or join flow for a Tencent TGit repository.
  2. The Skill follows `references/pro ...[truncated 1119 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace the plaintext HTTP endpoint with an authenticated HTTPS endpoint.
  2. Download the archive to a temporary file rather than piping it directly into tar.
  3. Verify a pinned cryptographic digest or trusted publisher signature before extraction.
  4. Abort installation if verification fails; checking only that a file exists and is executable is insufficient.
  5. Inspect archive member paths before extraction and reject absolute paths, .. traversal, symbolic-link escapes, and unexpected files.
  6. Extract into a newly created private staging directory, validate the expected file layout, and atomically move verified files into the final directory.
  7. Execute the binary only after transport authentication, integrity verification, and safe extraction have all succeeded.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
Findings (21)

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

This skill explicitly supports publishing and updating skills, rules, MCP, and environment state across AI tools. That is a self-modifying or capability-modifying workflow: if triggered by an untrusted user request or if the referenced flow lacks approval gates, it could propagate malicious instructions or unsafe configuration to other agents and users.

Content

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

md
🤝  Member — join an existing team:
      /teamai Help me join my team's TeamAI, repo URL is https://...

  🔧  Admin — daily management (publish & update skills, rules, MCP, env):
      /teamai I already have TeamAI set up, help me manage it

  📊  Anyone — open the team dashboard:

Self-Modification

High
Category
Rogue Agent
Confidence
89% confidence
Finding

The routing table includes a flow for managing and publishing shared skills, rules, MCP, and env artifacts, which can alter the behavior and trust boundaries of multiple AI tools. In skill context, this makes the self-modification risk more serious because the purpose of the tool is to distribute changes team-wide, amplifying the effect of a mistaken or malicious update.

Content

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

md
|-----------------------------------------------------|------------------------------------------|
| Set up TeamAI for a team from scratch (create repo) | `references/setup-admin.md`              |
| Join their team (with or without a repo URL)         | `references/join-member.md`              |
| Manage a team: publish/update skills, rules, MCP, env, invite members | `references/manage-admin.md`  |
| Share / publish a skill with the team ("share this xxx skill") — any member, not just admins | `references/contribute-member.md` |
| Open the team dashboard (web UI)                    | run `teamai dashboard` (see cheat sheet) |
| Remove / uninstall TeamAI from this machine         | `references/uninstall.md`                |

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file explicitly says the user may ask in plain language and 'then you run the publish for them,' which contradicts the metadata requirement that TeamAI be invoked only when the user explicitly runs /teamai. This can cause unauthorized or unintended tool activation from ordinary conversation, potentially leading to publishing internal skills or knowledge to the team without the strong invocation guard the skill promises.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
87% confidence
Finding

The skill explicitly states that authentication will be performed once and later unattended runs will reuse stored credentials, which introduces credential persistence and possible privilege misuse if the host, agent context, or stored auth material is compromised. Even though it notes limitations of PATs, it still encourages durable credential storage without specifying storage protections, scope minimization, or user approval boundaries.

Content

Scanner excerpt · references/provider-tgit.md (reported line 65)May include surrounding context.

md
its own once they do. Confirm with
`"${TEAMAI_HOME:-$HOME/.teamai}/gf/gf/bin/gf" auth whoami` before continuing.

There is no headless substitute for this step: a `TGIT_TOKEN` Personal Access
Token reaches the git.woa.com REST API only, and the git endpoint rejects it, so
`init` cannot clone with it. Run the login once on the machine (interactively);
later unattended runs reuse the credential it stores.

Credential Access

High
Category
Privilege Escalation
Confidence
82% confidence
Finding

The skill directs use of a high-privilege GitLab Personal Access Token with api scope via an environment variable. Broad-scope long-lived tokens increase the blast radius if exposed through shell history, process inspection, logs, or inherited environments, especially because the skill encourages the agent to run commands on the user's machine.

Content

Scanner excerpt · references/setup-admin.md (reported line 141)May include surrounding context.

GitLab (gitlab.com)

Set a Personal Access Token with api scope:

bash
export GITLAB_TOKEN=glpat-xxxxxxxxxxxxxxxx

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · references/troubleshooting.md (reported line 32)May include surrounding context.

teamai hooks inject

text
4. **Wrong scope?** Project-scope hooks are written to your HOME tool settings
(e.g. `~/.claude/settings.json`), not the project folder — that is intentional.
If you initialized project scope but expected machine-wide resources, re-run
with `--scope user`.
5. **Tool has no hook surface** (e.g. Gemini CLI, JoyCode): there is no auto-sync;

Unrestricted Tool Access

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.

Content

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

If they gave NO scenario (bare /teamai, or only greetings/no task): print the menu below exactly, then STOP and wait. Take no other action — do not run any command, do not read any reference file yet.

text
teamai — Team AI Skills & Rules Sync

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The broad examples like 'share this xxx skill with my team' and the instruction to act on them create an overly permissive trigger surface. In an agent environment, this increases the risk of accidental activation, social-engineering-triggered execution, or unintended publication of data or artifacts when the user did not deliberately enter the TeamAI command path.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · references/contribute-member.md (reported line 65)May include surrounding context.

  1. Create the skill directory with a SKILL.md:

    text
    skills/my-skill/SKILL.md
    

    Minimal frontmatter:

Behavior Manipulation

Medium
Category
Prompt Injection
Confidence
75% confidence
Finding

Subtle instructions detected that may alter agent decision-making or introduce hidden biases.

Content

Scanner excerpt · references/join-member.md (reported line 43)May include surrounding context.

md
Match the login to the URL's host (do NOT create a second repo):

- **`git.woa.com/...`** (Tencent TGit / 工蜂) → **you run both the `gf` install and
  the `gf … auth login`** (never tell the user to run them). Follow
  `provider-tgit.md` ("Log in"); the user's only action is approving the login URL
  in their browser / iOA. No `GITLAB_URL` needed. (No headless shortcut:
  `TGIT_TOKEN` is REST-API-only and cannot clone, so the login has to be run once

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill instructs the agent to treat broad natural-language phrases like "share this skill with my team" as authorization to publish team content, which can overlap with ordinary conversation and cause unintended side effects. Because publishing affects a shared team repository, ambiguous triggering can lead to accidental disclosure or propagation of internal code, prompts, or skills without a clear, explicit command boundary.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The suggested invocation includes the phrase "Help me join my team's TeamAI," which is natural everyday language rather than a narrowly scoped trigger. In contexts where invocation text is reused or matched loosely, this could cause unintended activation because the file does not provide tighter trigger constraints or exclusion examples.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/provider-tgit.md (reported line 16)May include surrounding context.

the header is what confirms it:

bash
curl -sS -m 3 -D - -o /dev/null https://git.woa.com 2>/dev/null | grep -qi '^x-env:[[:space:]]*tgit' && echo "tgit: OK" || echo "tgit: unreachable"

If it prints tgit: OK, prefer TGit and list it first among the choices — it

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/setup-admin.md (reported line 48)May include surrounding context.

the header is what confirms it:

bash
curl -sS -m 3 -D - -o /dev/null https://git.woa.com 2>/dev/null | grep -qi '^x-env:[[:space:]]*tgit' && echo "tgit: OK" || echo "tgit: unreachable"

If it prints tgit: OK, prefer TGit and list it first among the choices — it

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs the agent to silently install and execute a third-party CLI, initiate authentication, and persist credentials on the user's machine without requiring explicit informed consent or presenting system-change warnings. This creates a real security issue because it normalizes software installation and credential storage through the agent, reducing user visibility and increasing the chance of unintended trust in downloaded binaries and stored auth state.

Content

No source excerpt is available for this finding.

Behavior Manipulation

Medium
Category
Prompt Injection
Confidence
91% confidence
Finding

The instruction to 'run every command yourself' and 'never tell the user to run a gf command' pushes the agent to take direct action while bypassing normal user review of sensitive install and authentication steps. In security terms, this is dangerous behavior manipulation because it reduces transparency and encourages the agent to become the executor of trust-sensitive operations rather than obtaining explicit, granular authorization.

Content

Scanner excerpt · references/provider-tgit.md (reported line 27)May include surrounding context.

md
## Log in: install `gf`, then `gf auth login` — YOU run both

TeamAI drives the TGit CLI (`gf`) on the user's behalf. **Run every command in this
section yourself — both the install and the login. Never tell the user to run a
`gf` command.** The user's only action is approving the login in their browser /
iOA when it opens.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs the agent to reassure users that no session data is sent to third parties, while also stating that usage counts and knowledge are reported to the team repo. Even if raw chat text is excluded, this is still data disclosure to another system and can mislead users about privacy-sensitive behavior and consent.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The document claims raw conversation content is never uploaded, but elsewhere says session learnings may be shared automatically. Automatic extraction and upload of session-derived learnings can still leak sensitive information, proprietary details, or personal data even if verbatim transcripts are not sent.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation explicitly states that teamai hooks inject prints a success message even when it may have written nothing. Misleading success reporting can cause users and downstream automation to assume security-sensitive hooks are active when they are not, weakening expected synchronization or policy enforcement and masking misconfiguration.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file says TeamAI writes raw hook entries for tools that do not accept them, including cases skipped 'by design.' Writing incompatible hook data into agent configuration is dangerous because it can corrupt configuration state, create undefined behavior, or train users to normalize failed or partial security setup.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

Line L05 states that everything the skill says must be in the user's language, referencing a global language rule. The policy allows locale behavior when the user is offered a choice or when the constraint is clearly justified; neither appears in this file.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.