Repository Analysis

NixOS/nix

Nix, the purely functional package manager

1.5 Likely human-written View on GitHub
1.5
Adjusted Score
1.5
Raw Score
100%
Time Factor
2026-05-30
Last Push
16,974
Stars
C++
Language
59,305
Lines of Code
891
Files
58
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 17LOW 41

Pattern Findings

58 matches across 10 categories. Click a row to expand file-level details.

Self-Referential Comments10 hits · 30 pts
SeverityFileLineSnippet
MEDIUMtests/functional/nix-channel.sh31# Create a channel.
MEDIUMtests/functional/binary-cache.sh14# Create the binary cache.
MEDIUMtests/functional/binary-cache.sh185# Create a signed binary cache.
MEDIUMtests/functional/fetchGitShallow.sh8# Create a test repo with multiple commits for all our tests
MEDIUMtests/functional/local-overlay-store/optimise-inner.sh19# Create a file to add to store
MEDIUMtests/functional/flakes/common.sh52# Create a simple Git flake and add it to the registry as "flake1".
MEDIUMtests/functional/flakes/run.sh59# Create a flake with an app that prints its arguments
MEDIUMtests/functional/common/functions.sh256# This function is inefficient, so it should only be used in error messages.
MEDIUMscripts/install-systemd-multi-user.sh49 # Create a systemd unit override with proxy environment variables
MEDIUMscripts/create-darwin-volume.sh259# Create the paths defined in synthetic.conf, saving us a reboot.
Over-Commented Block28 hits · 28 pts
SeverityFileLineSnippet
LOWtests/nixos/ca-fd-leak/sender.c1#include <sys/socket.h>
LOWtests/functional/shell.shebang.sh1#! @ENV_PROG@ nix-shell
LOWtests/functional/shell.shebang.rb1#! @SHELL_PROG@
LOWtests/functional/fetchGitRefs.sh21# Test various combinations of ref names
LOWtests/functional/fetchGitSubmodules.sh161
LOWtests/functional/shell.sh21nix shell -f shell-hello.nix hello-symlink -c hello | grep 'Hello World'
LOWtests/functional/nix_path.sh21# ideally they would work off the table programmatically.
LOWtests/functional/nars.sh121expectStderr 1 nix-store "${opts[@]}" --dump "$TEST_ROOT/case" > /dev/null
LOWtests/functional/fixed-slow-vs-bad.sh1#!/usr/bin/env bash
LOWtests/functional/experimental-features.sh1#!/usr/bin/env bash
LOWtests/functional/local-overlay-store/common.sh1# shellcheck shell=bash
LOWtests/functional/flakes/follow-paths.sh181# A
LOWtests/functional/flakes/follow-paths.sh281}
LOWtests/functional/flakes/shebang.sh21chmod +x "$scriptDir/shebang.sh"
LOWtests/functional/common/functions.sh301#
LOWtests/functional/git/packed-refs-no-cache.sh1#!/usr/bin/env bash
LOWscripts/install-darwin-multi-user.sh1#!/usr/bin/env bash
LOWscripts/install-multi-user.sh661 # now mounted, but we haven't added a bunch of new files
LOWscripts/create-darwin-volume.sh1#!/usr/bin/env bash
LOWscripts/create-darwin-volume.sh21 # identifiers we inherit--just those necessary to:
LOWscripts/create-darwin-volume.sh141 fi
LOWscripts/create-darwin-volume.sh161 # the volume, and the install fails.
LOWscripts/create-darwin-volume.sh441 # shellcheck disable=SC1003,SC2026
LOWscripts/create-darwin-volume.sh461EOF
LOWscripts/create-darwin-volume.sh481 # I'm not sure if it's safe to approach this way?
LOWscripts/create-darwin-volume.sh721 # its UUID and set mount opts in fstab before first mount
LOWdoc/manual/generate-deps.py1#!/usr/bin/env python3
LOWsrc/libexpr-c/nix_api_expr.h21# define __has_c_attribute(x) 0
AI Slop Vocabulary3 hits · 9 pts
SeverityFileLineSnippet
MEDIUMtests/functional/flakes/flakes.sh116 # This `cd` should not be required and is indicative of aforementioned bug.
MEDIUMtests/functional/git/packed-refs-no-cache.sh5# tl;dr;fetchGit will utilize the git cache and avoid refetching when possible.
MEDIUMscripts/create-darwin-volume.sh553# aspiration: robust enough to both fix problems
Excessive Try-Catch Wrapping5 hits · 6 pts
SeverityFileLineSnippet
MEDIUMdoc/manual/expand-includes.py192 print(f"Error: Input file not found: {args.input_file}", file=sys.stderr)
MEDIUMdoc/manual/expand-includes.py196 print(f"Error: Source root is not a directory: {args.source_root}", file=sys.stderr)
MEDIUMdoc/manual/expand-includes.py200 print(f"Error: Generated root is not a directory: {args.generated_root}", file=sys.stderr)
LOWdoc/manual/expand-includes.py215 except Exception as e:
MEDIUMdoc/manual/expand-includes.py216 print(f"Error processing {args.input_file}: {e}", file=sys.stderr)
Hyper-Verbose Identifiers5 hits · 5 pts
SeverityFileLineSnippet
LOWtests/filetransfer-retry-backoff/test_retry_backoff.py95def test_rate_limit_delay_and_retry_after():
LOWtests/filetransfer-retry-backoff/test_retry_backoff.py109def test_retry_after_floor_exceeds_backoff():
LOWtests/filetransfer-retry-backoff/test_retry_backoff.py133def test_raised_retry_attempts():
LOWtests/filetransfer-retry-backoff/test_retry_backoff.py145def test_download_attempts_alias():
LOW…anual/source/store/derivation/outputs/input-address.md69function hashOutputsOrQuotientDerivation(drv) -> Map[String, Hash] | Hash:
Slop Phrases2 hits · 3 pts
SeverityFileLineSnippet
LOWsrc/libstore-c/nix_api_store.h111 * @note Don't forget to free this path using nix_store_path_free()!
LOWsrc/libstore-c/nix_api_store/store_path.h79 * @note Don't forget to free this path using nix_store_path_free()!
Unused Imports2 hits · 2 pts
SeverityFileLineSnippet
LOWcontrib/stack-collapse.py12
LOWcontrib/stack-collapse.py13
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippet
LOWtests/functional/eval.sh26# Check if toFile can be utilized during restricted eval
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWtests/functional/common/functions.sh215# Usage:
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippet
LOWtests/functional/fetchGitSubmodules.sh28 echo "lorem ipsum" > "$1"/content