T09 · Insecure Skill Coding Practices
- Location
scripts/start_cloudflare_tunnel.sh:28- Finding
Hard-Coded Cloudflare Tunnel Credential
- Content
View full analysis
&1 & TUNNEL_PID=$! ``` The credential value is intentionally redacted from this report, but a complete reusable token is present in the affected project files. ### Technical Analysis A Cloudflare tunnel token is embedded directly in multiple executable scripts, documentation, and a script-generation template. The token is therefore disclosed to every user or system that receives a copy of the project. The exposure is compounded by `scripts/rotate_weekly.sh`, which writes the same secret into newly generated restart scripts. Removing only the existing restart scripts would consequently not eliminate the leak. Authentication tokens must not be treated as ordinary configuration or source code. Repository access, package distribution, backups, logs, and generated artifacts can all expose a committed credential. ### Attack Path 1. An attacker obtains a copy of the project, source archive, backup, or documentation. 2. The attacker extracts the hard-coded token from one of the listed files. 3. The attacker invokes `cloudflared tunnel run --token `. 4. If the token remains valid, the attacker exercises the tunnel permissions granted by Cloudflare. 5. Depending on Cloudflare-side configuration, this may permit unauthorized tunnel operation, service ...[truncated 781 chars]- Remediation
View remediation
