-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: send user name with workflow requests #373
Conversation
WalkthroughWalkthroughThe code changes across multiple files primarily focus on enhancing authentication mechanisms by introducing new structures and methods. Key modifications include adding a Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI
participant Auth
participant Server
User->>CLI: Run Command
CLI->>Auth: Fetch Auth Information
Auth-->>CLI: Return `AuthInfoPayload` with `hasura_claims`
CLI->>CLI: Extract `nickname` from `AuthInfoPayload`
CLI->>CLI: Log username
CLI->>Server: Send Request with `nickname`
Server-->>CLI: Return Response
CLI-->>User: Display Response
Recent review detailsConfiguration used: .coderabbit.yaml Files selected for processing (3)
Additional context usedLearnings (1)
Gitleaks
Additional comments not posted (5)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
#[test] | ||
fn test_get_user_name() { | ||
// This token is safe, it isn't signed by a real authority - only use for testing | ||
let jwt = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJodHRwczovL2hhc3VyYS5pby9qd3QvY2xhaW1zIjp7IngtaGFzdXJhLWRlZmF1bHQtcm9sZSI6InVzZXIiLCJ4LWhhc3VyYS1hbGxvd2VkLXJvbGVzIjpbInVzZXIiXSwieC1oYXN1cmEtdXNlci1pZCI6ImdpdGh1YnwxNjI3ODAxIiwieC1oYXN1cmEtcmF3LW5pY2tuYW1lIjoibW9yZ2FudGUiLCJ4LWhhc3VyYS11c2VyLXRlbmFudCI6ImdpdGh1YiIsIngtaGFzdXJhLWF1dGgtcHJvdmlkZXIiOiJnaXRodWIiLCJ4LWhhc3VyYS11c2VyLW5pY2tuYW1lIjoiZ2l0aHVifG1vcmdhbnRlIn0sImlzcyI6Imh0dHBzOi8vYXV0aDAuZ3JpdC5pby8iLCJzdWIiOiJnaXRodWJ8MTYyNzgwMSIsImF1ZCI6Imh0dHBzOi8vYXBpMi5ncml0LmlvIiwiaWF0IjoxNzE4NzI2MzUzLCJleHAiOjE3MTg4MTI3NTN9.eEU0bSldfdxuWpXAKfWAuJBqTMR5BAdnAEhFu-hVlI4"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded JWT in the test might pose a security risk if exposed in public repositories. Consider obfuscating it or using mock libraries to handle JWTs in tests.
Tools
Gitleaks
84-84: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data. (jwt)
This allows (light) personalization in workflows.
Greptile Summary
This is an auto-generated summary
HasuraClaims
struct to handle additional JWT claimsget_user_name
method toAuthInfo
structdoctor.rs
Summary by CodeRabbit
New Features
Style
Refactor