Skip to content

serve: bind to loopback by default - #3

Merged
26zl merged 2 commits into
mainfrom
audit-fixes-2026-09-19
Sep 19, 2026
Merged

26zl merged 2 commits into
mainfrom
audit-fixes-2026-09-19

Conversation

@26zl

@26zl 26zl commented Sep 19, 2026

Copy link
Copy Markdown
Owner

serve printed http://127.0.0.1 but started python -m http.server / npx http-server without a bind address, and both listen on every interface by default. On a shared network the served directory was reachable by everyone.

  • pass --bind / -a explicitly, default 127.0.0.1
  • new -Bind parameter for when sharing on the LAN is intended
  • the banner prints the real address
  • help text and README updated

Tested on Windows 11 / PowerShell 7.6: the listener is on 127.0.0.1 only and answers there.

The banner said http://127.0.0.1 but neither backend was told to bind there:
python -m http.server and npx http-server both listen on every interface by
default, so the directory was reachable from the whole LAN.

Pass --bind / -a explicitly, default to 127.0.0.1, and add -Bind for the case
where sharing on the network is intended. The banner now prints the real
address.
The install notes told people to add powershell.exe and pwsh.exe to the CFA
allow-list for good. That hands every PowerShell script, ransomware
included, write access to the protected folders, which is the one thing
CFA is there to stop. The hard-coded pwsh path is also wrong for the Store
build, whose path changes with every update.

Allow the running host for the install only and remove it afterwards.
Describe the actual symptom (a misleading "Could not find file" plus
Defender event 1123), and drop the advice to move the clone: it is the
write to Documents that is blocked, not the read from the clone.
@26zl
26zl merged commit 1d20503 into main Sep 19, 2026
5 of 6 checks passed
@26zl
26zl deleted the audit-fixes-2026-09-19 branch September 19, 2026 23:19
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