T09 · Insecure Skill Coding Practices
- Location
scripts/check_rank.py:87- Finding
Unbounded Pagination Can Exhaust API Quota and Resources
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does what it claims: it checks Google ranking through ValueSERP using a disclosed API key, with some quota and accuracy caveats.
Install this only if you intend to use a ValueSERP account for SEO ranking checks. Keep the API key limited to that service, use modest page counts to avoid quota or cost surprises, and specify country/language when Colombia Spanish is not the intended market.
scripts/check_rank.py:87Unbounded Pagination Can Exhaust API Quota and Resources
scripts/check_rank.py:55Substring-Based Domain Comparison Produces False Ranking Matches
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def fetch_json(url: str) -> dict:
with urllib.request.urlopen(url, timeout=30) as response:
return json.loads(response.read().decode())
La skill requiere acceso a red y a una variable de entorno sensible (VALUESERP_API_KEY), pero no declara explícitamente el alcance de herramientas o permisos permitidos. Esa omisión debilita el principio de mínimo privilegio y dificulta la revisión de seguridad, porque un ejecutor podría conceder capacidades más amplias de las necesarias sin una política visible en el manifiesto.
La descripción de activación incluye frases amplias como 'o cualquier consulta sobre posicionamiento SEO de un dominio en Google', lo que puede hacer que la skill se invoque en contextos no específicos o ambiguos. Esto aumenta el riesgo de ejecución innecesaria con acceso a red y secretos, además de enviar consultas a un tercero cuando quizá no era la intención exacta del usuario.
La skill fuerza por defecto Google Colombia (gl=co) y español (hl=es) sin consentimiento explícito del usuario. Aunque no es una vulnerabilidad severa por sí sola, puede provocar resultados engañosos, fuga innecesaria de contexto regional al proveedor externo y decisiones erróneas si el usuario esperaba otra geografía o idioma.
The function signature hard-codes hl='es', and the CLI help also presents Spanish as the default language. This creates a language/locale policy issue because the skill defaults to a specific language rather than offering a neutral default or requiring explicit user choice, and no region-specific justification is documented.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def check_rank(keyword: str, domain: str, api_key: str, gl: str = "co", hl: str = "es", max_pages: int = 10):
base_url = "https://api.valueserp.com/search"
results_per_page = 10
for page in range(1, max_pages + 1):