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

cameri / nostream / 43917979809
79%

Build:
DEFAULT BRANCH: main
Ran 16 Nov 2026 05:27PM 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 05:24PM UTC coverage: 79.208% (+1.1%) from 78.146%
43917979809

push

github

web-flow
fix(cli): reject a SECRET that cannot be saved to .env and read back unchanged (#1091)

## Description
`nostream setup` took a `SECRET` from the environment and wrote it to
`.env` unquoted. Node's loader, which the CLI starts the relay with
(`--env-file`), reads an unquoted `#` as the start of a comment, so a
secret like `my-secret#suffix` came back as `my-secret`. `setup --start`
ran the relay with the full value and every later start with the
truncated one, so the relay's derived keys changed between the two.

The checks the interactive prompt already had (no `#`, no newline) now
live in one helper, `getUnsafeSecretReason`, and also cover a `$`, which
Docker Compose reads from the same `.env` and expands (`$NAME`,
`${NAME}`, `$$`) while Node's loader does not, and a quote that does not
match, which the loader would read differently. It is applied in three
places:

- `resolveSecret` throws on an inherited `SECRET` that fails it, with a
message that says what is wrong and to unset it or use another one,
instead of saving a value that will not read back;
- the prompt validator uses it, so it refuses the same values, and a
quoted answer typed at the prompt is saved without its quotes, as an
inherited one is;
- `upsertSecret` refuses to write a secret that fails it, as a last
guard.

`.env` is left untouched when a secret is refused.

## Related Issue
Closes #1060

## Motivation and Context
A secret the CLI accepts has to be the secret the relay runs with on
every start. Rejecting follows the first of the two fixes proposed in
the issue and matches what the prompt already did; values with `=`, `!`,
spaces or a single apostrophe are unaffected, and a secret wrapped in
matching quotes is still accepted. A `$` is rejected rather than quoted
because the two loaders agree on a single-quoted value but not on every
other form, and a hex secret (the recommended kind) has none.

## How Has This Been Tested?
- New tests: an inherited `SECRET` with `#`, a newline, ... (continued)

5412 of 7418 branches covered (72.96%)

Branch coverage included in aggregate %.

32 of 32 new or added lines in 3 files covered. (100.0%)

11426 of 13840 relevant lines covered (82.56%)

675.04 hits per line

Jobs
ID Job ID Ran Files Coverage
1 Integration - 43917979809.1 16 Nov 2026 05:27PM UTC 339
33.4
GitHub Action Run
2 Unit - 43917979809.2 16 Nov 2026 05:29PM UTC 339
77.1
GitHub Action Run
Source Files on build 43917979809
  • Tree
  • List 339
  • Changed 5
  • Source Changed 3
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #43917979809
  • 05937195 on github
  • Prev Build on main (#43900988690)
  • Next Build on main (#43936235076)
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