Repository Analysis

borgbackup/borg

Deduplicating archiver with compression and authenticated encryption.

19.6 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of borgbackup/borg, a Python project with 13,509 GitHub stars. SynthScan v2.0 examined 68,335 lines of code across 249 source files, recording 1211 pattern matches distributed across 15 syntactic categories. The overall adjusted score of 19.6 places this repository in the Moderate AI signal 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).

19.6
Adjusted Score
19.6
Raw Score
100%
Time Factor
2026-07-14
Last Push
13.5K
Stars
Python
Language
68.3K
Lines of Code
249
Files
1.2K
Pattern Hits
2026-07-14
Scan Date
0.05
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 12MEDIUM 80LOW 1119

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 1211 distinct pattern matches across 15 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.

Hyper-Verbose Identifiers537 hits · 532 pts
SeverityFileLineSnippetContext
LOWsrc/borg/fslocking.py427 def _wait_for_readers_finishing(self, remove, sleep):CODE
LOWsrc/borg/conftest.py196 def maybe_clear_flags_and_retry(func, path, _exc_info):CODE
LOWsrc/borg/patterns.py127 def get_unmatched_include_patterns(self):CODE
LOWsrc/borg/manifest.py46 def get_first_and_last_archive_ts(archives_list):CODE
LOWsrc/borg/manifest.py513 def check_repository_compatibility(self, operations):CODE
LOWsrc/borg/manifest.py527 def get_all_mandatory_features(self):CODE
LOWsrc/borg/security.py147 def assert_no_manifest_replay(self, manifest, key):CODE
LOWsrc/borg/cache.py60def discover_files_cache_names(path, files_cache_name="files"):CODE
LOWsrc/borg/cache.py350 def discover_files_cache_names(self, path):CODE
LOWsrc/borg/cache.py539def chunkindex_fragment_entry_size():CODE
LOWsrc/borg/cache.py554def list_chunkindex_fragments(repository):CODE
LOWsrc/borg/cache.py579def delete_chunkindex_from_repo(repository):CODE
LOWsrc/borg/cache.py593def _store_chunkindex_fragment(repository, batch, stored_hashes, *, force_write):CODE
LOWsrc/borg/cache.py701def read_chunkindex_from_repo(repository, hash):CODE
LOWsrc/borg/cache.py768def build_chunkindex_from_repo(CODE
LOWsrc/borg/cache.py917 def _maybe_write_chunks_index(self, now, force=False, clear=False):CODE
LOWsrc/borg/cache.py1047 def check_cache_compatibility(self):CODE
LOWsrc/borg/archive.py1932 def rebuild_archives_directory(self):CODE
LOWsrc/borg/crypto/key.py144def encryption_argument_names():CODE
LOWsrc/borg/crypto/key.py655 def get_existing_or_new_target(self, args):CODE
LOWsrc/borg/crypto/key.py683 def _find_all_keys_in_keys_dir(self):CODE
LOWsrc/borg/crypto/key.py710 def _find_key_file_from_environment(self):CODE
LOWsrc/borg/testsuite/compress_test.py154def test_additive_obfuscation(specs, c_type, obfuscation_padding: int):CODE
LOWsrc/borg/testsuite/compress_test.py192def test_default_compression_level(c_type, c_name):CODE
LOWsrc/borg/testsuite/compress_test.py204def test_specified_compression_level(c_type, c_name, c_levels):CODE
LOWsrc/borg/testsuite/compress_test.py212def test_invalid_compression_level(invalid_spec):CODE
LOWsrc/borg/testsuite/compress_test.py254def test_robj_specific_obfuscation(data_length, expected_padding, robj_type):CODE
LOWsrc/borg/testsuite/archives_test.py80def test_finish_returns_empty_dict():CODE
LOWsrc/borg/testsuite/archives_test.py90def test_ids_returns_binary_ids():CODE
LOWsrc/borg/testsuite/archives_test.py96def test_ids_store_object_not_found_gives_empty():CODE
LOWsrc/borg/testsuite/archives_test.py102def test_ids_passes_deleted_flag():CODE
LOWsrc/borg/testsuite/archives_test.py159def test_exists_name_and_id_true():CODE
LOWsrc/borg/testsuite/archives_test.py165def test_exists_name_and_id_false_wrong_name():CODE
LOWsrc/borg/testsuite/archives_test.py171def test_exists_name_and_id_false_wrong_id():CODE
LOWsrc/borg/testsuite/archives_test.py177def test_exists_name_and_ts_true():CODE
LOWsrc/borg/testsuite/archives_test.py183def test_exists_name_and_ts_false_wrong_ts():CODE
LOWsrc/borg/testsuite/archives_test.py189def test_exists_name_and_ts_false_wrong_name():CODE
LOWsrc/borg/testsuite/archives_test.py195def test_get_archive_meta_object_not_found():CODE
LOWsrc/borg/testsuite/archives_test.py258def test_get_archive_meta_bad_version():CODE
LOWsrc/borg/testsuite/archives_test.py267def test_get_missing_returns_none():CODE
LOWsrc/borg/testsuite/archives_test.py273def test_get_returns_archive_archiveinfo():CODE
LOWsrc/borg/testsuite/archives_test.py333def test_create_calls_store_store():CODE
LOWsrc/borg/testsuite/archives_test.py339def test_create_with_datetime_ts():CODE
LOWsrc/borg/testsuite/archives_test.py346def test_create_overwrite_kwarg_ignored():CODE
LOWsrc/borg/testsuite/archives_test.py523def test_get_one_no_match_raises():CODE
LOWsrc/borg/testsuite/archives_test.py529def test_get_one_multiple_matches_raises():CODE
LOWsrc/borg/testsuite/archives_test.py537def test_get_one_deleted_passes_flag():CODE
LOWsrc/borg/testsuite/archives_test.py545def test_list_considering_raises_if_name_set():CODE
LOWsrc/borg/testsuite/archives_test.py553def test_list_considering_delegates():CODE
LOWsrc/borg/testsuite/archives_test.py54def _stub_matching_info_tuples(infos):CODE
LOWsrc/borg/testsuite/archives_test.py66def test_archives_satisfies_archives_interface():CODE
LOWsrc/borg/testsuite/archives_test.py210def test_get_archive_meta_success():CODE
LOWsrc/borg/testsuite/archives_test.py238def test_get_archive_meta_success_with_tags():CODE
LOWsrc/borg/testsuite/archives_test.py292def test_get_by_id_missing_returns_none():CODE
LOWsrc/borg/testsuite/archives_test.py315def test_get_by_id_exists_false_returns_none():CODE
LOWsrc/borg/testsuite/archives_test.py378def test_list_sort_by_str_raises():CODE
LOWsrc/borg/testsuite/archives_test.py384def test_list_sort_generator_not_materialised_regression():CODE
LOWsrc/borg/testsuite/archives_test.py439def test_list_deleted_passes_flag():CODE
LOWsrc/borg/testsuite/archives_test.py453def test_list_match_name_prefix():CODE
LOWsrc/borg/testsuite/archives_test.py488def test_list_match_aid_ambiguous():CODE
477 more matches not shown…
Unused Imports362 hits · 262 pts
SeverityFileLineSnippetContext
LOWscripts/errorlist.py7CODE
LOWscripts/errorlist.py8CODE
LOWsrc/borg/repoobj.py4CODE
LOWsrc/borg/repoobj.py170CODE
LOWsrc/borg/manifest.py15CODE
LOWsrc/borg/cache.py170CODE
LOWsrc/borg/cache.py170CODE
LOWsrc/borg/cache.py170CODE
LOWsrc/borg/cache.py170CODE
LOWsrc/borg/cache.py170CODE
LOWsrc/borg/fuse_impl.py8CODE
LOWsrc/borg/archive.py28CODE
LOWsrc/borg/repository.py15CODE
LOWsrc/borg/crypto/key.py17CODE
LOWsrc/borg/crypto/key.py991CODE
LOWsrc/borg/crypto/key.py992CODE
LOWsrc/borg/crypto/key.py994CODE
LOWsrc/borg/crypto/keymanager.py198CODE
LOWsrc/borg/chunkers/__init__.py6CODE
LOWsrc/borg/testsuite/__init__.py23CODE
LOWsrc/borg/testsuite/__init__.py23CODE
LOWsrc/borg/testsuite/__init__.py23CODE
LOWsrc/borg/testsuite/__init__.py23CODE
LOWsrc/borg/testsuite/__init__.py23CODE
LOWsrc/borg/testsuite/chunkers/buzhash64_self_test.py8CODE
LOWsrc/borg/testsuite/chunkers/buzhash64_test.py11CODE
LOWsrc/borg/testsuite/chunkers/fixed_self_test.py7CODE
LOWsrc/borg/testsuite/chunkers/buzhash_self_test.py8CODE
LOWsrc/borg/testsuite/chunkers/__init__.py4CODE
LOWsrc/borg/testsuite/chunkers/interaction_test.py6CODE
LOWsrc/borg/testsuite/chunkers/reader_test.py9CODE
LOWsrc/borg/testsuite/chunkers/fixed_test.py10CODE
LOWsrc/borg/testsuite/chunkers/buzhash_test.py10CODE
LOWsrc/borg/testsuite/chunkers/failing_test.py6CODE
LOWsrc/borg/testsuite/chunkers/fastcdc_test.py11CODE
LOWsrc/borg/testsuite/archiver/repo_list_cmd_test.py6CODE
LOWsrc/borg/testsuite/archiver/tar_cmds_test.py8CODE
LOWsrc/borg/testsuite/archiver/prune_cmd_test.py7CODE
LOWsrc/borg/testsuite/archiver/extract_cmd_test.py13CODE
LOWsrc/borg/testsuite/archiver/help_cmd_test.py3CODE
LOWsrc/borg/testsuite/archiver/return_codes_test.py3CODE
LOWsrc/borg/testsuite/archiver/list_cmd_test.py5CODE
LOWsrc/borg/testsuite/archiver/recreate_cmd_test.py8CODE
LOWsrc/borg/testsuite/archiver/delete_cmd_test.py1CODE
LOWsrc/borg/testsuite/archiver/debug_cmds_test.py5CODE
LOWsrc/borg/testsuite/archiver/compact_cmd_test.py6CODE
LOWsrc/borg/testsuite/archiver/repo_space_cmd_test.py1CODE
LOWsrc/borg/testsuite/archiver/create_cmd_test.py13CODE
LOWsrc/borg/testsuite/archiver/corruption_test.py7CODE
LOWsrc/borg/testsuite/archiver/__init__.py20CODE
LOWsrc/borg/testsuite/archiver/__init__.py29CODE
LOWsrc/borg/testsuite/archiver/repo_delete_cmd_test.py5CODE
LOWsrc/borg/testsuite/archiver/repo_create_cmd_test.py7CODE
LOWsrc/borg/testsuite/archiver/undelete_cmd_test.py1CODE
LOWsrc/borg/testsuite/archiver/analyze_cmd_test.py3CODE
LOWsrc/borg/testsuite/archiver/check_cmd_remote_test.py3CODE
LOWsrc/borg/testsuite/archiver/rename_cmd_test.py1CODE
LOWsrc/borg/testsuite/archiver/patterns_test.py2CODE
LOWsrc/borg/testsuite/archiver/transfer_cmd_test.py13CODE
LOWsrc/borg/testsuite/archiver/mount_cmds_test.py15CODE
302 more matches not shown…
Decorative Section Separators37 hits · 140 pts
SeverityFileLineSnippetContext
MEDIUMscripts/rest_perf_test.sh24# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh26# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh63# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh65# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh105# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh107# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh129# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh134# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh162# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh164# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh196# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh198# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh206# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh208# ----------------------------------------------------------------------------COMMENT
MEDIUMsrc/borg/testsuite/legacy_upgrade_test.py43# ── upgrade_item ──────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/legacy_upgrade_test.py117# ── upgrade_archive_metadata ──────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/legacy_upgrade_test.py180# ── upgrade_compressed_chunk ──────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/legacy_upgrade_test.py18# ── helpers ───────────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/legacy_helpers_test.py15# ── borg1_hardlinkable ────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/legacy_helpers_test.py46# ── borg1_hardlink_master ─────────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/legacy_helpers_test.py64# ── borg1_hardlink_slave ──────────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/legacy_archives_test.py121# ── create ───────────────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/legacy_archives_test.py149# ── get / get_by_id ───────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/legacy_archives_test.py189# ── NotImplementedError stubs ──────────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/legacy_archives_test.py228# ── _get_archive_meta ────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/legacy_archives_test.py401# ── get_one ───────────────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/legacy_archives_test.py424# ── list_considering ──────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/legacy_archives_test.py454# ── ArchivesInterface Protocol / Manifest dispatch ────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/legacy_archives_test.py16# ── helpers ──────────────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/legacy_archives_test.py65# ── init / raw-dict operations ───────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/legacy_archives_test.py278# ── _infos / _info_tuples ────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/legacy_archives_test.py293# ── list ──────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/crypto/legacy_key_test.py10# ── Pbkdf2FileMixin ───────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/archiver/tar_cmds.py191 # ----------COMMENT
MEDIUMsrc/borg/archiver/tar_cmds.py199 # -----------COMMENT
MEDIUMsrc/borg/cockpit/widgets.py317 # --------------------------COMMENT
MEDIUMsrc/borg/cockpit/widgets.py328 # --------------COMMENT
Deep Nesting117 hits · 109 pts
SeverityFileLineSnippetContext
LOWscripts/make.py46CODE
LOWscripts/make.py113CODE
LOWscripts/make.py164CODE
LOWscripts/chunker_bench.py106CODE
LOWsrc/borg/fslocking.py138CODE
LOWsrc/borg/fslocking.py207CODE
LOWsrc/borg/fslocking.py291CODE
LOWsrc/borg/version.py35CODE
LOWsrc/borg/manifest.py214CODE
LOWsrc/borg/hlfuse.py193CODE
LOWsrc/borg/hlfuse.py262CODE
LOWsrc/borg/hlfuse.py468CODE
LOWsrc/borg/hlfuse.py628CODE
LOWsrc/borg/hlfuse.py471CODE
LOWsrc/borg/cache.py768CODE
LOWsrc/borg/cache.py287CODE
LOWsrc/borg/cache.py353CODE
LOWsrc/borg/cache.py396CODE
LOWsrc/borg/xattr.py60CODE
LOWsrc/borg/xattr.py99CODE
LOWsrc/borg/archive.py197CODE
LOWsrc/borg/archive.py323CODE
LOWsrc/borg/archive.py743CODE
LOWsrc/borg/archive.py765CODE
LOWsrc/borg/archive.py947CODE
LOWsrc/borg/archive.py1150CODE
LOWsrc/borg/archive.py1323CODE
LOWsrc/borg/archive.py1419CODE
LOWsrc/borg/archive.py1569CODE
LOWsrc/borg/archive.py1720CODE
LOWsrc/borg/archive.py1860CODE
LOWsrc/borg/archive.py1932CODE
LOWsrc/borg/archive.py2002CODE
LOWsrc/borg/archive.py2342CODE
LOWsrc/borg/archive.py2046CODE
LOWsrc/borg/storelocking.py178CODE
LOWsrc/borg/storelocking.py318CODE
LOWsrc/borg/repository.py914CODE
LOWsrc/borg/fuse.py528CODE
LOWsrc/borg/fuse.py712CODE
LOWsrc/borg/fuse.py531CODE
LOWsrc/borg/crypto/key.py435CODE
LOWsrc/borg/crypto/key.py809CODE
LOWsrc/borg/crypto/keymanager.py195CODE
LOWsrc/borg/chunkers/failing.py30CODE
LOWsrc/borg/testsuite/cache_test.py380CODE
LOWsrc/borg/testsuite/repository_test.py107CODE
LOWsrc/borg/testsuite/chunkers/buzhash64_test.py24CODE
LOWsrc/borg/testsuite/chunkers/interaction_test.py21CODE
LOWsrc/borg/testsuite/chunkers/fixed_test.py13CODE
LOWsrc/borg/testsuite/chunkers/buzhash_test.py18CODE
LOWsrc/borg/testsuite/chunkers/fastcdc_test.py24CODE
LOWsrc/borg/testsuite/platform/platform_test.py31CODE
LOWsrc/borg/testsuite/archiver/extract_cmd_test.py208CODE
LOWsrc/borg/testsuite/archiver/extract_cmd_test.py211CODE
LOWsrc/borg/testsuite/archiver/create_cmd_test.py1083CODE
LOWsrc/borg/testsuite/archiver/create_cmd_test.py1113CODE
LOWsrc/borg/testsuite/archiver/create_cmd_test.py1144CODE
LOWsrc/borg/testsuite/archiver/__init__.py50CODE
LOWsrc/borg/testsuite/archiver/__init__.py124CODE
57 more matches not shown…
Self-Referential Comments31 hits · 96 pts
SeverityFileLineSnippetContext
MEDIUMdocs/conf.py4# This file is execfile()d with the current directory set to its containing directory.COMMENT
MEDIUM.github/workflows/ci.yml511 # Create a FFS image with extended attributes enabled and use it for TMPDIR.COMMENT
MEDIUMsrc/borg/hlfuse.py168 # Create a directory item for the archiveCOMMENT
MEDIUMsrc/borg/testsuite/cache_test.py123 # Create an index entry so list_chunkindex_hashes finds it.COMMENT
MEDIUMsrc/borg/testsuite/repoobj_test.py146 # Create a repository object containing user data (file content data).COMMENT
MEDIUMsrc/borg/testsuite/repoobj_test.py158 # Create a repository object containing user data (file content data).COMMENT
MEDIUMsrc/borg/testsuite/crypto/csprng_test.py170 # Create a large listCOMMENT
MEDIUMsrc/borg/testsuite/crypto/crypto_test.py286 # Create a simple KeyBase subclass with a non-empty crypt_keyCOMMENT
MEDIUMsrc/borg/testsuite/chunkers/reader_test.py133 # Create a mock FileFMAPReader that yields specific chunksCOMMENT
MEDIUMsrc/borg/testsuite/chunkers/reader_test.py145 # Create a FileReader with a dummy BytesIO to satisfy the assertionCOMMENT
MEDIUMsrc/borg/testsuite/chunkers/reader_test.py271 # Create a file with all zerosCOMMENT
MEDIUMsrc/borg/testsuite/chunkers/reader_test.py288 # Create a sparse fileCOMMENT
MEDIUMsrc/borg/testsuite/chunkers/reader_test.py336 # Create a reader with sparse=FalseCOMMENT
MEDIUMsrc/borg/testsuite/archiver/tar_cmds_test.py220 # Create a simple directory structureCOMMENT
MEDIUMsrc/borg/testsuite/archiver/tar_cmds_test.py223 # Create a tar file with paths starting with './'COMMENT
MEDIUMsrc/borg/testsuite/archiver/transfer_cmd_test.py380 # Create an archive with a commentCOMMENT
MEDIUMsrc/borg/testsuite/archiver/diff_cmd_test.py48 # Create the first snapshotCOMMENT
MEDIUMsrc/borg/testsuite/archiver/diff_cmd_test.py78 # Create the second snapshotCOMMENT
MEDIUM…borg/testsuite/archiver/restricted_permissions_test.py18 # Create a repository with unrestricted permissions.COMMENT
MEDIUM…borg/testsuite/archiver/restricted_permissions_test.py43 # Create a repository first (need unrestricted permissions for that).COMMENT
MEDIUM…borg/testsuite/archiver/restricted_permissions_test.py98 # Create a repository first (need unrestricted permissions for that).COMMENT
MEDIUM…borg/testsuite/archiver/restricted_permissions_test.py102 # Create an archive to test with.COMMENT
MEDIUM…borg/testsuite/archiver/restricted_permissions_test.py147 # Create a repository first (need unrestricted permissions for that).COMMENT
MEDIUM…borg/testsuite/archiver/restricted_permissions_test.py151 # Create an initial archive to test with.COMMENT
MEDIUMsrc/borg/testsuite/helpers/fs_test.py353 # Create a directory with both a CACHEDIR.TAG and a custom tag fileCOMMENT
MEDIUMsrc/borg/testsuite/helpers/fs_test.py360 # Create a directory without any tag filesCOMMENT
MEDIUMsrc/borg/archiver/transfer_cmd.py52 # Create a chunker with the specified parametersCOMMENT
MEDIUMsrc/borg/archiver/repo_space_cmd.py70 # Create a new repository:STRING
MEDIUMsrc/borg/archiver/help_cmd.py223 # Define the recursion rootSTRING
MEDIUMsrc/borg/legacy/fs.py111 # This file is a cache directory tag created by Borg.STRING
MEDIUMsrc/borg/helpers/fs.py134 # This file is a cache directory tag created by Borg.STRING
Cross-Language Confusion12 hits · 65 pts
SeverityFileLineSnippetContext
HIGHsrc/borg/archiver/completion_cmd.py108 out=$( borg repo-list "${repo_arg[@]}" --format '{id}{NL}' 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py110 out=$( borg repo-list --format '{id}{NL}' 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py127 out=$( borg repo-list "${repo_arg[@]}" --format '{archive}{NL}' 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py129 out=$( borg repo-list --format '{archive}{NL}' 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py178 out=$( borg repo-list "${repo_arg[@]}" --format '{tags}{NL}' 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py180 out=$( borg repo-list --format '{tags}{NL}' 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py380 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py383 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py407 out=$( borg repo-list "${repo_arg[@]}" --format '{archive}{NL}' 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py409 out=$( borg repo-list --format '{archive}{NL}' 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py463 out=$( borg repo-list "${repo_arg[@]}" --format '{tags}{NL}' 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py465 out=$( borg repo-list --format '{tags}{NL}' 2>/dev/null </dev/null )CODE
Excessive Try-Catch Wrapping41 hits · 48 pts
SeverityFileLineSnippetContext
LOWsrc/borg/conftest.py31 except Exception:CODE
LOWsrc/borg/conftest.py63 except Exception: # nosec B110CODE
LOWsrc/borg/cache.py1035 except Exception as exc:CODE
LOWsrc/borg/logger.py183 except Exception as err: # XXX be more preciseCODE
LOWsrc/borg/archive.py2116 except Exception:CODE
LOWsrc/borg/storelocking.py329 except Exception as e:CODE
LOWsrc/borg/repository.py187 except Exception:CODE
LOWsrc/borg/repository.py431 except Exception:CODE
LOWsrc/borg/crypto/key.py772 except Exception as exc: # noqa: BLE001 - a corrupted borg key must not break unlocking via the othersCODE
LOWsrc/borg/crypto/key.py880 except Exception as exc: # noqa: BLE001 - a corrupted borg key must stay visible and removableCODE
MEDIUMsrc/borg/crypto/key.py460def _load(self, key_data, passphrase):CODE
LOWsrc/borg/crypto/keymanager.py76 except Exception: # noqa: BLE001 - best-effort: a borg key without a parseable envelope has no labelCODE
LOWsrc/borg/testsuite/logger_test.py56 except Exception:CODE
LOWsrc/borg/testsuite/archiver/extract_cmd_test.py645 except Exception:CODE
LOWsrc/borg/testsuite/archiver/remote_repo_test.py26 except Exception:CODE
LOWsrc/borg/testsuite/archiver/remote_repo_test.py31 except Exception:CODE
LOWsrc/borg/archiver/__init__.py528 except Exception:CODE
LOWsrc/borg/archiver/__init__.py536 except Exception:CODE
LOWsrc/borg/archiver/__init__.py610 except Exception:STRING
LOWsrc/borg/archiver/__init__.py650 except Exception as e:STRING
LOWsrc/borg/legacy/remote.py314 except Exception:CODE
MEDIUMsrc/borg/legacy/remote.py73def __init__(self, data):CODE
LOWsrc/borg/legacy/fs.py48 except Exception:CODE
LOWsrc/borg/legacy/fs.py54 except Exception: # nosec B110CODE
LOWsrc/borg/legacy/fs.py71 except Exception: # nosec B110CODE
LOWsrc/borg/legacy/repository.py998 except Exception as exc:CODE
LOWsrc/borg/cockpit/runner.py58 except Exception as e:CODE
LOWsrc/borg/helpers/msgpack.py105 except Exception as e:CODE
LOWsrc/borg/helpers/msgpack.py113 except Exception as e:CODE
LOWsrc/borg/helpers/msgpack.py121 except Exception as e:CODE
LOWsrc/borg/helpers/msgpack.py163 except Exception as e:CODE
LOWsrc/borg/helpers/msgpack.py171 except Exception as e:CODE
LOWsrc/borg/helpers/msgpack.py184 except Exception as e:CODE
LOWsrc/borg/helpers/msgpack.py195 except Exception as e:CODE
MEDIUMsrc/borg/helpers/msgpack.py102def pack(self, obj):CODE
MEDIUMsrc/borg/helpers/msgpack.py158def unpack(self):CODE
MEDIUMsrc/borg/helpers/msgpack.py166def __next__(self):CODE
LOWsrc/borg/helpers/__init__.py208 except Exception: # nosec B110CODE
LOWsrc/borg/helpers/process.py386 except Exception:CODE
LOWsrc/borg/helpers/parseformat.py437 except Exception as e:CODE
MEDIUMsrc/borg/helpers/parseformat.py49def hex_to_bin(hex, length=None):CODE
Over-Commented Block31 hits · 30 pts
SeverityFileLineSnippetContext
LOWpyproject.toml121# E402 module level import not at topCOMMENT
LOWdocs/conf.py1# Documentation build configuration file, created byCOMMENT
LOWdocs/conf.py61# language = NoneCOMMENT
LOWdocs/conf.py81# add_function_parentheses = TrueCOMMENT
LOWdocs/conf.py121COMMENT
LOWdocs/conf.py181COMMENT
LOWscripts/rest_perf_test.sh1#!/usr/bin/env bashCOMMENT
LOWsrc/borg/manifest.py441COMMENT
LOWsrc/borg/paperkey.html21// https://github.com/kazuhikoarase/qrcode-generator/blob/master/js/qrcode.jsCOMMENT
LOWsrc/borg/constants.py61COMMENT
LOWsrc/borg/constants.py101# repo.list() result count limit used by the Borg clientCOMMENT
LOWsrc/borg/cache.py621 # True, else the whole index. borghash cannot serialize just the F_NEW entries, so either way weCOMMENT
LOWsrc/borg/archive.py1481 # Do NOT wrap this in backup_io("read"): the source-file reads are alreadyCOMMENT
LOWsrc/borg/archive.py1501 elif self.files_changed == "ctime":COMMENT
LOWsrc/borg/fuse.py121COMMENT
LOWsrc/borg/fuse.py141COMMENT
LOWsrc/borg/fuse.py241COMMENT
LOWsrc/borg/testsuite/legacyrepository_test.py441 # this tests the shadowing-by-double-put behaviour, see issue #5661COMMENT
LOWsrc/borg/testsuite/archiver/prune_cmd_test.py201COMMENT
LOWsrc/borg/testsuite/archiver/__init__.py121 return exec_fnCOMMENT
LOWsrc/borg/testsuite/archiver/__init__.py241 # Ironically, due to how fakeroot works, comparing FUSE file xattrs to original file xattrsCOMMENT
LOWsrc/borg/testsuite/archiver/__init__.py501 # specified, the default value is `True`, regardless ofCOMMENT
LOWsrc/borg/archiver/tar_cmds.py61 # A quick note about the general design of tar_filter and tarfile;COMMENT
LOWsrc/borg/archiver/tar_cmds.py181 "%s: unsupported file type %o for tar export", remove_surrogates(item.path), modebitsCOMMENT
LOWsrc/borg/archiver/__init__.py321 def get_args(self, argv, cmd):COMMENT
LOWsrc/borg/legacy/remote.py81COMMENT
LOWsrc/borg/legacy/repository.py661 # (which may grow the index up to twice its current size).COMMENT
LOWsrc/borg/legacy/repository.py821 # However, this only happens if the crash also affects the FS to the effect that file deletionsCOMMENT
LOWsrc/borg/legacy/repository.py841 # Now we crash. But only segment 2 gets deleted, while segment 1 is still around. Now key 1COMMENT
LOWsrc/borg/helpers/fs.py321 assert isinstance(path, str)COMMENT
LOWsrc/borg/helpers/process.py321 # (non-matching) libraries from there.COMMENT
AI Slop Vocabulary11 hits · 20 pts
SeverityFileLineSnippetContext
MEDIUMscripts/rest_perf_test.sh3# rest_perf_test.sh - borg2 performance harness for rest:// repositories.COMMENT
LOWsrc/borg/archive.py848 # we just use the existing one and do not remove it.COMMENT
LOWsrc/borg/archive.py1926 # collecting any key we encounter in a damaged repo seems unwise, thus we just useCOMMENT
MEDIUMsrc/borg/archive.py1697 """A restartable/robust version of the streaming msgpack unpacker"""STRING
LOWsrc/borg/testsuite/repoobj_test.py84 # Here, we just use len_data. For Borg transfer, we also know the size from another metadata source.COMMENT
MEDIUMsrc/borg/testsuite/platform/linux_test.py85 # Testing non-ASCII ACL processing to see whether our code is robust.STRING
LOWsrc/borg/testsuite/archiver/extract_cmd_test.py839 # we should just use the existing directory and not remove/recreate it.COMMENT
MEDIUMsrc/borg/testsuite/archiver/benchmark_cmd_test.py21 # Filter for JSON lines only; the test harness merges stdout and stderr,COMMENT
MEDIUMsrc/borg/legacy/fs.py38 # 2. Prefer HOME, but be robust against mount helpers that set HOME to root's home for non-root users.COMMENT
LOWsrc/borg/helpers/fs.py528 fname, parent_fd = path, None # just use the pathCODE
LOWsrc/borg/helpers/fs.py573 fname, parent_fd = path, None # just use the pathCODE
AI Structural Patterns13 hits · 12 pts
SeverityFileLineSnippetContext
LOWsrc/borg/manifest.py102CODE
LOWsrc/borg/manifest.py352CODE
LOWsrc/borg/cache.py191CODE
LOWsrc/borg/archive.py500CODE
LOWsrc/borg/archive.py1751CODE
LOWsrc/borg/archive.py2002CODE
LOWsrc/borg/archive.py2218CODE
LOWsrc/borg/testsuite/archiver/__init__.py186CODE
LOWsrc/borg/archiver/_common.py78CODE
LOWsrc/borg/archiver/__init__.py567CODE
LOWsrc/borg/legacy/archives.py203CODE
LOWsrc/borg/helpers/msgpack.py126CODE
LOWsrc/borg/helpers/yes_no.py15CODE
Redundant / Tautological Comments7 hits · 11 pts
SeverityFileLineSnippetContext
LOWsrc/borg/fuse.py353 # Check if this is an archive we need to loadCOMMENT
LOWsrc/borg/testsuite/shell_completions_test.py14 # Check if Fish is availableCOMMENT
LOWsrc/borg/archiver/completion_cmd.py100 # Check if completing aid: prefixCOMMENT
LOWsrc/borg/archiver/completion_cmd.py369 # Check if completing aid: prefixCOMMENT
LOWsrc/borg/archiver/transfer_cmd.py58 # Check if the chunk is already in the repositoryCOMMENT
LOWsrc/borg/archiver/list_cmd.py38 # Check if the item matches the patterns/paths.COMMENT
LOWsrc/borg/archiver/__init__.py489 # Open the file early, before running the main program, to avoidCOMMENT
Fake / Example Data6 hits · 7 pts
SeverityFileLineSnippetContext
LOWsrc/borg/paperkey.html2346 typein.classList.add("placeholder");CODE
LOWsrc/borg/paperkey.html2347 svg.classList.add("placeholder");CODE
LOWsrc/borg/paperkey.html2357 typein.classList.remove("placeholder");CODE
LOWsrc/borg/paperkey.html2358 svg.classList.remove("placeholder");CODE
LOWsrc/borg/testsuite/legacyrepository_test.py959 assert remote_repository.ssh_cmd(Location("ssh://user@example.com/foo")) == ["ssh", "user@example.com"]CODE
LOWsrc/borg/testsuite/legacyrepository_test.py964 "user@example.com",CODE
Slop Phrases3 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMsrc/borg/constants.py215 # if you still need to, you can use "borg key migrate-to-repokey" with borg 1.0, 1.1 and 1.2.COMMENT
LOWsrc/borg/archiver/create_cmd.py415 # we better do a fresh stat on the file, just to make sure to get the current fileCOMMENT
LOWsrc/borg/legacy/upgrade.py62 # make sure we only have desired stuff in the new item. specifically, make sure to get rid of:COMMENT
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWscripts/rest_perf_test.sh15# Usage:COMMENT
Modern Structural Boilerplate2 hits · 2 pts
SeverityFileLineSnippetContext
LOWsrc/borg/cockpit/widgets.py197 def _update_art(self) -> None:CODE
LOWsrc/borg/cockpit/widgets.py256 def update_art(self) -> None:CODE