MicroK8s is a small, fast, single-package Kubernetes for datacenters and the edge.
This report presents the forensic synthetic code analysis of canonical/microk8s, a Python project with 9,347 GitHub stars. SynthScan v2.0 examined 32,266 lines of code across 180 source files, recording 184 pattern matches distributed across 11 syntactic categories. The overall adjusted score of 7.0 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 184 distinct pattern matches across 11 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test-cluster-agent.py | 9 | def test_cluster_agent_health(self): | CODE |
| LOW | tests/test-simple.py | 26 | def test_calico_cni_pods_running(self): | CODE |
| LOW | tests/utils.py | 157 | def wait_for_namespace_termination(namespace, timeout_insec=360): | CODE |
| LOW | tests/test-cluster.py | 134 | def _load_launch_configuration_lxc(self): | CODE |
| LOW | tests/test-cluster.py | 150 | def _transfer_install_local_snap_lxc(self, channel_or_snap): | CODE |
| LOW | tests/test-cluster.py | 198 | def _load_launch_configuration_multipass(self): | CODE |
| LOW | tests/test-cluster.py | 216 | def _transfer_install_local_snap_multipass(self, channel_or_snap): | CODE |
| LOW | tests/test-cluster.py | 378 | def test_calico_interfaces_removed_on_snap_remove(self): | CODE |
| LOW | tests/test-cluster.py | 599 | def test_no_cert_reissue_in_nodes(self): | CODE |
| LOW | tests/test-cluster.py | 660 | def setup_old_versioned_cluster(self): | CODE |
| LOW | tests/unit/test_refresh_certs.py | 25 | def test_reproduce_all_root_ca_certs(self, mock_check_call, mock_subproc_popen, mock_get_arg): | CODE |
| LOW | tests/unit/test_refresh_certs.py | 50 | def test_reproduce_front_proxy_client_cert(self, mock_check_call, mock_restart): | CODE |
| LOW | tests/unit/test_refresh_certs.py | 68 | def test_reproduce_server_cert(self, mock_check_call, mock_restart): | CODE |
| LOW | tests/unit/test_refresh_certs.py | 133 | def test_command_help_arguments(): | CODE |
| LOW⚡ | tests/unit/test_enable.py | 6 | def test_command_help_arguments(): | CODE |
| LOW⚡ | tests/unit/test_enable.py | 14 | def test_command_errors_if_no_arguments(): | CODE |
| LOW⚡ | tests/unit/test_enable.py | 22 | def test_command_shows_addon_help_message(xable_mock): | CODE |
| LOW⚡ | tests/unit/test_disable.py | 6 | def test_command_help_arguments(): | CODE |
| LOW⚡ | tests/unit/test_disable.py | 14 | def test_command_errors_if_no_arguments(): | CODE |
| LOW⚡ | tests/unit/test_disable.py | 22 | def test_command_shows_addon_help_message(xable_mock): | CODE |
| LOW | tests/unit/test_addons.py | 64 | def test_get_available_addons(snap_common_mock, listdir_mock, strict_mock, confinement, result): | STRING |
| LOW⚡ | tests/unit/test_addons.py | 135 | def test_validate_addons_file(load_addons_mock): | STRING |
| LOW⚡ | tests/unit/test_addons.py | 140 | def test_validate_addons_file_raises_if_invalid_format(load_addons_mock): | STRING |
| LOW⚡ | tests/unit/test_addons.py | 146 | def test_load_addons_raises_on_file_not_found(): | STRING |
| LOW⚡ | tests/unit/test_addons.py | 153 | def test_load_addons_raises_on_invalid_yaml_contents(repo_dir): | STRING |
| LOW⚡ | tests/unit/test_addons.py | 168 | def test_validate_addons_repo(repo_dir): | STRING |
| LOW⚡ | tests/unit/test_addons.py | 172 | def test_validate_addons_repo_raises_on_missing_enable_hook(addon_missing_enable_hook): | STRING |
| LOW⚡ | tests/unit/test_addons.py | 178 | def test_validate_addons_repo_raises_on_missing_disable_hook(addon_missing_disable_hook): | STRING |
| LOW⚡ | tests/unit/test_addons.py | 184 | def test_validate_addons_repo_raises_on_enable_not_executable(enable_not_executable): | STRING |
| LOW⚡ | tests/unit/test_addons.py | 190 | def test_validate_addons_repo_raises_on_disable_not_executable(disable_not_executable): | STRING |
| LOW | tests/unit/test_addons.py | 201 | def test_add_removes_repo_on_validation_error( | STRING |
| LOW | tests/unit/test_addons.py | 258 | def addon_missing_enable_hook(repo_dir): | STRING |
| LOW | tests/unit/test_addons.py | 265 | def addon_missing_disable_hook(repo_dir): | STRING |
| LOW | tests/unit/test_addons.py | 308 | def test_update_rollbacks_repo_on_validation_error( | STRING |
| LOW | tests/unit/test_reset.py | 5 | def test_command_help_arguments(): | CODE |
| LOW | tests/unit/test_upgrade_calico_cni.py | 45 | def test_get_autodetect_method(self): | CODE |
| LOW | tests/unit/cluster/test_join.py | 10 | def test_command_help_arguments(): | CODE |
| LOW | tests/unit/cluster/test_join.py | 18 | def test_command_errors_if_no_arguments(): | CODE |
| LOW | tests/unit/cluster/test_join.py | 30 | def test_join_dqlite_master_node( | CODE |
| LOW | tests/unit/cluster/test_leave.py | 5 | def test_command_help_arguments(): | CODE |
| LOW | scripts/kill-host-pods.py | 19 | def post_filter_has_known_containers(pod, containers: list) -> bool: | CODE |
| LOW | scripts/kill-host-pods.py | 35 | def post_filter_has_snap_data_mounts(pod) -> bool: | CODE |
| LOW | scripts/find-resolv-conf.py | 18 | def safe_is_non_loopback_address(address: str): | CODE |
| LOW | scripts/find-resolv-conf.py | 39 | def find_resolv_conf_with_non_loopback_address(resolv_confs: list): | CODE |
| LOW | scripts/wrappers/refresh_certs.py | 116 | def reproduce_all_root_ca_certs(): | CODE |
| LOW | scripts/wrappers/refresh_certs.py | 137 | def reproduce_front_proxy_client_cert(): | STRING |
| LOW | scripts/wrappers/reset.py | 179 | def remove_non_namespaced_resources(): | CODE |
| LOW | scripts/wrappers/join.py | 331 | def update_cert_auth_kubeproxy(token, master_ip, master_port): | CODE |
| LOW | scripts/wrappers/join.py | 468 | def update_kubelet_hostname_override(args_string): | CODE |
| LOW | scripts/wrappers/join.py | 719 | def rebuild_token_based_auth_configs(info): | CODE |
| LOW | scripts/wrappers/distributed_op.py | 34 | def get_cluster_agent_endpoints(include_self=False): | CODE |
| LOW | scripts/wrappers/leave.py | 33 | def reset_current_dqlite_worker_installation(): | CODE |
| LOW | scripts/wrappers/leave.py | 85 | def reset_current_etcd_installation(): | CODE |
| LOW | scripts/wrappers/leave.py | 123 | def reset_current_dqlite_installation(): | CODE |
| LOW | scripts/wrappers/leave.py | 238 | def is_leader_without_successor(): | CODE |
| LOW | scripts/wrappers/common/utils.py | 334 | def is_service_expected_to_start(service): | CODE |
| LOW | scripts/wrappers/common/utils.py | 345 | def set_service_expected_to_start(service, start=True): | CODE |
| LOW | scripts/wrappers/common/cluster/utils.py | 72 | def remove_expired_token_from_file(file): | CODE |
| LOW | scripts/wrappers/common/cluster/utils.py | 175 | def is_low_memory_guard_enabled(): | CODE |
| LOW | scripts/wrappers/common/cluster/utils.py | 237 | def get_control_plane_nodes_internal_ips(): | CODE |
| 20 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/utils.py | 93 | CODE | |
| LOW | tests/test-cluster.py | 83 | CODE | |
| LOW | tests/test-cluster.py | 228 | CODE | |
| LOW | tests/test-cluster.py | 289 | CODE | |
| LOW | tests/test-cluster.py | 378 | CODE | |
| LOW | tests/test-cluster.py | 660 | CODE | |
| LOW | tests/unit/test_refresh_certs.py | 86 | CODE | |
| LOW | scripts/wrappers/refresh_certs.py | 172 | CODE | |
| LOW | scripts/wrappers/addons.py | 301 | CODE | |
| LOW | scripts/wrappers/join.py | 478 | CODE | |
| LOW | scripts/wrappers/join.py | 531 | CODE | |
| LOW | scripts/wrappers/upgrade.py | 59 | CODE | |
| LOW | scripts/wrappers/upgrade.py | 124 | CODE | |
| LOW | scripts/wrappers/distributed_op.py | 34 | CODE | |
| LOW | scripts/wrappers/remove_node.py | 26 | CODE | |
| LOW | scripts/wrappers/remove_node.py | 121 | CODE | |
| LOW | scripts/wrappers/remove_node.py | 197 | CODE | |
| LOW | scripts/wrappers/status.py | 36 | CODE | |
| LOW | scripts/wrappers/leave.py | 238 | CODE | |
| LOW | scripts/wrappers/common/utils.py | 96 | CODE | |
| LOW | scripts/wrappers/common/utils.py | 141 | CODE | |
| LOW | scripts/wrappers/common/utils.py | 264 | CODE | |
| LOW | scripts/wrappers/common/utils.py | 287 | CODE | |
| LOW | scripts/wrappers/common/utils.py | 417 | CODE | |
| LOW | scripts/wrappers/common/utils.py | 561 | CODE | |
| LOW | scripts/wrappers/common/cluster/utils.py | 72 | CODE | |
| LOW | scripts/wrappers/common/cluster/utils.py | 92 | CODE | |
| LOW | scripts/wrappers/common/cluster/utils.py | 205 | CODE | |
| LOW | scripts/wrappers/common/cluster/utils.py | 225 | CODE | |
| LOW | scripts/wrappers/common/cluster/utils.py | 326 | CODE | |
| LOW | scripts/wrappers/common/cluster/utils.py | 476 | CODE | |
| LOW | scripts/calico/upgrade.py | 8 | CODE | |
| LOW | scripts/calico/upgrade.py | 35 | CODE | |
| LOW | scripts/calico/upgrade.py | 88 | CODE | |
| LOW | installer/cli/microk8s.py | 30 | CODE | |
| LOW | installer/cli/microk8s.py | 242 | CODE | |
| LOW | installer/vm_providers/repo/snaps.py | 102 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test-simple.py | 96 | # Define the services to check for control plane and worker nodes | COMMENT |
| MEDIUM | microk8s-resources/actions/common/utils.sh | 122 | # Create the file if doesn't exist | COMMENT |
| MEDIUM | microk8s-resources/actions/common/utils.sh | 136 | # Create the file if doesn't exist | COMMENT |
| MEDIUM | microk8s-resources/actions/common/utils.sh | 647 | # Create a kubeconfig file with x509 auth | COMMENT |
| MEDIUM | microk8s-resources/actions/common/utils.sh | 923 | # Create the basic tokens | COMMENT |
| MEDIUM | microk8s-resources/actions/common/utils.sh | 925 | # Create the client kubeconfig | COMMENT |
| MEDIUM⚡ | microk8s-resources/actions/common/utils.sh | 939 | # Create the known tokens | COMMENT |
| MEDIUM⚡ | microk8s-resources/actions/common/utils.sh | 945 | # Create the client kubeconfig for the controller | COMMENT |
| MEDIUM⚡ | microk8s-resources/actions/common/utils.sh | 952 | # Create the client kubeconfig for the scheduler | COMMENT |
| MEDIUM⚡ | microk8s-resources/actions/common/utils.sh | 959 | # Create the proxy and kubelet kubeconfig | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test-cluster.py | 652 | print("Error occurred during the request:", str(e)) | CODE |
| LOW | scripts/wrappers/addons.py | 337 | except Exception as e: | CODE |
| MEDIUM | scripts/wrappers/join.py | 866 | print("Error: Unknown API auth mode '{api_authn_mode}' received from control plane node.") | CODE |
| LOW | scripts/wrappers/upgrade.py | 117 | except Exception as e: | CODE |
| MEDIUM | scripts/wrappers/upgrade.py | 118 | print("Error in upgrading. Error: {}".format(e)) | CODE |
| MEDIUM | scripts/wrappers/upgrade.py | 147 | print("Error in gathering cluster node information. Upgrade aborted.") | CODE |
| LOW | scripts/wrappers/remove_node.py | 191 | except Exception as err: | CODE |
| LOW | scripts/wrappers/leave.py | 333 | except Exception as err: | CODE |
| LOW | scripts/wrappers/common/utils.py | 87 | except Exception: | CODE |
| LOW | scripts/wrappers/common/utils.py | 281 | except Exception: | CODE |
| LOW | scripts/wrappers/common/utils.py | 308 | except Exception: | CODE |
| MEDIUM | scripts/wrappers/common/utils.py | 39 | def snap() -> Path: | CODE |
| LOW | installer/cli/microk8s.py | 67 | except Exception as e: | CODE |
| MEDIUM | installer/cli/microk8s.py | 30 | def cli(ctx, help): | CODE |
| LOW | installer/vm_providers/_multipass/_multipass.py | 73 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …ade-scripts/000-switch-to-calico/resources/calico.yaml | 6201 | name: cni-net-dir | COMMENT |
| LOW | …ade-scripts/000-switch-to-calico/resources/calico.yaml | 6221 | # mountPropagation: Bidirectional | COMMENT |
| LOW | microk8s-resources/actions/common/utils.sh | 481 | # Example: enable linkerd:proxy-auto-inject=on;other-args=xyz | COMMENT |
| LOW | microk8s-resources/actions/common/utils.sh | 1141 | # generate csr | COMMENT |
| LOW | installer/microk8s.py | 1 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- | COMMENT |
| LOW | installer/cli/echo.py | 1 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- | COMMENT |
| LOW | installer/common/file_utils.py | 1 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- | COMMENT |
| LOW | installer/vm_providers/factory.py | 1 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- | COMMENT |
| LOW | installer/vm_providers/errors.py | 1 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- | COMMENT |
| LOW | installer/vm_providers/_base_provider.py | 1 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- | COMMENT |
| LOW | installer/vm_providers/_multipass/_multipass_command.py | 1 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- | COMMENT |
| LOW | installer/vm_providers/_multipass/__init__.py | 1 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- | COMMENT |
| LOW | installer/vm_providers/_multipass/_multipass.py | 1 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- | COMMENT |
| LOW | installer/vm_providers/_multipass/_instance_info.py | 1 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- | COMMENT |
| LOW | installer/vm_providers/_multipass/_windows.py | 1 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- | COMMENT |
| LOW | installer/vm_providers/repo/snaps.py | 1 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- | COMMENT |
| LOW | installer/vm_providers/repo/errors.py | 1 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test-simple.py | 21 | # Check if the node status is "Ready" | COMMENT |
| LOW | tests/test-simple.py | 39 | # Check if the pod is related to Calico CNI and not in the "Running" state | COMMENT |
| LOW | tests/test-simple.py | 127 | # Check if the line contains a running service | COMMENT |
| LOW | tests/test-simple.py | 131 | # Check if the running service is in the control plane services list | COMMENT |
| LOW | scripts/inspect.sh | 293 | # Check if appropriate cgroup libraries for Fedora are installed | COMMENT |
| LOW | scripts/inspect.sh | 313 | # Check if snapctl is fresh | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | installer/cli/microk8s.py | 18 | logger = logging.getLogger(__name__) | CODE |
| LOW | installer/common/file_utils.py | 27 | logger = logging.getLogger(__name__) | CODE |
| LOW | installer/common/auxiliary.py | 14 | logger = logging.getLogger(__name__) | CODE |
| LOW | installer/vm_providers/_base_provider.py | 30 | logger = logging.getLogger(__name__) | CODE |
| LOW | installer/vm_providers/_base_provider.py | 158 | def _setup_microk8s(self, specs: Dict) -> None: | CODE |
| LOW | installer/vm_providers/_multipass/_multipass_command.py | 29 | logger = logging.getLogger(__name__) | CODE |
| LOW | installer/vm_providers/_multipass/_multipass.py | 27 | logger = logging.getLogger(__name__) | CODE |
| LOW | installer/vm_providers/_multipass/_windows.py | 38 | logger = logging.getLogger(__name__) | CODE |
| LOW | installer/vm_providers/repo/snaps.py | 37 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …crok8s-resources/default-args/containerd-template.toml | 50 | # In this example, 'runc' is the RuntimeHandler string to match. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | microk8s-resources/actions/common/utils.sh | 878 | # Usage: | COMMENT |
| LOW | microk8s-resources/actions/common/utils.sh | 1104 | # Example usage: | COMMENT |
| LOW | microk8s-resources/actions/common/utils.sh | 1131 | # Example usage: | COMMENT |
| LOW | microk8s-resources/actions/common/utils.sh | 1154 | # Example usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | installer/vm_providers/factory.py | 23 | CODE | |
| LOW | installer/vm_providers/factory.py | 24 | CODE | |
| LOW | installer/vm_providers/_multipass/__init__.py | 17 | CODE | |
| LOW | installer/vm_providers/_multipass/__init__.py | 18 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | installer/cli/echo.py | 92 | CODE |