Back to skill

Security audit

Câmara dos Deputados

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly a coherent public-data client for Brazil's Chamber of Deputies, but its HTTP pagination can be redirected outside the official API host.

Review this before installing in environments with access to private internal networks or cloud metadata endpoints. The skill appears intended for public legislative research and does not handle secrets, but the HTTP client should validate pagination and redirect destinations to the official Camara API host, and deployments should use pinned, reviewed dependencies.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
camara_client.py:224
Finding

Unrestricted Pagination and Redirect URLs Permit Server-Side Request Forgery

Content
View full analysis
Remediation
View remediation
str: parsed = urlsplit(url) if parsed.scheme and parsed.scheme != "https": raise CamaraAPIError("Pagination URL must use HTTPS") if parsed.hostname and parsed.hostname != ALLOWED_HOST: raise CamaraAPIError("Pagination URL uses an untrusted host") if parsed.port not in (None, 443): raise CamaraAPIError("Pagination URL uses an unexpected port") if parsed.username is not None or parsed.password is not None: raise CamaraAPIError("Pagination URL must not contain user information") path = parsed.path if parsed.hostname and not path.startswith(ALLOWED_PREFIX): raise CamaraAPIError("Pagination URL is outside the API path") return url ``` Construct the `AsyncClient` with `follow_redirects=False`, inspect redirect responses explicitly, and apply equivalent validation to each `Location` header. ]]>

T08 · Insecure Dependencies

Note
Location
pyproject.toml:1
Finding

Unpinned Third-Party Dependencies Create Supply-Chain Exposure

Content
View full analysis
=68.0", "wheel"] build-backend = "setuptools.build_meta" [project] name = "camara-deputados" version = "1.1.1" description = "Cliente assíncrono para a API de Dados Abertos da Câmara dos Deputados" readme = "README.md" license = "MIT" requires-python = ">=3.11" authors = [{name = "olegantonov"}] keywords = ["câmara", "deputados", "api", "brasil", "dados-abertos"] dependencies = [ "httpx>=0.27.0", ] ``` `requirements.txt`: ```text httpx>=0.27.0 ``` `requirements-dev.txt`: ```text -e .[dev] ``` The development dependency group also uses minimum-only constraints: ```toml dev = [ "pytest>=8.0", "pytest-asyncio>=0.23", "pytest-cov>=5.0", "pytest-mock>=3.14", "PyYAML>=6.0", "mypy>=1.11", "ruff>=0.9", ] ``` The documented installation procedure resolves these dependencies dynamically: ```bash pip install -r requirements.txt pip install -r requirements-dev.txt ``` ### Technical Analysis The project specifies minimum versions but does not supply a lock file, exact transitive dependency versions, or package hashes. As a result, two installations performed at different times can install materially different code. Python packages and build-system requirements may execute code during installation or later when imported. A compromised future release, compromised package index account, or malicious transitive dependency could therefore introduce behavior that was not present during this audit. This finding does not establish that `httpx`, `setuptools`, `wheel`, or any development dependency is currently malicious. The weakness is the absence of reproducible, integrity-verified dependency resolution. # ...[truncated 1252 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says the skill should research Brazil's Chamber of Deputies via its official open-data API. However, the code chunk does not access any external API, legislative resource, or chamber-related dataset. Its sole purpose is validating YAML frontmatter in a SKILL.md file for a skill directory. This is a materially different primary purpose and capability set, so the description does not accurately represent the code's behavior.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill instructs the agent to read local reference files and use network access, but it does not declare any explicit tool scope such as allowed-tools or permissions. That creates an overbroad execution surface where an agent may use file and network capabilities beyond what a reviewer or caller expects, increasing the risk of data exfiltration or unintended access if the skill is modified or composed with other prompts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The entire skill documentation is written in Portuguese, including headings, usage instructions, and operational guidance, with no indication that users may choose another language. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

Line L33 instructs the skill to interpret “today” in America/Sao_Paulo. This imposes a locale-specific behavior in natural language, and the file does not explicitly present it as a user opt-in choice or clearly justify it as a region-locked policy requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

Natural-language strings throughout the file, including the top-level module description and method docstrings, are exclusively in Portuguese. There is no indication that users can choose another language or that the locale restriction is intentionally scoped to a Portuguese-speaking audience.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This Python file performs outbound HTTP requests to the Câmara API via client.get(...). Although the module docstring describes the API client and logging exists for debugging/errors, there is no user-facing warning, confirmation, or explicit disclosure that query parameters and requested data will be transmitted over the network.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The package description is written only in Portuguese, which can be interpreted as a language/locale constraint in user-facing metadata. This file does not provide any opt-in language choice or explicitly justify that the package is intentionally region-specific, so it may conflict with organizational language-policy expectations.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: PyYAML has 8 known advisory(ies) (CVE-2019-20477 (Deserialization of Untrusted Data in PyYAML); CVE-2020-1747 (Improper Input Validation in PyYAML); CVE-2020-14343 (Improper Input Validation in PyYAML) +5 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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

Line L34 instructs consumers to interpret relative dates such as “today” in America/Sao_Paulo, not the host timezone. This is a locale/timezone constraint expressed in natural language, and the file does not indicate user opt-in or explicitly justify that the skill is region-specific.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency is specified as httpx>=0.27.0, which allows future versions to be installed without review and prevents reproducible builds. This can introduce breaking changes or newly vulnerable releases into the skill's environment, and in a network-facing skill that queries an external API, dependency drift increases supply-chain risk.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
httpx>=0.27.0

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
86% confidence
Finding

Because httpx is not pinned, it is impossible to verify from this manifest alone whether the installed version is affected by known advisories. The skill relies on HTTP client functionality to access the Chamber of Deputies API, so if a vulnerable httpx release is resolved at install time, malformed input handling or related client-side issues could affect reliability or security.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module docstring, command descriptions, and all user-facing CLI text are written exclusively in Portuguese, which imposes a language choice on users. The file does not indicate that the tool is region- or language-specific by policy, nor does it offer an opt-in or alternative locale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The module docstring and fixture docstrings are written only in Portuguese, which can reflect a language-specific skill convention without any visible opt-in or justification. Under the policy, language constraints should either offer user choice or be clearly documented as intentionally locale-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The natural-language content in the module and test docstrings is entirely in Portuguese, including user-facing descriptions such as the module docstring and test summaries. Under the stated policy, forcing a specific language without opt-in can be a locale policy violation unless the constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module docstring states the test file description in Portuguese only. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation, and this file does not indicate that Portuguese is required for a Brazil-specific or locale-scoped context.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.