Back to skill

Security audit

BrainRepo

Security checks for vulnerabilities and agentic risk

Overview

BrainRepo is a coherent personal knowledge skill, but it asks agents to create and sync a broad plain-text personal repository with weak user controls around setup, sensitive data, deletion, and Git pushes.

Install only if you are comfortable with an agent creating and managing ~/Documents/brainrepo/ as a plain-text knowledge base. Before using Git sync, verify the remote is private and intended, review what will be committed, and avoid storing medical details, secrets, credentials, or other high-risk personal data unless you add your own encryption and review process.

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
references/workflows.md:50
Finding

Unguarded Git Push May Expose Sensitive Personal Information

Content
View full analysis

Vulnerability Details

File Location: references/workflows.md:50-53
Vulnerability Type: Unprotected synchronization of sensitive data to a Git remote
Risk Level: Medium

Vulnerable Code

markdown
After processing:
1. Create/update `Journal/YYYY-MM-DD.md`
2. Commit: `git add -A && git commit -m "daily: $(date +%Y-%m-%d)"`
3. Push: `git push`

The same unsafe synchronization pattern is repeated in weekly and general Git workflows:

bash
git add -A
git commit -m "weekly review: $(date +%Y-%m-%d)"
git push
bash
# After finishing work
git add -A && git commit -m "sync" && git push

The repository is explicitly intended to contain sensitive categories of information, as demonstrated in references/structure.md:

text
├── personal-growth/
│   ├── health.md             # Fitness, nutrition, medical
│   ├── habits.md             # Habit tracking
│   ├── learning.md           # Courses, books, skills
│   └── career.md             # Career goals, development
├── family/
│   ├── important-dates.md    # Birthdays, anniversaries
│   └── traditions.md         # Family rituals

The person template in assets/templates/person.md:17-21 also solicits direct contact information:

markdown
## Contact

- **Email:**
- **Phone:**
- **LinkedIn:**
- **Twitter:**

Technical Analysis

The workflow uses git add -A, which stages every changed, deleted, or newly created file in the knowledge repository. It then instructs the agent to run git push without first validating:

  • Which remote repository will receive the data.
  • Whether the remote is private or publicly accessible.
  • Whether the remote is controlled by the intended user.
  • Whether the user has explicitly consented to uploading sensitive records.
  • Whether files containing medical, family, relationship, journal, career, or contact information should be excluded.
  • Whether repository contents are encrypted before transmission and storage.

This violates data-minimiz ...[truncated 2662 chars]

Remediation
View remediation

Remediation Suggestions

  1. Make remote synchronization opt-in

    • Do not run git push as an automatic part of daily or weekly processing.
    • Separate local commits from remote synchronization.
    • Require explicit user authorization before the first push and whenever the remote changes.
  2. Validate the remote before uploading

    • Run and display git remote -v.
    • Confirm that the destination belongs to the intended user.
    • Warn if the remote uses an unexpected host, account, or repository.
    • Where provider APIs are available, verify that repository visibility is private.
  3. Require informed confirmation

    • Before pushing, summarize the files that will be uploaded using commands such as:
      bash
      git status --short
      git diff --cached --name-only
      
    • Obtain confirmation after warning that the repository may contain medical, family, journal, relationship, and contact data.
  4. Avoid indiscriminate staging

    • Replace git add -A with explicit staging of reviewed files.
    • Exclude sensitive directories by default unless users deliberately enable their synchronization.
    • Provide a conservative .gitignore template for local-only categories.
  5. Protect sensitive content

    • Recommend client-side encryption for repositories containing private personal records.
    • Clearly explain that private Git hosting does not provide end-to-end content encryption.
    • Avoid storing credentials, authentication tokens, government identifiers, or similarly high-risk secrets in the repository.
  6. Add remote-change safeguards

    • Record the approved remote URL locally and require renewed consent if it changes.
    • Refuse automatic pushes when multiple remotes exist or the destination cannot be validated.
  7. Document incident response

    • If sensitive data is pushed accidentally, instruct users to disable public access, rotate exposed credentials where relevant, rewrite Git history with an appropriat ...[truncated 195 chars]
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger phrases are broad enough to match common conversation such as 'remember', 'note', or 'capture', which can cause the skill to activate unexpectedly and store content the user did not intend to persist. In a skill that writes markdown files to a fixed local path, unintended activation can lead to silent collection of sensitive data and unreviewed local state changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill description does not prominently disclose that it will create a fixed directory tree under ~/Documents/brainrepo/, generate files from templates, and may initialize a Git repository. Missing disclosure undermines informed consent and makes the broad triggers and automatic onboarding more dangerous because users may not realize the skill performs persistent local changes.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Automatically running onboarding on 'first interaction' or whenever the expected directory is absent is too implicit for an operation that creates directories, files, and optionally a Git repository. This can cause the agent to perform local side effects without a clear, contemporaneous user request, increasing the risk of unwanted filesystem changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The structure guide explicitly encourages storing highly sensitive categories such as medical, family, relationship, and personal development information in plain markdown files within a Git-backed repository, but provides no privacy, access-control, retention, or encryption guidance. In the context of a knowledge-repository skill intended for broad agent use, this increases the likelihood that users will place sensitive personal data into locations that may be synced, indexed, shared, or exposed through misconfigured repositories or AI tooling.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

These workflows instruct an AI to create and modify repository files based on natural-language commands without any warning, confirmation step, or scope limitation around write effects. In a skill designed to operate directly on a Git-backed knowledge repo, this can lead to unintended file creation, overwrites, or persistence of sensitive content when a user issues ambiguous prompts or when prompt injection is relayed through captured content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The maintenance workflows include delete, merge, cleanup, and archive actions but do not warn that content may be permanently removed, become harder to recover after commit/push, or break links and references. Because this skill centers on file and Git operations, an AI following these instructions could perform destructive cleanup on user data with little friction, especially if the user assumes these are harmless organizational actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The template explicitly prompts users to store personal contact details such as email, phone number, and social profiles in markdown files, but provides no guidance on consent, minimization, retention, or secure handling. In the context of a git-backed knowledge repository, this can lead to inadvertent exposure of personal data through sync, sharing, backups, or repository misconfiguration.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.