Back to skill

Security audit

blog-publish

Security checks for vulnerabilities and agentic risk

Overview

This blog publishing skill mostly does what it says, but its helper script unnecessarily reads credential-like values even though the API is documented as unauthenticated.

Install only if you are comfortable with a blog API management tool that can create, update, upload, and delete content on the configured server. Before use, verify BLOG_PUBLISH_BASE_URL points to the intended host, avoid placing BLOG_PUBLISH_* secrets in the environment or .project-info, and treat --hard deletion and file uploads as irreversible or externally visible actions.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/blog-publish.py:39
Finding

Unnecessary Discovery and Loading of Authentication Secrets

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Unbounded and Unhashed Third-Party Dependency

Content
View full analysis
=2.20.0 ``` ### Technical Analysis The dependency declaration specifies only a very old minimum version. It has no exact version pin, upper bound, lock file, or package hash. Consequently, separate installations may resolve to different `requests` releases and transitive dependency versions. This prevents reproducible builds and means future, unreviewed package versions can enter the execution environment automatically. The observed package name is legitimate, and no evidence of dependency confusion, typosquatting, or a currently malicious release was found. The risk arises from unconstrained future resolution and missing artifact integrity verification. ### Attack Path 1. A user or build system installs the dependencies from `requirements.txt`. 2. The package resolver queries the configured package index. 3. It selects any available `requests` version satisfying `>=2.20.0`, along with resolver-selected transitive dependencies. 4. A compromised package-index account, compromised distribution artifact, unsafe mirror, or problematic future release could be selected without a repository change. 5. The selected dependency executes in the application process when `requests` is imported and used. This path requires compromise or malicious influence over the selected package source or a subsequently released dependency version; the repository itself does not contain evidence of such a compromise. ### Impact Assessment A malicious dependency would execute with the same operating-system permissions as the Skill process. Depending on the runtime environment, this could permit access to process environment variables, readable files, API responses, and outbound network connectivity. The current repository does not establish that such ...[truncated 173 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (33)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/blog-publish.py health-check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/blog-publish.py health-check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/blog-publish.py health-check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/blog-publish.py health-check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/blog-publish.py health-check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/blog-publish.py health-check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/blog-publish.py health-check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/blog-publish.py health-check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/blog-publish.py health-check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/blog-publish.py health-check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/blog-publish.py health-check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/blog-publish.py health-check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/blog-publish.py health-check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/blog-publish.py health-check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/blog-publish.py health-check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/blog-publish.py health-check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/blog-publish.py health-check

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
95% confidence
Finding

The code iterates over all environment variables and extracts credential-like values based on naming patterns, despite the skill not requiring authentication. In an agent environment, broad env inspection is especially risky because tokens and secrets for unrelated systems may coexist in the same process, making this unnecessary secret harvesting behavior more dangerous than in a standalone CLI.

Content

Scanner excerpt · scripts/blog-publish.py (reported line 50)May include surrounding context.

python
"""
    creds = {}
    creds.update(_load_from_project_knowledge())
    for k, v in os.environ.items():
        u = k.upper()
        if u.startswith(_CRED_PREFIX):
            if 'BASE_URL' in u:

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/blog-publish.py (reported line 247)May include surrounding context.

python
def cmd_delete_article(args):
    """能力 F:删除文章(默认软删除,--hard 硬删除不可恢复)"""
    # DELETE /api/articles/{id}?soft=true|false
    soft = 'false' if args.hard else 'true'
    return _api_request('DELETE', f'/api/articles/{args.id}', params={'soft': soft})

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill invokes network access, environment-variable access, and local file reads, but it does not declare an explicit tool scope such as permissions or allowed-tools. That omission weakens containment and reviewability: an agent may use broader capabilities than a caller expects, including reading configuration from .project-info/ and transmitting content to a remote API.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
81% confidence
Finding

The skill is designed to send data to an external service via curl and Python HTTP calls. In context this is expected functionality, but it is still a real exfiltration surface because the target base_url can be sourced from environment, project files, or user/context input, allowing content, metadata, and uploaded files to be transmitted to an arbitrary host if that value is malicious or misconfigured.

Content

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

1. 检查 API 可达性

bash
# curl
curl -s --max-time 30 {base_url}/health
# Expected: {"status":"ok","service":"blog-api","version":"1.0.0"}

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file describes hard deletion of articles (soft=false) and file upload/list/delete operations, which can affect user data and system integrity. Although the hard delete is marked as unrecoverable, the document does not provide an explicit overall warning about destructive actions, uploaded file visibility, or privacy implications of exposing uploaded content through listing endpoints.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill advertises and configures itself as an unauthenticated public API client, but it still recursively reads .project-info JSON files and scans environment variables for credentials-like values. Even though those secrets are not currently sent as auth, this unnecessary secret discovery expands the skill’s access to local sensitive data and creates latent exfiltration risk if the code is later modified or if values are exposed through errors/logging.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The credential-loading comments and docstrings claim authentication handling and interactive credential input, but the implementation uses only base_url because auth type is set to none. This mismatch is dangerous because it normalizes unnecessary secret collection behavior and can mislead users or future maintainers into supplying sensitive credentials the tool does not need.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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 · scripts/blog-publish.py (reported line 150)May include surrounding context.

python
if method == 'GET':
            resp = requests.get(url, params=params, timeout=30, **auth_kwargs)
        elif method == 'POST':
            resp = requests.post(url, json=payload, files=files, timeout=30, **auth_kwargs)
        elif method == 'PUT':
            resp = requests.put(url, json=payload, files=files, timeout=30, **auth_kwargs)
        elif method == 'PATCH':