Ver código fonte

docs: DEBUG and TRACE logs contain sensitive information by design (#1170)

James Read 2 dias atrás
pai
commit
d144ae670e

+ 1 - 0
SECURITY.md

@@ -94,6 +94,7 @@ Maintainers: see [.github/SECURITY_ADVISORY_DUPLICATES.md](.github/SECURITY_ADVI
 The following have been reported several times and reviewed. Please only report them if you have found something beyond what is described here.
 The following have been reported several times and reviewed. Please only report them if you have found something beyond what is described here.
 
 
 * **`PasswordHash` is unauthenticated and can make local login busy.** The `PasswordHash` API is a documented utility for generating Argon2id hashes, and is needed before any user exists. Unbounded resource use was fixed in CVE-2026-28342 by limiting all Argon2id work, including `LocalUserLogin`, to 10 concurrent operations. Flooding `PasswordHash` can make logins return `ResourceExhausted` while the flood continues; this fail-fast behaviour is intentional, keeps memory bounded, and has no lasting effect. Rate limit request floods at your reverse proxy.
 * **`PasswordHash` is unauthenticated and can make local login busy.** The `PasswordHash` API is a documented utility for generating Argon2id hashes, and is needed before any user exists. Unbounded resource use was fixed in CVE-2026-28342 by limiting all Argon2id work, including `LocalUserLogin`, to 10 concurrent operations. Flooding `PasswordHash` can make logins return `ResourceExhausted` while the flood continues; this fail-fast behaviour is intentional, keeps memory bounded, and has no lasting effect. Rate limit request floods at your reverse proxy.
+* **`DEBUG` and `TRACE` logs contain sensitive information.** The `DEBUG` and `TRACE` log levels, `-startuptrace`, and `logDebugOptions` exist to show OliveTin's internal workings while troubleshooting. They are expected to log sensitive information, such as configuration values including secrets, API keys, password hashes, OAuth2 client secrets, webhook secrets, and request headers. This is by design and is not considered a vulnerability. Treat logs produced with these options as being as sensitive as `config.yaml` itself, and only enable them while troubleshooting. Reports about sensitive information in logs are only in scope at the default `INFO` level, or at `WARN` and `ERROR`.
 
 
 ## Process
 ## Process
 
 

+ 8 - 0
docs/modules/ROOT/pages/advanced_configuration/logs.adoc

@@ -33,6 +33,14 @@ The supported log levels are;
 * `WARN` - Very few messages, only warnings are shown.
 * `WARN` - Very few messages, only warnings are shown.
 * `INFO` - The defualt log level.
 * `INFO` - The defualt log level.
 
 
+[#debug-logs-sensitive]
+[WARNING]
+====
+`DEBUG` and `TRACE` logs (including `-startuptrace` and xref:troubleshooting/log-debug-options.adoc[Debug Log Options]) are meant to show OliveTin's internal workings, so they **will contain sensitive information**: configuration values including secrets, API keys, password hashes, OAuth2 client secrets, webhook secrets, and request headers. This is expected, and is not considered a security vulnerability.
+
+Only use these log levels while troubleshooting, switch back to `INFO` afterwards, treat the logs as being as sensitive as your `config.yaml`, and remove secrets before sharing them with anyone.
+====
+
 You can change the `logLevel` while OliveTin is running, and it should update as soon as you save your config.yaml. You will always get a log message like this;
 You can change the `logLevel` while OliveTin is running, and it should update as soon as you save your config.yaml. You will always get a log message like this;
 
 
 [source,bash]
 [source,bash]

+ 2 - 0
docs/modules/ROOT/pages/troubleshooting/log-debug-options.adoc

@@ -1,6 +1,8 @@
 [#log-debug-options]
 [#log-debug-options]
 = Debug Log Options
 = Debug Log Options
 
 
+WARNING: Debug log options log internal details, including request headers, and **will contain sensitive information**. This is expected. Only enable them while troubleshooting, and remove secrets before sharing the logs. See xref:advanced_configuration/logs.adoc#debug-logs-sensitive[DEBUG and TRACE logs contain sensitive information].
+
 [source,yaml]
 [source,yaml]
 ----
 ----
 logDebugOptions:
 logDebugOptions:

+ 2 - 0
docs/modules/ROOT/pages/troubleshooting/service-logs.adoc

@@ -131,6 +131,8 @@ journalctl -eu OliveTin --since "30 minutes ago"
 
 
 For deeper server-side detail, you can temporarily enable xref:troubleshooting/log-debug-options.adoc[LogDebugOptions]—then capture logs again with those settings in mind.
 For deeper server-side detail, you can temporarily enable xref:troubleshooting/log-debug-options.adoc[LogDebugOptions]—then capture logs again with those settings in mind.
 
 
+WARNING: Logs captured at `DEBUG` or `TRACE` level, with `-startuptrace`, or with `logDebugOptions` enabled **will contain sensitive information**, such as secrets, API keys, password hashes and request headers. Remove these before sharing logs. See xref:advanced_configuration/logs.adoc#debug-logs-sensitive[DEBUG and TRACE logs contain sensitive information].
+
 [#share-the-logs]
 [#share-the-logs]
 == Share the logs
 == Share the logs