Back to skill

Security audit

疯信子AI资讯

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly aligned with generating AI news, but it uploads content and credentials to a separately named API host and offers recurring unattended execution without enough scoping or safeguards.

Review this skill before installing. Use it only if you intentionally want generated reports uploaded to a third-party note service, verify that openapi.biji.com is an official GetNote API endpoint for credentials from open.getnote.cn, avoid enabling the cron job until you understand how to remove it, and prefer scoped or disposable API credentials. Treat the current script as incomplete for actual AI-news analysis because it uploads a template rather than a finished report.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

other

Error
Location
scripts/generate.sh:94
Finding

Credentials and note content are transmitted to an undeclared API domain

Content
View full analysis

Vulnerability Details

File Location: scripts/generate.sh:94-99 and SKILL.md:118-123
Vulnerability Type: Credential disclosure to an insufficiently verified external endpoint
Risk Level: Critical

Complete Code Snippet

Credential acquisition instructions in SKILL.md:

markdown
**Get Notes**:
1. Visit https://open.getnote.cn/
2. Log in and enter the developer center
3. Create an application to obtain an API Key and Client ID

Transmission logic in scripts/generate.sh:

bash
RESULT=$(curl -s -X POST "https://openapi.biji.com/open/api/v1/resource/note/save" \
  -H "Authorization: ${GETNOTE_KEY}" \
  -H "X-Client-ID: ${GETNOTE_CLIENT}" \
  -H "Content-Type: application/json" \
  -d "{\"note_type\":\"plain_text\",\"title\":\"${NOTE_TITLE}\",\"content\":${JSON_CONTENT},\"tags\":[\"AI\",\"资讯\",\"每日汇总\"]}")

Technical Analysis

The documentation directs users to obtain credentials from open.getnote.cn, while the executable script sends those credentials to openapi.biji.com. The project does not document or verify a relationship between these differently named domains.

Both the API key and client ID are placed in HTTP headers, and the generated note title and content are included in the request body. HTTPS protects data in transit but does not establish that the destination is an authorized recipient. Consequently, running the script requires trusting an endpoint that was not disclosed in the credential setup procedure.

Although network submission is necessary to save a remote note, transmitting credentials to an unexplained domain exceeds the minimum safely disclosed behavior.

