AI Slop Code RIsk Monitor

borgbackup/borg

Deduplicating archiver with compression and authenticated encryption.

24.4 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for borgbackup/borg, a Python project with 13,830 GitHub stars. SynthScan examined 97,997 lines of code across 309 source files, recording 2185 pattern matches distributed across 16 syntactic categories. The legacy adjusted pattern signal is 24.4 (Elevated 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.

24.4
Adjusted Signal
24.4
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
13.8K
Stars
Python
Language
98.0K
Lines of Code
309
Files
2.2K
Pattern Hits
2026-10-12
Scan Date
0.26
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 52.9/100 · HIGH

Can maintainers explain intent, assumptions, and trade-offs? 1580 finding(s).

Hallucinated Dependency & Supply Chain Risk 17.0/100 · LOW

Are imports declared and package/API names verified? 438 finding(s).

Agent Over-Engineering Ratio 58.3/100 · HIGH

Are wrappers, guards, and repeated structures necessary? 1493 finding(s).

PR Review Velocity Impact 75.4/100 · CRITICAL

Which changes need focused human review? 2185 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 81MEDIUM 81LOW 2023

Directory Score Breakdown

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.

Pattern Findings

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

Hyper-Verbose Identifiers1310 hits · 1150 pts
SeverityFileLineSnippetContext
LOWsrc/borg/repoobj.py299def whole_object_authenticator(repo_objs):CODE
LOWsrc/borg/fslocking.py441 def _wait_for_readers_finishing(self, remove, sleep):CODE
LOWsrc/borg/conftest.py202 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.py100 def get_first_and_last_archive_ts(archives_list):CODE
LOWsrc/borg/cache.py86def discover_files_cache_names(path, files_cache_name="files"):CODE
LOWsrc/borg/cache.py355 def discover_files_cache_names(self, path):CODE
LOWsrc/borg/cache.py556def chunkindex_fragment_entry_size():CODE
LOWsrc/borg/cache.py572def list_chunkindex_fragments(repository):CODE
LOWsrc/borg/cache.py617def delete_chunkindex_invalid(repository):CODE
LOWsrc/borg/cache.py628def delete_chunkindex_from_repo(repository):CODE
LOWsrc/borg/cache.py650def _store_chunkindex_fragment(repository, batch, stored_hashes, *, force_write):CODE
LOWsrc/borg/cache.py811def read_chunkindex_from_repo(repository, hash):CODE
LOWsrc/borg/cache.py894def build_chunkindex_from_repo(CODE
LOWsrc/borg/cache.py1104def archive_reference_cache_name(archive_id: bytes) -> str:CODE
LOWsrc/borg/cache.py1109def list_archive_reference_caches(repository) -> set:CODE
LOWsrc/borg/cache.py1154def cleanup_archive_reference_caches(repository, stale_hex_ids: set) -> None:CODE
LOWsrc/borg/cache.py1277 def _maybe_write_chunks_index(self, now, force=False, clear=False):CODE
LOWsrc/borg/archive.py2732 def rebuild_archives_directory(self):CODE
LOWsrc/borg/repository.py699def remove_missing_pack_entries(chunks, missing_pack_ids):CODE
LOWsrc/borg/crypto/key.py226def encryption_argument_names():CODE
LOWsrc/borg/crypto/key.py794 def get_existing_or_new_target(self, args):CODE
LOWsrc/borg/crypto/key.py822 def _find_all_keys_in_keys_dir(self):CODE
LOWsrc/borg/crypto/key.py849 def _find_key_file_from_environment(self):CODE
LOWsrc/borg/testsuite/compress_test.py188def test_additive_obfuscation(specs, c_type, obfuscation_padding: int):CODE
LOWsrc/borg/testsuite/compress_test.py226def test_default_compression_level(c_type, c_name):CODE
LOWsrc/borg/testsuite/compress_test.py239def test_specified_compression_level(c_type, c_name, c_levels):CODE
LOWsrc/borg/testsuite/compress_test.py247def test_invalid_compression_level(invalid_spec):CODE
LOWsrc/borg/testsuite/compress_test.py262def test_zstd_level_roundtrip(level):CODE
LOWsrc/borg/testsuite/compress_test.py273def test_zstd_level_roundtrip_legacy_mode(level):CODE
LOWsrc/borg/testsuite/compress_test.py283def test_other_compressors_keep_their_level_byte():CODE
LOWsrc/borg/testsuite/compress_test.py330def test_robj_specific_obfuscation(data_length, expected_padding, robj_type):CODE
LOWsrc/borg/testsuite/compress_test.py342def test_zstd_mt_workers_from_env(monkeypatch):CODE
LOWsrc/borg/testsuite/compress_test.py384def test_zstd_compressor_is_cached_per_thread_and_level(zstd_mt):CODE
LOWsrc/borg/testsuite/compress_test.py399def test_zstd_mt_reused_compressor_output(zstd_mt):CODE
LOWsrc/borg/testsuite/compress_test.py415def test_zstd_mt_roundtrip_concurrent(zstd_mt):CODE
LOWsrc/borg/testsuite/compress_test.py429def test_zstd_below_threshold_is_single_threaded(zstd_mt):CODE
LOWsrc/borg/testsuite/compress_test.py442def test_zstd_single_threaded_reused_compressor_output(zstd_mt):CODE
LOW⚡src/borg/testsuite/archives_test.py86def test_ids_returns_binary_ids():CODE
LOW⚡src/borg/testsuite/archives_test.py92def test_ids_store_object_not_found_gives_empty():CODE
LOW⚡src/borg/testsuite/archives_test.py98def test_ids_passes_deleted_flag():CODE
LOW⚡src/borg/testsuite/archives_test.py155def test_exists_name_and_id_true():CODE
LOW⚡src/borg/testsuite/archives_test.py161def test_exists_name_and_id_false_wrong_name():CODE
LOW⚡src/borg/testsuite/archives_test.py167def test_exists_name_and_id_false_wrong_id():CODE
LOW⚡src/borg/testsuite/archives_test.py173def test_exists_name_and_ts_true():CODE
LOW⚡src/borg/testsuite/archives_test.py179def test_exists_name_and_ts_false_wrong_ts():CODE
LOW⚡src/borg/testsuite/archives_test.py185def test_exists_name_and_ts_false_wrong_name():CODE
LOW⚡src/borg/testsuite/archives_test.py191def test_get_archive_meta_object_not_found():CODE
LOW⚡src/borg/testsuite/archives_test.py396def test_create_calls_store_store():CODE
LOW⚡src/borg/testsuite/archives_test.py402def test_create_with_datetime_ts():CODE
LOW⚡src/borg/testsuite/archives_test.py409def test_create_overwrite_kwarg_ignored():CODE
LOW⚡src/borg/testsuite/archives_test.py586def test_get_one_no_match_raises():CODE
LOW⚡src/borg/testsuite/archives_test.py592def test_get_one_multiple_matches_raises():CODE
LOW⚡src/borg/testsuite/archives_test.py600def test_get_one_deleted_passes_flag():CODE
LOW⚡src/borg/testsuite/archives_test.py608def test_list_considering_raises_if_name_set():CODE
LOW⚡src/borg/testsuite/archives_test.py616def test_list_considering_delegates():CODE
LOWsrc/borg/testsuite/archives_test.py55def _stub_matching_info_tuples(infos):CODE
LOWsrc/borg/testsuite/archives_test.py67def test_archives_satisfies_archives_interface():CODE
LOWsrc/borg/testsuite/archives_test.py207def test_get_archive_meta_success():CODE
LOWsrc/borg/testsuite/archives_test.py236def test_get_archive_meta_success_with_tags():CODE
1250 more matches not shown…
Empty Error Handlers68 hits · 340 pts
SeverityFileLineSnippetContext
HIGHscripts/blake3-optimize-mt-threshold.py125except Exception:CODE
HIGHscripts/bench_chunker_kernels.py79except (OSError, subprocess.SubprocessError, IndexError):CODE
HIGHsrc/borg/fslocking.py338except FileNotFoundError:CODE
HIGHsrc/borg/fslocking.py173except: # nosec B110 # noqaCODE
HIGHsrc/borg/fslocking.py177except: # nosec B110 # noqaCODE
HIGHsrc/borg/conftest.py65except Exception: # nosec B110CODE
HIGHsrc/borg/conftest.py210except OSError:CODE
HIGHsrc/borg/cache.py624except StoreObjectNotFound:CODE
HIGHsrc/borg/cache.py638except StoreObjectNotFound:CODE
HIGHsrc/borg/cache.py1159except StoreObjectNotFound:CODE
HIGHsrc/borg/cache.py791except StoreObjectNotFound:CODE
HIGHsrc/borg/vfs.py181except KeyError:CODE
HIGHsrc/borg/vfs.py613except KeyError:CODE
HIGHsrc/borg/archive.py1057except OSError:CODE
HIGHsrc/borg/archive.py1194except OSError:CODE
HIGHsrc/borg/repository.py829except StoreObjectNotFound:CODE
HIGHsrc/borg/repository.py1209except StoreBackendError:CODE
HIGHsrc/borg/repository.py1350except StoreObjectNotFound:CODE
HIGHsrc/borg/crypto/key.py819except (KeyfileInvalidError, KeyfileMismatchError):CODE
HIGHsrc/borg/testsuite/__init__.py171except OSError:CODE
HIGHsrc/borg/testsuite/__init__.py190except OSError:CODE
HIGHsrc/borg/testsuite/__init__.py201except OSError:CODE
HIGHsrc/borg/testsuite/__init__.py203except NotImplementedError:CODE
HIGHsrc/borg/testsuite/__init__.py205except AttributeError:CODE
HIGHsrc/borg/testsuite/__init__.py226except OSError:CODE
HIGHsrc/borg/testsuite/__init__.py228except NotImplementedError:CODE
HIGHsrc/borg/testsuite/__init__.py253except OSError:CODE
HIGHsrc/borg/testsuite/__init__.py255except NotImplementedError:CODE
HIGHsrc/borg/testsuite/digests_test.py102except ValueError:CODE
HIGHsrc/borg/testsuite/legacyrepository_test.py305except TypeError:CODE
HIGHsrc/borg/testsuite/legacyrepository_test.py318except TypeError:CODE
HIGHsrc/borg/testsuite/legacyrepository_test.py363except TypeError:CODE
HIGHsrc/borg/testsuite/platform/platform_test.py27except (KeyError, ValueError):CODE
HIGHsrc/borg/testsuite/platform/platform_test.py64except PermissionError:CODE
HIGHsrc/borg/testsuite/archiver/extract_cmd_test.py340except OSError:CODE
HIGHsrc/borg/testsuite/archiver/create_cmd_test.py1049except OSError:CODE
HIGHsrc/borg/testsuite/archiver/create_cmd_test.py1081except BrokenPipeError:CODE
HIGHsrc/borg/testsuite/archiver/create_cmd_test.py1167except BrokenPipeError:CODE
HIGHsrc/borg/testsuite/archiver/create_cmd_test.py1217except OSError:CODE
HIGHsrc/borg/testsuite/archiver/__init__.py262except RepositoryKeyInfoMissing:CODE
HIGHsrc/borg/testsuite/archiver/mount_cmds_test.py491except: # noqaCODE
HIGHsrc/borg/testsuite/archiver/mount_cmds_test.py505except: # noqaCODE
HIGHsrc/borg/testsuite/helpers/fs_test.py493except OSError:CODE
HIGHsrc/borg/platform/base.py381except OSError:CODE
HIGHsrc/borg/platform/base.py170except OSError:CODE
HIGHsrc/borg/platform/base.py203except OSError:CODE
HIGHsrc/borg/archiver/__init__.py9except AssertionError:CODE
HIGHsrc/borg/archiver/create_cmd.py141except OSError:CODE
HIGHsrc/borg/archiver/create_cmd.py148except OSError:CODE
HIGHsrc/borg/archiver/check_cmd.py118except ObjectsNotAuthenticatable:CODE
HIGHsrc/borg/legacy/fs.py54except Exception: # nosec B110CODE
HIGHsrc/borg/legacy/fs.py71except Exception: # nosec B110CODE
HIGHsrc/borg/legacy/repository.py280except FileNotFoundError:CODE
HIGHsrc/borg/legacy/repository.py1169except KeyError:CODE
HIGHsrc/borg/legacy/repository.py1441except FileNotFoundError:CODE
HIGHsrc/borg/legacy/repository.py1453except OSError:CODE
HIGHsrc/borg/legacy/repository.py926except KeyError:CODE
HIGHsrc/borg/legacy/repository.py685except FileNotFoundError:CODE
HIGHsrc/borg/legacy/repository.py934except KeyError:CODE
HIGHsrc/borg/legacy/repository.py801except (KeyError, ValueError):CODE
8 more matches not shown…
Unused Imports419 hits · 290 pts
SeverityFileLineSnippetContext
LOWscripts/errorlist.py7CODE
LOWscripts/errorlist.py8CODE
LOWsrc/borg/repoobj.py5CODE
LOWsrc/borg/repoobj.py327CODE
LOWsrc/borg/webdav.py30CODE
LOWsrc/borg/manifest.py14CODE
LOWsrc/borg/cache.py165CODE
LOWsrc/borg/cache.py165CODE
LOWsrc/borg/cache.py165CODE
LOWsrc/borg/cache.py165CODE
LOWsrc/borg/cache.py165CODE
LOWsrc/borg/fuse_impl.py8CODE
LOWsrc/borg/archive.py28CODE
LOWsrc/borg/repository.py21CODE
LOWsrc/borg/crypto/key.py17CODE
LOWsrc/borg/crypto/key.py1278CODE
LOWsrc/borg/crypto/key.py1279CODE
LOWsrc/borg/crypto/key.py1281CODE
LOWsrc/borg/crypto/key.py1283CODE
LOWsrc/borg/crypto/keymanager.py195CODE
LOWsrc/borg/chunkers/__init__.py9CODE
LOWsrc/borg/testsuite/__init__.py26CODE
LOWsrc/borg/testsuite/chunkers/buzhash64_self_test.py8CODE
LOWsrc/borg/testsuite/chunkers/buzhash64_test.py12CODE
LOWsrc/borg/testsuite/chunkers/toeplitz_aes_test.py10CODE
LOWsrc/borg/testsuite/chunkers/fixed_self_test.py7CODE
LOWsrc/borg/testsuite/chunkers/buzhash_self_test.py8CODE
LOWsrc/borg/testsuite/chunkers/__init__.py8CODE
LOWsrc/borg/testsuite/chunkers/rabin_aes_test.py8CODE
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/goldilocks_aes_test.py16CODE
LOWsrc/borg/testsuite/chunkers/phte_chunkers_test.py21CODE
LOWsrc/borg/testsuite/chunkers/fastcdc_test.py14CODE
LOWsrc/borg/testsuite/archiver/repo_list_cmd_test.py8CODE
LOWsrc/borg/testsuite/archiver/store_objects_test.py7CODE
LOWsrc/borg/testsuite/archiver/tar_cmds_test.py16CODE
LOWsrc/borg/testsuite/archiver/prune_cmd_test.py7CODE
LOWsrc/borg/testsuite/archiver/extract_cmd_test.py17CODE
LOWsrc/borg/testsuite/archiver/webdav_cmd_test.py23CODE
LOWsrc/borg/testsuite/archiver/match_archives_date_test.py8CODE
LOWsrc/borg/testsuite/archiver/help_cmd_test.py4CODE
LOWsrc/borg/testsuite/archiver/return_codes_test.py7CODE
LOWsrc/borg/testsuite/archiver/list_cmd_test.py5CODE
LOWsrc/borg/testsuite/archiver/recreate_cmd_test.py9CODE
LOWsrc/borg/testsuite/archiver/delete_cmd_test.py3CODE
LOWsrc/borg/testsuite/archiver/repo_compress_cmd_test.py6CODE
LOWsrc/borg/testsuite/archiver/debug_cmds_test.py8CODE
LOWsrc/borg/testsuite/archiver/compact_cmd_test.py8CODE
LOWsrc/borg/testsuite/archiver/repo_space_cmd_test.py3CODE
LOWsrc/borg/testsuite/archiver/create_cmd_test.py16CODE
LOWsrc/borg/testsuite/archiver/corruption_test.py4CODE
LOWsrc/borg/testsuite/archiver/__init__.py22CODE
LOWsrc/borg/testsuite/archiver/__init__.py32CODE
LOWsrc/borg/testsuite/archiver/repo_delete_cmd_test.py5CODE
LOWsrc/borg/testsuite/archiver/repo_create_cmd_test.py11CODE
LOWsrc/borg/testsuite/archiver/undelete_cmd_test.py3CODE
359 more matches not shown…
Decorative Section Separators38 hits · 142 pts
SeverityFileLineSnippetContext
MEDIUM⚡scripts/rest_perf_test.sh24# ----------------------------------------------------------------------------COMMENT
MEDIUM⚡scripts/rest_perf_test.sh26# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh64# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh66# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh106# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh108# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh130# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh135# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh163# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/rest_perf_test.sh165# ----------------------------------------------------------------------------COMMENT
MEDIUM⚡scripts/rest_perf_test.sh197# ----------------------------------------------------------------------------COMMENT
MEDIUM⚡scripts/rest_perf_test.sh199# ----------------------------------------------------------------------------COMMENT
MEDIUM⚡scripts/rest_perf_test.sh207# ----------------------------------------------------------------------------COMMENT
MEDIUM⚡scripts/rest_perf_test.sh209# ----------------------------------------------------------------------------COMMENT
MEDIUM⚡src/borg/testsuite/legacy_upgrade_test.py43# ── upgrade_item ──────────────────────────────────────────────────────────────COMMENT
MEDIUM⚡src/borg/testsuite/legacy_upgrade_test.py117# ── upgrade_archive_metadata ──────────────────────────────────────────────────COMMENT
MEDIUM⚡src/borg/testsuite/legacy_upgrade_test.py180# ── upgrade_compressed_chunk ──────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/legacy_upgrade_test.py18# ── helpers ───────────────────────────────────────────────────────────────────COMMENT
MEDIUM⚡src/borg/testsuite/legacy_helpers_test.py15# ── borg1_hardlinkable ────────────────────────────────────────────────────────COMMENT
MEDIUM⚡src/borg/testsuite/legacy_helpers_test.py46# ── borg1_hardlink_with_content ───────────────────────────────────────────────COMMENT
MEDIUM⚡src/borg/testsuite/legacy_helpers_test.py71# ── borg1_hardlink_reference ──────────────────────────────────────────────────COMMENT
MEDIUM⚡src/borg/testsuite/legacy_archives_test.py115# ── create ───────────────────────────────────────────────────────────────────────COMMENT
MEDIUM⚡src/borg/testsuite/legacy_archives_test.py143# ── get / get_by_id ───────────────────────────────────────────────────────────────COMMENT
MEDIUM⚡src/borg/testsuite/legacy_archives_test.py183# ── NotImplementedError stubs ──────────────────────────────────────────────────────COMMENT
MEDIUM⚡src/borg/testsuite/legacy_archives_test.py222# ── _get_archive_meta ────────────────────────────────────────────────────────────COMMENT
MEDIUM⚡src/borg/testsuite/legacy_archives_test.py409# ── get_one ───────────────────────────────────────────────────────────────────────COMMENT
MEDIUM⚡src/borg/testsuite/legacy_archives_test.py432# ── list_considering ──────────────────────────────────────────────────────────────COMMENT
MEDIUM⚡src/borg/testsuite/legacy_archives_test.py462# ── 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.py272# ── _infos / _info_tuples ────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/legacy_archives_test.py287# ── list ──────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/crypto/legacy_key_test.py12# ── Pbkdf2FileMixin ───────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/testsuite/crypto/legacy_key_test.py39# ── borg 1.x authenticated modes ──────────────────────────────────────────────COMMENT
MEDIUMsrc/borg/archiver/tar_cmds.py118 # ----------COMMENT
MEDIUMsrc/borg/archiver/tar_cmds.py126 # -----------COMMENT
MEDIUMsrc/borg/cockpit/widgets.py317 # --------------------------COMMENT
MEDIUMsrc/borg/cockpit/widgets.py328 # --------------COMMENT
Deep Nesting154 hits · 136 pts
SeverityFileLineSnippetContext
LOWscripts/glibc_check.py27CODE
LOWscripts/lvm-thin-map.py78CODE
LOWscripts/endian_interop_test.py125CODE
LOWscripts/endian_interop_test.py182CODE
LOWscripts/endian_interop_test.py211CODE
LOWscripts/make.py71CODE
LOWscripts/make.py152CODE
LOWscripts/make.py203CODE
LOWscripts/blake3-optimize-mt-threshold.py199CODE
LOWscripts/bench_chunker_kernels.py63CODE
LOWscripts/bench_chunker_kernels.py203CODE
LOWscripts/chunker_bench.py106CODE
LOWsrc/borg/fslocking.py138CODE
LOWsrc/borg/fslocking.py216CODE
LOWsrc/borg/fslocking.py305CODE
LOWsrc/borg/webdav.py208CODE
LOWsrc/borg/webdav.py242CODE
LOWsrc/borg/webdav.py560CODE
LOWsrc/borg/webdav.py623CODE
LOWsrc/borg/webdav.py721CODE
LOWsrc/borg/version.py35CODE
LOWsrc/borg/manifest.py275CODE
LOWsrc/borg/cache.py65CODE
LOWsrc/borg/cache.py894CODE
LOWsrc/borg/cache.py283CODE
LOWsrc/borg/cache.py367CODE
LOWsrc/borg/cache.py411CODE
LOWsrc/borg/vfs.py666CODE
LOWsrc/borg/xattr.py60CODE
LOWsrc/borg/xattr.py99CODE
LOWsrc/borg/archive.py206CODE
LOWsrc/borg/archive.py376CODE
LOWsrc/borg/archive.py397CODE
LOWsrc/borg/archive.py913CODE
LOWsrc/borg/archive.py944CODE
LOWsrc/borg/archive.py1176CODE
LOWsrc/borg/archive.py1389CODE
LOWsrc/borg/archive.py1686CODE
LOWsrc/borg/archive.py1795CODE
LOWsrc/borg/archive.py2056CODE
LOWsrc/borg/archive.py2273CODE
LOWsrc/borg/archive.py2304CODE
LOWsrc/borg/archive.py2535CODE
LOWsrc/borg/archive.py2732CODE
LOWsrc/borg/archive.py2824CODE
LOWsrc/borg/archive.py3118CODE
LOWsrc/borg/archive.py3389CODE
LOWsrc/borg/archive.py2749CODE
LOWsrc/borg/archive.py2916CODE
LOWsrc/borg/storelocking.py538CODE
LOWsrc/borg/storelocking.py713CODE
LOWsrc/borg/repository.py611CODE
LOWsrc/borg/repository.py482CODE
LOWsrc/borg/repository.py1461CODE
LOWsrc/borg/repository.py1535CODE
LOWsrc/borg/repository.py2674CODE
LOWsrc/borg/crypto/key.py581CODE
LOWsrc/borg/crypto/key.py949CODE
LOWsrc/borg/crypto/keymanager.py192CODE
LOWsrc/borg/chunkers/failing.py30CODE
94 more matches not shown…
Self-Referential Comments29 hits · 88 pts
SeverityFileLineSnippetContext
MEDIUMdocs/conf.py4# This file is execfile()d with the current directory set to its containing directory.COMMENT
MEDIUM.github/workflows/ci.yml298 # Create the bucket (boto3 is a moto dependency)COMMENT
MEDIUMsrc/borg/testsuite/cache_test.py238 # Create an index entry so list_chunkindex_hashes finds it.COMMENT
MEDIUMsrc/borg/testsuite/repoobj_test.py212 # 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.py320 # 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
MEDIUM⚡src/borg/testsuite/archiver/tar_cmds_test.py546 # Create a simple directory structureCOMMENT
MEDIUM⚡src/borg/testsuite/archiver/tar_cmds_test.py549 # Create a tar file with paths starting with './'COMMENT
MEDIUMsrc/borg/testsuite/archiver/transfer_cmd_test.py483 # Create an archive with a commentCOMMENT
MEDIUMsrc/borg/testsuite/archiver/diff_cmd_test.py54 # Create the first snapshotCOMMENT
MEDIUMsrc/borg/testsuite/archiver/diff_cmd_test.py84 # 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.py103 # Create a repository first (need unrestricted permissions for that).COMMENT
MEDIUM⚡…borg/testsuite/archiver/restricted_permissions_test.py107 # Create an archive to test with.COMMENT
MEDIUM⚡…borg/testsuite/archiver/restricted_permissions_test.py152 # Create a repository first (need unrestricted permissions for that).COMMENT
MEDIUM⚡…borg/testsuite/archiver/restricted_permissions_test.py156 # Create an initial archive to test with.COMMENT
MEDIUMsrc/borg/testsuite/helpers/fs_test.py361 # Create a directory with both a CACHEDIR.TAG and a custom tag fileCOMMENT
MEDIUMsrc/borg/testsuite/helpers/fs_test.py368 # Create a directory without any tag filesCOMMENT
MEDIUMsrc/borg/archiver/transfer_cmd.py51 # Create a chunker with the specified parametersCOMMENT
MEDIUMsrc/borg/archiver/repo_space_cmd.py70 # Create a new repository:STRING
MEDIUMsrc/borg/archiver/help_cmd.py227 # Define the recursion rootSTRING
MEDIUMsrc/borg/legacy/fs.py111 # This file is a cache directory tag created by Borg.STRING
MEDIUMsrc/borg/helpers/fs.py144 # This file is a cache directory tag created by Borg.STRING
Cross-Language Confusion13 hits · 68 pts
SeverityFileLineSnippetContext
HIGH⚡src/borg/archiver/completion_cmd.py145 out=$( {PROG} repo-list "${repo_arg[@]}" --format '{id}{NL}' 2>/dev/null </dev/null )CODE
HIGH⚡src/borg/archiver/completion_cmd.py147 out=$( {PROG} repo-list --format '{id}{NL}' 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py164 out=$( {PROG} repo-list "${repo_arg[@]}" --format '{archive}{NL}' 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py166 out=$( {PROG} repo-list --format '{archive}{NL}' 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py229 out=$( {PROG} repo-list "${repo_arg[@]}" --format '{tags}{NL}' 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py231 out=$( {PROG} repo-list --format '{tags}{NL}' 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py386 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py389 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py413 out=$( {PROG} repo-list "${repo_arg[@]}" --format '{archive}{NL}' 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py415 out=$( {PROG} repo-list --format '{archive}{NL}' 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py483 out=$( {PROG} repo-list "${repo_arg[@]}" --format '{tags}{NL}' 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py485 out=$( {PROG} repo-list --format '{tags}{NL}' 2>/dev/null </dev/null )CODE
HIGHsrc/borg/archiver/completion_cmd.py820 '{PROG} repo-list "$@" --format "{archive}{NL}" 2>/dev/null </dev/null; 'STRING
Excessive Try-Catch Wrapping57 hits · 66 pts
SeverityFileLineSnippetContext
LOWscripts/blake3-optimize-mt-threshold.py125 except Exception:CODE
LOWsrc/borg/webdav.py450 except Exception:CODE
MEDIUMsrc/borg/webdav.py445def _guarded(self, method, *args):CODE
LOWsrc/borg/conftest.py33 except Exception:CODE
LOWsrc/borg/conftest.py65 except Exception: # nosec B110CODE
LOWsrc/borg/cache.py942 except Exception as err:CODE
LOWsrc/borg/cache.py1395 except Exception as exc:CODE
LOWsrc/borg/fuse_impl.py23 except Exception as err:CODE
LOWsrc/borg/fuse_impl.py36 except Exception as err:CODE
LOWsrc/borg/fuse_impl.py49 except Exception as err: # mfusepy raises OSError (not ImportError) if libfuse is missingCODE
LOWsrc/borg/logger.py222 except Exception as err: # XXX be more preciseCODE
LOWsrc/borg/digests.py121 except Exception: # hashing is not expected to fail, but we must not die with a full queueCODE
LOWsrc/borg/archive.py3009 except Exception:CODE
LOWsrc/borg/storelocking.py724 except Exception as e:CODE
LOWsrc/borg/repository.py387 except Exception as exc:CODE
LOWsrc/borg/repository.py1122 except Exception:CODE
LOWsrc/borg/repository.py1192 except Exception as exc:CODE
LOWsrc/borg/repository.py1476 except Exception as exc:CODE
LOWsrc/borg/repository.py1490 except Exception as exc:CODE
LOWsrc/borg/repository.py1510 except Exception as exc:CODE
LOWsrc/borg/repository.py1519 except Exception as exc:CODE
MEDIUMsrc/borg/crypto/key.py606def _load(self, key_data, passphrase):CODE
LOWsrc/borg/crypto/key.py911 except Exception as exc: # noqa: BLE001 - a corrupted borg key must not break unlocking via the othersCODE
LOWsrc/borg/crypto/key.py1021 except Exception as exc: # noqa: BLE001 - a corrupted borg key must stay visible and removableCODE
LOWsrc/borg/crypto/keymanager.py73 except Exception: # noqa: BLE001 - best-effort: a borg key without a parseable envelope has no labelCODE
LOWsrc/borg/testsuite/logger_test.py86 except Exception:CODE
LOWsrc/borg/testsuite/archiver/extract_cmd_test.py840 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/testsuite/helpers/lrucache_test.py124 except Exception as e:CODE
LOWsrc/borg/archiver/benchmark_cmd.py316 except Exception as exc:CODE
LOWsrc/borg/archiver/__init__.py558 except Exception:CODE
LOWsrc/borg/archiver/__init__.py566 except Exception:CODE
LOWsrc/borg/archiver/__init__.py640 except Exception:STRING
LOWsrc/borg/archiver/__init__.py680 except Exception as e:STRING
LOWsrc/borg/legacy/remote.py312 except Exception:CODE
MEDIUMsrc/borg/legacy/remote.py89def __init__(self, data):CODE
LOW⚡src/borg/legacy/fs.py48 except Exception:CODE
LOW⚡src/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/time.py282 except Exception:CODE
LOW⚡src/borg/helpers/msgpack.py106 except Exception as e:CODE
LOW⚡src/borg/helpers/msgpack.py114 except Exception as e:CODE
LOW⚡src/borg/helpers/msgpack.py122 except Exception as e:CODE
LOWsrc/borg/helpers/msgpack.py164 except Exception as e:CODE
LOWsrc/borg/helpers/msgpack.py172 except Exception as e:CODE
LOWsrc/borg/helpers/msgpack.py185 except Exception as e:CODE
LOWsrc/borg/helpers/msgpack.py196 except Exception as e:CODE
MEDIUMsrc/borg/helpers/msgpack.py103def pack(self, obj):CODE
MEDIUMsrc/borg/helpers/msgpack.py159def unpack(self):CODE
MEDIUMsrc/borg/helpers/msgpack.py167def __next__(self):CODE
LOWsrc/borg/helpers/__init__.py228 except Exception: # nosec B110CODE
LOWsrc/borg/helpers/process.py426 except Exception:CODE
LOWsrc/borg/helpers/parseformat.py508 except Exception as e:CODE
MEDIUMsrc/borg/helpers/parseformat.py52def hex_to_bin(hex, length=None):CODE
Over-Commented Block50 hits · 48 pts
SeverityFileLineSnippetContext
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
LOW.github/zizmor.yml1# Configuration for zizmor (https://docs.zizmor.sh/), the GitHub ActionsCOMMENT
LOW.github/workflows/release.yml1# Release automation: build the source distribution, publish it to PyPI andCOMMENT
LOW.github/workflows/32bit.yml1# 32-bit test: build and test borg on armv7 (32-bit) under qemu user-modeCOMMENT
LOW.github/workflows/fame.yml1# Refresh FAME.md and FAME.svg, the contributor summary generated byCOMMENT
LOW.github/workflows/ci.yml101 - name: Build Borg with ASan/UBSanCOMMENT
LOW.github/workflows/ci.yml461 report_type: coverageCOMMENT
LOW.github/workflows/ci.yml1101 - name: Name the sigstore bundle after the binariesCOMMENT
LOW.github/workflows/ci.yml1261COMMENT
LOW.github/workflows/ci.yml1341COMMENT
LOW.github/workflows/bigendian.yml1# Big-endian test: build and test borg on s390x (big-endian) under qemuCOMMENT
LOWsrc/borg/paperkey.html21// https://github.com/kazuhikoarase/qrcode-generator/blob/master/js/qrcode.jsCOMMENT
LOWsrc/borg/constants.py81# borg compact merges packs smaller than MIN_PACK_SIZE bytes ("tiny") once their combined sizeCOMMENT
LOWsrc/borg/constants.py121# have one all-zero bytes objectCOMMENT
LOWsrc/borg/constants.py141# How often to restart merging the fragments into a chunk index when a listed fragment vanishesCOMMENT
LOWsrc/borg/cache.py681 # True, else the whole index. borghash cannot serialize just the F_NEW entries, so either way weCOMMENT
LOWsrc/borg/cache.py761 if fragments_written:COMMENT
LOWsrc/borg/cache.py901 on_duplicate=None,COMMENT
LOWsrc/borg/cache.py1001 return NoneCOMMENT
LOWsrc/borg/vfs.py701 """COMMENT
LOWsrc/borg/archive.py1101 # Writing a single zero at the end forces NTFS to zero-fill the holeCOMMENT
LOWsrc/borg/storelocking.py421 logger.debug(f"LOCK-STALE: we KNOW that the lock-owning process is dead. lock: {lock}.")COMMENT
LOWsrc/borg/storelocking.py661 # domain cross-check wrongly confirm a skewed peer's healthy lock as stale, see #9870.COMMENT
LOWsrc/borg/repository.py41# (hash) with the store hash, which it knows by STORE_HASH_NAME.COMMENT
LOWsrc/borg/crypto/key.py41KEYFILE_ID = "BORG_KEY"COMMENT
LOWsrc/borg/crypto/key.py341class KeyBase:COMMENT
LOWsrc/borg/crypto/key.py381 crypt_key: bytes = NoneCOMMENT
LOWsrc/borg/crypto/key.py1341COMMENT
LOWsrc/borg/crypto/key.py1361 # when decrypting, we provide the id we **want** as AAD for the auth tag verification, soCOMMENT
LOWsrc/borg/crypto/key.py1481COMMENT
LOWsrc/borg/chunkers/phte_core.h101#define PHTE_KIND_HW "aes-arm64"COMMENT
LOWsrc/borg/testsuite/legacyrepository_test.py441def test_shadowed_entries_are_preserved2(repository):COMMENT
LOWsrc/borg/testsuite/archiver/__init__.py141COMMENT
LOWsrc/borg/testsuite/archiver/__init__.py301 if not xattr.XATTR_FAKEROOT and xattr.is_enabled(input_path):COMMENT
LOWsrc/borg/testsuite/archiver/__init__.py601COMMENT
LOWsrc/borg/archiver/completion_cmd.py101# URL schemes of the repository locations that are not local directories, see Location.COMMENT
LOWsrc/borg/archiver/tar_cmds.py121 # - atime, ctime (DONE)COMMENT
LOWsrc/borg/archiver/tar_cmds.py361 # Doing so would have three major drawbacks:COMMENT
LOWsrc/borg/archiver/__init__.py341 # which might be different in the case of a forced command or same otherwise.COMMENT
LOWsrc/borg/archiver/compact_cmd.py61 # The index loads entries with F_NONE flags and each object's obj_size (used by --stats).COMMENT
LOWsrc/borg/legacy/remote.py101COMMENT
LOWsrc/borg/legacy/remote.py361 pass # warning is defaultCOMMENT
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
AI Slop Vocabulary12 hits · 24 pts
SeverityFileLineSnippetContext
MEDIUMscripts/rest_perf_test.sh3# rest_perf_test.sh - borg2 performance harness for ssh:// repositories.COMMENT
LOWsrc/borg/archive.py1049 # we just use the existing one and do not remove it.COMMENT
MEDIUMsrc/borg/archive.py2225 """A restartable/robust version of the streaming msgpack unpackerSTRING
LOWsrc/borg/crypto/key.py1495# setting: the advantages of the individual session keys just add up, so the quantity that mattersCOMMENT
LOWsrc/borg/testsuite/repoobj_test.py115 # 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.py88 # Testing non-ASCII ACL processing to see whether our code is robust.STRING
LOWsrc/borg/testsuite/archiver/extract_cmd_test.py1161 # we should just use the existing directory and not remove/recreate it.COMMENT
MEDIUMsrc/borg/testsuite/archiver/completion_cmd_test.py707 # the harness' compadd stub prints the candidates - replace it by one printing the descriptionsCOMMENT
MEDIUMsrc/borg/testsuite/archiver/benchmark_cmd_test.py25 # Filter for JSON lines only; the test harness merges stdout and stderr,COMMENT
MEDIUM⚡src/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.py543 fname, parent_fd = path, None # just use the pathCODE
LOWsrc/borg/helpers/fs.py588 fname, parent_fd = path, None # just use the pathCODE
AI Structural Patterns16 hits · 14 pts
SeverityFileLineSnippetContext
LOWsrc/borg/manifest.py155CODE
LOWsrc/borg/manifest.py422CODE
LOWsrc/borg/cache.py894CODE
LOWsrc/borg/cache.py186CODE
LOWsrc/borg/vfs.py74CODE
LOWsrc/borg/archive.py605CODE
LOWsrc/borg/archive.py2379CODE
LOWsrc/borg/archive.py2824CODE
LOWsrc/borg/archive.py3259CODE
LOWsrc/borg/repository.py956CODE
LOWsrc/borg/testsuite/archiver/__init__.py205CODE
LOWsrc/borg/archiver/_common.py115CODE
LOWsrc/borg/archiver/__init__.py597CODE
LOWsrc/borg/legacy/archives.py206CODE
LOWsrc/borg/helpers/msgpack.py127CODE
LOWsrc/borg/helpers/yes_no.py17CODE
Redundant / Tautological Comments5 hits · 8 pts
SeverityFileLineSnippetContext
LOW⚡src/borg/archiver/completion_cmd.py137 # Check if completing aid: prefixCOMMENT
LOWsrc/borg/archiver/completion_cmd.py375 # 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.py67 # Check if the item matches the patterns/paths.COMMENT
LOWsrc/borg/archiver/__init__.py519 # Open the file early, before running the main program, to avoidCOMMENT
Fake / Example Data6 hits · 7 pts
SeverityFileLineSnippetContext
LOW⚡src/borg/paperkey.html2346 typein.classList.add("placeholder");CODE
LOW⚡src/borg/paperkey.html2347 svg.classList.add("placeholder");CODE
LOW⚡src/borg/paperkey.html2357 typein.classList.remove("placeholder");CODE
LOW⚡src/borg/paperkey.html2358 svg.classList.remove("placeholder");CODE
LOWsrc/borg/testsuite/legacyrepository_test.py957 assert remote_repository.ssh_cmd(Location("ssh://user@example.com/foo")) == ["ssh", "user@example.com"]CODE
LOWsrc/borg/testsuite/legacyrepository_test.py962 "user@example.com",CODE
Slop Phrases3 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMsrc/borg/constants.py272 # 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.py570 # 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
Modern Structural Boilerplate4 hits · 4 pts
SeverityFileLineSnippetContext
LOWsrc/borg/repoobj.py112 def set_assert_id_place(self, place: str) -> None:CODE
LOWsrc/borg/legacy/repoobj.py15 def set_assert_id_place(self, place: str) -> None:CODE
LOWsrc/borg/cockpit/widgets.py197 def _update_art(self) -> None:CODE
LOWsrc/borg/cockpit/widgets.py256 def update_art(self) -> None:CODE
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOW⚡scripts/rest_perf_test.sh15# Usage:COMMENT