When a token has already been revoked we will return to GitHub that it was a "true positive" now, but we skip sending out a notification email to the owner since we don't allow unrevoking tokens.
This PR also extracts a `send_notifica…
We should not send emails for already revoked tokens.
Even if the tokens are already leaked on GitHub we shouldn't write them to the logs. Instead we will log the token ID.
We don't save tokens in plaintext in the database, so the new secret scanning endpoint needs to look for the hashed token instead of the plaintext token.
This PR builds on top of #5495 and improves the code a little bit more. See the individual commit messages for more details.
Since we use tracing for the HTTP logs now and that uses the test writer we don't have to disable this anymore.
We can use the re-exported types instead, which helps to avoid potential version conflicts.
This was previously only usable from within the tests module, but now it can also be used in unit tests.
We're only allowing SMTP in production, so logging the backend in our production logs seems a bit redundant.
Previously, our test suite ignored the hyper wrapper and just interfaced with conduit directly. We would eventually like to migrate our conduit middlewares to tower middlewares though, so we will need to run our tests through as …
.search() is putting this value directly into MockRequest::with_query(), which expects a URL-encoded string. This currently only works because we're skipping the hyper layer in our test suite, but would cause invalid URL errors oth…
We are using our own Response struct from src/tests/util/response.rs to wrap around a conduit::Response to make it more ergonomic to use in our test suite. This however creates a tight coupling between conduit and our test suite….
The app.db() closure takes the only existing database connection and any API requests inside the closure can deadlock waiting on the connection. For some reason this does not appear to cause any issues in the current state, but once th…
By reordering the header checks, we can use .into_body() instead.
Most of them can use http directly, which helps us migrate away from conduit eventually
Related:
Most of them can use http directly, which helps us migrate away from conduit eventually
see https://github.com/conduit-rust/conduit-hyper
We are the only users of this crate and we would eventually like to migrate away from using conduit. Vendoring the crate into the main crates.io repo will hopefully make it easier to…
There is no obvious need for this file to exist outside of the assets folder and need special handling in nginx
This will also have the side effect of our logs showing the correct requested path instead of /index.html for everything.
This makes them much easier to handle when opened in the editor… 😅