Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hledger run does not support nesting run commands #2331

Open
Xitian9 opened this issue Feb 23, 2025 · 1 comment
Open

hledger run does not support nesting run commands #2331

Xitian9 opened this issue Feb 23, 2025 · 1 comment
Labels

Comments

@Xitian9
Copy link
Collaborator

Xitian9 commented Feb 23, 2025

hledger run does not yet support run commands itself. This prevents the use of re-usable scripts which can be embedded in multiple calls. That said, it may be worth thinking about whether this functionality would open security holes which could be exploited. What could a maliciously constructed (recursive?) run script do, and how would it be protected against?

echo "balance assets" > test.cmd
echo "run test.cmd" > nested.cmd

hledger run test.cmd
hledger run nested.cmd
adept added a commit to adept/hledger that referenced this issue Feb 23, 2025
@adept
Copy link
Collaborator

adept commented Feb 23, 2025

Thanks, this seems like a straightforward thing to fix. While it is true that a user could construct a series of co-recursive invocations that loop forever, i feel that people should be allowed to shoot themselves in a foot if they want to :)

adept added a commit to adept/hledger that referenced this issue Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants