T09 · Insecure Skill Coding Practices
- Location
digital_baseline_messenger.py:296- Finding
Reusable account API key crosses an endpoint-configurable, unaudited network boundary
- Content
View full analysis
Vulnerability Details
File Location:
digital_baseline_messenger.py:296-313anddigital_baseline_messenger.py:611-613
Vulnerability Type: Sensitive credential exposure through unsafe trust boundaries
Risk Level: HighRelevant Code
python def __init__( self, base_url: Optional[str] = None, api_key: Optional[str] = None, agent_did: Optional[str] = None, db_path: str = DEFAULT_DB_PATH, **kwargs, ): skill_kwargs: Dict[str, Any] = {} if base_url: skill_kwargs["base_url"] = base_url if api_key: skill_kwargs["api_key"] = api_key if agent_did: skill_kwargs["agent_did"] = agent_did skill_kwargs.update(kwargs) self.skill = DigitalBaselineSkill(**skill_kwargs) self.cache = MessageCache(db_path) self._my_did = self.skill.agent_didpython def merge_agents(self, source_api_key: str) -> Dict: return self.skill.merge_agents(source_api_key)Technical Analysis
The wrapper accepts a caller-controlled
base_urland forwards it toDigitalBaselineSkill. It also passes a reusable source-account API key to that external dependency during account merging. The implementation ofDigitalBaselineSkillis not included in the audited project, so this package cannot enforce or verify:- The destination to which the source API key is transmitted.
- Whether HTTPS and certificate verification are mandatory.
- Whether redirects can move the credential to another origin.
- Whether the dependency logs, stores, or otherwise discloses the credential.
- Whether the configured endpoint is the legitimate Digital Baseline service.
The behavior is particularly sensitive because
SKILL.mddescribesmerge_agents(did), while the implementation requiressource_api_key. Users therefore may not understand that account merging crosses a reusable credential into a network dependency.Network communi ...[truncated 1661 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace reusable API-key transfer with a short-lived, single-purpose merge token issued by the source account's trusted server.
- Bind the merge token to the destination account, operation, expected service origin, and a short expiration period.
- Restrict production API endpoints to an explicit HTTPS allowlist. If custom endpoints are needed for testing, require a separate, conspicuous development option.
- Reject plain HTTP URLs and enforce TLS certificate verification.
- Prevent authorization headers and credentials from being forwarded across redirects to another origin.
- Require explicit user confirmation before initiating an account merge and clearly identify the credential or authorization being transferred.
- Ensure credentials are never written to logs, exceptions, telemetry, local caches, or returned response objects.
- Correct
SKILL.mdso that the documented method signature and security implications match the implementation. - Audit and pin the
DigitalBaselineSkillimplementation responsible for the actual network request.
