T09 · Insecure Skill Coding Practices
- Location
SKILL.md:27- Finding
Administrator Bearer Token and Financial Data Transmitted over Plaintext HTTP
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 27–39 and 58–80
Vulnerability Type: Plaintext transmission of privileged credentials and sensitive data
Risk Level: HighVulnerable Code
markdown ## Authentication **ADMIN ONLY.** This skill accesses sensitive financial data. Always use admin-level auth. ```bash TOKEN=$(~/clawd/scripts/farmos-auth.sh admin)Role mapping: Check
~/.clawdbot/farmos-users.json. If the sender is not admin, respond: "Financial data is restricted to farm owners. I can't access that for your account."API Base
text The authenticated endpoints subsequently send the token through an HTTP authorization header: ```markdown ### Cost Categories GET /api/categories Authorization: Bearer {token} ### Cost Items GET /api/cost-items?crop_year=2025 Authorization: Bearer {token} ### Cash Flow Projection (Full) GET /api/cash-flow/projection?crop_year=2025 Authorization: Bearer {token} ### Cash Flow Summary GET /api/cash-flow/summary?crop_year=2025 Authorization: Bearer {token}Technical Analysis
The Skill obtains an administrator-level bearer token and instructs the agent to use it against an API whose base URL uses plaintext HTTP. HTTP provides neither transport confidentiality nor server authenticity. A bearer token observed in transit can generally be replayed without knowledge of any additional secret.
An attacker with visibility or control over the relevant network path could inspect the authorization header, capture the administrator token, modify API requests or responses, or impersonate the API service. The plaintext financial responses could also be read or manipulated in transit.
Attack Path
- The agent invokes
~/clawd/scripts/farmos-auth.sh adminand receives an administrator bearer token. - The agent sends a request to
http://100.102.77.110:8010with `Authorization: Beare ...[truncated 993 chars]
- The agent invokes
- Remediation
View remediation
Remediation Suggestions
- Replace the HTTP API base with an HTTPS endpoint using a valid, trusted certificate.
- Configure clients to validate the certificate and hostname; do not permit insecure fallback to HTTP.
- Refuse to attach authorization headers to non-HTTPS requests.
- Replace administrator-wide credentials with narrowly scoped, read-only tokens for the required financial endpoints.
- Use short-lived tokens with audience restrictions and prompt revocation support.
- Prevent tokens from appearing in logs, shell traces, error messages, or command output.
- Apply network-level restrictions as defense in depth, but do not treat a private network as a substitute for authenticated encryption.
- Rotate any administrator token that may previously have been transmitted through the documented HTTP endpoint.
