{{ message }}
Repository navigation
Conversation
Remove instance tokens from fetchInstances responses unless AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES is explicitly enabled.
Contributor
Contributor
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. This changes whether authenticated callers receive instance tokens, which are credentials and could affect access to instances. Reverting restores the previous response behavior, but any tokens exposed during an incorrect configuration or implementation could be used before the revert.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

📋 Description
Prevent
GET /instance/fetchInstancesfrom returning instance tokens whenAUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES=false.The response is sanitized consistently for:
When exposure is explicitly enabled, the existing response remains unchanged.
🔗 Related Issue
Closes #2677
🧪 Type of Change
🧪 Testing
npx eslint src/api/controllers/instance.controller.tsnpx tsc --noEmitnpm run build✅ Checklist
📝 Additional Notes
The change only removes the
tokenproperty from returned copies of instance records; it does not mutate the records returned by the monitoring service.Summary by Sourcery
Hide instance tokens from fetch responses unless token exposure is explicitly enabled.
Bug Fixes:
Enhancements: