Repository Analysis

tiann/KernelSU

A Kernel based root solution for Android

1.7 Likely human-written View on GitHub
1.7
Adjusted Score
1.7
Raw Score
100%
Time Factor
2026-05-29
Last Push
16,654
Stars
Kotlin
Language
86,219
Lines of Code
577
Files
80
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 7HIGH 0MEDIUM 2LOW 71

Pattern Findings

80 matches across 7 categories. Click a row to expand file-level details.

Hallucination Indicators7 hits · 70 pts
SeverityFileLineSnippet
CRITICAL…me/weishu/kernelsu/ui/viewmodel/ModuleRepoViewModel.kt79 me.weishu.kernelsu.ui.util.HanziToPinyin.getInstance().toPinyinString(it.moduleName)
CRITICAL…a/me/weishu/kernelsu/ui/viewmodel/TemplateViewModel.kt85 me.weishu.kernelsu.data.model.TemplateInfo.fromJSON(JSONObject(getAppProfileTemplate(id)))
CRITICAL…ava/me/weishu/kernelsu/ui/viewmodel/ModuleViewModel.kt147 me.weishu.kernelsu.ui.util.HanziToPinyin.getInstance().toPinyinString(it.name)
CRITICAL…u/ui/component/rebootlistpopup/RebootListPopupMiuix.kt72 me.weishu.kernelsu.ui.component.miuix.DropdownItem(
CRITICAL…eishu/kernelsu/ui/screen/appprofile/AppProfileMiuix.kt339 val info = me.weishu.kernelsu.ui.viewmodel.getTemplateInfoById(selected)
CRITICAL…java/me/weishu/kernelsu/ui/screen/home/HomeMaterial.kt581 latestVersionInfo = me.weishu.kernelsu.ui.util.module.LatestVersionInfo(),
CRITICAL…weishu/kernelsu/ui/screen/template/TemplateMaterial.kt194 verticalArrangement = androidx.compose.foundation.layout.Arrangement.spacedBy(2.dp),
Over-Commented Block62 hits · 62 pts
SeverityFileLineSnippet
LOWuapi/ksu.h1#ifndef __KSU_UAPI_KSU_H
LOW.cargo/config.example.toml1# This file contains required configuration to correctly build ksud across platforms.
LOW.cargo/config.example.toml21# BINDGEN_EXTRA_CLANG_ARGS_x86_64_linux_android=--sysroot=ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/darwin-x86_64/sysroo
LOWmanager/app/src/main/cpp/logging.h1#pragma once
LOWmanager/app/src/main/cpp/logging.h21#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
LOWuserspace/ksud/src/boot_patch.rs401 /// LKM module path to replace, if not specified, will use the builtin one
LOWuserspace/ksud/src/boot_patch.rs421 /// even if --flash is specified.
LOWuserspace/ksud/src/boot_patch.rs441 /// written to the output directory even if --flash is specified.
LOWuserspace/ksud/src/boot_patch.rs761 result
LOWuserspace/ksud/src/ksu_uapi.h1#include "uapi/ksu.h"
LOWkernel/infra/seccomp_cache.c1#include <linux/version.h>
LOWkernel/infra/file_wrapper.c1#include <linux/gfp.h>
LOWkernel/infra/event_queue.c1#include <linux/ktime.h>
LOWkernel/infra/su_mount_ns.c1#include <linux/dcache.h>
LOWkernel/infra/event_queue.h1#ifndef KSU_EVENT_QUEUE_H
LOWkernel/infra/symbol_resolver.c1#include <linux/kallsyms.h>
LOWkernel/infra/symbol_resolver.c21// https://github.com/torvalds/linux/commit/d721def7392a7348ffb9f3583b264239cbd3702c
LOWkernel/core/init.c1#include <linux/export.h>
LOWkernel/core/init.c21#include "supercall/supercall.h"
LOWkernel/include/klog.h1#ifndef __KSU_H_KLOG
LOWkernel/include/arch.h1#ifndef __KSU_H_ARCH
LOWkernel/include/arch.h21
LOWkernel/include/arch.h41#define __PT_RC_REG ax
LOWkernel/include/arch.h61#define PT_REGS_PARM3(x) (__PT_REGS_CAST(x)->__PT_PARM3_REG)
LOWkernel/runtime/boot_event.c1#include "feature/selinux_hide.h"
LOWkernel/runtime/ksud_integration.c1#include "feature/selinux_hide.h"
LOWkernel/runtime/ksud_integration.c21#include <linux/stat.h>
LOWkernel/manager/pkg_observer.c1// SPDX-License-Identifier: GPL-2.0
LOWkernel/manager/throne_tracker.c1#include <linux/err.h>
LOWkernel/manager/apk_sign.c1#include <linux/err.h>
LOWkernel/supercall/supercall.c1#include <linux/anon_inodes.h>
LOWkernel/supercall/dispatch.c1#include <linux/capability.h>
LOWkernel/sulog/fd.c1#include <linux/anon_inodes.h>
LOWkernel/sulog/event.c1#include <asm/current.h>
LOWkernel/feature/kernel_umount.c1#include <linux/sched.h>
LOWkernel/feature/sucompat.c1#include <linux/compiler_types.h>
LOWkernel/feature/adb_root.c1
LOWkernel/feature/selinux_hide.c1#include "selinux_hide.h"
LOWkernel/selinux/rules.c1#include "linux/rcupdate.h"
LOWkernel/selinux/sepolicy.c1#include "ss/avtab.h"
LOWkernel/selinux/sepolicy.c61// rules
LOWkernel/selinux/selinux.h1#ifndef __KSU_H_SELINUX
LOWkernel/hook/tp_marker.c1#include "hook/tp_marker.h"
LOWkernel/hook/patch_memory.h1/* SPDX-License-Identifier: GPL-2.0-only */
LOWkernel/hook/patch_memory.h21#include "asm/text-patching.h" // IWYU pragma: keep
LOWkernel/hook/lsm_hook.c1#include <linux/compiler.h>
LOWkernel/hook/syscall_hook_manager.c1#include "linux/printk.h"
LOWkernel/hook/setuid_hook.c1#include <linux/compiler.h>
LOWkernel/hook/syscall_event_bridge.c1#include "linux/compiler.h"
LOWkernel/hook/lsm_hook.h41// This API implements runtime patching of existing LSM hook slots. It is a
LOWkernel/hook/lsm_hook.h61// If hook->target_name is NULL, the target symbol defaults to "bpf_lsm_<hook>".
LOWkernel/hook/syscall_hook.h1#ifndef __KSU_H_KSU_SYSCALL_HOOK
LOWkernel/hook/syscall_hook.h21// Register a handler into the dispatcher's routing table for syscall @nr.
LOWkernel/hook/arm64/syscall_hook.c1#ifdef __aarch64__
LOWkernel/hook/arm64/patch_memory.c1/* SPDX-License-Identifier: GPL-2.0-only */
LOWkernel/hook/arm64/patch_memory.c101#define ksu_flush_dcache(start, sz) __flush_dcache_area((void *)start, sz)
LOWkernel/hook/x86_64/syscall_hook.c1#ifdef __x86_64__
LOWkernel/hook/x86_64/patch_memory.c1/* SPDX-License-Identifier: GPL-2.0-only */
LOWkernel/policy/allowlist.h1#ifndef __KSU_H_ALLOWLIST
LOWkernel/policy/app_profile.c1#include <linux/capability.h>
2 more matches not shown…
Self-Referential Comments2 hits · 5 pts
SeverityFileLineSnippet
MEDIUM.cargo/config.example.toml1# This file contains required configuration to correctly build ksud across platforms.
MEDIUMscripts/setup_cargo_config.py110 "# This file is auto-generated by scripts/setup_cargo_config.py.",
Unused Imports3 hits · 3 pts
SeverityFileLineSnippet
LOWscripts/ksubot.py5
LOWkernel/.vscode/generate_compdb.py3
LOWkernel/.vscode/generate_compdb.py3
Hyper-Verbose Identifiers2 hits · 2 pts
SeverityFileLineSnippet
LOWrepack_apk.py185def find_ksud_binaries_by_arch(ksud_build_type: str, arch_filters: List[str]) -> Dict[str, Path]:
LOWrepack_apk.py218def collect_existing_ksud_arches(apk_path: Path) -> List[str]:
Deep Nesting2 hits · 2 pts
SeverityFileLineSnippet
LOWrepack_apk.py94
LOWrepack_apk.py239
Excessive Try-Catch Wrapping2 hits · 2 pts
SeverityFileLineSnippet
LOWrepack_apk.py483 except Exception as exc: # noqa: BLE001
LOWscripts/ksubot.py109 except Exception as e: