Automate Docker container image updates
This report presents the forensic synthetic code analysis of nicholas-fedor/watchtower, a Go project with 4,343 GitHub stars. SynthScan v2.0 examined 137,265 lines of code across 485 source files, recording 445 pattern matches distributed across 8 syntactic categories. The overall adjusted score of 4.2 places this repository in the Likely human-written 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).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
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 445 distinct pattern matches across 8 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 | main.go | 1 | // @title Watchtower HTTP API | COMMENT |
| LOW | main.go | 21 | // @tag.name health | COMMENT |
| LOW | cmd/notify-upgrade.go | 61 | // runNotifyUpgradeE performs the core logic for the `notify-upgrade` subcommand, converting legacy Watchtower notificat | COMMENT |
| LOW | cmd/doc.go | 1 | // Package cmd contains the command-line interface (CLI) definitions and execution logic for Watchtower. | COMMENT |
| LOW | cmd/root.go | 41 | // | COMMENT |
| LOW | cmd/root.go | 61 | client container.Client | COMMENT |
| LOW | cmd/root.go | 81 | COMMENT | |
| LOW | cmd/root.go | 101 | // rootCmd represents the root command for the Watchtower CLI, serving as the entry point for all subcommands. | COMMENT |
| LOW | cmd/root.go | 161 | proc.log.Fatal().Err(err).Msg("Failed to execute root command") | COMMENT |
| LOW | cmd/root.go | 301 | exitInvalidWatchtowerRestart(p.log, client, currentWatchtowerContainer) | COMMENT |
| LOW | cmd/root.go | 521 | // runUpdatesWithNotifications performs container updates and sends notifications about the results. | COMMENT |
| LOW | tools/tplprev/internal/preview/render.go | 41 | // | COMMENT |
| LOW | tools/tplprev/internal/report/id.go | 21 | // ShortID returns the 12-character short version of a container ID. | COMMENT |
| LOW | tools/tplprev/internal/metadata/metadata.go | 1 | // Package metadata holds compile-time build information for tplprev. | COMMENT |
| LOW | internal/metrics/metrics.go | 241 | // | COMMENT |
| LOW | internal/metrics/doc.go | 1 | // Package metrics provides tracking and exposure of Watchtower scan metrics. | COMMENT |
| LOW | internal/flags/flags_test.go | 761 | // | COMMENT |
| LOW | internal/flags/flags.go | 221 | // | COMMENT |
| LOW | internal/flags/flags.go | 421 | // ProcessFlagAliases applies environment values then syncs flag aliases. | COMMENT |
| LOW | internal/flags/doc.go | 1 | // Package flags manages command-line flags and environment variables for Watchtower configuration. | COMMENT |
| LOW | internal/flags/doc.go | 21 | // | COMMENT |
| LOW | internal/flags/bind.go | 21 | ) | COMMENT |
| LOW | internal/flags/spec/register.go | 41 | // - flagSet: Target flag set that receives the registered flags. | COMMENT |
| LOW | internal/flags/spec/spec.go | 41 | // | COMMENT |
| LOW | internal/flags/utils/env.go | 41 | // Parameters: | COMMENT |
| LOW | internal/flags/utils/listparse.go | 41 | // - []string: Parsed non-empty tokens. | COMMENT |
| LOW | internal/util/util.go | 81 | // | COMMENT |
| LOW | internal/util/util.go | 201 | COMMENT | |
| LOW | internal/util/util.go | 261 | // Returns: | COMMENT |
| LOW | internal/util/util.go | 321 | } | COMMENT |
| LOW | internal/util/doc.go | 1 | // Package util provides utility functions for Watchtower operations. | COMMENT |
| LOW | internal/util/diskspace.go | 61 | "pib": pebibyteMultiplier, | COMMENT |
| LOW | internal/util/diskspace.go | 101 | } | COMMENT |
| LOW | internal/scheduling/scheduling.go | 61 | type ScheduleDeps struct { | COMMENT |
| LOW | internal/scheduling/scheduling.go | 81 | Client container.Client | COMMENT |
| LOW | internal/scheduling/scheduling.go | 101 | BaseParams types.UpdateParams | COMMENT |
| LOW | internal/scheduling/scheduling.go | 321 | // Close the notification system to clean up resources during shutdown. | COMMENT |
| LOW | internal/config/config.go | 21 | // Use UpdateParams and ClientOptions to project this snapshot into the DTOs | COMMENT |
| LOW | internal/config/doc.go | 1 | // Package config resolves process configuration into a single immutable Config. | COMMENT |
| LOW | internal/config/viper_get.go | 81 | // bareSeconds parses a pure numeric string as seconds. | COMMENT |
| LOW | internal/config/viper_get.go | 101 | // stringSliceValue reads a string list using the FlagSpec ListParse strategy. | COMMENT |
| LOW | internal/config/load.go | 61 | // Load reads resolved settings from a parsed Cobra command into Config. | COMMENT |
| LOW | internal/config/load.go | 321 | } | COMMENT |
| LOW | internal/config/run_config.go | 21 | type RunConfigInput struct { | COMMENT |
| LOW | internal/config/notify/notify.go | 1 | // Package notify holds notification settings for the config domain. | COMMENT |
| LOW | internal/config/notify/notify.go | 21 | // (--notification-template-file / WATCHTOWER_NOTIFICATION_TEMPLATE_FILE). | COMMENT |
| LOW | internal/config/notify/notify.go | 41 | // TitleTag prefixes the notification title | COMMENT |
| LOW | internal/config/update/update.go | 1 | // Package update holds container update policy settings. | COMMENT |
| LOW | internal/config/update/update.go | 21 | // (--monitor-only / WATCHTOWER_MONITOR_ONLY). | COMMENT |
| LOW | internal/config/client/client.go | 1 | // Package client holds Docker client construction options derived from flags. | COMMENT |
| LOW | internal/actions/ephemeral.go | 41 | errOrchestratorRemoveFailed = errors.New("failed to remove old container") | COMMENT |
| LOW | internal/actions/ephemeral.go | 61 | // 5. Removes the old container | COMMENT |
| LOW | internal/actions/ephemeral.go | 161 | // Log that the orchestrator has been started. The orchestrator ID identifies | COMMENT |
| LOW | internal/actions/ephemeral.go | 181 | // image for cleanup. This process is about to be stopped and still uses that | COMMENT |
| LOW | internal/actions/ephemeral.go | 201 | // 8. REMOVE OLD: Delete the renamed predecessor | COMMENT |
| LOW | internal/actions/ephemeral.go | 261 | } | COMMENT |
| LOW | internal/actions/ephemeral.go | 301 | } | COMMENT |
| LOW | internal/actions/ephemeral.go | 321 | // 8. When cleanup is enabled, remove the unused predecessor image. | COMMENT |
| LOW | internal/actions/ephemeral.go | 781 | COMMENT | |
| LOW | internal/actions/ephemeral.go | 841 | } | COMMENT |
| 305 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | cliff.toml | 9 | # ────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | cliff.toml | 12 | # ────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | cliff.toml | 23 | # ────────────────────────────────────────────────────────────── | STRING |
| MEDIUM | cliff.toml | 26 | # ────────────────────────────────────────────────────────────── | STRING |
| MEDIUM | cliff.toml | 61 | # ────────────────────────────────────────────────────────────── | STRING |
| MEDIUM | cliff.toml | 64 | # ────────────────────────────────────────────────────────────── | STRING |
| MEDIUM⚡ | examples/lifecycle-hooks/synology-stop/synology-stop.sh | 6 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | examples/lifecycle-hooks/synology-stop/synology-stop.sh | 8 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | examples/lifecycle-hooks/synology-stop/synology-stop.sh | 15 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | examples/lifecycle-hooks/synology-stop/synology-stop.sh | 17 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | examples/lifecycle-hooks/synology-stop/synology-stop.sh | 23 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | examples/lifecycle-hooks/synology-stop/synology-stop.sh | 25 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | examples/lifecycle-hooks/synology-stop/synology-stop.sh | 30 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | examples/lifecycle-hooks/synology-stop/synology-stop.sh | 32 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | examples/lifecycle-hooks/synology-stop/synology-stop.sh | 38 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | examples/lifecycle-hooks/synology-stop/synology-stop.sh | 40 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | examples/lifecycle-hooks/synology-stop/synology-stop.sh | 70 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | examples/lifecycle-hooks/synology-stop/synology-stop.sh | 72 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | examples/lifecycle-hooks/synology-stop/synology-stop.sh | 76 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | examples/lifecycle-hooks/synology-stop/synology-stop.sh | 78 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | examples/lifecycle-hooks/synology-stop/synology-stop.sh | 95 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | examples/lifecycle-hooks/synology-stop/synology-stop.sh | 97 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | examples/lifecycle-hooks/synology-stop/synology-stop.sh | 115 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | examples/lifecycle-hooks/synology-stop/synology-stop.sh | 117 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | examples/lifecycle-hooks/synology-stop/synology-stop.sh | 123 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | examples/lifecycle-hooks/synology-stop/synology-stop.sh | 125 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | …lifecycle-hooks/synology-stop/test_synology_parsing.sh | 7 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | …lifecycle-hooks/synology-stop/test_synology_parsing.sh | 9 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | …lifecycle-hooks/synology-stop/test_synology_parsing.sh | 44 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | …lifecycle-hooks/synology-stop/test_synology_parsing.sh | 46 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | …lifecycle-hooks/synology-stop/test_synology_parsing.sh | 70 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | …lifecycle-hooks/synology-stop/test_synology_parsing.sh | 72 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | …lifecycle-hooks/synology-stop/test_synology_parsing.sh | 116 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | …lifecycle-hooks/synology-stop/test_synology_parsing.sh | 118 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | …lifecycle-hooks/synology-stop/test_synology_parsing.sh | 148 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | …lifecycle-hooks/synology-stop/test_synology_parsing.sh | 150 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | …lifecycle-hooks/synology-stop/test_synology_parsing.sh | 180 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | …lifecycle-hooks/synology-stop/test_synology_parsing.sh | 182 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | …lifecycle-hooks/synology-stop/test_synology_parsing.sh | 221 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | …lifecycle-hooks/synology-stop/test_synology_parsing.sh | 223 | # ------------------------------------------------------------------ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | pkg/registry/auth/auth_fuzz_test.go | 28 | // FuzzGetBearerToken fuzzes the JSON unmarshaling in GetBearerToken to ensure robust parsing | COMMENT |
| MEDIUM | pkg/registry/auth/auth_fuzz_test.go | 87 | // with various base64-encoded inputs. It ensures robust decoding and unmarshaling of JSON credentials, | COMMENT |
| MEDIUM | pkg/registry/auth/auth_fuzz_test.go | 119 | // with malformed authentication challenge strings. It ensures robust URL construction from | COMMENT |
| MEDIUM | pkg/registry/digest/digest_integration_fuzz_test.go | 84 | // FuzzDigestsMatch fuzzes the digestsMatch function to ensure robust handling of malformed inputs. | COMMENT |
| MEDIUM | pkg/registry/digest/digest_integration_fuzz_test.go | 119 | // FuzzBuildManifestURL fuzzes the buildManifestURL function to ensure robust URL construction. | COMMENT |
| MEDIUM | pkg/registry/manifest/manifest_fuzz_test.go | 16 | // to ensure robust parsing. It tests valid references, malformed strings, and edge cases to prevent | COMMENT |
| MEDIUM | pkg/notifications/shoutrrr_fuzz_test.go | 16 | // FuzzGetShoutrrrTemplate fuzzes the getShoutrrrTemplate function to ensure robust parsing of template strings. | COMMENT |
| MEDIUM | pkg/notifications/shoutrrr_fuzz_test.go | 34 | // FuzzSanitizeURLForLogging fuzzes the sanitizeURLForLogging function to ensure robust URL parsing. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | internal/metrics/doc.go | 8 | // Usage example: | COMMENT |
| LOW | internal/flags/doc.go | 26 | // Usage example: | COMMENT |
| LOW | internal/util/doc.go | 14 | // Usage example: | COMMENT |
| LOW | internal/actions/doc.go | 16 | // Usage example: | COMMENT |
| LOW | pkg/filters/doc.go | 8 | // Usage example: | COMMENT |
| LOW | pkg/types/doc.go | 13 | // Usage example: | COMMENT |
| LOW | pkg/sorter/doc.go | 9 | // Usage example: | COMMENT |
| LOW | pkg/compose/doc.go | 11 | // Usage example: | COMMENT |
| LOW | pkg/lifecycle/doc.go | 8 | // Usage example: | COMMENT |
| LOW | pkg/container/doc.go | 12 | // Usage example: | COMMENT |
| LOW | pkg/registry/doc.go | 13 | // Usage example: | COMMENT |
| LOW | pkg/session/doc.go | 11 | // Usage example: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | internal/flags/flags_test.go | 1294 | // Step 1: env bridge sets pflag to the file path | COMMENT |
| LOW⚡ | internal/flags/flags_test.go | 1306 | // Step 2: secret expansion replaces content and marks Changed=true | COMMENT |
| LOW⚡ | internal/flags/flags_test.go | 1315 | // Step 3: re-running ApplyEnvToFlags must not overwrite the expanded value | COMMENT |
| LOW | docs/http-api/configuration/tls/index.md | 27 | ### Step 1: Obtain a Certificate and Private Key | COMMENT |
| LOW | docs/http-api/configuration/tls/index.md | 59 | ### Step 2: Prepare Files for the Container | COMMENT |
| LOW | docs/http-api/configuration/tls/index.md | 70 | ### Step 3: Mount and Configure Watchtower | COMMENT |
| LOW | docs/http-api/configuration/tls/index.md | 110 | ### Step 4: Connect Using HTTPS | COMMENT |
| LOW⚡ | pkg/container/cycles.go | 70 | // Step 1: Mark node as visiting (gray) and add to current exploration path | COMMENT |
| LOW⚡ | pkg/container/cycles.go | 76 | // Step 2: Explore all dependencies (neighbors) of this node | COMMENT |
| LOW | pkg/container/cycles.go | 109 | // Step 3: Backtrack - remove node from current path and mark as fully visited (black) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | internal/flags/flags_test.go | 1294 | // Step 1: env bridge sets pflag to the file path | COMMENT |
| LOW⚡ | internal/flags/flags_test.go | 1306 | // Step 2: secret expansion replaces content and marks Changed=true | COMMENT |
| LOW⚡ | internal/flags/flags_test.go | 1315 | // Step 3: re-running ApplyEnvToFlags must not overwrite the expanded value | COMMENT |
| LOW⚡ | pkg/container/cycles.go | 70 | // Step 1: Mark node as visiting (gray) and add to current exploration path | COMMENT |
| LOW⚡ | pkg/container/cycles.go | 76 | // Step 2: Explore all dependencies (neighbors) of this node | COMMENT |
| LOW | pkg/container/cycles.go | 109 | // Step 3: Backtrack - remove node from current path and mark as fully visited (black) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | scripts/docker-util.sh | 2 | # This file is meant to be sourced into other scripts and contain some utility functions for docker e2e testing | COMMENT |
| MEDIUM | .circleci/continue-config.yml | 14 | # Define a job to be invoked later in a workflow. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/scripts/test_tls_integration.sh | 52 | # Check if certs exist | COMMENT |
| LOW | .github/workflows/release-nightly.yaml | 69 | # Check if there are any changes in the watched paths since last successful nightly run | COMMENT |