Repository navigation
chore: back-merge release/0.8.0 into develop - #1733
Merged
Merged
Conversation
…hown (#1687) A recursive permission change collected symbolic links found below the selected folder and set the chosen mode on them. SFTP SETSTAT follows links, so the mode ended up on the link's target, which may lie outside the selected folder. Links below the root are now skipped, as recursive chown already does (spec 0020, section 7). Spec 0054 now states this for chmod as well. Co-authored-by: smart-ssh-maintainer[bot] <341545259+smart-ssh-maintainer[bot]@users.noreply.github.com>
…r and risk (#1705) The effective-command resolution skipped only -u/-g of sudo/doas, so the value of any other option was read as the command, and deny rules, the hard blacklist and the risk rating looked at the wrong word. - classify_sudo_option moves from risk/ to filter/wrapper_options.rs and is used by both the effective-command resolution and the sftp-server word check; it also knows -a/-c, unambiguous long-option abbreviations and doas -a. The rest of risk/sudo_options.rs becomes risk/wrapper_state.rs. - Wrapper stripping splits words with quotes in mind and compares wrapper names and options after quote removal, so quoted values or assignments with spaces stay one word. - A substitution stays part of its word while wrappers are stripped (resolve_segment_command), so `-D $(...)` keeps the real command; the risk classifier's segments include this resolution. Adversarial tests compare decision and risk with and without the option. Co-authored-by: smart-ssh-maintainer[bot] <341545259+smart-ssh-maintainer[bot]@users.noreply.github.com>
…and risk (#1730) env and sudo take every argument with a "=" before the command as an assignment, quoted or not. The wrapper stripping only knew the shell's unquoted NAME=value prefix, so a quoted assignment after env or sudo was read as the command, and deny rules, the hard blacklist and the risk rating looked at the wrong word. - classify_env_option reads env options like getopt: clusters, abbreviated long options, -a/--argv0, --env0-from, BSD -P, and -S, whose value is split and read again in place of the option. - After env options and around sudo options (not after "--", not a path starting with "/") every argument with "=" is skipped as an assignment. - An assignment whose expansion may split into more words, or an env -S value with other escapes or comments, leaves the command word unknown (Confirm); deny rules still see the command after it. - A command word that contains "=" (a quoted assignment without env or sudo) counts as unknown instead of a plain name. - NAME+=value in front of a command is an assignment. Adversarial tests compare decision and risk with and without the assignments and options. Co-authored-by: smart-ssh-maintainer[bot] <341545259+smart-ssh-maintainer[bot]@users.noreply.github.com>
* fix(app-logic): bound memory for remote file reads in preview, edit open and write backup (#1714) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * ci: re-run browser tests after job timeout (#1714) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * fix(app-logic): bound backup copy and sudo hash by stat size, clean partial backups (#1714) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * fix(app-logic): remove partial backup after first-write failure, align specs (#1714) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: smart-ssh-coder[bot] <338317697+smart-ssh-coder[bot]@users.noreply.github.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
…1731) * fix(android): exclude app data from system backup and device transfer, drop unused FileProvider (#1716) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * fix(android): address review on backup exclusion docs (#1716) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * ci: re-trigger checks (#1716) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: smart-ssh-coder[bot] <338317697+smart-ssh-coder[bot]@users.noreply.github.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
5 tasks
Contributor
Author
|
Needs maintainer (back-merge): CI failed on back-merge PR #1733: Test (ubuntu-latest) |
This was referenced Dec 4, 2026
Open
…s, compile rules once (#1741) * test(sftp): check the subdirectory entries of an elevated recursive chmod * perf(filter): compile rule patterns once User rule patterns were compiled again for every segment and text form, and the hard blacklist for every check. They are now compiled once: user rule patterns per pattern content and thread (the cache is emptied past 256 entries), the blacklist at first use. Matching is unchanged; a test compares it with the uncompiled form over the patterns and commands of the filter tests. * test(filter): sudo/doas options with a value keep decision and risk Unit tests for options that take a value, attached values, clusters and `--`, comparing filter decision and risk rating with and without the option. * feat(filter): raise the command length limit to 16384 bytes Commands up to 16384 bytes (before: 4096) are now parsed and checked in full by the filter engine and the risk classifier; longer commands still always ask for a confirmation. The work for longer commands stays bounded in relation to the limit. Tests that need an over-long command derive its size from the limit. * fix(filter): check every command a prefix, group or ambiguous text may run Deny rules, the hard blacklist and the risk rating now reach the command in more places, and nothing is weaker than before for any input. - Ambiguous and over-long commands are split naively at `;`, `&`, `|` and newlines; a Deny on a piece makes the whole command Deny, a blacklist hit is reported. Code that closes past the length limit and substitutions in ambiguous text are checked as well. - Subshells, groups and quoted separators are evaluated like the code of `eval`; a group body ends at its own closing bracket. - Command prefixes are read once, as the shell reads them (quotes, comments, ASCII blanks, `$'...'` escapes, substitutions as option values), so long prefix chains take linear time. The `env`/`sudo` assignment and `env` option handling of the release branch is kept. - An option word with an expansion, or an ambiguous abbreviated `sudo` long option, asks for confirmation and counts in every reading. - `eval`, `trap` and `alias` code is read with and without its substitutions, also past arguments that may expand to nothing. * fix(filter): read env -S values in a loop with a depth limit The text an `env -S` value gives is now queued and read again in a loop instead of a nested call per value, and all its readings share one budget. Past 16 values in a row the command counts as unknown and needs confirmation; Deny rules and the hard blacklist still see the command behind the remaining `env` and option words. A test evaluates the deepest inputs under the length limit on a thread with a 2 MiB stack and bounds their time. Test modules in a `tests/` folder under `src` are left out of the spawn-site check. * fix(filter): read the command past the env -S limit as a word stream Past 16 `env -S` values in a row the command still counts as unknown, but it is now read with the full option tables of `env`, `sudo` and the other wrappers: the words form one stream, and each further split value puts its words in front of the remaining ones, as `env` does it. Option values, further wrappers and option words with an expansion are read as before the limit, in linear time and within the shared reading budget. The spawn-site check skips a `tests/` folder only when a `tests.rs` sits next to it. * fix(filter): read glued env -S values in linear time An `env` option word that chains `-S` values into one word (`-S-S…`, `-vS-vS…`) is now read in one pass when its values have no blanks, quotes, escapes or expansions: `env -SVALUE` then runs as `env VALUE`. Such a value as the next word is taken as it is instead of being read again, and other split values are read within a bound on the bytes read again in total. * fix(filter): add no word for an empty env -S value An empty `env -S` value past the split limit added an empty word, which ended the `env` options, so the options behind it were taken for the command. It now adds no word, and empty words of a split value are left out, so the command behind them is found again. * fix(filter): keep empty words of a split env -S value A quoted empty word in a split `env -S` value is an argument of its own, such as the value of `-a ''`; dropping it let the option take the command as its value. Only an empty value as a whole adds no word. --------- Co-authored-by: smart-ssh-maintainer[bot] <341545259+smart-ssh-maintainer[bot]@users.noreply.github.com>
…dify (#1734) * fix(persistence-sqlite): refuse data dir overrides other users can modify (#1717) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * fix(persistence-sqlite): gate Unix-only reason constants (#1717) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * test(persistence-sqlite): drop unused imports on Windows (#1717) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * test(persistence-sqlite): fix imports of the Unix data dir tests (#1717) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * fix(persistence-sqlite): check owner and all allow ACEs on Windows, refuse non-regular pointer files (#1717) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * fix(persistence-sqlite): accept Administrators-owned data dirs on Windows (#1717) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: smart-ssh-coder[bot] <338317697+smart-ssh-coder[bot]@users.noreply.github.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Closed
6 tasks
6 tasks
This was referenced Dec 5, 2026
This was referenced Dec 5, 2026
…e command (#1743) * fix(filter): evaluate commands run by execution wrappers like the bare command Programs such as watch, su -c, runuser, sg, systemd-run, taskset, nsenter, chrt, unshare, setpriv, pkexec, run0, find -exec/-delete, ssh, mosh, pdsh, tmux, screen, parallel, kubectl/docker/podman exec, machinectl, ansible, flock -c, script -c, git (command-valued settings and options), awk and other interpreters, cmd /C and PowerShell run a command line they get as arguments. That command line is now evaluated like a command of its own, so Deny rules, the hard blacklist and the risk rating see it as they see the bare command, also nested. An Allow rule on the call still covers a plainly readable command that no other rule matches, as for env or timeout. Where the command cannot be read for sure (unknown options, commands from stdin or a file, keys sent to a session, cmd/PowerShell syntax, encoded PowerShell, code of another language that can start commands), the call needs at least Confirm. Each nesting level counts towards the existing depth limit, and parallel never multiplies the work of nested calls. A test checks that every program the risk classifier treats as passing its arguments to a shell is read by the filter. Docs: ADR 0165, spec 0002, threat model, codemap, changelog fragment. * docs(codemap): name only symbols the module defines for command_runners --------- Co-authored-by: smart-ssh-maintainer[bot] <341545259+smart-ssh-maintainer[bot]@users.noreply.github.com>
…elease/0.8.0 # Conflicts: # docs/adr/INDEX.md
…size limit Merging release/0.8.0 into develop grew both files past their file-size limit. Pure move, no behaviour change: - filter/parser/program_options.rs: where a shell, interpreter or source call takes its program from (ProgramSource, program_source, program_source_in_forms, the per-program OptionSpec tables, analyse_options, is_shell_program). - filter/parser/builtin_code.rs: the code eval, trap and alias run (eval_code, eval_codes, deferred_code, DeferredCode). - app-shell startup_inputs.rs: StartupInputs and startup_inputs, what the startup reads from the environment once per run. parser.rs and lib.rs re-export the moved items, so callers are unchanged. The allowlist entry of parser.rs is removed (now 963 lines), and the codemap names the new files.
…/0.8.0 # Conflicts: # crates/core/src/filter/mod.rs
Version 0.8.0 gesetzt, Lockfiles regeneriert, CHANGELOG-Abschnitt 0.8.0 mit 6 Highlights aus 233 Fragmenten, release-notes/0.8.0.json (en/de/fr/es), Fragmente entfernt; Prüfungen grün. Co-authored-by: smart-ssh-maintainer[bot] <341545259+smart-ssh-maintainer[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the fixes merged into
release/0.8.0back intodevelop(merge commit, no squash, so both branches keep a shared history). Head isback-merge/release/0.8.0, which followsrelease/0.8.0; it is only updated withrelease/0.8.0anddevelopmerges.Threat model: no change – back-merge of fixes already reviewed on
release/0.8.0(each with its own threat-model note)