T09 · Insecure Skill Coding Practices
- Location
SKILL.md:7- Finding
Long-Lived Bearer Token Transmitted over Unencrypted HTTP
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:7-8, 17, 22, 28, 34, 40;README.md:31-32, 40-57
Vulnerability Type: Plaintext transmission of a sensitive authentication credential
Risk Level: HighVulnerable Code
SKILL.mddefines an HTTP endpoint, requires a ten-year bearer token, and includes that token in every API request:md - DUPLICATI_URL # e.g., http://0.0.0.0:8200 - DUPLICATI_TOKEN # Your generated 10-year Forever Tokenmd **Authentication**: Every request MUST include the header: `-H "Authorization: Bearer $DUPLICATI_TOKEN"`md `curl -s -H "Authorization: Bearer $DUPLICATI_TOKEN" "$DUPLICATI_URL/api/v1/serverstate"`md `curl -s -H "Authorization: Bearer $DUPLICATI_TOKEN" "$DUPLICATI_URL/api/v1/backups"`md `curl -s -X POST -H "Authorization: Bearer $DUPLICATI_TOKEN" "$DUPLICATI_URL/api/v1/backup/{ID}/start"`md `curl -s -H "Authorization: Bearer $DUPLICATI_TOKEN" "$DUPLICATI_URL/api/v1/backup/{ID}/log?pagesize=5"`README.mdlikewise directs users to configure a plain HTTP server URL with a long-lived token:json "duplicati": { "enabled": true, "env": { "DUPLICATI_URL": "[http://YOUR_SERVER_IP:8200]", "DUPLICATI_TOKEN": "YOUR_GENERATED_FOREVER_TOKEN" } }md Since Duplicati uses secure JWT tokens, you must generate a "Forever Token" to allow the OpenClaw agent to talk to the server. **1.Enable Token Issuance**: On your Duplicati server, stop the service and restart it briefly with the enable flag: ###### If using systemdsudo systemctl stop duplicati duplicati-server --webservice-enable-forever-token=true
text **2.Generate the Token**: In a second terminal on the same server, run the utility to issue your 10-year token:duplicati-server-util issue-forever-token
text Copy the long string it spits out. This is your `DUPLICATI_TOKEN`.Te
...[truncated 2754 chars]
- Remediation
View remediation
Remediation Suggestions
- Require
DUPLICATI_URLto usehttps://and retain normal TLS certificate and hostname verification. - Reject plain HTTP endpoints by default. If local development support is essential, restrict any exception to an explicitly approved loopback address and display a security warning.
- Replace the
0.0.0.0client URL example with an HTTPS hostname whose certificate can be validated. - If Duplicati cannot directly provide TLS, place it behind a properly configured TLS reverse proxy or access it through an authenticated, encrypted tunnel.
- Prefer short-lived, revocable credentials over ten-year “Forever Tokens.” Rotate existing tokens after transport security is deployed.
- Scope the credential to only the operations required by this Skill where Duplicati supports granular authorization.
- Store the token only in a protected secret-management facility or restricted environment configuration. Do not print it in logs, command traces, status output, or error reports.
- Document token revocation and incident-response procedures so an intercepted credential can be invalidated promptly.
- Consider validating the configured URL before every request and failing closed for unsupported schemes, malformed destinations, embedded credentials, or unexpected hosts.
- Require
