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

cameri / nostream / 46326669113
81%

Build:
DEFAULT BRANCH: main
Ran 30 Nov 2026 12:08AM UTC
Jobs 2
Files 354
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

30 Nov 2026 12:03AM UTC coverage: 80.874% (+0.03%) from 80.848%
46326669113

push

github

web-flow
fix(admin): redact nested webhook urls in settings-change notifications (#1295)

## Description

`PATCH /admin/settings` builds a `settings.changed` notification and
redacts secrets in it in two steps:

- `redactSettingsValue(path, value)` for each change, which only
replaced a string value at a sensitive path (`passwordHash`, `secret`,
`botToken` or an `admin.notifications.targets…url`), and returned an
object or array as it was;
- `redactSettingsSecrets(changes)` on the list of `{ path, value, reload
}` records, which walks the list with paths such as
`[0].value.targets[0].url`. The rule for a webhook url is
`path.startsWith('admin.notifications.targets')`, so it never matches
there.

So when the changed path is a parent of the webhook targets, for example
`admin.notifications` or `admin`, the value is the whole object and the
`url` of each target is sent to the notification recipients unredacted.

- `redactSettingsValue` now walks an object or array value with the path
it was written at (`admin.notifications.targets[0].url`), so the rules
that already exist apply to the nested values;
- `redactSettingsSecrets` uses the same walk, so nothing else changes
for it;
- the response of the settings request uses the same function, so it no
longer echoes the url either.

## Related Issue

Partly addresses #1022 (F-041). The other findings in that issue are
handled separately.

## Motivation and Context

A webhook url holds a token (a Discord or Slack webhook). The settings
API and the dedicated notifications endpoint already hide it, and the
settings-change notification is the one place that sent it to the
recipients. CodeRabbit's scan did not establish reachability, so I
checked the code: the path rule is
`startsWith('admin.notifications.targets')` and the walk in
`redactSettingsSecrets` starts at the list, so a parent-path change is
not caught.

## How Has This Been Tested?

- New test in `test/unit/utils/settings-redaction.spec.ts` for a value
written at... (continued)

6419 of 8557 branches covered (75.01%)

Branch coverage included in aggregate %.

23 of 23 new or added lines in 1 file covered. (100.0%)

5 existing lines in 1 file now uncovered.

12998 of 15452 relevant lines covered (84.12%)

714.22 hits per line

Coverage Regressions

Lines Coverage ∆ File
5
91.67
2.4% src/services/wot-graph-service.ts
Jobs
ID Job ID Ran Files Coverage
1 Integration - 46326669113.1 30 Nov 2026 12:08AM UTC 354
36.96
GitHub Action Run
2 Unit - 46326669113.2 30 Nov 2026 12:08AM UTC 354
78.91
GitHub Action Run
Source Files on build 46326669113
  • Tree
  • List 354
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #46326669113
  • 1b957d43 on github
  • Prev Build on main (#46295150180)
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