T09 · Insecure Skill Coding Practices
- Location
scripts/canva.sh:159- Finding
OAuth callback does not validate the state parameter
- Content
View full analysis
/dev/null; then xdg-open "$auth_url" 2>/dev/null & elif command -v open &> /dev/null; then open "$auth_url" 2>/dev/null & fi # Start simple HTTP server to catch callback echo "Waiting for OAuth callback on port $OAUTH_PORT..." # Save code_verifier to temp file for the callback handler local verifier_file=$(mktemp) local code_file=$(mktemp) echo "$code_verifier" > "$verifier_file" # Use Python for the callback server (simpler, more reliable) python3 << PYEOF import http.server import socketserver import urllib.parse code_file = "$code_file" port = $OAUTH_PORT class Handler(http.server.BaseHTTPRequestHandler): def do_GET(self): parsed = urllib.parse.urlparse(self.path) if parsed.path == '/oauth/redirect': p ...[truncated 2458 chars]- Remediation
View remediation
