T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:546- Finding
External AI Review May Disclose Proprietary Repository Data
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:546-576andSKILL.md:600-605
Vulnerability Type: Excessive repository access and unapproved third-party data processing
Risk Level: HighVulnerable Code Snippet
typescript // In the code review stage, automatically spawn a child task sessions_spawn({ model: "bailian/kimi-k2.5", task: `Perform a line-by-line review of this week's code changes for the ${projectName} project. Review scope: ${branchName} Changed files: ${fileList} Changed lines: +${insertions}/-${deletions} Review the following dimensions: 1. Security 2. Performance 3. Correctness 4. Maintainability 5. Testing Output format: | File | Line | Issue Type | Severity | Description | Recommendation | `, cwd: projectPath })The documented workflow further directs the child task to access repository differences:
text Main task: -> Analyze code changes -> Synchronize data to the database -> Score -> Spawn child task (kimi-k2.5) -> Obtain git diff -> Review code line by line -> Identify issues -> Return structured results -> Receive review results -> Store them in the databaseTechnical Analysis
The Skill mandates spawning a provider-qualified AI model and grants the spawned task access to
projectPaththrough its working directory. The workflow then instructs that child task to obtain Git diffs and perform a line-by-line review.A full Git diff can contain proprietary source code, unreleased functionality, credentials accidentally committed to the repository, internal hostnames, security defects, and contributor information. The Skill provides no explicit consent gate, provider disclosure, data-classification check, secret scanning, redaction, file allowlist, or minimization control before the external-model operation.
This also conflicts with the Skill's statements elsewhere that AI scoring and review do not call an external AI API. Consequently, users may rea ...[truncated 2383 chars]
- Remediation
View remediation
Remediation Suggestions
- Use the current trusted local model for code review by default.
- Before selecting a third-party or provider-qualified model, require explicit user approval that identifies:
- The provider and model
- The repository or files involved
- The categories of data that may be transmitted
- Applicable retention and training policies
- Do not grant the child task unrestricted
cwdaccess to the repository. Generate the minimum required diff locally and pass only approved fragments. - Apply strict file allowlists and exclude sensitive paths such as secrets, deployment configuration, private keys, environment files, credential stores, and production data fixtures.
- Scan diffs for API keys, passwords, tokens, private keys, personal data, internal endpoints, and other sensitive values before model processing.
- Redact or tokenize contributor names, email addresses, task identifiers, internal URLs, and credentials unless they are necessary for the review.
- Limit the child task's tools to read-only access and prohibit arbitrary network access or commands unrelated to generating the approved diff.
- Clearly document whether model calls are local or external. Remove contradictory claims that no external AI API is used when a provider-qualified model may be selected.
- Provide a fully local review mode for confidential repositories and make it the mandatory mode when repository policy prohibits third-party processing.
- Record auditable consent, the selected files, the data sent, the model used, and the destination without logging sensitive source content itself.
- Define retention and deletion controls for code snippets and contributor-associated findings stored in
code_issues,code_reviews, and related analysis tables.
