Skip to content

chore: add logging quality audit and remediate high-severity gaps#81

Open
gbasin wants to merge 3 commits intofeat/dependency-risk-scannerfrom
chore/logging-quality-audit
Open

chore: add logging quality audit and remediate high-severity gaps#81
gbasin wants to merge 3 commits intofeat/dependency-risk-scannerfrom
chore/logging-quality-audit

Conversation

@gbasin
Copy link
Owner

@gbasin gbasin commented Feb 18, 2026

Summary

  • add a repeatable server logging auditor (logging_audit scanned_files=36 high=0 medium=89 low=0
    MEDIUM catch_without_logging src/server/db.ts:332 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/db.ts:338 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:63 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:78 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:102 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:128 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:158 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:564 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:1368 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:1395 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:1599 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:1624 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:1650 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:1682 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:1721 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:1776 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:1788 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:1904 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:2011 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:2104 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:2137 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:2235 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:2291 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:2379 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:2401 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:2418 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:2438 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logDiscovery.ts:169 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logDiscovery.ts:208 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logDiscovery.ts:243 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logDiscovery.ts:253 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logger.ts:47 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logger.ts:77 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logger.ts:102 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logger.ts:116 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logMatcher.ts:273 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logMatcher.ts:402 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logMatcher.ts:791 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logMatcher.ts:1220 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logMatcher.ts:1244 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logMatcher.ts:1333 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logMatcher.ts:1425 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logMatchWorker.ts:185 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logMatchWorkerClient.ts:49 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logWatcher.ts:74 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/prerequisites.ts:11 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/remoteSessions.ts:284 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/remoteSessions.ts:329 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/sessionRefreshWorker.ts:120 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/sessionRefreshWorker.ts:152 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/sessionRefreshWorker.ts:193 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:107 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:133 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:160 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:187 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:238 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:256 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:277 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:287 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:307 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:338 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:370 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:396 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:432 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:440 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:459 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:30 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:46 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:57 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:91 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:133 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:146 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:181 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:213 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:221 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:234 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:265 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:51 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:67 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:78 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:101 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:157 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:203 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:300 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:373 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:381 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:394 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:427 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/TerminalProxyBase.ts:121 catch block does not emit a structured logger event) with CI-friendly output and unit tests
  • remediate high-severity backend logging gaps in API handlers (, , directories/settings/upload/clipboard paths)
  • log DB migration rollback/failure details with migration identifiers before rethrow
  • resolve SessionManager silent catches with debug logs or explicit intentional-silent annotation
  • document audit scope, baseline, and contract in README + docs/logging-audit.md

Baseline -> Current

  • baseline: , ,
  • current: , ,

Validation

  • Found 0 warnings and 0 errors.
    Finished in 28ms on 164 files with 90 rules using 10 threads.
  • �[0m�[1mbun test �[0m�[2mv1.3.8 (b64edcb4)�[0m
    [2026-02-18 08:36:42.533 +0000] �[33mWARN�[39m:
    �[35mevent�[39m: "warn_event"
    [2026-02-18 08:36:42.540 +0000] �[32mINFO�[39m:
    �[35mevent�[39m: "info_event"
    [2026-02-18 08:36:42.535 +0000] �[32mINFO�[39m:
    �[35mevent�[39m: "info_event"
    [2026-02-18 08:36:42.529 +0000] �[32mINFO�[39m:
    �[35mfoo�[39m: "bar"
    �[35mevent�[39m: "test_event"
    [2026-02-18 08:36:42.542 +0000] �[32mINFO�[39m:
    �[35mkey�[39m: "value"
    �[35mevent�[39m: "my_custom_event"
    [2026-02-18 08:36:42.543 +0000] �[32mINFO�[39m:
    �[35mevent�[39m: "correct_event"
    �[35mother�[39m: "data"
    �[0m�[1mbun test �[0m�[2mv1.3.8 (b64edcb4)�[0m
  • logging_audit scanned_files=36 high=0 medium=89 low=0
    MEDIUM catch_without_logging src/server/db.ts:332 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/db.ts:338 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:63 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:78 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:102 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:128 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:158 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:564 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:1368 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:1395 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:1599 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:1624 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:1650 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:1682 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:1721 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:1776 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:1788 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:1904 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:2011 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:2104 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:2137 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:2235 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:2291 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:2379 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:2401 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:2418 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/index.ts:2438 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logDiscovery.ts:169 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logDiscovery.ts:208 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logDiscovery.ts:243 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logDiscovery.ts:253 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logger.ts:47 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logger.ts:77 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logger.ts:102 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logger.ts:116 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logMatcher.ts:273 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logMatcher.ts:402 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logMatcher.ts:791 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logMatcher.ts:1220 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logMatcher.ts:1244 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logMatcher.ts:1333 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logMatcher.ts:1425 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logMatchWorker.ts:185 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logMatchWorkerClient.ts:49 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/logWatcher.ts:74 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/prerequisites.ts:11 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/remoteSessions.ts:284 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/remoteSessions.ts:329 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/sessionRefreshWorker.ts:120 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/sessionRefreshWorker.ts:152 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/sessionRefreshWorker.ts:193 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:107 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:133 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:160 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:187 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:238 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:256 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:277 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:287 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:307 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:338 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:370 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:396 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:432 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:440 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PipePaneTerminalProxy.ts:459 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:30 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:46 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:57 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:91 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:133 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:146 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:181 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:213 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:221 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:234 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/PtyTerminalProxy.ts:265 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:51 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:67 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:78 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:101 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:157 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:203 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:300 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:373 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:381 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:394 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/SshTerminalProxy.ts:427 catch block does not emit a structured logger event
    MEDIUM catch_without_logging src/server/terminal/TerminalProxyBase.ts:121 catch block does not emit a structured logger event

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.

1 participant