Attack Path

  1. A user follows SKILL.md and obtains credentials through open.getnote.cn.
  2. The user exports the credentials as GETNOTE_API_KEY and GETNOTE_CLIENT_ID.
  3. The user executes scripts/generate.sh.
  4. The script inserts the credentials into the Authorization and `X ...[truncated 977 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace the endpoint with the official API endpoint explicitly documented by the credential issuer.
  2. If openapi.biji.com is legitimate, clearly document and independently verify its ownership and relationship to open.getnote.cn.
  3. Make the endpoint configurable, while enforcing HTTPS and validating the destination against an allowlist of approved hosts.
  4. Request a narrowly scoped credential that permits only the required note-creation operation.
  5. Display the destination host and categories of transmitted data before the first submission.
  6. Add connection timeouts, certificate validation requirements, and explicit error handling to the curl invocation.
  7. Revoke and rotate credentials previously used with the script if the destination cannot be conclusively verified.

T06 · System Persistence

Error
Location
SKILL.md:143
Finding

Optional cron configuration creates recurring cross-session execution

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:143-149
Vulnerability Type: Scheduled persistence
Risk Level: High

Complete Code Snippet

bash
# Add to crontab
crontab -e

# Execute every day at 8:00
0 8 * * * /path/to/ai-news-generator/scripts/generate.sh >> /path/to/logs/ai-news.log 2>&1

Technical Analysis

The documentation instructs the user to register the script as a daily cron task. This survives the original skill invocation and causes recurring unattended execution across sessions.

Scheduling is relevant to the declared daily-news functionality and requires explicit user action, so the mechanism is not concealed. Nevertheless, persistence is not necessary for one-shot report generation, and the instructions do not provide an uninstall procedure, security prerequisites, or controls for the execution environment.

The impact is amplified by the script's external credential transmission: every scheduled run attempts to send credentials and generated content to the API destination. Cron may also execute with a limited or unexpected environment, making credential handling and dependency resolution unreliable.

Attack Path

  1. A user follows the scheduling instructions and edits their crontab.
  2. The cron entry persists after the initial terminal or agent session ends.
  3. At 08:00 every day, the script runs without further confirmation.
  4. Each invocation performs searches, accesses configured credentials, writes files, and attempts an external API request.
  5. If the script or any dependency at the referenced path is subsequently modified, the modified code is executed automatically on the next scheduled run.
  6. Execution continues until the user manually removes the cron entry.

Impact Assessment

The cron job obtains the permissions of the user who installed it. It can access that user's environment, files, commands, and API credentials to the extent available in the cron ...[truncated 354 chars]

Remediation
View remediation

Remediation Suggestions

  1. Clearly label scheduling as optional and separate it from the minimum setup procedure.
  2. Require successful endpoint verification and a manual one-shot test before enabling automation.
  3. Provide an exact removal command, such as instructions to delete the corresponding entry with crontab -e.
  4. Use an absolute, user-owned, non-world-writable script path and verify ownership and permissions before installation.
  5. Run with a minimal environment and narrowly scoped credentials stored in an appropriately protected credential facility.
  6. Add a wrapper that uses a lock file to prevent overlapping runs and that records only non-sensitive status information.
  7. Consider a user-level timer with explicit enable, disable, status, and logging controls instead of an undocumented persistent cron entry.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:90
Finding

Unpinned package is installed globally from a mutable registry source

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:90-97
Vulnerability Type: Unpinned global third-party dependency
Risk Level: Medium

Complete Code Snippet

bash
# Install search tool
npm install -g ddgs

# Or use pnpm
pnpm add -g ddgs

Technical Analysis

The setup instructions install the latest registry version of ddgs globally without a version constraint, lockfile, integrity hash, or documented publisher verification. Package resolution can therefore change after the skill has been reviewed.

npm-compatible packages may execute lifecycle scripts during installation. A malicious or compromised package release could consequently run code with the permissions of the user performing the installation. Global installation also exposes the command broadly in the user's environment and can affect unrelated projects.

The audit did not establish that the named package is currently malicious. The vulnerability is the mutable and insufficiently verified supply-chain installation process.

Attack Path

  1. An attacker compromises the package, publisher account, or relevant registry distribution path.
  2. The attacker publishes a malicious version under the package name used by the documentation.
  3. A user executes npm install -g ddgs or pnpm add -g ddgs.
  4. The package manager resolves the attacker-controlled release because no reviewed version is pinned.
  5. Package lifecycle code executes with the installing user's privileges.
  6. The installed global executable remains available to future invocations and may access user files, environment variables, and network resources.

Impact Assessment

A compromised dependency can execute arbitrary code with the installing user's privileges. This may permit access to user-readable files and credentials, modification of user-owned files, network communication, and replacement or spoofing of the globally installed search command. Root-level impa ...[truncated 155 chars]

Remediation
View remediation

Remediation Suggestions

  1. Verify that the package name and publisher are the intended official distribution.
  2. Pin a reviewed exact version rather than resolving the latest release.
  3. Record and verify package integrity metadata.
  4. Prefer a project-local dependency with a committed lockfile over global installation.
  5. Disable package lifecycle scripts where practical or inspect them before installation.
  6. Document the expected package version, provenance, hashes, and executable behavior.
  7. Run dependency scanning and update only after reviewing new versions.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate.sh:27
Finding

Predictable shared temporary files permit symlink-based file overwrite or append

Content
View full analysis

Vulnerability Details

File Location: scripts/generate.sh:27-28, scripts/generate.sh:67-86, and scripts/generate.sh:107-113
Vulnerability Type: Unsafe temporary-file handling
Risk Level: Medium

Complete Code Snippet

bash
OUTPUT_FILE="/tmp/ai-news-${DATE}.md"
LOG_FILE="${AI_NEWS_LOG:-/tmp/ai-news.log}"
bash
cat > "$OUTPUT_FILE" << 'TEMPLATE'
# AI资讯

**更新日期**: DATE_PLACEHOLDER

---

## 🔥 行业核弹

### 1. [标题]

**一句话懂它**: [15字以内]

**核心信息提取**:
> * [要点1]
> * [要点2]
> * [要点3]

**博主创作视角**: [解读切入点]

**来源溯源**: [链接]

---

TEMPLATE
bash
if echo "$RESULT" | grep -q '"success":true'; then
    echo "✅ AI资讯已保存到Get笔记"
    echo "$RESULT" | python3 -c "import json,sys; d=json.load(sys.stdin); print('笔记ID:', d['data']['id'])"
    echo "$(date) - SUCCESS" >> "$LOG_FILE"
else
    echo "❌ 保存失败: $RESULT"
    echo "$(date) - FAILED: $RESULT" >> "$LOG_FILE"
    exit 1
fi

Technical Analysis

The script uses deterministic names in the shared /tmp directory. The output name is predictable from the current date, and the default log name is constant. Shell redirection opens these paths without exclusive creation, ownership verification, or symlink rejection.

On systems where multiple users share /tmp, another local user can create a symbolic link at either expected path before the script runs. The shell follows that link when processing > or >>, causing the script to overwrite or append to another file writable by the victim account.

The failure log also records the complete API response. Depending on the service response, this can expose operational details or sensitive response data through an attacker-selected log target.

Attack Path

  1. A local attacker predicts /tmp/ai-news-YYYY-MM-DD.md or /tmp/ai-news.log.
  2. Before the victim runs the script, the attacker creates a symbolic link from the predictable path to a file writable by the v ...[truncated 927 chars]
Remediation
View remediation

Remediation Suggestions

  1. Set a restrictive file-creation mask at startup with umask 077.
  2. Create a private working directory using mktemp -d.
  3. Store output and logs inside that private directory rather than directly under /tmp.
  4. Install a trap to remove temporary data on normal exit and interruption.
  5. If persistent logs are required, use a private user-owned directory with verified ownership and permissions.
  6. Create files atomically and reject pre-existing files and symbolic links.
  7. Avoid logging complete external API responses; retain only a sanitized status code and non-sensitive error summary.
  8. Validate a user-supplied AI_NEWS_LOG destination before writing to it.
Vulnerability Patterns
  • 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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared purpose focuses on generating AI news, but the skill also persists content to an external note service using stored credentials and does not clearly disclose that behavior as a privileged outbound action. This mismatch is dangerous because users may invoke a seemingly local content-generation skill without realizing it transmits data externally, stores credentials, and may not even enforce the claimed 24-hour filtering or analysis quality.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
88% confidence
Finding

The skill instructs users to create a plaintext .env file containing API credentials in a persistent location under the home directory. While common, this is dangerous because secrets stored on disk can be exposed through backups, accidental disclosure, other local tooling, or overbroad file access by agents and scripts.

Content

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

md
mkdir -p ~/.config/ai-news-generator

# 创建环境变量文件
cat > ~/.config/ai-news-generator/.env << 'EOF'
# Get笔记配置
GETNOTE_API_KEY="your_getnote_api_key"
GETNOTE_CLIENT_ID="your_getnote_client_id"

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

EOF

设置权限

chmod 600 ~/.config/ai-news-generator/.env

text

### 3. 获取API Key

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
97% confidence
Finding

The skill advertises shell-based execution paths such as running bash scripts, installing packages, and configuring cron, but it declares no explicit tool scope or permissions boundaries. This is dangerous because an agent or user may grant overly broad execution implicitly, increasing the chance of unintended command execution, package installation, file writes, or network access without clear consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill states that generated reports are automatically saved to GetNote without prominently warning that content will be sent to an external service. This is dangerous because scraped content, user prompts, or derived summaries may contain sensitive information, and automatic exfiltration can occur without meaningful user awareness or consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The environment setup instructs users to configure persistent GetNote API credentials, but the skill does not clearly warn that those credentials will be used to send generated content to a third-party service. This is dangerous because it normalizes stored credential use without sufficient disclosure, increasing the risk of unnoticed external transmission and misuse of long-lived tokens.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% 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 103)May include surrounding context.

bash
# 创建配置目录
mkdir -p ~/.config/ai-news-generator

# 创建环境变量文件
cat > ~/.config/ai-news-generator/.env << 'EOF'

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

EOF

设置权限

chmod 600 ~/.config/ai-news-generator/.env

text

### 3. 获取API Key

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

The cron setup establishes persistent automated execution that will repeatedly run the skill and potentially continue network collection and external uploads without ongoing user review. This is dangerous because any later change in the script, dependencies, or collected content flow can be amplified into recurring unintended data transmission or abuse.

Content

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

bash
# 添加到crontab
crontab -e

# 每天8点执行
0 8 * * * /path/to/ai-news-generator/scripts/generate.sh >> /path/to/logs/ai-news.log 2>&1

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file includes its descriptive comments and console guidance exclusively in Chinese, such as the script title and configuration/error messages. That creates a language-policy concern because the skill effectively forces a specific language on users without any opt-in or alternative locale support.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The stated skill purpose is to automatically fetch AI hotspots from the last 24 hours. The implemented searches use fixed keyword queries via ddgs without any date restriction, recency filter, or post-processing that limits results to the previous 24 hours.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes automatic collection of the past 24 hours of AI hotspots and generation of a structured deep analysis report. However, the code does not transform search results into analysis content; instead it writes a fixed markdown skeleton with placeholders and then saves that placeholder document to GetNote.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
86% confidence
Finding

The script transmits generated content and authentication headers to an external third-party API. External transmission is expected for this skill, but it still creates a real data-exposure boundary: any sensitive data accidentally included in the note content, logs, or future dynamic inputs would be sent off-host, and the skill does not perform content classification, destination allowlisting beyond a hardcoded URL, or user-confirmation safeguards.

Content

Scanner excerpt · scripts/generate.sh (reported line 103)May include surrounding context.

sh
CONTENT=$(cat "$OUTPUT_FILE")
JSON_CONTENT=$(python3 -c "import json; print(json.dumps('''$CONTENT'''))")

RESULT=$(curl -s -X POST "https://openapi.biji.com/open/api/v1/resource/note/save" \
  -H "Authorization: ${GETNOTE_KEY}" \
  -H "X-Client-ID: ${GETNOTE_CLIENT}" \
  -H "Content-Type: application/json" \

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
75% confidence
Finding

The manifest describes a news-generation/reporting skill focused on fetching and analyzing AI news. Persisting the output to a third-party notes service requires handling API credentials, which is an additional capability not mentioned in the stated purpose.

Content

No source excerpt is available for this finding.