Back to skill

Security audit

Same Idea

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its stated note-search purpose, but it also includes an unsafe release script that can commit and push local files to GitHub without clear user confirmation or scoping.

Install only if you are comfortable letting the agent read your Logseq and Obsidian note vaults and return matching excerpts. Avoid running scripts/release.sh unless you are maintaining the package and have reviewed the exact repository, remote, and staged files; it should not be needed for normal use.

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
scripts/release.sh:13
Finding
Release Script May Commit and Publish Unintended Local Files## Vulnerability Details **File Location**: `scripts/release.sh`, lines 13-30 **Vulnerability Type**: Unrestricted file staging and unsafe repository-context handling **Risk Level**: Medium ```bash # Check if git repo exists if [ ! -d ".git" ]; then echo "Initializing git repository..." git init git remote add origin $REPO_URL fi # Add all files git add . # Commit git commit -m "Release v$VERSION - Same Idea skill for finding resonating quotes" || true # Create tag git tag -a "v$VERSION" -m "Release version $VERSION" || true # Push git push origin main || git push origin master || true git push origin --tags || true ``` ### Technical Analysis The release script acts on the caller's current working directory instead of resolving and validating the Skill repository root. It then uses `git add .`, which recursively stages all files not excluded by Git configuration. If the current directory is not a Git repository, the script initializes it and assigns the hardcoded external GitHub repository as its remote. If the current directory is already a Git repository, the script accepts that repository and its existing `origin` without verifying its identity. In both cases, it may commit and push files unrelated to the Skill. The script does not provide an explicit release-file allowlist, inspect staged files for secrets, verify the destination remote, or request confirmation before transmission. The `|| true` clauses also suppress commit, tag, and push failures, potentially concealing partial or unexpected release behavior. ### Attack Path 1. A user invokes `scripts/release.sh` while the current working directory is incorrect, or sensitive untracked files are present in the intended repository. 2. The script either uses the existing Git repository or initializes the current directory as a new repository. 3. `git add .` stages all non-ignored files under that directory, potentially including cre ...[truncated 1135 chars]
Remediation
## Remediation Suggestions 1. Resolve the repository root from the script's own location and change to it before executing Git commands: ```bash SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" REPO_ROOT="$(cd -- "$SCRIPT_DIR/.." && pwd)" cd -- "$REPO_ROOT" ``` 2. Abort unless the directory is the expected repository. Validate both the repository root and normalized remote URL before staging or pushing: ```bash test "$(git rev-parse --show-toplevel)" = "$REPO_ROOT" || exit 1 test "$(git remote get-url origin)" = "$REPO_URL" || exit 1 ``` 3. Do not initialize an arbitrary directory automatically. Repository initialization and remote configuration should be separate, explicit setup operations. 4. Replace `git add .` with an explicit allowlist of release files, for example: ```bash git add -- SKILL.md README.md CONTRIBUTING.md DESIGN.md RELEASE_NOTES.md scripts/find_similar.py ``` 5. Verify `.gitignore` coverage for environment files, credentials, editor state, local vault data, build artifacts, and temporary files. 6. Display the staged file list and abort on unexpected paths: ```bash git diff --cached --name-only ``` 7. Add automated secret scanning before committing, and require explicit user confirmation before pushing. 8. Remove broad `|| true` error suppression. Handle expected conditions individually and terminate on unexpected commit, tagging, or push failures.
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
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
Findings (23)

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
Cross-user anonymous insight aggregation is a major scope expansion for a personal knowledge-base search skill and creates data sharing risk across users. 'Anonymous' aggregation is often insufficient for sensitive note content because derived insights, rare topics, or metadata patterns can still enable re-identification or leak private intellectual history.

Missing User Warnings

High
Confidence
98% confidence
Finding
Proposing cross-user aggregation without prominently warning users about data sharing implications is dangerous because it converts private local knowledge exploration into a multi-user data processing system. The sensitivity of personal notes makes undisclosed sharing especially risky, and users cannot meaningfully consent if the design hides or understates those flows.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared purpose is an end-user knowledge-search skill for finding similar ideas and quotes in personal notes. The actual code does not implement any note searching, quote matching, concept similarity, vault access, or result formatting. Instead, it performs software release automation using git and network pushes to GitHub. These are materially different capabilities and involve repository/network operations that are unrelated to the declared functionality.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
- **Medium match**: Related concept or supporting idea
- **Weak match**: Tangential connection worth noting

## Output Guidelines

