Repository Analysis

rustdesk/rustdesk

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

2.1 Likely human-written View on GitHub
2.1
Adjusted Score
2.1
Raw Score
100%
Time Factor
2026-05-29
Last Push
115,212
Stars
Rust
Language
241,849
Lines of Code
620
Files
314
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 1HIGH 9MEDIUM 100LOW 204

Pattern Findings

314 matches across 13 categories. Click a row to expand file-level details.

Excessive Try-Catch Wrapping90 hits · 204 pts
SeverityFileLineSnippet
MEDIUMres/audits.py153 print(f"Error: HTTP {response.status_code} - {response.text}")
MEDIUMres/audits.py159 print(f"Error: {response_json['error']}")
MEDIUMres/ab.py570 print("Error: --ab-name is required for add-ab command")
MEDIUMres/ab.py579 print("Error: --ab-name or --ab-guid is required for this command")
MEDIUMres/ab.py583 print("Error: Cannot specify both --ab-name and --ab-guid")
MEDIUMres/ab.py593 print(f"Error: Address book '{args.ab_name}' not found")
MEDIUMres/ab.py608 print("Error: --ab-name or --ab-guid is required for this command")
MEDIUMres/ab.py612 print("Error: Cannot specify both --ab-name and --ab-guid")
MEDIUMres/ab.py622 print(f"Error: Address book '{args.ab_name}' not found")
MEDIUMres/ab.py704 print("Error: --tag-name is required for add-tag command")
MEDIUMres/ab.py712 print("Error: --tag-name is required for update-tag command")
MEDIUMres/ab.py720 print("Error: --tag-name is required for delete-tag command")
MEDIUMres/ab.py732 print("Error: --rule-permission is required for add-rule command")
MEDIUMres/ab.py738 print("Error: Cannot specify both --rule-user and --rule-group")
MEDIUMres/ab.py745 print("Error: Must specify --rule-type=everyone, --rule-user, or --rule-group")
MEDIUMres/ab.py752 print("Error: --rule-user is required when rule-type=user")
MEDIUMres/ab.py755 print("Error: --rule-group is required when rule-type=group")
MEDIUMres/ab.py758 print("Error: Cannot specify --rule-group when rule-type=user")
MEDIUMres/ab.py761 print("Error: Cannot specify --rule-user when rule-type=group")
MEDIUMres/ab.py764 print("Error: Cannot specify --rule-user or --rule-group when rule-type=everyone")
MEDIUMres/ab.py772 print("Error: --rule-guid is required for update-rule command")
MEDIUMres/ab.py775 print("Error: --rule-permission is required for update-rule command")
MEDIUMres/ab.py783 print("Error: --rule-guid is required for delete-rule command")
MEDIUMres/ab.py44 print(f"Error: HTTP {response.status_code} - {response.text}")
MEDIUMres/ab.py49 print(f"Error: {response_json['error']}")
MEDIUMres/ab.py96 print(f"Error: HTTP {response.status_code} - {response.text}")
MEDIUMres/ab.py101 print(f"Error: {response_json['error']}")
MEDIUMres/ab.py135 print(f"Error: HTTP {response.status_code} - {response.text}")
MEDIUMres/ab.py141 print(f"Error: {response_json['error']}")
MEDIUMres/ab.py413 print(f"Error: HTTP {response.status_code} - {response.text}")
MEDIUMres/ab.py418 print(f"Error: {response_json['error']}")
MEDIUMres/ab.py634 print("Error: --peer-id is required for add-peer command")
MEDIUMres/ab.py663 print("Error: --peer-id is required for update-peer command")
MEDIUMres/ab.py692 print("Error: --peer-id is required for delete-peer command")
MEDIUMres/device-groups.py17 print(f"Error: HTTP {response.status_code}: {response.text}")
MEDIUMres/device-groups.py25 print(f"Error: {json_data['error']}")
MEDIUMres/device-groups.py51 print(f"Error: HTTP {r.status_code} - {r.text}")
MEDIUMres/device-groups.py55 print(f"Error: {res['error']}")
MEDIUMres/device-groups.py88 print(f"Error: Group '{name}' not found")
MEDIUMres/device-groups.py110 print(f"Error: Group '{n}' not found")
LOWres/device-groups.py191 except Exception:
MEDIUMres/device-groups.py231 print("Error: --name is required")
MEDIUMres/device-groups.py239 print("Error: --name is required")
MEDIUMres/device-groups.py247 print("Error: --name is required (supports comma separated)")
MEDIUMres/device-groups.py264 print("Error: --name and --ids are required for add/remove devices")
MEDIUMres/strategies.py156 print(f"Error: Strategy '{strategy_name}' not found")
MEDIUMres/strategies.py171 print(f"Error: Device '{peer}' not found")
MEDIUMres/strategies.py186 print(f"Error: User '{user}' not found")
MEDIUMres/strategies.py201 print(f"Error: Device group '{dg}' not found")
MEDIUMres/strategies.py248 print(f"Error: Strategy '{args.name}' not found")
MEDIUMres/strategies.py255 print("Error: --name or --guid is required for view command")
MEDIUMres/strategies.py260 print("Error: --name is required")
MEDIUMres/strategies.py266 print("Error: --name is required")
MEDIUMres/strategies.py272 print("Error: --name is required")
MEDIUMres/strategies.py275 print("Error: at least one of --peers, --users, or --device-groups is required")
MEDIUMres/strategies.py17 print(f"Error: HTTP {response.status_code}: {response.text}")
MEDIUMres/strategies.py25 print(f"Error: {json_data['error']}")
MEDIUMres/strategies.py70 print(f"Error: Strategy '{name}' not found")
MEDIUMres/strategies.py83 print(f"Error: Strategy '{name}' not found")
MEDIUMres/strategies.py288 print("Error: at least one of --peers, --users, or --device-groups is required")
30 more matches not shown…
Over-Commented Block147 hits · 144 pts
SeverityFileLineSnippet
LOWres/startwm.sh1#!/usr/bin/env bash
LOWres/msi/CustomActions/CustomActions.cpp1// CustomAction.cpp : Defines the entry point for the custom action.
LOWres/msi/CustomActions/CustomActions.cpp161 WcaLog(LOGMSG_STANDARD, "Runtime cleanup deleting '%ls'.", fullPath);
LOWres/msi/CustomActions/RemotePrinter.cpp1#include "pch.h"
LOWres/msi/CustomActions/pch.h1// pch.h: This is a precompiled header file.
LOWres/msi/CustomActions/framework.h1#pragma once
LOWlibs/enigo/appveyor.yml1# AppVeyor configuration template for Rust using rustup for Rust installation
LOWlibs/enigo/appveyor.yml21# ARCH-pc-windows-TOOLCHAIN
LOWlibs/enigo/appveyor.yml81 target: i686-pc-windows-gnu
LOWlibs/enigo/src/lib.rs1//! Enigo lets you simulate mouse and keyboard input-events as if they were
LOWlibs/enigo/src/lib.rs21//! Possible use cases could be for testing user interfaces on different
LOWlibs/enigo/src/lib.rs41//! enigo.key_click(Key::Layout('v'));
LOWlibs/enigo/src/lib.rs81/// DSL parser module
LOWlibs/enigo/src/lib.rs121 ScrollRight,
LOWlibs/enigo/src/lib.rs141 ///
LOWlibs/enigo/src/lib.rs161 ///
LOWlibs/enigo/src/lib.rs181 /// # Example
LOWlibs/enigo/src/lib.rs201 ///
LOWlibs/enigo/src/lib.rs221 /// let mut enigo = Enigo::new();
LOWlibs/enigo/src/lib.rs241 fn mouse_scroll_x(&mut self, length: i32);
LOWlibs/enigo/src/lib.rs261/// A key on the keyboard.
LOWlibs/enigo/src/lib.rs321 PageUp,
LOWlibs/enigo/src/lib.rs461 fn key_sequence_parse_try(&mut self, sequence: &str) -> Result<(), dsl::ParseError>
LOWlibs/enigo/src/lib.rs501#[cfg(any(target_os = "android", target_os = "ios"))]
LOWlibs/enigo/src/dsl.rs1use crate::{Key, KeyboardControllable};
LOWlibs/enigo/src/macos/macos_impl.rs141 self.flags |= flag;
LOWlibs/scrap/src/common/hwcodec.rs501 #[cfg(feature = "vram")]
LOWlibs/scrap/src/bindings/yuv_ffi.h1#include <libyuv/convert.h>
LOWlibs/scrap/src/bindings/vpx_ffi.h1#include <vpx/vp8.h>
LOWlibs/scrap/src/bindings/aom_ffi.h1#include <aom/aom.h>
LOWlibs/clipboard/src/platform/unix/local_file.rs141 buf.put(&[0u8; 32][..]);
LOWlibs/clipboard/src/platform/unix/fuse/cs.rs1//! fuse server implement
LOWlibs/clipboard/src/windows/wf_cliprdr.c21 * See the License for the specific language governing permissions and
LOWlibs/clipboard/src/windows/wf_cliprdr.c41
LOWlibs/clipboard/src/windows/wf_cliprdr.c61#define CB_FILECONTENTS_REQUEST 0x0008
LOWlibs/clipboard/src/windows/wf_cliprdr.c121#define CHANNEL_RC_TOO_MANY_CHANNELS 5
LOWlibs/clipboard/src/windows/wf_cliprdr.c2861 rc = ERROR_INTERNAL_ERROR;
LOWflutter/build_fdroid.sh1#!/bin/bash
LOWflutter/pubspec.yaml1name: flutter_hbb
LOWflutter/pubspec.yaml181
LOWflutter/linux/wayland_shortcuts_inhibit.h1// Wayland keyboard shortcuts inhibit support
LOW…n/kotlin/com/carriez/flutter_hbb/RdClipboardManager.kt21 private val supportedMimeTypes = arrayOf(
LOWflutter/lib/consts.dart281/// Minimum server version required for relative mouse mode (MOUSE_TYPE_MOVE_RELATIVE).
LOWflutter/lib/common.dart2821 await windowManager.close();
LOWflutter/lib/desktop/pages/remote_page.dart161 // customCursorController.registerNeedUpdateCursorCallback(
LOW…utter/lib/desktop/widgets/material_mod_popup_menu.dart1// Copyright 2014 The Flutter Authors. All rights reserved.
LOW…utter/lib/desktop/widgets/material_mod_popup_menu.dart41
LOW…utter/lib/desktop/widgets/material_mod_popup_menu.dart61/// several icons, or a single entry, for example a menu item with an icon (see
LOW…utter/lib/desktop/widgets/material_mod_popup_menu.dart81 /// entry when aligning the selected entry over the given `position`. It is
LOW…utter/lib/desktop/widgets/material_mod_popup_menu.dart101///
LOW…utter/lib/desktop/widgets/material_mod_popup_menu.dart181 childParentData.offset = Offset.zero;
LOW…utter/lib/desktop/widgets/material_mod_popup_menu.dart201///
LOW…utter/lib/desktop/widgets/material_mod_popup_menu.dart261
LOW…utter/lib/desktop/widgets/material_mod_popup_menu.dart281 ///
LOW…utter/lib/desktop/widgets/material_mod_popup_menu.dart301 @override
LOW…utter/lib/desktop/widgets/material_mod_popup_menu.dart321/// This class takes two type arguments. The second, `W`, is the exact type of
LOW…utter/lib/desktop/widgets/material_mod_popup_menu.dart401/// To show a popup menu, use the [showMenu] function. To create a button that
LOW…utter/lib/desktop/widgets/material_mod_popup_menu.dart421/// onSelected: (Commands result) {
LOW…utter/lib/desktop/widgets/material_mod_popup_menu.dart441/// child: ListTile(leading: Icon(null), title: Text('Bring hurricane')),
LOW…utter/lib/desktop/widgets/material_mod_popup_menu.dart481 height: height,
87 more matches not shown…
Self-Referential Comments10 hits · 40 pts
SeverityFileLineSnippet
MEDIUMres/job.py229 # Create a parser for the "sign_one_file" command
MEDIUMres/job.py235 # Create a parser for the "sign_files" command
MEDIUMres/job.py246 # Create a parser for the "fetch" command
MEDIUMres/job.py249 # Create a parser for the "update_status" command
MEDIUMres/job.py256 # Create a parser for the "delete_task" command
MEDIUMres/job.py260 # Create a parser for the "create" command
MEDIUMres/job.py270 # Create a parser for the "upload_file" command
MEDIUMres/job.py279 # Create a parser for the "get_status" command
MEDIUMres/job.py287 # Create a parser for the "download_files" command
MEDIUMflutter/pubspec.yaml145# The following section is specific to Flutter.
Cross-Language Confusion6 hits · 30 pts
SeverityFileLineSnippet
HIGHbuild.py174 pushd /tmp && git clone https://github.com/SoLongAndThanksForAllThePizza/flutter_rust_bridge --depth=1 && po
HIGHbuild.py175 pushd /tmp/flutter_rust_bridge/frb_codegen && cargo install --path . --locked && popd
HIGHbuild.py176 pushd flutter && flutter pub get && popd
HIGHbuild.py333 system2('rm tmpdeb/usr/bin/rustdesk || true')
HIGHbuild.py376 system2('rm tmpdeb/usr/bin/rustdesk || true')
HIGHbuild.py525 system2('ln -s res/pacman_install && ln -s res/PKGBUILD')
Deep Nesting18 hits · 16 pts
SeverityFileLineSnippet
LOWbuild.py56
LOWbuild.py195
LOWbuild.py465
LOWres/lang.py40
LOWres/audits.py108
LOWres/audits.py289
LOWres/ab.py114
LOWres/ab.py483
LOWres/device-groups.py196
LOWres/strategies.py139
LOWres/strategies.py218
LOWres/users.py186
LOWres/job.py66
LOWres/job.py86
LOWres/job.py201
LOWres/job.py223
LOWres/devices.py129
LOWres/user-groups.py230
Redundant / Tautological Comments11 hits · 16 pts
SeverityFileLineSnippet
LOWres/ab.py189 # Check if at least one parameter is provided for update
LOWres/ab.py239 # Check if tag name matches a predefined color
LOWres/ab.py341 # Check if at least one parameter is provided for update
LOWres/strategies.py164 # Check if it's already a GUID format
LOWres/strategies.py179 # Check if it's already a GUID format
LOWres/strategies.py194 # Check if it's already a GUID format
LOWres/users.py245 # Check if we need user confirmation for multiple users
LOWres/job.py74 # Check if the request was successful
LOWres/job.py94 # Check if the request was successful
LOWres/devices.py172 # Check if we need user confirmation for multiple devices
LOWflutter/build_android_deps.sh30# Check if vcpkg.json is one level up - in root directory of RD
Cross-File Repetition3 hits · 15 pts
SeverityFileLineSnippet
HIGHres/device-groups.py0check api response and handle errors. two error cases: 1. status code is not 200 -> exit with error 2. response contains
HIGHres/strategies.py0check api response and handle errors. two error cases: 1. status code is not 200 -> exit with error 2. response contains
HIGHres/user-groups.py0check api response and handle errors. two error cases: 1. status code is not 200 -> exit with error 2. response contains
Hyper-Verbose Identifiers14 hits · 12 pts
SeverityFileLineSnippet
LOWbuild.py160def generate_build_script_for_docker():
LOWbuild.py195def download_extract_features(features, res_dir):
LOWbuild.py312def ffi_bindgen_function_refactor():
LOWbuild.py423def build_flutter_arch_manjaro(version, features):
LOWres/audits.py21def parse_local_time_to_utc_string(time_str):
LOWres/audits.py65def get_console_operation_name(operation_code):
LOWres/strategies.py123def get_device_group_guid_by_name(url, token, name):
LOWres/users.py154def disable_email_verification(url, token, user_guids):
LOWres/msi/preprocess.py94def read_lines_and_start_index(file_path, tag_start, tag_end):
LOWres/msi/preprocess.py114def insert_components_between_tags(lines, index_start, app_name, dist_dir):
LOWres/msi/preprocess.py182def replace_app_name_in_langs(app_name):
LOWres/msi/preprocess.py192def replace_app_name_in_custom_actions(app_name):
LOWres/msi/preprocess.py229def gen_custom_dialog_bitmaps():
LOWres/msi/preprocess.py507def replace_component_guids_in_wxs():
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippet
CRITICALflutter/lib/desktop/widgets/tabbar_widget.dart749 widget.tabController.state.value.tabs.any((tab) => tab.key == key))
Slop Phrases3 hits · 8 pts
SeverityFileLineSnippet
LOWlibs/scrap/src/quartz/config.rs22 /// Don't forget to CFRelease this!
MEDIUMflutter/pubspec.yaml148 # included with your application, so that you can use the icons in
MEDIUMappimage/AppImageBuilder-x86_64.yml42 # We modify APPDIR_LIBRARY_PATH to use system lib first because gst crashed if not doing so, but you can try to chan
Unused Imports8 hits · 7 pts
SeverityFileLineSnippet
LOWres/ab.py6
LOWres/ab.py6
LOWres/users.py5
LOWres/users.py5
LOWres/job.py8
LOWres/job.py9
LOWres/devices.py5
LOWres/msi/preprocess.py11
AI Slop Vocabulary2 hits · 4 pts
SeverityFileLineSnippet
LOWlibs/enigo/appveyor.yml102# For simple configurations, instead of using the build matrix, you can simply set the
MEDIUM…utter/lib/desktop/widgets/material_mod_popup_menu.dart1210 /// and the button will utilize an [InkWell] for taps.
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippet
LOWsrc/platform/windows.rs3419 // We need to check if is_root here because if `update_me()` is called from