deepmodeling / deepmodeling/dpgui
[Code scan] Pass --bind_all through to the web server
- Dominant language
- Vue
- Stars
- 9
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
This issue was found during a Codex global code scan of the repository.
Baseline commit: e3c5b38a99eb7ab778b5d8c68a5ed4ddf6cf91b3
Problem
The CLI exposes `--bind_all`, but the parsed value is never passed to `run()`. As a result, `dpgui --bind_all` still binds only to loopback addresses.
Code references:
https://github.com/deepmodeling/dpgui/blob/e3c5b38a99eb7ab778b5d8c68a5ed4ddf6cf91b3/dpgui/cli.py#L14-L23
https://github.com/deepmodeling/dpgui/blob/e3c5b38a99eb7ab778b5d8c68a5ed4ddf6cf91b3/dpgui/web.py#L66-L72
Relevant snippet:
```py
args = argparser.parse_args()
run(port=args.port)
```
Impact
Users who explicitly request network binding get the default local-only binding instead, which makes the CLI flag misleading and prevents intended remote access.
Suggested fix
Pass the parsed flag through:
```py
run(port=args.port, bind_all=args.bind_all)
```
Verification note
A local monkeypatch check with `sys.argv=['dpgui', '--bind_all', '--port', '1234']` showed that the current code calls `run` with only `{'port': 1234}`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.