Repository Analysis

fail2ban/fail2ban

Daemon to ban hosts that cause multiple authentication errors

23.0 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of fail2ban/fail2ban, a Python project with 18,173 GitHub stars. SynthScan v2.0 examined 35,737 lines of code across 102 source files, recording 510 pattern matches distributed across 15 syntactic categories. The overall adjusted score of 23.0 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).

23.0
Adjusted Score
23.0
Raw Score
100%
Time Factor
2026-06-23
Last Push
18.2K
Stars
Python
Language
35.7K
Lines of Code
102
Files
510
Pattern Hits
2026-07-14
Scan Date
0.16
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 16MEDIUM 129LOW 365

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 510 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.

Self-Referential Comments86 hits · 258 pts
SeverityFileLineSnippetContext
MEDIUMsetup.py5# This file is part of Fail2Ban.COMMENT
MEDIUMconfig/action.d/smtp.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/version.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/protocol.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/__init__.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/setup.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/exceptions.py6# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/helpers.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/tickettestcase.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/fail2banregextestcase.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/clientreadertestcase.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/sockettestcase.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/fail2banclienttestcase.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/servertestcase.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/observertestcase.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/__init__.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/filtertestcase.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/misctestcase.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/failmanagertestcase.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/databasetestcase.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/utils.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/clientbeautifiertestcase.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/actiontestcase.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/actiontestcase.py530 # Create a nasty script which would hang there for a whileCOMMENT
MEDIUMfail2ban/tests/dummyjail.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/actionstestcase.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/datedetectortestcase.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/samplestestcase.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/banmanagertestcase.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/action_d/__init__.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/tests/action_d/test_smtp.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/observer.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/datetemplate.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/failregex.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/failregex.py118# This class represents a regular expression with its compiled version.COMMENT
MEDIUMfail2ban/server/failregex.py412# This class represents a regular expression with its compiled version.COMMENT
MEDIUMfail2ban/server/server.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/ticket.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/jailthread.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/strptime.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/database.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/filterpoll.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/filterpoll.py51 # Initialize the filter object with default values.COMMENT
MEDIUMfail2ban/server/filterpoll.py91 # This function is the main loop of the thread. It checks if theCOMMENT
MEDIUMfail2ban/server/actions.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/__init__.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/jail.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/action.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/action.py48# Create a lock for running system commandsCOMMENT
MEDIUMfail2ban/server/filtersystemd.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/filtersystemd.py97 # Initialize the filter object with default values.COMMENT
MEDIUMfail2ban/server/utils.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/datedetector.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/jails.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/transmitter.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/filter.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/filter.py62 # Initialize the filter object with default values.COMMENT
MEDIUMfail2ban/server/filter.py412 # This function is the main loop of the thread. It checks if theCOMMENT
MEDIUMfail2ban/server/mytime.py4# This file is part of Fail2Ban.COMMENT
MEDIUMfail2ban/server/asyncserver.py4# This file is part of Fail2Ban.COMMENT
26 more matches not shown…
Excessive Try-Catch Wrapping107 hits · 128 pts
SeverityFileLineSnippetContext
LOWfail2ban/helpers.py213 except Exception as e: # pragma: no cover - unreachable if log-handler safe in this python-versionCODE
MEDIUMfail2ban/helpers.py72def uni_decode(x, enc=PREFER_ENC, errors='strict'):CODE
LOWfail2ban/tests/clientreadertestcase.py646 except Exception as e: # pragma: no cover - failed if reachableCODE
LOWfail2ban/tests/clientreadertestcase.py792 except Exception as e: # pragma: no coverCODE
LOWfail2ban/tests/clientreadertestcase.py1050 except Exception as e: # pragma: no coverSTRING
LOWfail2ban/tests/sockettestcase.py109 except Exception as e:CODE
MEDIUMfail2ban/tests/sockettestcase.py106def _serverSocket(self):CODE
LOWfail2ban/tests/fail2banclienttestcase.py259 except Exception as e: # pragma: no coverCODE
LOWfail2ban/tests/fail2banclienttestcase.py302 except Exception as e: # pragma: no coverCODE
LOWfail2ban/tests/fail2banclienttestcase.py369 except Exception as e: # pragma: no coverCODE
MEDIUMfail2ban/tests/fail2banclienttestcase.py247def _inherited_log(startparams):CODE
LOWfail2ban/tests/servertestcase.py1287 except Exception as e: # pragma: no coverCODE
LOWfail2ban/tests/filtertestcase.py1692 except Exception as e:CODE
LOWfail2ban/tests/filtertestcase.py1702 except Exception as e:CODE
LOWfail2ban/tests/filtertestcase.py2189 except Exception as e:CODE
LOWfail2ban/tests/filtertestcase.py2506 except Exception as e: # pragma: no coverCODE
MEDIUMfail2ban/tests/filtertestcase.py1687def _state(*args):CODE
MEDIUMfail2ban/tests/filtertestcase.py1696def _inoper():CODE
MEDIUMfail2ban/tests/filtertestcase.py2178def _TestCacheStr2IP(forw=True, result=[], random=False):CODE
LOWfail2ban/tests/utils.py589 except Exception as e:CODE
LOWfail2ban/tests/utils.py682 except Exception as e: # pragma: no cover - normally unreachableCODE
MEDIUMfail2ban/tests/utils.py675def __write(self, record):CODE
MEDIUMfail2ban/server/observer.py84def __getitem__(self, i):CODE
LOWfail2ban/server/observer.py222 except Exception as e:CODE
LOWfail2ban/server/observer.py244 except Exception as e:CODE
LOWfail2ban/server/observer.py413 except Exception as e:CODE
LOWfail2ban/server/observer.py463 except Exception as e:CODE
LOWfail2ban/server/observer.py506 except Exception as e:CODE
LOWfail2ban/server/observer.py521 except Exception as e:CODE
LOWfail2ban/server/datetemplate.py161 except Exception as e:STRING
LOWfail2ban/server/datetemplate.py331 except Exception as e:STRING
LOWfail2ban/server/jailthread.py72 except Exception as e:CODE
MEDIUMfail2ban/server/jailthread.py67def run_with_except_hook(*args, **kwargs):CODE
LOWfail2ban/server/database.py52 except Exception as e:CODE
LOWfail2ban/server/database.py61 except Exception as e:CODE
LOWfail2ban/server/database.py293 except Exception as e:CODE
LOWfail2ban/server/database.py388 except Exception as e:CODE
MEDIUMfail2ban/server/database.py48def _json_dumps_safe(x):CODE
MEDIUMfail2ban/server/database.py58def _json_loads_safe(x):CODE
MEDIUMfail2ban/server/database.py261def _dbBackupFilename(self):CODE
LOWfail2ban/server/filterpoll.py119 except Exception as e: # pragma: no coverCODE
LOWfail2ban/server/filterpoll.py152 except Exception as e:CODE
MEDIUMfail2ban/server/filterpoll.py135def isModified(self, filename):CODE
LOWfail2ban/server/actions.py311 except Exception as e:CODE
LOWfail2ban/server/actions.py334 except Exception as e:CODE
LOWfail2ban/server/actions.py361 except Exception as e: # pragma: no coverCODE
LOWfail2ban/server/actions.py456 except Exception as e:CODE
LOWfail2ban/server/actions.py515 except Exception as e:CODE
LOWfail2ban/server/actions.py586 except Exception as e:CODE
LOWfail2ban/server/actions.py615 except Exception as e:CODE
LOWfail2ban/server/actions.py660 except Exception as e:CODE
LOWfail2ban/server/actions.py714 except Exception as e:CODE
LOWfail2ban/server/jail.py310 except Exception as e: # pragma: no coverCODE
LOWfail2ban/server/jail.py313 except Exception as e: # pragma: no coverCODE
LOWfail2ban/server/jail.py344 except Exception as e:CODE
LOWfail2ban/server/filtersystemd.py513 except Exception as e: # pragma: no coverCODE
LOWfail2ban/server/filtersystemd.py535 except Exception as e: # pragma: no coverCODE
MEDIUMfail2ban/server/filtersystemd.py530def closeJournal(self):CODE
LOWfail2ban/server/transmitter.py60 except Exception as e:CODE
MEDIUMfail2ban/server/filter.py196def delFailRegex(self, index=None):CODE
47 more matches not shown…
Deep Nesting106 hits · 104 pts
SeverityFileLineSnippetContext
LOWsetup.py72CODE
LOWfail2ban/helpers.py195CODE
LOWfail2ban/helpers.py373CODE
LOWfail2ban/compat/asyncore.py553CODE
LOWfail2ban/compat/asynchat.py117CODE
LOWfail2ban/tests/clientreadertestcase.py893CODE
LOWfail2ban/tests/fail2banclienttestcase.py733CODE
LOWfail2ban/tests/servertestcase.py979CODE
LOWfail2ban/tests/servertestcase.py1247CODE
LOWfail2ban/tests/servertestcase.py1333CODE
LOWfail2ban/tests/servertestcase.py2274CODE
LOWfail2ban/tests/filtertestcase.py151CODE
LOWfail2ban/tests/filtertestcase.py685CODE
LOWfail2ban/tests/filtertestcase.py1964CODE
LOWfail2ban/tests/filtertestcase.py2167CODE
LOWfail2ban/tests/failmanagertestcase.py250CODE
LOWfail2ban/tests/utils.py364CODE
LOWfail2ban/tests/utils.py544CODE
LOWfail2ban/tests/utils.py562CODE
LOWfail2ban/tests/utils.py774CODE
LOWfail2ban/tests/samplestestcase.py142CODE
LOWfail2ban/tests/samplestestcase.py85CODE
LOWfail2ban/tests/samplestestcase.py143CODE
LOWfail2ban/server/observer.py173CODE
LOWfail2ban/server/observer.py426CODE
LOWfail2ban/server/failregex.py129CODE
LOWfail2ban/server/failregex.py245CODE
LOWfail2ban/server/server.py296CODE
LOWfail2ban/server/server.py545CODE
LOWfail2ban/server/server.py671CODE
LOWfail2ban/server/server.py855CODE
LOWfail2ban/server/strptime.py73CODE
LOWfail2ban/server/strptime.py189CODE
LOWfail2ban/server/strptime.py74CODE
LOWfail2ban/server/strptime.py80CODE
LOWfail2ban/server/database.py676CODE
LOWfail2ban/server/database.py791CODE
LOWfail2ban/server/filterpoll.py95CODE
LOWfail2ban/server/actions.py151CODE
LOWfail2ban/server/actions.py245CODE
LOWfail2ban/server/actions.py319CODE
LOWfail2ban/server/actions.py480CODE
LOWfail2ban/server/actions.py636CODE
LOWfail2ban/server/jail.py281CODE
LOWfail2ban/server/jail.py329CODE
LOWfail2ban/server/action.py114CODE
LOWfail2ban/server/action.py417CODE
LOWfail2ban/server/action.py443CODE
LOWfail2ban/server/filtersystemd.py112CODE
LOWfail2ban/server/filtersystemd.py312CODE
LOWfail2ban/server/filtersystemd.py373CODE
LOWfail2ban/server/utils.py149CODE
LOWfail2ban/server/utils.py90CODE
LOWfail2ban/server/datedetector.py44CODE
LOWfail2ban/server/datedetector.py258CODE
LOWfail2ban/server/datedetector.py327CODE
LOWfail2ban/server/datedetector.py475CODE
LOWfail2ban/server/transmitter.py72CODE
LOWfail2ban/server/transmitter.py156CODE
LOWfail2ban/server/transmitter.py412CODE
46 more matches not shown…
Over-Commented Block95 hits · 95 pts
SeverityFileLineSnippetContext
LOWsetup.py1#!/usr/bin/env pythonCOMMENT
LOWconfig/action.d/smtp.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/version.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/protocol.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/__init__.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/setup.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/exceptions.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/helpers.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/compat/asyncore.py1# -*- Mode: Python -*-COMMENT
LOWfail2ban/compat/asynchat.py1# -*- Mode: Python; tab-width: 4 -*-COMMENT
LOWfail2ban/tests/tickettestcase.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/fail2banregextestcase.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/clientreadertestcase.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/sockettestcase.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/fail2banclienttestcase.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/servertestcase.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/observertestcase.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/__init__.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/filtertestcase.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/misctestcase.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/failmanagertestcase.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/databasetestcase.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/utils.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/clientbeautifiertestcase.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/actiontestcase.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/dummyjail.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/actionstestcase.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/datedetectortestcase.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/datedetectortestcase.py581 self.assertEqual(date, None)COMMENT
LOWfail2ban/tests/samplestestcase.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/banmanagertestcase.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/action_d/__init__.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/tests/action_d/test_smtp.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/server/observer.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/server/datetemplate.py1# emacs: -*- mode: python; coding: utf-8; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/server/failregex.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/server/failregex.py221 ##COMMENT
LOWfail2ban/server/failregex.py401# The order of this tuple is important while searching for failure-idCOMMENT
LOWfail2ban/server/server.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/server/server.py881 # When the first child terminates, all processes in the second childCOMMENT
LOWfail2ban/server/server.py901 COMMENT
LOWfail2ban/server/ticket.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/server/jailthread.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/server/strptime.py1# emacs: -*- mode: python; coding: utf-8; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/server/database.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/server/filterpoll.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/server/actions.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/server/__init__.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/server/jail.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/server/action.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/server/filtersystemd.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/server/filtersystemd.py81 if os.geteuid() != 0:COMMENT
LOWfail2ban/server/utils.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/server/datedetector.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/server/datedetector.py121 template2.weight = 100.0COMMENT
LOWfail2ban/server/datedetector.py141 # (See http://bugs.debian.org/537610)COMMENT
LOWfail2ban/server/jails.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/server/transmitter.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/server/filter.py1# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-COMMENT
LOWfail2ban/server/filter.py101 ## Default or preferred encoding (to decode bytes from file or journal):COMMENT
35 more matches not shown…
Cross-Language Confusion15 hits · 80 pts
SeverityFileLineSnippetContext
HIGHfail2ban/tests/servertestcase.py1361 "`{ nft flush set inet f2b-table addr-set-j-w-nft-mp 2> /dev/null; } || ",CODE
HIGHfail2ban/tests/servertestcase.py1362 "`{ nft flush set inet f2b-table addr6-set-j-w-nft-mp 2> /dev/null; } || ",CODE
HIGHfail2ban/tests/servertestcase.py1407 "`{ nft flush set inet f2b-table addr-set-j-w-nft-ap 2> /dev/null; } || ",CODE
HIGHfail2ban/tests/servertestcase.py1408 "`{ nft flush set inet f2b-table addr6-set-j-w-nft-ap 2> /dev/null; } || ",CODE
HIGHfail2ban/tests/servertestcase.py1489 "{ iptables -w -N f2b-j-w-iptables-mp || true; iptables -w -A f2b-j-w-iptables-mp -j RETURN; }`",CODE
HIGHfail2ban/tests/servertestcase.py1495 "{ ip6tables -w -N f2b-j-w-iptables-mp || true; ip6tables -w -A f2b-j-w-iptables-mp -j RETURN; }`",CODE
HIGHfail2ban/tests/servertestcase.py1540 "{ iptables -w -N f2b-j-w-iptables-ap || true; iptables -w -A f2b-j-w-iptables-ap -j RETURN; }`",CODE
HIGHfail2ban/tests/servertestcase.py1546 "{ ip6tables -w -N f2b-j-w-iptables-ap || true; ip6tables -w -A f2b-j-w-iptables-ap -j RETURN; }`",CODE
HIGHfail2ban/tests/servertestcase.py1789 "{ iptables -w -N f2b-j-w-iptables || true; iptables -w -A f2b-j-w-iptables -j RETURN; }",CODE
HIGHfail2ban/tests/servertestcase.py1795 "{ ip6tables -w -N f2b-j-w-iptables || true; ip6tables -w -A f2b-j-w-iptables -j RETURN; }",CODE
HIGHfail2ban/tests/servertestcase.py1840 "{ iptables -w -N f2b-j-w-iptables-new || true; iptables -w -A f2b-j-w-iptables-new -j RETURN; }`",CODE
HIGHfail2ban/tests/servertestcase.py1846 "{ ip6tables -w -N f2b-j-w-iptables-new || true; ip6tables -w -A f2b-j-w-iptables-new -j RETURN; }`",CODE
HIGHfail2ban/server/asyncserver.py119 self.push(message + CSPROTO.END)CODE
HIGHfail2ban/server/asyncserver.py126 self.push(message + CSPROTO.END)CODE
HIGHfail2ban/server/asyncserver.py138 self.push(message + CSPROTO.END)CODE
Decorative Section Separators16 hits · 54 pts
SeverityFileLineSnippetContext
MEDIUMfail2ban/compat/asyncore.py5# ======================================================================COMMENT
MEDIUMfail2ban/compat/asyncore.py26# ======================================================================COMMENT
MEDIUMfail2ban/compat/asyncore.py302 # ==================================================COMMENT
MEDIUMfail2ban/compat/asyncore.py306 # ==================================================COMMENT
MEDIUMfail2ban/compat/asyncore.py314 # ==================================================COMMENT
MEDIUMfail2ban/compat/asyncore.py316 # ==================================================COMMENT
MEDIUMfail2ban/compat/asyncore.py501# ---------------------------------------------------------------------------COMMENT
MEDIUMfail2ban/compat/asyncore.py504# ---------------------------------------------------------------------------COMMENT
MEDIUMfail2ban/compat/asyncore.py529# ---------------------------------------------------------------------------COMMENT
MEDIUMfail2ban/compat/asyncore.py531# ---------------------------------------------------------------------------COMMENT
MEDIUMfail2ban/compat/asynchat.py5# ======================================================================COMMENT
MEDIUMfail2ban/compat/asynchat.py26# ======================================================================COMMENT
MEDIUMfail2ban/server/observer.py349 ## -----------------------------------------COMMENT
MEDIUMfail2ban/server/observer.py351 ## -----------------------------------------COMMENT
MEDIUMfail2ban/server/observer.py363 ## -----------------------------------------COMMENT
MEDIUMfail2ban/server/observer.py365 ## -----------------------------------------COMMENT
Unused Imports53 hits · 51 pts
SeverityFileLineSnippetContext
LOWfail2ban/helpers.py34CODE
LOWfail2ban/tests/clientreadertestcase.py1049CODE
LOWfail2ban/tests/sockettestcase.py31CODE
LOWfail2ban/tests/fail2banclienttestcase.py46CODE
LOWfail2ban/tests/fail2banclienttestcase.py638CODE
LOWfail2ban/tests/servertestcase.py679CODE
LOWfail2ban/tests/servertestcase.py680CODE
LOWfail2ban/tests/databasetestcase.py26CODE
LOWfail2ban/tests/databasetestcase.py35CODE
LOWfail2ban/tests/utils.py41CODE
LOWfail2ban/tests/utils.py46CODE
LOWfail2ban/tests/utils.py429CODE
LOWfail2ban/tests/actionstestcase.py29CODE
LOWfail2ban/tests/samplestestcase.py30CODE
LOWfail2ban/tests/action_d/test_smtp.py184CODE
LOWfail2ban/server/observer.py30CODE
LOWfail2ban/server/observer.py31CODE
LOWfail2ban/server/observer.py31CODE
LOWfail2ban/server/observer.py31CODE
LOWfail2ban/server/observer.py31CODE
LOWfail2ban/server/observer.py31CODE
LOWfail2ban/server/observer.py32CODE
LOWfail2ban/server/database.py28CODE
LOWfail2ban/server/database.py196CODE
LOWfail2ban/server/filterpoll.py28CODE
LOWfail2ban/server/actions.py28CODE
LOWfail2ban/server/actions.py29CODE
LOWfail2ban/server/jail.py27CODE
LOWfail2ban/server/action.py25CODE
LOWfail2ban/server/action.py27CODE
LOWfail2ban/server/action.py28CODE
LOWfail2ban/server/action.py29CODE
LOWfail2ban/server/filtersystemd.py31CODE
LOWfail2ban/server/filtersystemd.py32CODE
LOWfail2ban/server/utils.py29CODE
LOWfail2ban/server/datedetector.py24CODE
LOWfail2ban/server/filter.py30CODE
LOWfail2ban/server/asyncserver.py32CODE
LOWfail2ban/server/filterpyinotify.py30CODE
LOWfail2ban/server/filterpyinotify.py32CODE
LOWfail2ban/server/ipdns.py818CODE
LOWfail2ban/client/configparserinc.py29CODE
LOWfail2ban/client/configparserinc.py33CODE
LOWfail2ban/client/jailreader.py30CODE
LOWfail2ban/client/jailreader.py32CODE
LOWfail2ban/client/configreader.py31CODE
LOWfail2ban/client/configreader.py31CODE
LOWfail2ban/client/fail2banserver.py26CODE
LOWfail2ban/client/fail2banregex.py36CODE
LOWfail2ban/client/fail2banregex.py46CODE
LOWfail2ban/client/fail2banregex.py46CODE
LOWfail2ban/client/csocket.py31CODE
LOWdoc/conf.py4CODE
AI Slop Vocabulary9 hits · 16 pts
SeverityFileLineSnippetContext
MEDIUMfail2ban/compat/asyncore.py15# Rushing not be used in advertising or publicity pertaining toCOMMENT
MEDIUMfail2ban/compat/asynchat.py15# Rushing not be used in advertising or publicity pertaining toCOMMENT
LOWfail2ban/tests/filtertestcase.py2027 # Actually no exception would be raised -- it will be just set to 'no'COMMENT
LOWfail2ban/server/observer.py272 # just add shutdown job to make possible wait later until full (events remaining)COMMENT
LOWfail2ban/server/observer.py275 #don't pulse - just set, because we will delete it hereafter (sometimes not wakeup)COMMENT
LOWfail2ban/server/database.py825 # if bantime unknown (after upgrade-db from earlier version), just use min known ban-time:COMMENT
LOWfail2ban/server/action.py918 # if don't need repair/restore - just return:COMMENT
LOWfail2ban/server/filter.py1162 # The jail reached the bottom, simply set in operation for this logCOMMENT
LOWfail2ban/server/ipdns.py65 # not found - simply use first known fqdn:COMMENT
Hyper-Verbose Identifiers10 hits · 10 pts
SeverityFileLineSnippetContext
LOWfail2ban/tests/fail2banclienttestcase.py95def _observer_wait_before_incrban(cond, timeout=MID_WAITTIME):CODE
LOWfail2ban/tests/fail2banclienttestcase.py321def with_foreground_server_thread(startextra={}):CODE
LOWfail2ban/tests/filtertestcase.py151def _assert_correct_last_attempt(utest, filter_, output, count=None):CODE
LOWfail2ban/tests/filtertestcase.py201def _copy_lines_between_files(in_, fout, n=None, skip=0, mode='a', terminal_line="", lines=None):CODE
LOWfail2ban/tests/filtertestcase.py1145def get_monitor_failures_testcase(Filter_):CODE
LOWfail2ban/tests/filtertestcase.py1199 def assert_correct_last_attempt(self, failures, count=None):CODE
LOWfail2ban/tests/filtertestcase.py1388 def test_move_into_file_after_removed(self):CODE
LOWfail2ban/tests/filtertestcase.py1444def get_monitor_failures_journal_testcase(Filter_): # pragma: systemd no coverCODE
LOWfail2ban/tests/action_d/test_smtp.py212 def create_temp_self_signed_cert(cls):CODE
LOWfail2ban/server/asyncserver.py56class RequestHandler(asynchat.async_chat):CODE
Redundant / Tautological Comments5 hits · 8 pts
SeverityFileLineSnippetContext
LOWfail2ban/server/filter.py562 # Check if IP address/DNS is in the ignore list.COMMENT
LOWfail2ban/server/filter.py564 # Check if the given IP address matches an IP address/DNS or a CIDRCOMMENT
LOWfail2ban/server/banmanager.py309 # Check if a ticket is in the list.COMMENT
LOWfail2ban/server/banmanager.py311 # Check if a BanTicket with a given IP address is already in theCOMMENT
LOWfail2ban/server/ipdns.py627 # Check if IP in DNSCOMMENT
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHfail2ban/client/fail2banserver.py93 # Start async (don't read config) and in background as requested.COMMENT
AI Structural Patterns4 hits · 4 pts
SeverityFileLineSnippetContext
LOWconfig/action.d/smtp.py78CODE
LOWfail2ban/server/action.py547CODE
LOWfail2ban/server/action.py729CODE
LOWfail2ban/server/filter.py1002CODE
Modern AI Meta-Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMfail2ban/server/observer.py60 # observer is event driven and it sleep organized incremental, so sleep intervals can be shortly:COMMENT
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMfiles/cacti/fail2ban_stats.sh22# If Fail2ban is not available in the path, you can change the value of theCOMMENT
Modern Structural Boilerplate1 hit · 1 pts
SeverityFileLineSnippetContext
LOWfail2ban/client/configparserinc.py79__all__ = ['SafeConfigParserWithIncludes']CODE