Repository Analysis

lima-vm/lima

Linux virtual machines, with a focus on running containers

1.8 Likely human-written View on GitHub
1.8
Adjusted Score
1.8
Raw Score
100%
Time Factor
2026-05-29
Last Push
21,125
Stars
Go
Language
72,873
Lines of Code
660
Files
134
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 4LOW 130

Pattern Findings

134 matches across 5 categories. Click a row to expand file-level details.

Over-Commented Block121 hits · 107 pts
SeverityFileLineSnippet
LOWcmd/limactl/shell.go781// parseRsyncStats parses the output of `rsync --itemize-changes` to extract file operation statistics.
LOWwebsite/config.yaml1# THIS IS A TEST CONFIG ONLY!
LOWwebsite/content/en/docs/config/mount.md81- location: "~"
LOWwebsite/content/en/docs/config/network/vmnet.md81settings:
LOWhack/update-template-macos.sh41HELP
LOWhack/toolexec-for-codesign.sh1#!/bin/sh
LOWhack/update-template-ubuntu.sh61 ["daily"]=https://cloud-images.ubuntu.com/daily/
LOWhack/update-template-ubuntu.sh381 return 1
LOWhack/calculate-cache.sh1#!/usr/bin/env bash
LOWhack/calculate-cache.sh21# 3. detect size of image, kernel, initrd, and nerdctl (responses from remote are cached for faster iteration)
LOWhack/calculate-cache.sh61export LIMA_HOME
LOWhack/calculate-cache.sh141}
LOWhack/calculate-cache.sh161# "macOS-49aa50a4872ded07ebf657c0eaf9e44ecc0c174d033a97c537ecd270f35b462f": 813179462,
LOWhack/inject-cmdline-to-template.sh1#!/usr/bin/env bash
LOWhack/update-template-debian.sh201 tar.xz) echo "internal" ;;
LOWhack/update-template-debian.sh241 codename=$(echo "${location#"${debian_base_url}"}" | cut -d/ -f1 | cut -d- -f1)
LOWhack/update-template-debian.sh281 base_url+=${timestamp:-latest}/
LOWhack/cache-common-inc.sh1#!/usr/bin/env bash
LOWhack/cache-common-inc.sh281# image-path=.download/by-url-sha256/ae988d797c6de06b9c8a81a2b814904151135ccfd4616c22948057f6280477e8
LOWhack/cache-common-inc.sh301# containerd-path=.download/by-url-sha256/21cc8dfa548ea8a678135bd6984c9feb9f8a01901d10b11bb491f6f4e7537158
LOWhack/test-selinux.sh21## but it might break for other work loads if the process is running with
LOWhack/test-port-forwarding.pl1#!/usr/bin/env perl
LOWhack/test-port-forwarding.pl361
LOWhack/test-port-forwarding.pl401 # forward: 0.0.0.0 326 → 127.0.0.1 326
LOWhack/update-template-opensuse.sh161 [[ -n ${latest_version_info} ]] || return
LOWhack/update-template.sh101# validate_url checks if the URL is valid and prints the location if it is.
LOWhack/update-template.sh141 # - ${distribution}_cache_key_for_image_kernel
LOWhack/ltag/dockerfile.txt1# SPDX-FileCopyrightText: Copyright The Lima Authors
LOWhack/ltag/bash.txt1# SPDX-FileCopyrightText: Copyright The Lima Authors
LOWhack/ltag/makefile.txt1# SPDX-FileCopyrightText: Copyright The Lima Authors
LOWtemplates/k8s.yaml1# Deploy kubernetes via kubeadm.
LOWtemplates/faasd.yaml1# Deploy faasd (which installs a bundled containerd).
LOWtemplates/k0s.yaml1# Deploy kubernetes via k0s (which installs a bundled containerd).
LOWtemplates/k3s.yaml1# Deploy kubernetes via k3s (which installs a bundled containerd).
LOWtemplates/default.yaml1# ===================================================================== #
LOWtemplates/default.yaml21# To specify a custom kernel and initial RAM disk, nest `kernel` and `initrd` under an image entry:
LOWtemplates/default.yaml41# 🟢 Builtin default: min("4GiB", half of host memory)
LOWtemplates/default.yaml61# # 🟢 Builtin default: false
LOWtemplates/default.yaml81# # "mapped-xattr" and "mapped-file" are useful for persistent chown but incompatible with symlinks.
LOWtemplates/default.yaml101#
LOWtemplates/default.yaml121# `/mnt/lima-${VOLUME}`.
LOWtemplates/default.yaml141 # Forward ssh agent into the instance.
LOWtemplates/default.yaml161 removeDefaults: null
LOWtemplates/default.yaml181upgradePackages: null
LOWtemplates/default.yaml201# The scripts can use the following template variables: {{.Home}}, {{.Name}}, {{.Hostname}}, {{.UID}}, {{.User}}, and {{
LOWtemplates/default.yaml221# digest: deadbeef
LOWtemplates/default.yaml241# # See ansible docs, and `ansible-config`, for more info https://docs.ansible.com/ansible/latest/playbook_guide/
LOWtemplates/default.yaml261# # Create or edit a file in the guest filesystem by using `yq`.
LOWtemplates/default.yaml281#
LOWtemplates/default.yaml301# - `mode: yq` files are processed
LOWtemplates/default.yaml321# if ! timeout 30s bash -c "until command -v vim; do sleep 3; done"; then
LOWtemplates/default.yaml341# is created, and the combined template is stored in the instance directory.
LOWtemplates/default.yaml361 # Numeric user id. It is not currently possible to specify a group id.
LOWtemplates/default.yaml381 # 🟢 Builtin default: hard-coded arch map with type (see the output of `limactl info | jq .defaultTemplate.cpuType`)
LOWtemplates/default.yaml421 # 🟢 Builtin default: false
LOWtemplates/default.yaml441 device: null
LOWtemplates/default.yaml461# https://github.com/lima-vm/socket_vmnet.
LOWtemplates/default.yaml481# - socket: "/var/run/socket_vmnet"
LOWtemplates/default.yaml501# - guestPort: 80
LOWtemplates/default.yaml521# # "guestSocket" can include these template variables: {{.Home}}, {{.Name}}, {{.Hostname}}, {{.UID}}, {{.User}}, and {{
61 more matches not shown…
Redundant / Tautological Comments8 hits · 12 pts
SeverityFileLineSnippet
LOWhack/toolexec-for-codesign.sh32 # Check if the command is a linker command.
LOWhack/toolexec-for-codesign.sh55# Print the output of the command and exit with the result of the command.
LOWhack/test-port-forwarding.pl80# Check if netcat is available before running tests
LOWhack/update-template.sh204# Check if the distribution has the required functions
LOWhack/bats/helpers/limactl.bash21# Close file handles 3 and 4 so the host agent doesn't block BATS from exiting.
LOW…/cidata.TEMPLATE.d/boot.Linux/00-reboot-if-required.sh10# Check if cloud-init forgot to reboot_if_required
LOW…ata.TEMPLATE.d/boot.Linux/00-check-rtc-and-wait-ntp.sh58# Print the result of NTP synchronization
LOW…/cidata/cidata.TEMPLATE.d/boot.Linux/05-lima-mounts.sh8# Check if mount type is virtiofs and vm type as vz
Self-Referential Comments3 hits · 9 pts
SeverityFileLineSnippet
MEDIUMhack/bats/helpers/limactl.bash4# Create a dummy Lima instance for testing purposes. It cannot be started because it doesn't have an actual image.
MEDIUMpkg/driver/vz/boot.Linux/05-rosetta-volume.sh59 # Create the symlink as expected by the configuration to enable Rosetta AOT caching
MEDIUMpkg/hostagent/hostagent.go283# This file is created by Lima, but not used by Lima itself currently.
Decorative Section Separators1 hit · 3 pts
SeverityFileLineSnippet
MEDIUM.github/workflows/test.yml185 # ------------------------------------------------------------------
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWhack/toolexec-for-codesign.sh14# Usage: