Back to skill

Security audit

TSE Eleições

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Python client for public Brazilian election APIs, with expected network access and ordinary dependency hygiene caveats.

Install it in a virtual environment, expect outbound requests to TSE and CKAN public API domains, and consider pinning or locking dependencies before use in CI or production.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (20)

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill clearly instructs users to clone, install, and run Python code that makes outbound HTTP requests to TSE and CKAN endpoints, but the manifest does not declare any explicit tool scope such as network permissions. This weakens security review and policy enforcement because consumers cannot easily see or constrain the skill's external connectivity, increasing the chance of unintended or over-broad network use.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The module docstring and all user-facing print messages are written in Portuguese, which imposes a specific language on users without any opt-in or alternative locale handling. This matches the policy category for language or locale constraints that are not user-selectable or explicitly justified as region-specific.

Unverifiable Dependency: setuptools has 10 known advisory(ies) (CVE-2013-1633 (Setuptools vulnerable to Man-in-the-middle attacks); CVE-2025-47273 (setuptools has a path traversal vulnerability in PackageIndex.download that lead); CVE-2024-6345 (setuptools vulnerable to Command Injection via package URL) +7 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Unverifiable Dependency: wheel has 4 known advisory(ies) (CVE-2026-24049 (Wheel Affected by Arbitrary File Permission Modification via Path Traversal in w); CVE-2022-40898 (pypa/wheel vulnerable to Regular Expression denial of service (ReDoS)); CVE-2022-40898 (An issue discovered in Python Packaging Authority (PyPA) Wheel 0.37.1 and earlie) +1 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Unverifiable Dependency: httpx has 2 known advisory(ies) (CVE-2021-41945 (Improper Input Validation in httpx); CVE-2021-41945 (Encode OSS httpx <=1.0.0.beta0 is affected by improper input validation in `http)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Unverifiable Dependency: pytest has 2 known advisory(ies) (CVE-2025-71176 (pytest has vulnerable tmpdir handling); CVE-2025-71176 (pytest has vulnerable tmpdir handling)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Natural-Language Policy Violations

Low
Confidence
85% confidence
Finding
This reference file presents all user-facing natural language content in Portuguese and does not mention any user opt-in, alternative language, or region-specific requirement. Under the policy rule for language or locale constraints, forcing a specific language without user choice can be a natural-language policy violation.

Unpinned Dependencies

Low
Category
Supply Chain
Content
-r requirements.txt
pytest>=8.0.0
pytest-asyncio>=0.23.0
pytest-cov>=4.1.0
pytest-mock>=3.12.0
Confidence
93% confidence
Finding
The development dependency on pytest is specified with a lower bound only, which allows future versions to be installed without review and makes builds non-reproducible. This creates supply-chain risk and uncertainty around whether vulnerable or breaking releases may be pulled into CI or local developer environments.

Unverifiable Dependency: pytest has 2 known advisory(ies) (CVE-2025-71176 (pytest has vulnerable tmpdir handling); CVE-2025-71176 (pytest has vulnerable tmpdir handling)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
81% confidence
Finding
pytest has known advisories, and because the manifest does not pin an exact version, it is impossible to verify whether the installed version is affected. In practice, this means vulnerable releases could be selected during installation, especially in CI or fresh developer setups.

Unpinned Dependencies

Low
Category
Supply Chain
Content
-r requirements.txt
pytest>=8.0.0
pytest-asyncio>=0.23.0
pytest-cov>=4.1.0
pytest-mock>=3.12.0
black>=24.0.0
Confidence
92% confidence
Finding
pytest-asyncio is unpinned, so dependency resolution may select different versions over time, reducing reproducibility and increasing exposure to newly introduced malicious or vulnerable releases. Even though it is a dev-only package, it can still affect CI pipelines and contributor machines.

Unpinned Dependencies

Low
Category
Supply Chain
Content
-r requirements.txt
pytest>=8.0.0
pytest-asyncio>=0.23.0
pytest-cov>=4.1.0
pytest-mock>=3.12.0
black>=24.0.0
mypy>=1.8.0
Confidence
92% confidence
Finding
pytest-cov is declared with only a minimum version, which permits unreviewed future releases to be installed. This is a supply-chain hygiene issue because non-deterministic dependency resolution can introduce vulnerable or compromised packages into development workflows.

Unpinned Dependencies

Low
Category
Supply Chain
Content
pytest>=8.0.0
pytest-asyncio>=0.23.0
pytest-cov>=4.1.0
pytest-mock>=3.12.0
black>=24.0.0
mypy>=1.8.0
ruff>=0.2.0
Confidence
92% confidence
Finding
The pytest-mock dependency is not pinned to a specific version, so builds may resolve to different releases over time. This increases supply-chain exposure and can destabilize testing or CI if a problematic release is published.

Unpinned Dependencies

Low
Category
Supply Chain
Content
pytest-asyncio>=0.23.0
pytest-cov>=4.1.0
pytest-mock>=3.12.0
black>=24.0.0
mypy>=1.8.0
ruff>=0.2.0
Confidence
95% confidence
Finding
black is unpinned, which is especially relevant because formatter tooling runs in developer and CI contexts and may process repository content automatically. Allowing arbitrary newer versions increases the chance of pulling a vulnerable or compromised release and makes it harder to determine exposure to known advisories.

Unverifiable Dependency: black has 5 known advisory(ies) (CVE-2026-32274 (Black: Arbitrary file writes from unsanitized user input in cache file name); CVE-2024-21503 (Black vulnerable to Regular Expression Denial of Service (ReDoS)); CVE-2024-21503 (Versions of the package black before 24.3.0 are vulnerable to Regular Expression) +2 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
88% confidence
Finding
black has multiple known advisories and is not pinned, so the project cannot demonstrate that installations avoid affected versions. Because formatter tools may run automatically in CI or on developer machines and touch repository files, uncertainty around the resolved version creates a real but low-severity toolchain risk.

Unpinned Dependencies

Low
Category
Supply Chain
Content
pytest-cov>=4.1.0
pytest-mock>=3.12.0
black>=24.0.0
mypy>=1.8.0
ruff>=0.2.0
Confidence
91% confidence
Finding
mypy is specified with a lower-bound constraint only, so future versions may be installed automatically without compatibility or security review. While primarily a development tool, compromise or breakage in static-analysis tooling can still affect CI trust and contributor environments.

Unpinned Dependencies

Low
Category
Supply Chain
Content
pytest-mock>=3.12.0
black>=24.0.0
mypy>=1.8.0
ruff>=0.2.0
Confidence
91% confidence
Finding
ruff is unpinned, which introduces non-deterministic dependency resolution and avoidable supply-chain risk in developer and CI environments. Security and operational exposure are lower than for runtime dependencies, but compromised tooling can still impact code review and automated workflows.

Unpinned Dependencies

Low
Category
Supply Chain
Content
httpx>=0.27.0
Confidence
96% confidence
Finding
The dependency is specified as `httpx>=0.27.0` without an upper bound or exact pin, which makes builds non-reproducible and allows future dependency resolution to pull in unexpected versions. This increases supply-chain and stability risk because a later vulnerable or breaking release could be installed without review.

Unverifiable Dependency: httpx has 2 known advisory(ies) (CVE-2021-41945 (Improper Input Validation in httpx); CVE-2021-41945 (Encode OSS httpx <=1.0.0.beta0 is affected by improper input validation in `http)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
87% confidence
Finding
Because the manifest does not pin `httpx`, it is not possible to verify at analysis time whether deployment will resolve to a version affected by known advisories. In a network client library, consuming an unverified version can expose the skill to known dependency flaws if an older or otherwise affected release is installed in some environments.

Natural-Language Policy Violations

Low
Confidence
79% confidence
Finding
The module docstring is written as 'Testes unitários para tse_client.', and the file consistently uses Portuguese-only natural-language strings in docstrings and test descriptions. Under the stated policy, forcing a specific language without offering user choice can be a locale/language policy violation.

Missing User Warnings

Low
Confidence
82% confidence
Finding
This code file performs outbound network calls via httpx to external TSE endpoints and may send user-supplied values such as search terms, election IDs, municipality codes, or candidate identifiers as request paths or query parameters. While the module purpose implies API access, the file itself does not include any explicit user-facing warning, print/log disclosure at the call sites, or comment/docstring noting that supplied inputs will be transmitted to external services.

Static analysis

No suspicious patterns detected.