Commit graph

10 commits

Author SHA1 Message Date
fusion44
4355c8eabd
fix(lightning): prevent shell injection in CLN local calls
Two authenticated code paths interpolated user-controlled input into a
shell command:

- decode_pay_request passed the bolt11 string into _make_local_call,
  which ran it via create_subprocess_shell; a crafted /lightning/
  decode-pay-req request could execute arbitrary commands. Switch
  _make_local_call to create_subprocess_exec with a discrete argv list.
- blitz_cln_unlock interpolated the wallet password into a
  cl.hsmtool.sh invocation run through a shell, and logged it in the
  clear. shlex.quote the interpolated values and mark the call
  sensitive=True.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 19:58:41 +02:00
fusion44
2b98912796 feat: replace call_script func with better func
use exec_bash_command instead

refs #123
2025-05-06 09:16:46 +02:00
fusion44
25e4be8441 feat: make config loading more flexible
If the environment variable BAPI_ENV_PATH is set, the config system will
try to read configs from the given path instead of .env in pwd

If no file is found .env in pwd will be used as a fallback

Env variables will always override settings in .env files.
2025-03-23 17:43:39 +01:00
fusion44
adf472ac8b feat: implement Ruff as a linter; fix given errors 2023-06-25 07:17:00 +02:00
fusion44
71ad84e704
feat: improve logging and error handling 2023-04-21 22:58:29 +02:00
fusion44
fd4d70fa9a
fix: CLN gRPC logging import 2023-04-12 19:18:35 +02:00
fusion44
494c8c3477
feat: add the RaspiBlitz CLN specialization
RaspiBlitz has build an unlock feature on top of CLN
2023-04-09 18:38:51 +02:00
fusion44
a448dbda8d
fix: more import path fixes 2022-10-09 20:16:49 +02:00
fusion44
4908f99999
fix: import problems and typos 2022-10-04 19:23:09 +02:00
fusion44
ba453e7bdb
refactor: switch to domain driven directory layout 2022-10-03 20:22:00 +02:00