Skip to content

Commit

Permalink
feat: ux improvement
Browse files Browse the repository at this point in the history
Describe the functional dependencies of `--prospective-execution` and
`--allow-untrusted-execution` in `datalad make`. Add warnings about
untrusted execution in a remote.
  • Loading branch information
christian-monch authored Dec 18, 2024
2 parents 0332201 + 6f7cdf8 commit a2d2351
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions datalad_remake/annexremotes/remake_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ def transfer_retrieve(self, key: str, file_name: str) -> None:
)
if get_allow_untrusted_execution(dataset_id):
trusted_key_ids = None
lgr.warning('datalad remake remote performs UNTRUSTED execution')
else:
trusted_key_ids = get_trusted_keys()

Expand Down
8 changes: 7 additions & 1 deletion datalad_remake/commands/make_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ class Make(ValidatedInterface):
doc='Skip commit signature verification before executing code. This '
'should only be used in a strictly controlled environment with '
'fully trusted datasets. Trusted dataset means: every commit '
'stems from a trusted entity. '
'stems from a trusted entity. This option has no effect when '
'combined with `--prospective-execution`. '
'DO NOT USE THIS OPTION, unless you are sure to understand the '
'consequences. One of which is that arbitrary parties can '
'execute arbitrary code under your account on your '
Expand Down Expand Up @@ -258,6 +259,11 @@ def __call__(
)
resolved_output = collect(worktree, ds, output_pattern)
else:
if allow_untrusted_execution:
lgr.warning(
'--allow-untrusted-execution has no effect if '
'--prospective-execution`is provided.'
)
resolved_output = set(output_pattern)

initialize_remotes(ds, resolved_output)
Expand Down

0 comments on commit a2d2351

Please sign in to comment.