Repository Analysis

apple/container

A tool for creating and running Linux containers using lightweight virtual machines on a Mac. It is written in Swift, and optimized for Apple silicon.

8.4 Low AI signal View on GitHub
8.4
Adjusted Score
8.4
Raw Score
100%
Time Factor
2026-05-29
Last Push
26,700
Stars
Swift
Language
62,752
Lines of Code
403
Files
474
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 15MEDIUM 0LOW 459

Pattern Findings

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

Over-Commented Block454 hits · 444 pts
SeverityFileLineSnippet
LOWPackage.swift1// swift-tools-version: 6.2
LOW…tainerNetworkServerTests/AttachmentAllocatorTest.swift1//===----------------------------------------------------------------------===//
LOW…ntainerAPIServiceTests/RuntimeConfigurationTests.swift1//===----------------------------------------------------------------------===//
LOWTests/ContainerCommandsTests/ListFormattingTests.swift1//===----------------------------------------------------------------------===//
LOWTests/ContainerCommandsTests/HelpCommandTests.swift1//===----------------------------------------------------------------------===//
LOWTests/ContainerPersistenceTests/PathUtilsTests.swift1//===----------------------------------------------------------------------===//
LOW…ntainerPersistenceTests/ConfigurationLoaderTests.swift1//===----------------------------------------------------------------------===//
LOW…ntainerPersistenceTests/ConfigurationLoaderTests.swift81 }
LOW…ntainerPersistenceTests/ConfigurationLoaderTests.swift141 #expect(config.build.memory == expectedBuildMemory)
LOW…/ContainerPersistenceTests/FilePathSymlinksTests.swift1//===----------------------------------------------------------------------===//
LOW…ainerPersistenceTests/FilesystemEntityStoreTests.swift1//===----------------------------------------------------------------------===//
LOW…ainerPersistenceTests/ConfigSnapshotDecoderTests.swift1//===----------------------------------------------------------------------===//
LOWTests/ContainerVersionTests/Bundle+AppBundleTests.swift1//===----------------------------------------------------------------------===//
LOW…ontainerVersionTests/CommandLine+ExecutableTests.swift1//===----------------------------------------------------------------------===//
LOWTests/DNSServerTests/RecordsTests.swift1//===----------------------------------------------------------------------===//
LOWTests/DNSServerTests/HostTableResolverTest.swift1//===----------------------------------------------------------------------===//
LOWTests/DNSServerTests/NxDomainResolverTest.swift1//===----------------------------------------------------------------------===//
LOWTests/DNSServerTests/MockHandlers.swift1//===----------------------------------------------------------------------===//
LOWTests/DNSServerTests/CompositeResolverTest.swift1//===----------------------------------------------------------------------===//
LOWTests/DNSServerTests/StandardQueryValidatorTest.swift1//===----------------------------------------------------------------------===//
LOWTests/DNSServerTests/StandardQueryValidatorTest.swift121 #expect(2 == response?.id)
LOWTests/SocketForwarderTests/ConnectHandlerRaceTest.swift1//===----------------------------------------------------------------------===//
LOWTests/SocketForwarderTests/UDPEchoHandler.swift1//===----------------------------------------------------------------------===//
LOWTests/SocketForwarderTests/UDPEchoServer.swift1//===----------------------------------------------------------------------===//
LOWTests/SocketForwarderTests/LRUCacheTest.swift1//===----------------------------------------------------------------------===//
LOWTests/SocketForwarderTests/LRUCacheTest.swift41 #expect(firstEvicted == ("foo", "1"))
LOWTests/SocketForwarderTests/TCPEchoHandler.swift1//===----------------------------------------------------------------------===//
LOWTests/SocketForwarderTests/UDPForwarderTest.swift1//===----------------------------------------------------------------------===//
LOWTests/SocketForwarderTests/TCPForwarderTest.swift1//===----------------------------------------------------------------------===//
LOWTests/SocketForwarderTests/TCPEchoServer.swift1//===----------------------------------------------------------------------===//
LOWTests/ContainerBuildTests/GlobberTests.swift1//===----------------------------------------------------------------------===//
LOWTests/ContainerBuildTests/BuilderExtensionsTests.swift1//===----------------------------------------------------------------------===//
LOWTests/ContainerBuildTests/BuildFile.swift1//===----------------------------------------------------------------------===//
LOWTests/CLITests/TestCLIHelp.swift1//===----------------------------------------------------------------------===//
LOWTests/CLITests/TestCLINoParallelCases.swift1//===----------------------------------------------------------------------===//
LOW…/CLITests/Subcommands/Images/TestCLIProgressAuto.swift1//===----------------------------------------------------------------------===//
LOW…CLITests/Subcommands/Images/TestCLIImagesCommand.swift1//===----------------------------------------------------------------------===//
LOW…CLITests/Subcommands/Plugins/TestCLIPluginErrors.swift1//===----------------------------------------------------------------------===//
LOW…CLITests/Subcommands/Plugins/TestCLIPluginErrors.swift21 func testHelpfulMessageWhenPluginsUnavailable() throws {
LOW…ts/CLITests/Subcommands/System/TestCLISystemLogs.swift1//===----------------------------------------------------------------------===//
LOWTests/CLITests/Subcommands/System/TestCLIStatus.swift1//===----------------------------------------------------------------------===//
LOWTests/CLITests/Subcommands/System/TestCLIStatus.swift41
LOWTests/CLITests/Subcommands/System/TestCLIVersion.swift1//===----------------------------------------------------------------------===//
LOWTests/CLITests/Subcommands/System/TestKernelSet.swift1//===----------------------------------------------------------------------===//
LOW…sts/CLITests/Subcommands/Networks/TestCLINetwork.swift1//===----------------------------------------------------------------------===//
LOW…ts/CLITests/Subcommands/Registry/TestCLIRegistry.swift1//===----------------------------------------------------------------------===//
LOWTests/CLITests/Subcommands/Containers/TestCLIExec.swift1//===----------------------------------------------------------------------===//
LOW…/CLITests/Subcommands/Containers/TestCLINotFound.swift1//===----------------------------------------------------------------------===//
LOW…ts/CLITests/Subcommands/Containers/TestCLIRmRace.swift1//===----------------------------------------------------------------------===//
LOW…ts/CLITests/Subcommands/Containers/TestCLICreate.swift1//===----------------------------------------------------------------------===//
LOW…ts/CLITests/Subcommands/Containers/TestCLIRemove.swift1//===----------------------------------------------------------------------===//
LOWTests/CLITests/Subcommands/Containers/TestCLIStop.swift1//===----------------------------------------------------------------------===//
LOWTests/CLITests/Subcommands/Containers/TestCLICopy.swift1//===----------------------------------------------------------------------===//
LOW…sts/CLITests/Subcommands/Containers/TestCLIStats.swift1//===----------------------------------------------------------------------===//
LOW…ts/CLITests/Subcommands/Containers/TestCLIExport.swift1//===----------------------------------------------------------------------===//
LOW…sts/CLITests/Subcommands/Containers/TestCLIPrune.swift1//===----------------------------------------------------------------------===//
LOWTests/CLITests/Subcommands/Build/TestCLITermIO.swift1//===----------------------------------------------------------------------===//
LOWTests/CLITests/Subcommands/Build/CLIBuildBase.swift1//===----------------------------------------------------------------------===//
LOW…ITests/Subcommands/Build/CLIBuilderLifecycleTest.swift1//===----------------------------------------------------------------------===//
LOW…CLITests/Subcommands/Build/CLIBuilderEnvOnlyTest.swift1//===----------------------------------------------------------------------===//
394 more matches not shown…
Cross-File Repetition15 hits · 75 pts
SeverityFileLineSnippet
HIGHTests/CLITests/Subcommands/Build/CLIBuilderTest.swift0from ghcr.io/linuxcontainers/alpine:3.20 workdir /app copy . .
HIGHTests/CLITests/Subcommands/Build/CLIBuilderTest.swift0from ghcr.io/linuxcontainers/alpine:3.20 workdir /app copy . .
HIGHTests/CLITests/Subcommands/Build/CLIBuilderTest.swift0from ghcr.io/linuxcontainers/alpine:3.20 workdir /app copy . .
HIGHTests/CLITests/Subcommands/Build/CLIBuilderTest.swift0from ghcr.io/linuxcontainers/alpine:3.20 workdir /app copy . .
HIGHTests/CLITests/Subcommands/Build/CLIBuilderTest.swift0from ghcr.io/linuxcontainers/alpine:3.20 workdir /app copy . .
HIGHTests/CLITests/Subcommands/Build/CLIBuilderTest.swift0from ghcr.io/linuxcontainers/alpine:3.20 workdir /app copy . .
HIGHTests/CLITests/Subcommands/Build/CLIBuilderTest.swift0from ghcr.io/linuxcontainers/alpine:3.20 workdir /app copy . .
HIGHTests/CLITests/Subcommands/Build/CLIBuilderTest.swift0from ghcr.io/linuxcontainers/alpine:3.20 workdir /app copy . .
HIGHTests/CLITests/Subcommands/Build/CLIBuilderTest.swift0from ghcr.io/linuxcontainers/alpine:3.20 workdir /app copy . .
HIGHTests/ContainerPluginTests/PluginConfigTest.swift0abstract = "default network management service" author = "apple"
HIGHTests/ContainerPluginTests/PluginFactoryTest.swift0abstract = "default network management service" author = "apple"
HIGHTests/ContainerPluginTests/PluginFactoryTest.swift0abstract = "default network management service" author = "apple"
HIGHTests/ContainerPluginTests/PluginFactoryTest.swift0abstract = "default network management service" author = "apple"
HIGHTests/ContainerPluginTests/PluginFactoryTest.swift0abstract = "default network management service" author = "apple"
HIGHTests/ContainerPluginTests/PluginFactoryTest.swift0abstract = "default network management service" author = "apple"
Verbosity Indicators3 hits · 7 pts
SeverityFileLineSnippet
LOW…rces/Services/RuntimeLinux/Server/RuntimeService.swift1154 // Step 1: Determine base set
LOW…rces/Services/RuntimeLinux/Server/RuntimeService.swift1162 // Step 2: Process adds
LOW…rces/Services/RuntimeLinux/Server/RuntimeService.swift1171 // Step 3: Remove individual drops (skip "ALL" sentinel)
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippet
LOWscripts/update-container.sh83# Check if container is still running
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWSources/ContainerOS/DirectoryWatcher.swift30/// Example usage: