MicroK8s is a small, fast, single-package Kubernetes for datacenters and the edge.
This report summarizes scanner evidence for canonical/microk8s, a Python project with 9,383 GitHub stars. SynthScan examined 32,265 lines of code across 179 source files, recording 199 pattern matches distributed across 12 syntactic categories. The legacy adjusted pattern signal is 9.3 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 156 finding(s).
Are imports declared and package/API names verified? 4 finding(s).
Are wrappers, guards, and repeated structures necessary? 120 finding(s).
Which changes need focused human review? 199 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 199 distinct pattern matches across 12 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| 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 |
|---|---|---|---|---|
| HIGH | tests/validators.py | 147 | except requests.RequestException: | CODE |
| HIGH | tests/validators.py | 167 | except subprocess.CalledProcessError: | CODE |
| HIGH | scripts/kill-host-pods.py | 53 | except OSError: | CODE |
| HIGH | scripts/run-lifecycle-hooks.py | 24 | except (subprocess.CalledProcessError, OSError): | CODE |
| HIGH | scripts/find-resolv-conf.py | 53 | except (OSError, ValueError): | CODE |
| HIGH | scripts/wrappers/refresh_certs.py | 71 | except subprocess.CalledProcessError: | CODE |
| HIGH | scripts/wrappers/addons.py | 325 | except (subprocess.CalledProcessError, TypeError, ValueError): | CODE |
| HIGH | scripts/wrappers/join.py | 126 | except ValueError: | CODE |
| HIGH | scripts/wrappers/join.py | 602 | except OSError: | CODE |
| HIGH | scripts/wrappers/join.py | 609 | except ValueError: | CODE |
| HIGH | scripts/wrappers/distributed_op.py | 85 | except OSError: | CODE |
| HIGH | scripts/wrappers/common/utils.py | 485 | except OSError: | CODE |
| HIGH | scripts/wrappers/common/cluster/utils.py | 67 | except LookupError: | CODE |
| HIGH | scripts/wrappers/common/cluster/utils.py | 275 | except socket.error: | CODE |
| HIGH | scripts/calico/upgrade.py | 177 | except OSError: | CODE |
| 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 |