Back to skill

Security audit

improve-skill-with-best-practices

Security checks for vulnerabilities and agentic risk

Overview

The skill’s goal is coherent, but its credential handling and live-site fetching need review before installation.

Install only if you are comfortable giving the skill read access to your website analytics/search data and storing local reports and credentials. Use least-privilege read-only accounts, avoid untrusted .env files, restrict file permissions on the data directory, review sitemap-audit targets before running with --sitemap, and prefer pinned dependencies or a lockfile.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/seo_audit.py:183
Finding

Sitemap-Driven Server-Side Request Forgery Across Audit Scripts

Content
View full analysis
list[str]: """Parse sitemap.xml and return all URLs. Handles sitemap index files.""" resp = safe_fetch(sitemap_url) if not resp or resp.status_code != 200: return [] content = resp.text urls = [] # Check if it's a sitemap index if "\s*(.*?)\s*', content) for sub_url in sub_sitemaps: sub_resp = safe_fetch(sub_url) if sub_resp and sub_resp.status_code == 200: urls.extend(re.findall(r'\s*(.*?)\s*', sub_resp.text)) else: urls = re.findall(r'\s*(.*?)\s*', content) return urls ``` The corresponding fetch implementation at `scripts/seo_audit.py:52-59` is: ```python def fetch(url: str, *, follow_redirects: bool = True) -> requests.Response: """Fetch a URL with standard headers.""" return requests.get( url, headers={"User-Agent": USER_AGENT, "Accept-Encoding": "gzip, br"}, timeout=REQUEST_TIMEOUT, allow_redirects=follow_redirects, ) ``` `scripts/geo_audit.py:67-84`: ```python def fetch(url: str) -> requests.Response: return requests.get( url, headers={"User-Agent": USER_AGENT, "Accept-Encoding": "gzip, br"}, timeout=REQUEST_TIMEOUT, allow_redirects=True, ) def safe_fetch(url: str) -> requests.Response | None: try: return fetch(url) except Exception as exc: print(f" ⚠️ Failed to fetch {url}: {exc}", file=sys.stderr) return None ``` `scripts/perf_audit.py:54 ...[truncated 3560 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:248
Finding

Documented Shell Sourcing of .env Enables Arbitrary Command Execution

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/pyproject.toml:6
Finding

Unpinned Dependencies and Missing Reproducible Locking

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/utils.py:83
Finding

Ambiguous Automatic Selection of Google Credential Files

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (50)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description promises a higher-level website analysis workflow centered on goals, user journeys, GA4/GSC analysis, live-site auditing, and strategic recommendations. The code instead implements a narrow data extraction utility for Bing Webmaster Tools. While Bing webmaster/search data is adjacent to SEO analysis, this script neither accesses GA4/GSC nor performs auditing, interpretation, gap analysis, or roadmap generation. Its primary purpose and accessed resource are materially different from the declared description, so this is a clear mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description presents a broad website analysis and optimization skill that first understands goals and user journeys, audits the live site, analyzes both GA4 and GSC data, identifies gaps, and produces actionable improvement roadmaps. The supplied code does not implement that broader workflow. It is a focused utility for querying GA4 funnel exploration data through the v1alpha API and returning parsed report output. It does not inspect website content, audit a live site, analyze Search Console, infer business goals, compare intended versus actual behavior beyond raw funnel output, or generate recommendations. While GA4 analysis is part of the declared scope, the actual code is materially narrower and lacks most of the claimed capabilities, so the description does not accurately represent this code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description promises a high-level auditing and advisory skill that combines business-goal discovery, user-journey validation, GA4/GSC analysis, live-site auditing, and recommendation generation. The actual code only implements one narrow subset: querying GA4 reports via the Google Analytics Data API. That is related to part of the declared scope, but the primary described workflow and outputs are not present in this code chunk. There are no capabilities for website crawling/auditing, Search Console integration, goal alignment analysis, or improvement planning. Therefore the code materially underdelivers relative to the declared purpose, making this a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description presents an analytics-and-strategy skill centered on understanding business goals, validating user behavior with GSC/GA4 data, and creating goal-aligned improvement plans. The code instead is a specialized technical crawler for Generative Engine Optimization. It performs HTTP fetches against site files and pages, inspects llms.txt/llms-full.txt, parses robots.txt for AI crawler rules, optionally enumerates URLs from sitemap.xml, and measures content-depth and schema signals. There is no integration with Google Analytics, Search Console, conversion funnels, user journey analysis, or behavior-vs-goals validation. While both relate loosely to website improvement and SEO, the primary purpose and concrete capabilities are materially different, so this is a clear mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared purpose describes a higher-level analytical auditing skill that combines website goals, user journey evaluation, GSC/GA4 analysis, live-site auditing, and recommendation generation. The supplied code does not implement that workflow. It only provides low-level read-only extraction from Google Search Console via three modes: search analytics query, sitemap listing, and URL inspection, and emits JSON. While GSC data access is one component of the declared description, the primary behavior here is data retrieval rather than diagnosis, auditing, validation against goals, or planning. It also lacks any GA4 integration. Additionally, sitemap listing and URL inspection are concrete capabilities present in code but not reflected in the declared description. Therefore the description materially overstates and misrepresents what this code chunk actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description centers on business/behavioral and analytics-driven diagnosis: understanding goals and user journeys first, then analyzing GA4/GSC data and auditing the live site to compare intended versus actual user behavior. The supplied code does not do any of that. It is a standalone performance/security audit script focused on HTTP requests, page timing, compression, HTML size, redirects, HTTPS/TLS, security headers, cache-control, sitemap enumeration, and CDN detection. While a live-site audit can be loosely related to website improvement, here the primary purpose is materially different: technical performance and security inspection, not analytics or user-journey validation. This is a substantive description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The description promises a broader diagnostic workflow centered on business goals, user journeys, and behavioral validation using GA4/GSC data. The supplied code does none of that: it is a standalone technical SEO audit script for live pages and sitemap resources. It performs HTTP fetches of site content and evaluates structural/on-page SEO checks only. While this partially overlaps with the 'audit website performance/search rankings' theme, the core declared capabilities around analytics data analysis and user-behavior validation are absent, making this a material description-behavior mismatch.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs collection and persistent storage of analytics exports, screenshots, logs, and service account keys, but provides no explicit privacy notice, retention policy, masking guidance, or consent checkpoint. Because GA4/GSC exports and screenshots may contain sensitive business data, URLs, query terms, and potentially user-related information, storing them by default increases the risk of data exposure and misuse.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

The skill normalizes storing authentication material in .env and service account keys in a local configs directory, with scripts auto-loading them. This creates a credential-access pattern that increases the chance of accidental disclosure through logs, reports, shell history, misconfigured permissions, or inclusion in analysis artifacts and backups.

Content

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

text
<project_root>/.skills-data/google-analytics-and-search-improve/
  .env        # Configuration (auth, URLs, etc.), auto-loaded by scripts
  data/       # Raw data only: API responses, user-uploaded CSVs (GSC/GA4/PSI JSON/CSV)
  analysis/   # Analysis outputs: reports, audit results, website profile, funnel analysis
  charts/     # Generated chart images (PNG) for embedding in analysis reports

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

Sourcing .env directly into the shell environment exposes all contained secrets to any subsequently executed commands and child processes in that session. In a skill that also runs multiple Python scripts and writes logs and outputs, this broad propagation materially raises the risk of credential leakage or unintended reuse.

Content

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

bash
source "$DATA_DIR/venv/bin/activate"
set -a; source "$DATA_DIR/.env"; set +a
python scripts/seo_audit.py --url "$SITE_URL" --sitemap -o "$DATA_DIR/analysis/seo_audit.json"
python scripts/geo_audit.py --url "$SITE_URL" --sitemap -o "$DATA_DIR/analysis/geo_audit.json"
python scripts/perf_audit.py --url "$SITE_URL" --sitemap -o "$DATA_DIR/analysis/perf_audit.json"

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

The reference documentation explicitly centers .env-based auth setup for multiple third-party services, reinforcing a pattern of broad secret distribution across the skill workflow. While this line is documentation rather than executable logic, it encourages insecure credential handling practices that can lead to compromise in real deployments.

Content

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

md
| Document | Contents |
|----------|----------|
| [references/data-collection-reference.md](references/data-collection-reference.md) | Auth setup (GSC/GA4/Bing), .env configuration, collection commands, script usage (gsc_query.py, ga4_query.py, ga4_funnel.py, bing_query.py), dimensions & metrics, CSV export instructions, custom queries, PSI collection |
| [references/metrics-glossary.md](references/metrics-glossary.md) | Six analysis dimensions: thresholds, diagnostics, priority matrix |
| [references/SEO-GEO-Optimization-Checklist.md](references/SEO-GEO-Optimization-Checklist.md) | SEO & GEO optimization checklist: structured data, AI readability, content depth, performance |
| [references/data-visualization-guide.md](references/data-visualization-guide.md) | Chart generation patterns, type selection, per-phase chart requirements, CJK font support |

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

Writing credentials and operational parameters into .env creates a credential exposure risk because .env files are commonly read by tooling, left on disk, or accidentally committed. In this skill's context, the file may contain API keys and site-related configuration that facilitate broader access if obtained.

Content

Scanner excerpt · references/data-collection-reference.md (reported line 70)May include surrounding context.

  1. In the Google Analytics Admin page, click "Property Settings" (or "Property Details") under "Property"
  2. The "Property ID" is displayed in the top-right — a numeric string (e.g., 123456789, no "UA-" prefix)

Step 8: Write to .env

bash
cat > "$DATA_DIR/.env" <<EOF

Credential Access

High
Category
Privilege Escalation
Confidence
88% confidence
Finding

This specific line references writing GA4 property configuration to .env, but GA4_PROPERTY_ID and site URLs are identifiers rather than secrets by themselves. Still, bundling them into the same plaintext credential file alongside actual secrets normalizes insecure storage practices and may aid an attacker when combined with stolen keys.

Content

Scanner excerpt · references/data-collection-reference.md (reported line 73)May include surrounding context.

Step 8: Write to .env

bash
cat > "$DATA_DIR/.env" <<EOF
SITE_URL=provided by user
GSC_SITE_URL=provided by user (note sc-domain: or https:// format)
GA4_PROPERTY_ID=provided by user

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 · scripts/bing_query.py (reported line 14)May include surrounding context.

python
Centralizes:
- Data directory discovery (.skills-data/google-analytics-and-search-improve/)
- .env loading
- Google Service Account credential auto-discovery
- Warning suppression for clean output
"""

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 · scripts/bing_query.py (reported line 24)May include surrounding context.

python
Centralizes:
- Data directory discovery (.skills-data/google-analytics-and-search-improve/)
- .env loading
- Google Service Account credential auto-discovery
- Warning suppression for clean output
"""

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 · scripts/ga4_funnel.py (reported line 31)May include surrounding context.

python
Centralizes:
- Data directory discovery (.skills-data/google-analytics-and-search-improve/)
- .env loading
- Google Service Account credential auto-discovery
- Warning suppression for clean output
"""

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 · scripts/ga4_query.py (reported line 16)May include surrounding context.

python
Centralizes:
- Data directory discovery (.skills-data/google-analytics-and-search-improve/)
- .env loading
- Google Service Account credential auto-discovery
- Warning suppression for clean output
"""

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 · scripts/geo_audit.py (reported line 22)May include surrounding context.

python
Centralizes:
- Data directory discovery (.skills-data/google-analytics-and-search-improve/)
- .env loading
- Google Service Account credential auto-discovery
- Warning suppression for clean output
"""

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 · scripts/geo_audit.py (reported line 35)May include surrounding context.

python
Centralizes:
- Data directory discovery (.skills-data/google-analytics-and-search-improve/)
- .env loading
- Google Service Account credential auto-discovery
- Warning suppression for clean output
"""

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 · scripts/gsc_query.py (reported line 13)May include surrounding context.

python
Centralizes:
- Data directory discovery (.skills-data/google-analytics-and-search-improve/)
- .env loading
- Google Service Account credential auto-discovery
- Warning suppression for clean output
"""

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 · scripts/perf_audit.py (reported line 22)May include surrounding context.

python
Centralizes:
- Data directory discovery (.skills-data/google-analytics-and-search-improve/)
- .env loading
- Google Service Account credential auto-discovery
- Warning suppression for clean output
"""

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 · scripts/perf_audit.py (reported line 36)May include surrounding context.

python
Centralizes:
- Data directory discovery (.skills-data/google-analytics-and-search-improve/)
- .env loading
- Google Service Account credential auto-discovery
- Warning suppression for clean output
"""

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 · scripts/seo_audit.py (reported line 19)May include surrounding context.

python
Centralizes:
- Data directory discovery (.skills-data/google-analytics-and-search-improve/)
- .env loading
- Google Service Account credential auto-discovery
- Warning suppression for clean output
"""

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 · scripts/seo_audit.py (reported line 33)May include surrounding context.

python
Centralizes:
- Data directory discovery (.skills-data/google-analytics-and-search-improve/)
- .env loading
- Google Service Account credential auto-discovery
- Warning suppression for clean output
"""

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 · scripts/utils.py (reported line 5)May include surrounding context.

python
Centralizes:
- Data directory discovery (.skills-data/google-analytics-and-search-improve/)
- .env loading
- Google Service Account credential auto-discovery
- Warning suppression for clean output
"""

Static analysis

No suspicious patterns detected.