Nix, the purely functional package manager
This report summarizes scanner evidence for NixOS/nix, a C++ project with 17,948 GitHub stars. SynthScan examined 62,044 lines of code across 926 source files, recording 61 pattern matches distributed across 11 syntactic categories. The legacy adjusted pattern signal is 1.5 (Low 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.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 52 finding(s).
Are imports declared and package/API names verified? 4 finding(s).
Are wrappers, guards, and repeated structures necessary? 11 finding(s).
Which changes need focused human review? 61 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 61 distinct pattern matches across 11 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 |
|---|---|---|---|---|
| MEDIUM | …aging/scripted-installer/install-systemd-multi-user.sh | 49 | # Create a systemd unit override with proxy environment variables | COMMENT |
| MEDIUM | packaging/scripted-installer/create-darwin-volume.sh | 259 | # Create the paths defined in synthetic.conf, saving us a reboot. | COMMENT |
| MEDIUM | tests/functional/nix-channel.sh | 31 | # Create a channel. | COMMENT |
| MEDIUM | tests/functional/binary-cache.sh | 15 | # Create the binary cache. | COMMENT |
| MEDIUM | tests/functional/binary-cache.sh | 184 | # Create a signed binary cache. | COMMENT |
| MEDIUM | tests/functional/fetchGitShallow.sh | 8 | # Create a test repo with multiple commits for all our tests | COMMENT |
| MEDIUM | tests/functional/local-overlay-store/optimise-inner.sh | 19 | # Create a file to add to store | COMMENT |
| MEDIUM | tests/functional/flakes/common.sh | 52 | # Create a simple Git flake and add it to the registry as "flake1". | COMMENT |
| MEDIUM | tests/functional/flakes/run.sh | 56 | # Create a flake with an app that prints its arguments | COMMENT |
| MEDIUM | tests/functional/common/functions.sh | 276 | # This function is inefficient, so it should only be used in error messages. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …kaging/scripted-installer/install-darwin-multi-user.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | packaging/scripted-installer/install-multi-user.sh | 661 | # now mounted, but we haven't added a bunch of new files | COMMENT |
| LOW | packaging/scripted-installer/create-darwin-volume.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | packaging/scripted-installer/create-darwin-volume.sh | 21 | # identifiers we inherit--just those necessary to: | COMMENT |
| LOW | packaging/scripted-installer/create-darwin-volume.sh | 141 | fi | COMMENT |
| LOW | packaging/scripted-installer/create-darwin-volume.sh | 161 | # the volume, and the install fails. | COMMENT |
| LOW | packaging/scripted-installer/create-darwin-volume.sh | 441 | # shellcheck disable=SC1003,SC2026 | COMMENT |
| LOW | packaging/scripted-installer/create-darwin-volume.sh | 461 | EOF | COMMENT |
| LOW | packaging/scripted-installer/create-darwin-volume.sh | 481 | # I'm not sure if it's safe to approach this way? | COMMENT |
| LOW | packaging/scripted-installer/create-darwin-volume.sh | 721 | # its UUID and set mount opts in fstab before first mount | COMMENT |
| LOW | tests/nixos/ca-fd-leak/sender.c | 1 | #include <sys/socket.h> | COMMENT |
| LOW | tests/functional/shell.shebang.sh | 1 | #! @ENV_PROG@ nix-shell | COMMENT |
| LOW | tests/functional/shell.shebang.rb | 1 | #! @SHELL_PROG@ | COMMENT |
| LOW | tests/functional/structured-attrs.sh | 61 | # Check it works with the expected structured attrs | COMMENT |
| LOW | tests/functional/fetchGitRefs.sh | 21 | # Git imposes the following rules on how references are named: | COMMENT |
| LOW | tests/functional/nix_path.sh | 21 | # ideally they would work off the table programmatically. | COMMENT |
| LOW | tests/functional/nars.sh | 121 | COMMENT | |
| LOW | tests/functional/fixed-slow-vs-bad.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | tests/functional/experimental-features.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | tests/functional/local-overlay-store/common.sh | 1 | # shellcheck shell=bash | COMMENT |
| LOW | tests/functional/flakes/flake-in-submodule.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | tests/functional/flakes/follow-paths.sh | 181 | # A | COMMENT |
| LOW | tests/functional/flakes/follow-paths.sh | 281 | } | COMMENT |
| LOW | tests/functional/flakes/shebang.sh | 21 | chmod +x "$scriptDir/shebang.sh" | COMMENT |
| LOW | tests/functional/common/functions.sh | 321 | # | COMMENT |
| LOW | tests/functional/git/packed-refs-no-cache.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | doc/manual/generate-deps.py | 1 | #!/usr/bin/env python3 | COMMENT |
| LOW | src/libexpr-c/nix_api_expr.h | 21 | # define __has_c_attribute(x) 0 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | packaging/scripted-installer/create-darwin-volume.sh | 553 | # aspiration: robust enough to both fix problems | COMMENT |
| MEDIUM | tests/functional/flakes/flakes.sh | 113 | # This `cd` should not be required and is indicative of aforementioned bug. | COMMENT |
| MEDIUM | tests/functional/git/packed-refs-no-cache.sh | 5 | # tl;dr;fetchGit will utilize the git cache and avoid refetching when possible. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/filetransfer-retry-backoff/test_retry_backoff.py | 110 | def test_rate_limit_delay_and_retry_after(): | CODE |
| LOW | tests/filetransfer-retry-backoff/test_retry_backoff.py | 124 | def test_retry_after_floor_exceeds_backoff(): | CODE |
| LOW | tests/filetransfer-retry-backoff/test_retry_backoff.py | 148 | def test_raised_retry_attempts(): | CODE |
| LOW | tests/filetransfer-retry-backoff/test_retry_backoff.py | 160 | def test_download_attempts_alias(): | CODE |
| LOW | …anual/source/store/derivation/outputs/input-address.md | 69 | function hashInputMaskedDerivation(drv) -> Hash: | CODE |
| LOW | …anual/source/store/derivation/outputs/input-address.md | 84 | function hashOutputsOrInputMaskedDerivation(drv) -> Map[String, Hash] | Hash: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | doc/manual/expand-includes.py | 192 | print(f"Error: Input file not found: {args.input_file}", file=sys.stderr) | STRING |
| MEDIUM⚡ | doc/manual/expand-includes.py | 196 | print(f"Error: Source root is not a directory: {args.source_root}", file=sys.stderr) | STRING |
| MEDIUM⚡ | doc/manual/expand-includes.py | 200 | print(f"Error: Generated root is not a directory: {args.generated_root}", file=sys.stderr) | STRING |
| LOW | doc/manual/expand-includes.py | 215 | except Exception as e: | STRING |
| MEDIUM | doc/manual/expand-includes.py | 216 | print(f"Error processing {args.input_file}: {e}", file=sys.stderr) | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | packaging/scripted-installer/create-darwin-volume.sh | 502 | # TODO: I'm scaffolding this to handle the new nix volumes | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/libstore-c/nix_api_store.h | 111 | * @note Don't forget to free this path using nix_store_path_free()! | COMMENT |
| LOW | src/libstore-c/nix_api_store/store_path.h | 79 | * @note Don't forget to free this path using nix_store_path_free()! | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/functional/fetchGitSubmodules.sh | 22 | echo "lorem ipsum" > "$1"/content | CODE |
| LOW | doc/manual/source/package-management/ssh-substituter.md | 58 | nix.sshServe.keys = [ "ssh-dss AAAAB3NzaC1k... bob@example.org" ]; | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | contrib/stack-collapse.py | 12 | CODE | |
| LOW | contrib/stack-collapse.py | 13 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/functional/eval.sh | 24 | # Check if toFile can be utilized during restricted eval | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/functional/common/functions.sh | 232 | # Usage: | COMMENT |