Newly introduced findings

List of Findings

Error: CLIPPY_WARNING: [#def1]
crates/openshell-bootstrap/src/container_runtime.rs:213:5: warning: this `map_or` can be simplified
#      |
#  213 |     current_uid().map_or(false, |uid| uid != 0)
#      |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#unnecessary_map_or
#      = note: `-W clippy::unnecessary-map-or` implied by `-W clippy::all`
#      = help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_map_or)]`
#  help: use is_some_and instead
#      |
#  213 -     current_uid().map_or(false, |uid| uid != 0)
#  213 +     current_uid().is_some_and(|uid| uid != 0)
#      |

Error: CLIPPY_WARNING: [#def2]
crates/openshell-bootstrap/src/docker.rs:545:1: warning: this function has too many arguments (13/7)
#      |
#  545 | / pub async fn ensure_container(
#  546 | |     docker: &Docker,
#  547 | |     name: &str,
#  548 | |     image_ref: &str,
#  ...   |
#  558 | |     resume: bool,
#  559 | | ) -> Result<u16> {
#      | |________________^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#too_many_arguments
#      = note: `-W clippy::too-many-arguments` implied by `-W clippy::all`
#      = help: to override `-W clippy::all` add `#[allow(clippy::too_many_arguments)]`

Error: CLIPPY_WARNING: [#def3]
crates/openshell-cli/src/main.rs:1638:17: warning: large future with a size of 16784 bytes
#       |
#  1638 | /                 run::gateway_admin_deploy(
#  1639 | |                     &name,
#  1640 | |                     remote.as_deref(),
#  1641 | |                     ssh_key.as_deref(),
#  ...    |
#  1650 | |                     cli.container_runtime.as_deref(),
#  1651 | |                 )
#       | |_________________^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#large_futures
#       = note: `-W clippy::large-futures` implied by `-W clippy::pedantic`
#       = help: to override `-W clippy::pedantic` add `#[allow(clippy::large_futures)]`
#  help: consider `Box::pin` on it
#       |
#  1638 ~                 Box::pin(run::gateway_admin_deploy(
#  1639 +                     &name,
#  1640 +                     remote.as_deref(),
#  1641 +                     ssh_key.as_deref(),
#  1642 +                     port,
#  1643 +                     gateway_host.as_deref(),
#  1644 +                     recreate,
#  1645 +                     plaintext,
#  1646 +                     disable_gateway_auth,
#  1647 +                     registry_username.as_deref(),
#  1648 +                     registry_token.as_deref(),
#  1649 +                     gpu,
#  1650 +                     cli.container_runtime.as_deref(),
#  1651 +                 ))
#       |

Error: CLIPPY_WARNING: [#def4]
crates/openshell-cli/src/run.rs:1897:9: warning: large future with a size of 17000 bytes
#       |
#  1897 |         crate::bootstrap::run_bootstrap(remote, ssh_key, requested_gpu).await?;
#       |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Box::pin` on it: `Box::pin(crate::bootstrap::run_bootstrap(remote, ssh_key, requested_gpu))`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#large_futures
#       = note: `-W clippy::large-futures` implied by `-W clippy::pedantic`
#       = help: to override `-W clippy::pedantic` add `#[allow(clippy::large_futures)]`

Error: CLIPPY_WARNING: [#def5]
crates/openshell-cli/src/run.rs:1900:5: warning: large future with a size of 19624 bytes
#       |
#  1900 | /     sandbox_create(
#  1901 | |         &server,
#  1902 | |         name,
#  1903 | |         from,
#  ...    |
#  1918 | |         &tls,
#  1919 | |     )
#       | |_____^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#large_futures
#  help: consider `Box::pin` on it
#       |
#  1900 ~     Box::pin(sandbox_create(
#  1901 +         &server,
#  1902 +         name,
#  1903 +         from,
#  1904 +         &gateway_name,
#  1905 +         upload,
#  1906 +         keep,
#  1907 +         gpu,
#  1908 +         editor,
#  1909 +         remote,
#  1910 +         ssh_key,
#  1911 +         providers,
#  1912 +         policy,
#  1913 +         forward,
#  1914 +         command,
#  1915 +         tty_override,
#  1916 +         Some(false),
#  1917 +         auto_providers_override,
#  1918 +         &tls,
#  1919 +     ))
#       |

Error: CLIPPY_WARNING: [#def6]
crates/openshell-cli/src/run.rs:2022:17: warning: large future with a size of 17000 bytes
#       |
#  2022 |                 crate::bootstrap::run_bootstrap(remote, ssh_key, requested_gpu).await?;
#       |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Box::pin` on it: `Box::pin(crate::bootstrap::run_bootstrap(remote, ssh_key, requested_gpu))`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#large_futures

Error: CLIPPY_WARNING: [#def7]
crates/openshell-cli/src/run.rs:2768:25: warning: unnecessary boolean `not` operation
#       |
#  2768 |       let stdin_payload = if !std::io::stdin().is_terminal() {
#       |  _________________________^
#  2769 | |         tokio::task::spawn_blocking(|| {
#  2770 | |             let limit = (MAX_STDIN_PAYLOAD + 1) as u64;
#  2771 | |             let mut buf = Vec::new();
#  ...    |
#  2787 | |         Vec::new()
#  2788 | |     };
#       | |_____^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#if_not_else
#  help: try
#       |
#  2768 ~     let stdin_payload = if std::io::stdin().is_terminal() {
#  2769 +         Vec::new()
#  2770 +     } else {
#  2771 +         tokio::task::spawn_blocking(|| {
#  2772 +             let limit = (MAX_STDIN_PAYLOAD + 1) as u64;
#  2773 +             let mut buf = Vec::new();
#  2774 +             std::io::stdin()
#  2775 +                 .take(limit)
#  2776 +                 .read_to_end(&mut buf)
#  2777 +                 .into_diagnostic()?;
#  2778 +             if buf.len() > MAX_STDIN_PAYLOAD {
#  2779 +                 return Err(miette::miette!(
#  2780 +                     "stdin payload exceeds {} byte limit; pipe smaller inputs or use `sandbox upload`",
#  2781 +                     MAX_STDIN_PAYLOAD
#  2782 +                 ));
#  2783 +             }
#  2784 +             Ok(buf)
#  2785 +         })
#  2786 +         .await
#  2787 +         .into_diagnostic()?? // first ? unwraps JoinError, second ? unwraps Result
#  2788 ~     };
#       |

Error: CLIPPY_WARNING: [#def8]
crates/openshell-policy/src/lib.rs:105:15: warning: this argument (2 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
#      |
#  105 | fn is_zero(v: &u16) -> bool {
#      |               ^^^^ help: consider passing by value instead: `u16`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#trivially_copy_pass_by_ref
#      = note: `-W clippy::trivially-copy-pass-by-ref` implied by `-W clippy::pedantic`
#      = help: to override `-W clippy::pedantic` add `#[allow(clippy::trivially_copy_pass_by_ref)]`

Scan Properties

analyzer-version-clippy1.94.1
analyzer-version-cppcheck2.20.0
analyzer-version-gcc16.0.1
analyzer-version-gcc-analyzer16.0.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.94.1
diffbase-analyzer-version-cppcheck2.20.0
diffbase-analyzer-version-gcc16.0.1
diffbase-analyzer-version-gcc-analyzer16.0.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-91.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20260320.200800.gd35503f.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-nameopenshell-0.0.21-1.20260406205235926512.midstream.73.g8592ab0
diffbase-store-results-to/tmp/tmptqag_i0b/openshell-0.0.21-1.20260406205235926512.midstream.73.g8592ab0.tar.xz
diffbase-time-created2026-04-06 23:00:33
diffbase-time-finished2026-04-06 23:17:01
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,gcc,shellcheck,clippy,unicontrol' '-o' '/tmp/tmptqag_i0b/openshell-0.0.21-1.20260406205235926512.midstream.73.g8592ab0.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmptqag_i0b/openshell-0.0.21-1.20260406205235926512.midstream.73.g8592ab0.src.rpm'
diffbase-tool-versioncsmock-3.8.4.20260302.153719.g8203630-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-91.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260320.200800.gd35503f.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameopenshell-0.0.21-1.20260406223917424056.pr21.75.g9ac1ab8
store-results-to/tmp/tmpgy68ochz/openshell-0.0.21-1.20260406223917424056.pr21.75.g9ac1ab8.tar.xz
time-created2026-04-06 23:17:58
time-finished2026-04-06 23:33:56
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,gcc,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpgy68ochz/openshell-0.0.21-1.20260406223917424056.pr21.75.g9ac1ab8.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpgy68ochz/openshell-0.0.21-1.20260406223917424056.pr21.75.g9ac1ab8.src.rpm'
tool-versioncsmock-3.8.4.20260302.153719.g8203630-1.el9