[feature] SC-166737/improve app proxy security by restricting where token replacements can go#90
Conversation
…oken replacements can go
Reviewer's guide (collapsed on small PRs)Reviewer's GuideEnhances OAuth client_secret handling by introducing dynamic injection into GitHub API requests via manifest.json proxy settings, and strengthens type safety by asserting placeholders as const in the GitHub constants. Class diagram for updated GitHub constants with 'as const' assertionclassDiagram
class placeholders {
CODE : string
OAUTH_TOKEN_PATH : string
TOKEN : string
}
class BASE_URL {
<<const>>
value : "https://api.github.com"
}
placeholders <|-- BASE_URL
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Pull Request Overview
This pull request enhances OAuth security and TypeScript type safety for the GitHub app integration. The changes introduce controlled injection of the OAuth client secret and strengthen compile-time guarantees for constant values.
- Added
settingsInjectionconfiguration to enable secure, platform-managed injection of the OAuth client secret into GitHub OAuth requests - Enhanced type safety of the placeholders object with
as constassertion to prevent mutations and provide literal types
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| manifest.json | Added settingsInjection configuration to inject the client_secret setting into querystring parameters for GitHub OAuth endpoints |
| src/services/github/constants.ts | Applied as const assertion to the placeholders object to enforce immutability and improve type inference |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Build for commit d8f3dff deployed to: https://github-pr-90.ci.next.deskprodemo.com URLs: |
This pull request introduces improvements to OAuth client secret handling and TypeScript constant definitions. The most significant changes are grouped below:
OAuth Configuration Enhancements:
manifest.jsonto support dynamic injection of theclient_secretinto the query string for GitHub API requests, improving flexibility and security in OAuth flows.Code Quality and Type Safety:
as constassertion to theplaceholdersobject insrc/services/github/constants.ts, ensuring stronger type safety and preventing accidental mutations.Summary by Sourcery
Enable secure client secret injection into querystring for GitHub API requests and strengthen type safety of GitHub constants.
New Features:
Enhancements: