• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cameri / nostream / 43899400692
79%

Build:
DEFAULT BRANCH: main
Ran 16 Nov 2026 03:47PM UTC
Jobs 2
Files 339
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Nov 2026 03:43PM UTC coverage: 78.146% (+0.008%) from 78.138%
43899400692

push

github

web-flow
fix(logging): do not write credential headers to debug logs (#1156)

## Description
Debug logging of incoming requests printed the whole `request.headers`
object. For an administrator request that includes the `Cookie` with the
session token and an `Authorization: Bearer` token, so anyone who can
read the debug logs could copy the token and reuse it until it expires.

- new `redactHeaders(headers)` in `src/utils/http.ts` returns a copy of
the headers in which the value of every credential-bearing header is
replaced by `[redacted]`: `authorization`, `proxy-authorization`,
`cookie`, `set-cookie`, and any header whose name contains `token`,
`secret`, `signature`, `api-key` or `auth` (the match is
case-insensitive). Other headers (`host`, `user-agent`,
`x-forwarded-for`, ...) are kept, so the log stays useful;
- it is used at every place that logged the incoming request headers:
`rate-limiter-middleware.ts` (the one reported),
`web-socket-server-adapter.ts` (connection log), and the LNbits,
OpenNode, Zebedee and Nodeless callback controllers (which also receive
webhook signatures).

I did not change `nodeless-payments-processor.ts`, which logs the
headers of the response from the Nodeless API, not of a request to the
relay.

## Related Issue
Fixes #1015

CodeRabbit's scan did not establish reachability, so I checked the code:
on `main`, `rate-limiter-middleware.ts:15` logs `request.headers` for
every HTTP request, and the admin routes accept the session token from
the `Cookie` and `Authorization` headers.

## Motivation and Context
A log is read by more people and tools than the admin console is, and it
is often copied to other systems. Credentials should not be written to
it, even at debug level.

## How Has This Been Tested?
Unit tests in `test/unit/utils/http.spec.ts` for `redactHeaders`:
credential headers are replaced, the match ignores case, diagnostic
headers are kept, the input is not modified, and missing headers give an
empty object.

`pnpm lint... (continued)

5302 of 7396 branches covered (71.69%)

Branch coverage included in aggregate %.

19 of 19 new or added lines in 7 files covered. (100.0%)

11279 of 13822 relevant lines covered (81.6%)

675.77 hits per line

Jobs
ID Job ID Ran Files Coverage
1 Unit - 43899400692.1 16 Nov 2026 03:48PM UTC 339
76.03
GitHub Action Run
2 Integration - 43899400692.2 16 Nov 2026 03:47PM UTC 339
33.46
GitHub Action Run
Source Files on build 43899400692
  • Tree
  • List 339
  • Changed 8
  • Source Changed 7
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #43899400692
  • db1e21b2 on github
  • Prev Build on main (#43874016828)
  • Next Build on main (#43900988690)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc