Skip to content

Redact API keys when saving to disk #551

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

Merged
merged 1 commit into from
May 31, 2025
Merged

Redact API keys when saving to disk #551

merged 1 commit into from
May 31, 2025

Conversation

hadley
Copy link
Member

@hadley hadley commented May 29, 2025

Using the magic of weak refs. Fixes #534

Using the magic of weak refs. Fixes #534
@hadley hadley requested review from atheriel and simonpcouch May 29, 2025 22:02
Copy link
Contributor

@simonpcouch simonpcouch left a comment

Choose a reason for hiding this comment

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

SO GOOD YAY

Just to make sure my mental model is right here—this doesn't cause any hiccups with sending chat apps into production, right? e.g. in Joe's ellmer assistant, the weak reference is created in the server each time the app starts up?

@hadley
Copy link
Member Author

hadley commented May 30, 2025

Right, it shouldn't because you're not saving the chat to RDS and reloading it, you're creating it live each time.

Copy link
Collaborator

@atheriel atheriel left a comment

Choose a reason for hiding this comment

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

Nice!

@hadley hadley merged commit bc28d4e into main May 31, 2025
10 checks passed
@hadley hadley deleted the redact-keys branch May 31, 2025 12:41
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.

Too easy to save chat object, accidentally exposing API key
3 participants