Back to skill

Security audit

Türkiye AFAD Deprem

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its AFAD earthquake-data purpose, but its helper script can be pointed at arbitrary URLs instead of only AFAD, so it needs review before installation.

Install only if you are comfortable with a network-enabled helper script and can ensure it is used with the default AFAD endpoint or constrained by egress policy to deprem.afad.gov.tr. Expect Turkish output and avoid allowing prompts or wrappers to pass custom --source-url values.

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/fetch_afad_earthquakes.py:37
Finding

Unrestricted Source URL Override Enables Server-Side Request Forgery

Content
View full analysis
list[dict[str, Any]]: url = build_url(source_url=source_url, window=window) request = Request( url, headers={ "Accept": "application/json", "User-Agent": "turkiye-afad-deprem-skill/0.1", }, method="GET", ) try: with urlopen(request, timeout=timeout) as response: status = getattr(response, "status", 200) if int(status) >= 400: raise AppError( "HTTP_ERROR", f"AFAD servisi HTTP {status} dondu", exit_code=4, ) ``` ```python # scripts/fetch_afad_earthquakes.py:345-352 if args.fixture: raw_events = load_fixture(args.fixture) else: raw_events = fetch_events( source_url=args.source_url, timeout=args.timeout, window=window, ) ``` ### Technical Analysis The `--source-url` command-line argument is passed directly into `build_url()` and then to `urllib.request.urlopen()` without validating the URL scheme, destination hostname, port, or resolved IP address. The implementation does not restrict requests to the documented AFAD endpoint. Consequently, a caller who can influence invocation arguments can cause the process to issue HTTP GET requests to arbitrary reachable services. Potential destinations include loopback addresses, private network ranges, link-local a ...[truncated 2461 chars]
Remediation
View remediation
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This code emits user-facing error text in Turkish, and the same pattern continues throughout other AppError messages and stderr output. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.