-
Notifications
You must be signed in to change notification settings - Fork 167
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
When fetching plugins from private repositories using authenticated URLs (e.g., https://oauth2:<token>@gitlab.com/org/private-marketplace), credentials are exposed in multiple places:
- Application logs - Clone URLs and git commands are logged with credentials visible
- Exception messages - Error messages include full URLs with credentials
- Persisted conversation state - Plugin source URLs with credentials are stored in
StoredConversationandResolvedPluginSource
Business Impact
- Credential leakage to log aggregators: Tokens sent to centralized logging systems (Datadog, Splunk, etc.) where they may be accessible to operations teams or retained indefinitely
- Credential exposure in error responses: When plugin fetching fails, error messages containing credentials may be returned to API clients
- Credential persistence: Tokens stored in conversation state could be accessed by other processes or leaked through database backups
- Security audit failures: Logging credentials violates security best practices and compliance requirements
Expected Behavior
- Log messages should redact credentials from URLs (e.g.,
https://****@gitlab.com/repo) - Exception messages should not contain authentication credentials
- Persisted state should store redacted URLs (credentials only needed at fetch time)
Reproduction
from openhands.sdk.plugin.fetch import fetch_plugin
# This will log the full URL with credentials
fetch_plugin(
source='https://oauth2:SECRET_TOKEN@gitlab.com/org/repo',
ref='main'
)Logs will show:
INFO - Cloning repository from https://oauth2:SECRET_TOKEN@gitlab.com/org/repo.git
Related
- Security: Credentials in plugin source URLs exposed via API responses OpenHands#12959 - Related credential exposure in app server
- Part of Plugin Marketplace feature (Plugin Marketplace GUI OpenHands#12088)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working