Skip to content
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

Improper error handling can lead to credentials leakage #369

Open
mortenlj opened this issue Nov 14, 2024 · 0 comments
Open

Improper error handling can lead to credentials leakage #369

mortenlj opened this issue Nov 14, 2024 · 0 comments

Comments

@mortenlj
Copy link
Contributor

When listing all services in a project, the resulting response contains all services, with all service users, with all credentials.

In certain situations, that response can find its way into an error that is returned, and propagated up the callstack until it is handled, most typically be being logged.
This can lead to credentials being logged in places they shouldn't be.

One possible situation where this might happen:

When the client has received a response from the API and tries to read the buffer, io.ReadAll may return an error in some situations. This could presumably be things like read timeout, connection reset or other forms of I/O errors.
In this case, the client returns an error where the message is whatever has been read from the buffer so far, which could be anything.

if err != nil || rsp.StatusCode < 200 || rsp.StatusCode >= 300 {

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

No branches or pull requests

1 participant