T09 · Insecure Skill Coding Practices
- Location
authenticate.py:176- Finding
Logout Does Not Remove the OAuth Credentials Used for Authentication
- Content
View full analysis
Path: """Get full path to token file.""" return self.token_dir / self.token_file ``` ### Technical Analysis The authentication state is loaded from `oauth1_token.json` and `oauth2_token.json`, which are created by `garth.save()`. However, `logout()` attempts to remove only `tokens.json`. This mismatch means the files that contain the effective OAuth session credentials are not deleted. If `tokens.json` does not exist, the logout method performs no deletion at all. A later invocation can still detect both OAuth files and restore the session using `garth.resume()`. The implementation therefore violates secure credential lifecycle requirements: a user-facing logout operation must remove or revoke every credential capable of restoring the authenticated session. ### Attack Path 1. The user authenticates through `authenticat ...[truncated 1146 chars]- Remediation
View remediation
