Skip to content

Comments

[feature] SC-166737/improve app proxy security by restricting where token replacements can go#75

Open
HappyPaul55 wants to merge 2 commits intomainfrom
SC-166737/improve-app-proxy-security-by-restricting-where-token-replacements-can-go
Open

[feature] SC-166737/improve app proxy security by restricting where token replacements can go#75
HappyPaul55 wants to merge 2 commits intomainfrom
SC-166737/improve-app-proxy-security-by-restricting-where-token-replacements-can-go

Conversation

@HappyPaul55
Copy link
Contributor

@HappyPaul55 HappyPaul55 commented Nov 17, 2025

This pull request introduces improvements to API authentication and strengthens type safety in the codebase. The most significant changes are grouped below:

API Authentication Enhancements:

  • Added a settingsInjection configuration to the API manifest, enabling automatic injection of the api_key into the Authorization header for all REST API requests.

Type Safety Improvements:

  • Updated the placeholders object in src/constants.ts to use as const, ensuring its properties are treated as immutable and providing better type inference.

Summary by Sourcery

Enhance app proxy security by automatically injecting API keys into request headers and bolster type safety in the codebase

New Features:

  • Automatically inject api_key into the Authorization header for REST API requests via settingsInjection in the manifest

Enhancements:

  • Mark placeholders object as const in constants.ts to improve type safety

@HappyPaul55 HappyPaul55 requested a review from a team as a code owner November 17, 2025 15:01
@sourcery-ai
Copy link

sourcery-ai bot commented Nov 17, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds automatic API key injection into the Authorization header for all REST endpoints via a new settingsInjection configuration in the manifest, and strengthens type safety by marking the placeholders object as immutable.

Class diagram for updated placeholders constant

classDiagram
  class placeholders {
    +URL: string
    +API_KEY: string
    <<immutable>>
  }
Loading

File-Level Changes

Change Details Files
Enable automatic API key injection into request headers
  • Added settingsInjection block under REST API route configuration
  • Configured api_key to populate the Authorization header
  • Updated timeout entry to include settingsInjection
manifest.json
Strengthen type safety of placeholders
  • Appended as const to the placeholders object
  • Ensured placeholder keys are immutable for better inference
src/constants.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@openhands-ai
Copy link

openhands-ai bot commented Nov 20, 2025

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • Feature Build

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #75 at branch `SC-166737/improve-app-proxy-security-by-restricting-where-token-replacements-can-go`

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

@github-actions
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant