[feature] SC-166737/improve app proxy security by restricting where token replacements can go#60
Conversation
…oken replacements can go
Reviewer's guide (collapsed on small PRs)Reviewer's GuideIntroduces a dynamic API key injection mechanism for People HR API calls by adding a settingsInjection block in the manifest.json, and bolsters type safety of constant placeholders by marking them immutable with ‘as const’. Class diagram for updated constants with type safetyclassDiagram
class placeholders {
+API_KEY: "__api_key__"
<<immutable>>
}
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 PR enhances security for the People HR API integration by implementing restricted token replacement through settingsInjection configuration, ensuring API keys can only be injected into specific request body fields. Additionally, it improves type safety for constants.
- Added
settingsInjectionconfiguration to restrict API key injection to theAPIKeyfield in request bodies - Applied
as constassertion to theplaceholdersobject for improved type immutability
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| manifest.json | Adds settingsInjection configuration to whitelist entry, enabling secure API key injection into request body's APIKey field |
| src/constants.ts | Applies as const assertion to placeholders object for better type safety |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Build for commit dbbf0c7 deployed to: https://people-hr-pr-60.ci.next.deskprodemo.com URLs: |
This pull request introduces a configuration update to enable dynamic API key injection for People HR API requests and strengthens type safety for constants. The main changes are grouped below:
API Configuration Improvements:
settingsInjectionblock to the People HR API entry inmanifest.json, allowing the API key to be injected into the request body under theAPIKeyfield.Type Safety Enhancements:
placeholdersobject insrc/constants.tsto useas const, ensuring its values are treated as immutable and providing better type safety.Summary by Sourcery
Allow dynamic API key injection into People HR API requests and strengthen type safety for constants
New Features:
Enhancements: