Let loopback-lint see a positional bind whose port is a call - #875
Merged
Merged
Conversation
The node positional form scanned the port with [^,)]+, which stopped at the inner ) of Number(process.env.PORT || 0), so hosted/server/dev.ts's loopback bind went unlisted. The port may now wrap one call, and a selftest fixture pins that shape. Refs #873
Deploying mouseterm with
|
| Latest commit: |
feb1300
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d5bd2948.mouseterm.pages.dev |
| Branch Preview URL: | https://fix-loopback-lint-call-port.mouseterm.pages.dev |
This was referenced Oct 1, 2026
nedtwigg
approved these changes
Oct 1, 2026
nedtwigg
left a comment
Member
There was a problem hiding this comment.
Reviewed the bounded positional-port matcher and its regression fixture. This closes the missed Number(...) bind without changing listener policy; CI and bot self-review passed.
nedtwigg
requested a deployment
to
hosted-preview
October 1, 2026 21:06 — with
GitHub Actions
Waiting
This branch is waiting to be deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
scripts/loopback-lint.mjsmissed the loopback bind inhosted/server/dev.ts:45,server.listen(Number(process.env.PORT || 0), "127.0.0.1"). The node positional form scanned the port argument with[^,)]+, which stops at the inner)ofNumber(...), so the file never appeared in the lint's output. That contradictssecurity-local.md-> "Loopback Listeners", which says the lint prints every bind and fails an unguarded new one. The nightly audit flagged it in #873. The listener itself is guarded (allowedDevRequestfromhosted/server/dev-host-guard.ts), so this was lint drift, not exposure.The port may now contain one level of parenthesised call,
(?:[^,()]|\([^()]*\))+, and the header's list of limits says so. A newloopback-lint-selftest.mjsfixture appends exactly that shape. It went red before the regex change and passes after. The lint now listshosted/server/dev.ts:45among non-test listeners and stays green because the file imports its guard.This settles one of the three FAILs in #873; #874 takes the Local networks candidate filter, and the installers'
ts ip -4 | head -1remains.Refs #873 — automated triage