Back to skill

Security audit

ProFind

Security checks for vulnerabilities and agentic risk

Overview

This ProFind file-search skill is mostly disclosed and purpose-related, but it needs review because its automation helpers can broadly access or modify local files and its CLI handles user search text unsafely.

Review this before installing if you will let an agent pass arbitrary search terms or run ProFind scripts. Grant Full Disk Access only if you need protected locations searched, keep Media Server disabled unless needed, and avoid the included CLI/script examples for untrusted input or bulk file changes until escaping, confirmations, dry-run previews, and collision checks are added.

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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/profind-cli.sh:30
Finding

AppleScript Injection Through Unescaped Search Parameters

Content
View full analysis
[选项]${NC}" echo "选项:" echo " --kind PDF|image|movie|document|archive|folder" echo " --size larger:1MB|smaller:100KB|equal:5GB" echo " --date modified:~week|created:~month" echo " --path ~/Documents" echo " --scope all|home|hidden" echo " --label red|orange|yellow|green|blue|purple|gray" exit 1 fi local url url=$(build_url "$name") echo -e "${GREEN}[ProFind]${NC} 搜索: $name" osascript -e "tell application \"ProFind\" to open location \"$url\"" & } ``` A second affected execution path is: ```bash cmd_window() { local query="${1:-}" if [ -z "$query" ]; then echo -e "${GREEN}[ProFind]${NC} 打开搜索窗口..." else echo -e "${GREEN}[ProFind]${NC} 打开搜索窗口,关键词: $query" fi if [ -n "$query" ]; then osascript -e "tell application \"ProFind\" to open location \"profind:search?name=${query}\"" & else osascript -e "tell application \"ProFind\ ...[truncated 2319 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/profind-cli.sh:118
Finding

SOAP XML Injection Through an Unescaped Search Keyword

Content
View full analysis
0 (dc:title contains \"$keyword\") " ;; ``` ### Technical Analysis The command-line keyword is inserted directly into XML text and into the ProFind search-criteria grammar. It is not escaped for XML reserved characters such as `&`, `<`, and `>`, nor is it escaped or validated for the quoted search expression. Consequently, crafted input can break the `SearchCriteria` expression, introduce additional XML content, or produce malformed SOAP. The request is sent to ProFind's local Media Server on port 54812, which limits the immediate exposure to a local service, but the receiving parser still processes attacker-controlled XML. ### Attack Path 1. A user or automation process invokes `profind api search` with attacker-controlled keyword text. 2. `cmd_api` assigns the raw value to `keyword`. 3. Bash expands the keyword directly inside the SOAP document. 4. XML metacharacters or search-language delimiters alter the intended XML or query structure. 5. The modified request is sent to `localhost:54812`. 6. Depending on ProFind's parser behavior, the request ...[truncated 635 chars]
Remediation
View remediation
`, `"`, and `'` before placing user data in the document. 3. Separately escape the value for the `SearchCriteria` grammar; XML escaping alone does not prevent query-language injection. 4. Apply an allowlist appropriate for filename searches and reject control characters. 5. If arbitrary filename text must be supported, use a documented ProFind API mechanism for parameterized search expressions rather than constructing the grammar manually. 6. Treat non-2xx responses and SOAP faults as errors and avoid returning potentially misleading partial output. 7. Add tests for XML metacharacters, nested quotes, parentheses, and oversized keywords. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
sample-scripts/custom/BatchRename.sh:10
Finding

Batch Rename Hook Can Overwrite Existing Files

Content
View full analysis
Remediation
View remediation
%s\n' "$file" "$destination" >&2 continue fi mv -- "$file" "$destination" ``` 2. On platforms where it is reliably supported, use no-clobber behavior such as `mv -n`; retain the explicit check for clearer reporting. 3. Precompute all source-to-destination mappings before modifying files and reject duplicate generated destinations within the batch. 4. Offer a dry-run mode that prints every proposed rename. 5. For interactive use, require confirmation before destructive operations or generate a unique destination suffix. 6. Record completed operations so interrupted batches can be diagnosed or reversed. 7. Correct the duplicated examples in `SKILL.md` and `docs/SAMPLE-SCRIPTS.md`. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
scripts/install.sh:62
Finding

Full Disk Access Check Produces False Authorization Results

Content
View full analysis
/dev/null) if [ -n "$FULL_DISK_ACCESS" ]; then info "✓ 完全磁盘访问权限已授予" else warn "⚠ 完全磁盘访问权限未检测到" info " 请手动配置:" info " 系统偏好设置 → 隐私与安全性 → 完全磁盘访问 → 勾选 ProFind" fi ``` ### Technical Analysis The SQL query checks whether any row grants `kTCCServiceSystemPolicyAllFiles`, but it does not filter by ProFind's client identifier. If another application has Full Disk Access, the query can return a row and the installer will report that the relevant permission is granted even when ProFind has no such authorization. The schema and availability of the TCC database also vary across macOS versions. Errors are suppressed with `2>/dev/null`, making denial of access, schema changes, and an actual absence of authorization indistinguishable. The installer additionally queries the user's privacy authorization database when it could instead perform a narrowly scoped functional check or provide manual instructions. ### Attack Path 1. At least one unrelated application has Full Disk Access. 2. The installer queries all allowed rows for the Full Disk Access service without selecting a client. 3. The query returns a nonempty result. 4. The installer reports that Full Disk Access has been granted. 5. The user proceeds under the incorrect assumption that ProFind is properly authorized, creating unreliable security and operational expectations. ### Impact Assessment This issue does not itself grant Full Disk Access or bypass macOS authorization controls. Its direct impact is false permission reporting and unnecessary inspection of privacy st ...[truncated 289 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (38)

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The skill is framed as local file search, yet it also documents localhost SOAP/HTTP access to a Media Server and browsing of indexed results. That is an undeclared network-facing capability which expands the attack surface and may expose sensitive search results through another interface without the user expecting it.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill is framed as local file search, yet it also documents localhost SOAP/HTTP access to a Media Server and browsing of indexed results. That is an undeclared network-facing capability which expands the attack surface and may expose sensitive search results through another interface without the user expecting it.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README documents a localhost HTTP/SOAP media-server query capability that expands the skill surface beyond simple file search. Even though it targets localhost, exposing or encouraging use of an undocumented network-style API can enable unintended data access paths and makes review of the skill’s real privileges and behavior harder.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README instructs users to grant Full Disk Access without clearly warning that this gives the application broad visibility into sensitive files such as mail, messages, documents, and system data. In the context of an automation skill, this materially increases the blast radius of any misuse, bug, or companion script behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script-hook feature enables built-in or custom scripts to act on search results in bulk, but the README presents it without caution about destructive, privacy-impacting, or exfiltration-capable actions. In a file-search tool with broad filesystem visibility, script automation can quickly turn discovery into mass rename, deletion, transmission, or other unsafe operations.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation extends the skill from local macOS file search into HTTP API interaction, which is not reflected in the stated description. This mismatch is dangerous because users and reviewers may grant trust and permissions for a search tool while overlooking network-access behavior and secondary interfaces.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill contains substantial executable shell and AppleScript examples but declares no explicit tool scope or permissions boundary. In an agent setting, that omission is dangerous because it can cause the runtime or reviewer to underestimate that the skill can launch apps, automate UI, create scripts, and interact with local services.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

bash
if [ -d "/Applications/ProFind.app" ]; then
    echo "ProFind 已安装: $(defaults read /Applications/ProFind.app/Contents/Info.plist CFBundleShortVersionString 2>/dev/null)"
else
    echo "ProFind 未安装,请从 App Store 下载:https://apps.apple.com/app/id1559203395"
fi

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

bash
if [ -d "/Applications/ProFind.app" ]; then
    echo "ProFind 已安装: $(defaults read /Applications/ProFind.app/Contents/Info.plist CFBundleShortVersionString 2>/dev/null)"
else
    echo "ProFind 未安装,请从 App Store 下载:https://apps.apple.com/app/id1559203395"
fi

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/install.sh (reported line 34)May include surrounding context.

sh
```bash
if [ -d "/Applications/ProFind.app" ]; then
    echo "ProFind 已安装: $(defaults read /Applications/ProFind.app/Contents/Info.plist CFBundleShortVersionString 2>/dev/null)"
else
    echo "ProFind 未安装,请从 App Store 下载:https://apps.apple.com/app/id1559203395"
fi

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/profind-cli.sh (reported line 151)May include surrounding context.

sh
```bash
if [ -d "/Applications/ProFind.app" ]; then
    echo "ProFind 已安装: $(defaults read /Applications/ProFind.app/Contents/Info.plist CFBundleShortVersionString 2>/dev/null)"
else
    echo "ProFind 未安装,请从 App Store 下载:https://apps.apple.com/app/id1559203395"
fi

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This section enables arbitrary shell/AppleScript hooks over user-selected files, including examples that rename files and invoke external applications. In context, a search skill should not implicitly become a bulk file-operation executor, because that allows destructive or stealthy post-processing on broad file sets returned by searches.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The sample shell hook performs bulk file renaming directly on every provided path with no backup, preview, or conflict handling. In a search-driven workflow, broad matches can cause unintended widespread modifications to user files.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation describes exposing search results through a local HTTP/UPnP media server but does not give a clear privacy warning. Search results and metadata may contain sensitive filenames, paths, or content-derived information that users would not expect to be queryable through a service.

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 · SKILL.md (reported line 329)May include surrounding context.

md
PORT=54812

# ① 获取搜索能力
curl -s --max-time 10 -X POST "http://localhost:$PORT/ContentDirectory/control" \
  -H "Content-Type: text/xml; charset=utf-8" \
  -H 'SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#GetSearchCapabilities"' \
  -d '<?xml version="1.0" encoding="utf-8"?>

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation suggests batch deletion via 'Move To Trash' after a search without emphasizing review, confirmation, or dry-run safeguards. Because search queries can match many files, this can lead to accidental mass deletion of user data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file's natural-language content is entirely in Chinese, and there is no indication that the skill is region-specific or that users can choose another language. Under the stated policy, forcing a specific language without opt-in or justification is a language/locale policy violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest describes a macOS file search skill focused on indexed search, content search, filtering, and batch operations. This documentation adds a separate HTTP-based media server interface using UPnP/DLNA SOAP, which is a distinct service exposure and not an obvious implementation detail of local file search.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

A file-search skill would reasonably document local search invocation methods such as URL schemes, AppleScript, or shell wrappers. Publishing an HTTP endpoint for ContentDirectory search/browse over UPnP/DLNA introduces a network-style service capability that is not justified by the manifest's stated purpose of macOS file search.

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 · README.md (reported line 142)May include surrounding context.

GetSearchCapabilities

bash
curl -s --max-time 10 -X POST "http://localhost:54812/ContentDirectory/control" \
  -H "Content-Type: text/xml; charset=utf-8" \
  -H 'SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#GetSearchCapabilities"' \
  -d '<?xml version="1.0" encoding="utf-8"?>

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 · docs/API-REFERENCE.md (reported line 107)May include surrounding context.

GetSearchCapabilities

bash
curl -s --max-time 10 -X POST "http://localhost:54812/ContentDirectory/control" \
  -H "Content-Type: text/xml; charset=utf-8" \
  -H 'SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#GetSearchCapabilities"' \
  -d '<?xml version="1.0" encoding="utf-8"?>

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

技能清单将 ProFind 描述为 macOS 文件搜索技能,强调索引搜索、全文检索、筛选和批量操作,但该文档列出的内置脚本还包括将文件移至废纸篓、发送邮件、在外部应用中打开文件、朗读路径以及用 DuckDuckGo 搜索文件名等行为。这些能力不属于搜索本身,且引入了文件处置、跨应用自动化和外部查询等更广泛操作,与“文件搜索技能”的核心描述存在语义偏移。

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

文档中的自定义脚本示例允许批量重命名文件、通过 AppleScript 控制 Mail 和 System Events、以及通过 do shell script 调用系统命令打开 VS Code。这些能力属于通用自动化和文件操作框架,不是“文件搜索”这一 stated purpose 的直接且显然必要组成部分。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The batch rename example performs in-place modification of every selected file without any warning, dry-run mode, collision handling, or confirmation. In a file-search tool context where users may act on many results at once, this can cause unintended bulk changes or data loss if names collide or the selection is broader than expected.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The email example collects selected file paths and prepares them for sending via Mail without warning that paths may contain sensitive personal, project, customer, or system information. In the context of a desktop search tool, selected results may span confidential locations, making path disclosure a realistic privacy leak even if file contents are not attached.

Content

No source excerpt is available for this finding.