- Return top 3-5 most resonating matches
- Always include source attribution (book/person)
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
The script has direct capability to publish local contents to a remote GitHub repository through 'git add .', commit, tag, and push operations. If executed from an unexpected directory or on a system with configured Git credentials, it can exfiltrate sensitive local content to a remote without validating what is being uploaded.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The design expands a read-only note search skill into one that can maintain feedback state and update user profiles, which materially broadens data collection and persistence beyond the stated purpose. Even though this is a design document rather than executable code, the added stateful behaviors increase privacy risk and create opportunities for unintended writes or retention of sensitive reading-history-derived data.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
Tracking clicks, reading time, and other implicit behaviors to build a user profile is not justified by the narrow purpose of finding similar ideas in personal notes. This creates surveillance-style data collection and persistent profiling risks, especially because behavioral signals can reveal sensitive interests, beliefs, or mental-state-adjacent patterns from reading habits.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
Implicit behavioral tracking without a clear warning or consent mechanism is a privacy vulnerability because users may unknowingly expose sensitive engagement patterns. In the context of a personal note-search skill, those patterns can be especially revealing since they are tied to private reading notes and knowledge-base exploration.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The interactive template explicitly proposes saving exploration results back into the knowledge base, introducing write access not described in the skill's stated purpose. Unauthorized or poorly scoped write-back can alter personal notes, create misleading records, or persist model-generated content into a trusted knowledge base without adequate review.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The document’s NLP stack explicitly defines Chinese tokenization and sentiment analysis as defaults while pairing English support only secondarily, in a design document otherwise centered on Chinese interaction examples. This creates a natural-language locale bias without stating that users can choose their preferred language or that the skill is limited to a Chinese-language context.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The README explicitly states the skill searches personal Logseq and Obsidian vaults, which commonly contain sensitive notes, reading highlights, private reflections, and credentials or tokens accidentally stored in plaintext. Documenting broad search over personal knowledge bases without a prominent privacy warning, scope limitation, or consent guidance increases the risk of unintended exposure of sensitive data through the agent.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
brew install ripgrep

# Ubuntu/Debian
sudo apt install ripgrep

# Windows (winget)
winget install BurntSushi.ripgrep.MSVC
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Lp3

Medium
Category
MCP Least Privilege
Confidence
82% confidence
Finding
The skill explicitly instructs use of shell-based search tools like grep or rg over sensitive local note directories, but it declares no tool scope or permissions. This creates an authorization gap where an agent may access local files more broadly than the skill metadata communicates, increasing the chance of unintended data exposure.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The documented output format is entirely in Chinese, and the worked example also presents the response structure in Chinese. This creates a language/locale constraint in the skill instructions without indicating that users may choose another language or that Chinese is optional.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
This skill automatically reads from local Logseq and Obsidian vaults and returns matching note content, which can expose sensitive personal data without any explicit consent prompt, disclosure, or scoping control. In a note-search skill, this is particularly relevant because the data source is likely to contain private thoughts, quotes, health, financial, or work-related information.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
for keyword in all_keywords[:8]:  # Limit to top 8 keywords
        cmd = ['rg', '-i', '-n', '--type', 'md', '-C', '2', '-w', keyword, str(vault_path)]
        try:
            output = subprocess.check_output(cmd, stderr=subprocess.DEVNULL, text=True, timeout=15)
            lines = output.strip().split('\n')[:15]
            
            for line in lines:
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The script hardcodes Chinese-language user-visible strings in its output, including status text and result labels, regardless of user preference or environment. Under the language/locale policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
This release script initializes a Git repository, stages all local files, creates commits/tags, and pushes contents to GitHub, which is unrelated to the skill's stated purpose of searching local notes for similar ideas. In a skill package, that creates an unnecessary publication capability that could expose local files or package contents if run in the wrong directory or with modified repository settings.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The script performs repository-modifying actions and network pushes without any warning, dry-run mode, or user confirmation. Because the skill's expected function is local note search, hidden release-side effects are more dangerous: a user or automation could run this script and unintentionally alter a repo and publish data remotely.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
This markdown file contains contributor-facing instructions entirely in Chinese, which can be interpreted as forcing a specific language for interaction without user opt-in. The policy specifically calls for flagging language or locale constraints unless the skill offers a choice or clearly justifies the constraint.

Description-Behavior Mismatch

Low
Confidence
81% confidence
Finding
The manifest limits the skill's purpose to searching notes for similar ideas, resonating quotes, or related concepts and returning matching quotes with sources. The design adds '行动建议' and broader recommendation/exploration features, which materially expand the skill from retrieval into advisory output not described in the manifest.

Natural-Language Policy Violations

Low
Confidence
72% confidence
Finding
The skill documentation is primarily in Chinese while also including English text, and later describes separate handling for Chinese and English keywords. There is no explicit statement of supported languages, user language selection, or justification for a locale-specific experience, which can conflict with language/locale policy expectations.

Natural-Language Policy Violations

Low
Confidence
89% confidence
Finding
This markdown file contains user-facing natural-language content primarily in Chinese, but it does not indicate that the skill is region-specific or provide an opt-in language choice. Under the policy rule for language or locale constraints, forcing a single language without user choice can be a natural-language policy issue.

Static analysis

No suspicious patterns detected.