Repository Analysis

CTFd/CTFd

CTFs as you need them

12.3 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of CTFd/CTFd, a Python project with 6,741 GitHub stars. SynthScan v2.0 examined 93,037 lines of code across 746 source files, recording 882 pattern matches distributed across 13 syntactic categories. The overall adjusted score of 12.3 places this repository in the Low 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).

12.3
Adjusted Score
12.3
Raw Score
100%
Time Factor
2026-07-01
Last Push
6.7K
Stars
Python
Language
93.0K
Lines of Code
746
Files
882
Pattern Hits
2026-07-14
Scan Date
0.02
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 18HIGH 0MEDIUM 52LOW 812

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 882 distinct pattern matches across 13 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 Identifiers586 hits · 544 pts
SeverityFileLineSnippetContext
LOWtests/test_views.py153def test_pages_routing_and_rendering():CODE
LOWtests/test_views.py181def test_user_can_access_files():CODE
LOWtests/test_views.py276def test_admin_access_files_with_auth_token():CODE
LOWtests/test_views.py351def test_user_can_access_files_with_auth_token():CODE
LOWtests/test_views.py486def test_user_can_access_files_if_view_after_ctf():CODE
LOWtests/test_themes.py18def test_themes_run_in_sandbox():CODE
LOWtests/test_themes.py33def test_themes_cant_access_configpy_attributes():CODE
LOWtests/test_themes.py82def test_that_ctfd_can_be_deployed_in_subdir():CODE
LOWtests/test_themes.py126def test_that_ctfd_subdir_redirects_work():CODE
LOWtests/test_themes.py160def test_that_request_path_hijacking_works_properly():CODE
LOWtests/test_themes.py187def test_theme_fallback_config():CODE
LOWtests/test_themes.py231def test_theme_template_loading_by_prefix():CODE
LOWtests/test_themes.py240def test_theme_template_disallow_loading_admin_templates():CODE
LOWtests/test_config.py19def test_reverse_proxy_config():CODE
LOWtests/test_config.py59def test_server_sent_events_config():CODE
LOWtests/test_config.py74def test_trusted_hosts_config():CODE
LOWtests/test_config.py174def test_preset_admin_token_config():CODE
LOWtests/test_config.py248def test_preset_admin_no_promotion_existing_user():CODE
LOWtests/test_config.py334def test_preset_admin_empty_credentials():CODE
LOWtests/test_plugin_utils.py29def test_register_plugin_asset():CODE
LOWtests/test_plugin_utils.py42def test_register_plugin_assets_directory():CODE
LOWtests/test_plugin_utils.py71def test_admin_override_template():CODE
LOWtests/test_plugin_utils.py85def test_register_plugin_script():CODE
LOWtests/test_plugin_utils.py99def test_register_plugin_stylesheet():CODE
LOWtests/test_plugin_utils.py113def test_register_admin_plugin_script():CODE
LOWtests/test_plugin_utils.py127def test_register_admin_plugin_stylesheet():CODE
LOWtests/test_plugin_utils.py143def test_register_admin_plugin_menu_bar():CODE
LOWtests/test_plugin_utils.py166def test_register_user_page_menu_bar():CODE
LOWtests/test_plugin_utils.py190def test_bypass_csrf_protection():CODE
LOWtests/test_plugin_utils.py202 def bypass_csrf_protection_test_route():CODE
LOWtests/test_plugin_utils.py218def test_challenges_model_access_plugin_class():CODE
LOWtests/helpers.py638def gen_module_audience_access(db, module_id, audience_id):CODE
LOWtests/oauth/test_redirect.py15def test_oauth_not_configured():CODE
LOWtests/oauth/test_redirect.py28def test_oauth_configured_flow():CODE
LOWtests/oauth/test_users.py8def test_num_users_oauth_limit():CODE
LOWtests/cache/test_challenges.py14def test_adding_challenge_clears_cache():CODE
LOWtests/cache/test_challenges.py47def test_deleting_challenge_clears_cache_solves():CODE
LOWtests/cache/test_challenges.py87def test_deleting_solve_clears_cache():CODE
LOWtests/cache/test_cache.py43def test_clear_all_user_sessions():CODE
LOWtests/cache/test_cache.py72def test_cache_subclass_commands():CODE
LOWtests/cache/test_cache.py88def test_redis_cache_subclass_commands():CODE
LOWtests/challenges/test_challenge_types.py8def test_missing_challenge_type():CODE
LOWtests/challenges/test_challenge_logic.py15def test_all_flags_challenge_logic():CODE
LOWtests/challenges/test_challenge_logic.py66def test_all_flags_challenge_logic_teams_mode():CODE
LOWtests/challenges/test_challenge_logic.py145def test_group_flags_challenge_logic_teams_mode():CODE
LOWtests/challenges/test_challenge_logic.py227def test_challenge_default_logic_is_any():CODE
LOWtests/challenges/test_standard_dynamic.py18def test_can_create_standard_dynamic_challenge():CODE
LOWtests/challenges/test_standard_dynamic.py53def test_can_update_standard_dynamic_challenge():CODE
LOWtests/challenges/test_standard_dynamic.py101def test_can_add_requirement_standard_dynamic_challenge():CODE
LOWtests/challenges/test_standard_dynamic.py159def test_can_delete_standard_dynamic_challenge():CODE
LOWtests/challenges/test_standard_dynamic.py193def test_standard_dynamic_challenge_loses_value_properly():CODE
LOWtests/challenges/test_standard_dynamic.py246def test_standard_dynamic_challenge_doesnt_lose_value_on_update():CODE
LOWtests/challenges/test_standard_dynamic.py279def test_standard_dynamic_challenge_value_isnt_affected_by_hidden_users():CODE
LOWtests/challenges/test_standard_dynamic.py339def test_standard_dynamic_challenges_reset():CODE
LOWtests/challenges/test_standard_dynamic.py369def test_standard_dynamic_challenge_linear_loses_value_properly():CODE
LOWtests/challenges/test_standard_dynamic.py421def test_standard_challenges_default_to_static_function():CODE
LOWtests/challenges/test_standard_dynamic.py495def test_standard_dynamic_challenge_update_overrides_manual_value():CODE
LOWtests/challenges/test_standard_dynamic.py593def test_standard_dynamic_challenge_creation_requires_all_parameters():CODE
LOWtests/challenges/test_standard_dynamic.py732def test_dynamic_challenge_update_requires_all_parameters():CODE
LOWtests/challenges/test_ratings.py19def test_ratings_public_config():CODE
526 more matches not shown…
Hallucination Indicators18 hits · 180 pts
SeverityFileLineSnippetContext
CRITICALCTFd/auth.py22from CTFd.utils.helpers import error_for, get_errors, markupCODE
CRITICALCTFd/scoreboard.py9from CTFd.utils.helpers import get_infosCODE
CRITICALCTFd/users.py10from CTFd.utils.helpers import get_errors, get_infosCODE
CRITICALCTFd/teams.py14from CTFd.utils.helpers import get_errors, get_infosCODE
CRITICALCTFd/challenges.py13from CTFd.utils.helpers import get_errors, get_infosCODE
CRITICALCTFd/views.py47from CTFd.utils.helpers import get_errors, get_infos, markupCODE
CRITICALCTFd/constants/plugins.py4from CTFd.utils.helpers import markupCODE
CRITICALCTFd/constants/config.py34 from CTFd.utils.helpers import markupCODE
CRITICALCTFd/constants/config.py40 from CTFd.utils.helpers import markupCODE
CRITICALCTFd/constants/assets.py8from CTFd.utils.helpers import markupCODE
CRITICALCTFd/utils/decorators/__init__.py196 from CTFd.utils.helpers import info_forCODE
CRITICALCTFd/models/__init__.py70 from CTFd.utils.helpers import markupCODE
CRITICALCTFd/models/__init__.py165 from CTFd.utils.helpers import markupCODE
CRITICALCTFd/models/__init__.py172 from CTFd.utils.helpers import markupCODE
CRITICALCTFd/models/__init__.py224 from CTFd.utils.helpers import markupCODE
CRITICALCTFd/models/__init__.py326 from CTFd.utils.helpers import markupCODE
CRITICALCTFd/models/__init__.py1081 from CTFd.utils.helpers import markupCODE
CRITICALCTFd/themes/admin/static/assets/htmlmixed-CBfzcasR.js19`);var m=document.activeElement;Kt(h),setTimeout(function(){r.display.lineSpace.removeChild(d),m.focus(),m==i&&n.showPriCODE
Self-Referential Comments51 hits · 168 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_config.py258 # Create a regular user with the same credentials as preset adminCOMMENT
MEDIUMtests/challenges/test_challenge_logic.py22 # Create a challengeCOMMENT
MEDIUMtests/challenges/test_challenge_logic.py73 # Create a challenge with "all" logicCOMMENT
MEDIUMtests/challenges/test_challenge_logic.py89 # Create a team with members using gen_team helperCOMMENT
MEDIUMtests/challenges/test_challenge_logic.py152 # Create a challenge with "group" logicCOMMENT
MEDIUMtests/challenges/test_challenge_logic.py168 # Create a team with members using gen_team helperCOMMENT
MEDIUMtests/challenges/test_challenge_logic.py234 # Create a challenge without specifying logic (should default to "any")COMMENT
MEDIUMtests/challenges/test_standard_dynamic.py474 # Create a user and solve the challengeCOMMENT
MEDIUMtests/challenges/test_ratings.py236 # Create a user and challengeCOMMENT
MEDIUMtests/challenges/test_ratings.py275 # Create a user and challengeCOMMENT
MEDIUMtests/challenges/test_ratings.py355 # Create a user and challengeCOMMENT
MEDIUMtests/users/test_auth.py388 # Create a userCOMMENT
MEDIUMtests/users/test_auth.py792 # Create a user before configuring mail to not send any extra emailsCOMMENT
MEDIUMtests/users/test_auth.py614 # Create a user with change_password=TrueCOMMENT
MEDIUMtests/users/test_auth.py720 # Create a user via API with change_password=TrueCOMMENT
MEDIUMtests/users/test_fields.py227 # Create the fields that we wantCOMMENT
MEDIUMtests/teams/test_fields.py264 # Create a user and team who haven't filled any of their fieldsCOMMENT
MEDIUMtests/teams/test_teams.py163 # Create a team with only one memberCOMMENT
MEDIUMtests/teams/test_teams.py198 # Create a teamCOMMENT
MEDIUMtests/api/v1/test_solutions.py404 # Create a challengeCOMMENT
MEDIUMtests/api/v1/test_solutions.py538 # Create a challenge and solutionCOMMENT
MEDIUMtests/api/v1/test_solutions.py548 # Create a regular userCOMMENT
MEDIUMtests/api/v1/test_solutions.py612 # Create a hidden challenge and solutionCOMMENT
MEDIUMtests/api/v1/test_solutions.py622 # Create a regular userCOMMENT
MEDIUMtests/api/v1/test_solutions.py676 # Create a challenge and solution with state="hidden"COMMENT
MEDIUMtests/api/v1/test_solutions.py686 # Create a regular userCOMMENT
MEDIUMtests/api/v1/test_solutions.py848 # Create a userCOMMENT
MEDIUMtests/api/v1/test_solutions.py456 # Create a challenge and solutionCOMMENT
MEDIUMtests/api/v1/test_solutions.py467 # Create a regular userCOMMENT
MEDIUMtests/api/v1/test_challenges.py379 # Create a user and generate a solve from before the freeze timeCOMMENT
MEDIUMtests/api/v1/test_challenges.py390 # Create a user and generate a solve from after the freeze timeCOMMENT
MEDIUMtests/api/v1/test_challenges.py433 # Create a banned user and generate a solve for the challengeCOMMENT
MEDIUMtests/api/v1/test_challenges.py816 # Create a user and generate a solve from before the freeze timeCOMMENT
MEDIUMtests/api/v1/test_challenges.py827 # Create a user and generate a solve from after the freeze timeCOMMENT
MEDIUMtests/api/v1/test_challenges.py865 # Create a user and generate a solve for the challengeCOMMENT
MEDIUMtests/api/v1/test_challenges.py1479 # Create a challenge and a userCOMMENT
MEDIUMtests/api/v1/test_hints.py103 # Create a challenge and two hints, where hint2 requires hint1 as a prerequisiteCOMMENT
MEDIUMtests/api/v1/test_files.py112 # Create a fake fileCOMMENT
MEDIUMtests/api/v1/test_teams.py873 # Create a user with a teamCOMMENT
MEDIUMtests/api/v1/test_scoreboard.py169 # Create a challengeCOMMENT
MEDIUM…ts/api/v1/challenges/requirements/test_requirements.py78 # Create a new user which will solve the prerequisiteCOMMENT
MEDIUM…ts/api/v1/challenges/requirements/test_requirements.py106 # Create a new user which will solve the prerequisite and hide themCOMMENT
MEDIUM…ts/api/v1/challenges/requirements/test_requirements.py135 # Create a new user which will solve the prerequisite and ban themCOMMENT
MEDIUM…ts/api/v1/challenges/requirements/test_requirements.py241 # Create a new user which will solve the prerequisiteCOMMENT
MEDIUMtests/api/v1/users/test_users.py62 # Create a user with a null password. Use raw SQL to bypass SQLAlchemy validatesCOMMENT
MEDIUMtests/api/v1/teams/test_teams.py36 # Create a user with a null password. Use raw SQL to bypass SQLAlchemy validatesCOMMENT
MEDIUMtests/api/v1/teams/test_teams.py80 # Create a new teamCOMMENT
MEDIUMCTFd/views.py189 # Create an empty index pageCOMMENT
MEDIUMCTFd/utils/security/auth.py50 # Create the preset admin userCOMMENT
MEDIUMCTFd/models/__init__.py786 # Create the team specific secretCOMMENT
MEDIUMCTFd/api/v1/helpers/models.py1# This file is no longer used. If you're importing the function from here please update your importsCOMMENT
Deep Nesting73 hits · 71 pts
SeverityFileLineSnippetContext
LOWtests/test_views.py181CODE
LOWtests/test_views.py276CODE
LOWtests/test_views.py351CODE
LOWtests/test_views.py486CODE
LOWtests/helpers.py210CODE
LOWtests/helpers.py250CODE
LOWtests/helpers.py550CODE
LOWtests/challenges/test_standard_dynamic.py193CODE
LOWtests/challenges/test_standard_dynamic.py279CODE
LOWtests/challenges/test_standard_dynamic.py369CODE
LOWtests/challenges/test_standard_dynamic.py495CODE
LOWtests/challenges/test_dynamic.py184CODE
LOWtests/challenges/test_dynamic.py266CODE
LOWtests/challenges/test_dynamic.py354CODE
LOWtests/utils/test_exports.py127CODE
LOWtests/utils/test_ctftime.py28CODE
LOWtests/utils/test_ctftime.py53CODE
LOWtests/utils/test_ctftime.py90CODE
LOWtests/utils/test_ctftime.py118CODE
LOWtests/users/test_challenges.py329CODE
LOWtests/users/test_challenges.py518CODE
LOWtests/users/test_auth.py786CODE
LOWtests/users/test_fields.py54CODE
LOWtests/teams/test_fields.py60CODE
LOWtests/api/v1/test_solutions.py532CODE
LOWCTFd/auth.py239CODE
LOWCTFd/auth.py444CODE
LOWCTFd/auth.py549CODE
LOWCTFd/config.py24CODE
LOWCTFd/teams.py191CODE
LOWCTFd/views.py394CODE
LOWCTFd/plugins/challenges/logic.py72CODE
LOWCTFd/admin/__init__.py81CODE
LOWCTFd/admin/__init__.py222CODE
LOWCTFd/utils/__init__.py45CODE
LOWCTFd/utils/config/visibility.py22CODE
LOWCTFd/utils/decorators/__init__.py61CODE
LOWCTFd/utils/decorators/__init__.py195CODE
LOWCTFd/utils/decorators/__init__.py69CODE
LOWCTFd/utils/decorators/__init__.py199CODE
LOWCTFd/utils/decorators/visibility.py16CODE
LOWCTFd/utils/decorators/visibility.py55CODE
LOWCTFd/utils/decorators/visibility.py89CODE
LOWCTFd/utils/decorators/visibility.py18CODE
LOWCTFd/utils/decorators/visibility.py57CODE
LOWCTFd/utils/decorators/visibility.py91CODE
LOWCTFd/utils/plugins/__init__.py53CODE
LOWCTFd/utils/user/__init__.py18CODE
LOWCTFd/utils/updates/__init__.py15CODE
LOWCTFd/utils/initialization/__init__.py203CODE
LOWCTFd/utils/initialization/__init__.py311CODE
LOWCTFd/utils/exports/serializers.py38CODE
LOWCTFd/utils/exports/__init__.py121CODE
LOWCTFd/utils/exports/__init__.py302CODE
LOWCTFd/utils/csv/__init__.py477CODE
LOWCTFd/utils/events/__init__.py81CODE
LOWCTFd/utils/events/__init__.py83CODE
LOWCTFd/utils/helpers/models.py4CODE
LOWCTFd/utils/email/__init__.py127CODE
LOWCTFd/utils/email/__init__.py155CODE
13 more matches not shown…
Unused Imports35 hits · 35 pts
SeverityFileLineSnippetContext
LOWCTFd/__init__.py232CODE
LOWCTFd/__init__.py232CODE
LOWCTFd/__init__.py232CODE
LOWCTFd/__init__.py232CODE
LOWCTFd/__init__.py232CODE
LOWCTFd/__init__.py232CODE
LOWCTFd/__init__.py232CODE
LOWCTFd/__init__.py232CODE
LOWCTFd/plugins/dynamic_challenges/decay.py1CODE
LOWCTFd/plugins/challenges/decay.py1CODE
LOWCTFd/constants/config.py6CODE
LOWCTFd/constants/config.py6CODE
LOWCTFd/constants/config.py6CODE
LOWCTFd/constants/config.py6CODE
LOWCTFd/constants/config.py6CODE
LOWCTFd/constants/config.py6CODE
LOWCTFd/admin/__init__.py21CODE
LOWCTFd/admin/__init__.py22CODE
LOWCTFd/admin/__init__.py23CODE
LOWCTFd/admin/__init__.py24CODE
LOWCTFd/admin/__init__.py25CODE
LOWCTFd/admin/__init__.py26CODE
LOWCTFd/admin/__init__.py27CODE
LOWCTFd/admin/__init__.py28CODE
LOWCTFd/admin/__init__.py29CODE
LOWCTFd/admin/__init__.py30CODE
LOWCTFd/utils/security/signing.py6CODE
LOWCTFd/utils/security/signing.py6CODE
LOWCTFd/utils/security/signing.py6CODE
LOWCTFd/api/v1/statistics/__init__.py8CODE
LOWCTFd/api/v1/statistics/__init__.py9CODE
LOWCTFd/api/v1/statistics/__init__.py10CODE
LOWCTFd/api/v1/statistics/__init__.py11CODE
LOWCTFd/api/v1/statistics/__init__.py12CODE
LOWCTFd/api/v1/statistics/__init__.py13CODE
Redundant / Tautological Comments22 hits · 34 pts
SeverityFileLineSnippetContext
LOWpopulate.py467 # Check if this user has already rated this challengeCOMMENT
LOWtests/test_views.py306 # Set CTF to start in the future (before CTF start scenario)COMMENT
LOWtests/users/test_auth.py381 # Set CTFd to send emailsCOMMENT
LOWtests/users/test_auth.py795 # Set CTFd to send emailsCOMMENT
LOWtests/users/test_auth.py328 # Set CTFd to only allow confirmed users and send emailsCOMMENT
LOWtests/api/v1/user/test_hints.py190 # Set challenges to be visible publiclyCOMMENT
LOWtests/api/v1/user/test_hints.py236 # Set challenges to be visible to only authedCOMMENT
LOWCTFd/auth.py456 # Check if credentials match preset adminCOMMENT
LOWCTFd/auth.py470 # Check if the user submitted an email address or a team nameCOMMENT
LOWCTFd/auth.py606 # Check if we are allowing registration before creating usersCOMMENT
LOWCTFd/views.py266 # Set theme to default and try againCOMMENT
LOWCTFd/plugins/migrations.py66 # Check if the plugin has migraitonsCOMMENT
LOWCTFd/plugins/challenges/logic.py84 # Check if the user's submission is correctCOMMENT
LOWCTFd/admin/users.py90 # Check if the user has an account (team or user)COMMENT
LOWCTFd/utils/security/auth.py41 # Check if user already existsCOMMENT
LOWCTFd/utils/user/__init__.py22 # Check if the session is still validCOMMENT
LOWCTFd/utils/exports/__init__.py182 # Check if the alembic version is from CTFd 1.xCOMMENT
LOWCTFd/api/v1/challenges.py199 # Iterate through the list of challenges, adding to the object whichCOMMENT
LOWCTFd/api/v1/challenges.py1220 # Check if challenge is visible to the userCOMMENT
LOWCTFd/api/v1/challenges.py1227 # Check if user/team has solved this challenge (only allow rating if solved)COMMENT
LOWCTFd/api/v1/challenges.py1313 # Check if challenge is visible to the userCOMMENT
LOWCTFd/api/v1/helpers/request.py39 # Check if the schema is for enums, if so, we just add in the "enum" keyCOMMENT
Over-Commented Block30 hits · 29 pts
SeverityFileLineSnippetContext
LOWrequirements.txt1#COMMENT
LOWrequirements.txt21bcrypt==4.0.1COMMENT
LOWrequirements.txt41 # via flaskCOMMENT
LOWrequirements.txt61 # via -r requirements.inCOMMENT
LOWrequirements.txt81 # sqlalchemyCOMMENT
LOWrequirements.txt101jsonschema-specifications==2025.4.1COMMENT
LOWrequirements.txt121 # python-geoacumen-cityCOMMENT
LOWrequirements.txt141 # freezegunCOMMENT
LOWrequirements.txt161 # referencingCOMMENT
LOWrequirements.txt181typing-extensions==4.14.1COMMENT
LOWtests/utils/test_validators.py161COMMENT
LOWtests/utils/test_events.py221 # "team": None,COMMENT
LOWtests/utils/test_events.py241 # data=saved_event["data"], type="notification", channel="ctf"COMMENT
LOWtests/users/test_challenges.py81# email = "user{}@examplectf.com".format(c)COMMENT
LOWtests/users/test_challenges.py101# "1": 5,COMMENT
LOWCTFd/config.ini1# CTFd Configuration FileCOMMENT
LOWCTFd/config.ini21#COMMENT
LOWCTFd/config.ini61# REDIS_URLCOMMENT
LOWCTFd/config.ini101# Comma seperated string containing valid host names for CTFd to respond to. If not specified, COMMENT
LOWCTFd/config.ini161# MAILSENDER_ADDRCOMMENT
LOWCTFd/config.ini181# By default CTFd will automatically detect the correct email provider based on the other settingsCOMMENT
LOWCTFd/config.ini201# AWS secret token used to authenticate to the S3 bucket. Only used under the s3 uploader.COMMENT
LOWCTFd/config.ini221COMMENT
LOWCTFd/config.ini241# See https://werkzeug.palletsprojects.com/en/0.15.x/middleware/proxy_fix/#werkzeug.middleware.proxy_fix.ProxyFix.COMMENT
LOWCTFd/config.ini261# SWAGGER_UICOMMENT
LOWCTFd/config.ini281# Defaults to trueCOMMENT
LOWCTFd/config.ini301# EMAIL_CONFIRMATION_REQUIRE_INTERACTIONCOMMENT
LOWCTFd/config.ini321# PRESET_ADMIN_NAMECOMMENT
LOWCTFd/config.ini341# Configuration values that will be loaded into CTFd and take precedence over database settings.COMMENT
LOWCTFd/utils/validators/__init__.py21 # Remove any leading and trailing C0 control or space from input.COMMENT
Verbosity Indicators20 hits · 28 pts
SeverityFileLineSnippetContext
LOWtests/api/v1/test_solutions.py853 # Step 1: Before solving, user queries the challenge detail endpointCOMMENT
LOWtests/api/v1/test_solutions.py863 # Step 2: Check the challenge solution endpoint - should also return no solution_idCOMMENT
LOWtests/api/v1/test_solutions.py871 # Step 3: User attempts to view the solution directly - should fail (404 for hidden solutions)COMMENT
LOWtests/api/v1/test_solutions.py875 # Step 4: User solves the challengeCOMMENT
LOWtests/api/v1/test_solutions.py885 # Step 5: After solving, user queries the challenge detail endpoint againCOMMENT
LOWtests/api/v1/test_solutions.py895 # Step 6: User queries the challenge solution endpoint - should now return solution_idCOMMENT
LOWtests/api/v1/test_solutions.py903 # Step 7: User tries to view the solution - should see it but content is locked (not unlocked yet)COMMENT
LOWtests/api/v1/test_solutions.py927 # Step 9: Verify the unlock was recorded in the databaseCOMMENT
LOWtests/api/v1/test_solutions.py935 # Step 10: User views the solution again - now they should see the full contentCOMMENT
LOWtests/api/v1/test_solutions.py946 # Step 12: Create another user who has NOT solved the challengeCOMMENT
LOWtests/api/v1/test_solutions.py951 # Step 13: Other user queries the challenge detail endpointCOMMENT
LOWtests/api/v1/test_solutions.py960 # Step 14: Other user queries the solution endpoint directlyCOMMENT
LOWtests/api/v1/test_solutions.py969 # Step 15: Other user tries to view the solution directlyCOMMENT
LOWtests/api/v1/test_solutions.py974 # Step 16: Other user attempts to unlock the solutionCOMMENT
LOWtests/api/v1/test_solutions.py987 # Step 17: Verify the unlock was recorded for the other userCOMMENT
LOWtests/api/v1/test_solutions.py995 # Step 18: Other user tries to view the solution AGAIN after unlockingCOMMENT
LOWtests/api/v1/test_solutions.py1014 # Step 19: Other user now solves the challengeCOMMENT
LOWtests/api/v1/test_solutions.py1024 # Step 20: After solving, other user should now see the solution_idCOMMENT
LOWtests/api/v1/test_solutions.py1031 # Step 21: Other user can now view the solution with full contentCOMMENT
LOWtests/api/v1/test_solutions.py915 # Step 8: User unlocks the solution via the unlock APICOMMENT
Structural Annotation Overuse20 hits · 28 pts
SeverityFileLineSnippetContext
LOWtests/api/v1/test_solutions.py853 # Step 1: Before solving, user queries the challenge detail endpointCOMMENT
LOWtests/api/v1/test_solutions.py863 # Step 2: Check the challenge solution endpoint - should also return no solution_idCOMMENT
LOWtests/api/v1/test_solutions.py871 # Step 3: User attempts to view the solution directly - should fail (404 for hidden solutions)COMMENT
LOWtests/api/v1/test_solutions.py875 # Step 4: User solves the challengeCOMMENT
LOWtests/api/v1/test_solutions.py885 # Step 5: After solving, user queries the challenge detail endpoint againCOMMENT
LOWtests/api/v1/test_solutions.py895 # Step 6: User queries the challenge solution endpoint - should now return solution_idCOMMENT
LOWtests/api/v1/test_solutions.py903 # Step 7: User tries to view the solution - should see it but content is locked (not unlocked yet)COMMENT
LOWtests/api/v1/test_solutions.py927 # Step 9: Verify the unlock was recorded in the databaseCOMMENT
LOWtests/api/v1/test_solutions.py935 # Step 10: User views the solution again - now they should see the full contentCOMMENT
LOWtests/api/v1/test_solutions.py946 # Step 12: Create another user who has NOT solved the challengeCOMMENT
LOWtests/api/v1/test_solutions.py951 # Step 13: Other user queries the challenge detail endpointCOMMENT
LOWtests/api/v1/test_solutions.py960 # Step 14: Other user queries the solution endpoint directlyCOMMENT
LOWtests/api/v1/test_solutions.py969 # Step 15: Other user tries to view the solution directlyCOMMENT
LOWtests/api/v1/test_solutions.py974 # Step 16: Other user attempts to unlock the solutionCOMMENT
LOWtests/api/v1/test_solutions.py987 # Step 17: Verify the unlock was recorded for the other userCOMMENT
LOWtests/api/v1/test_solutions.py995 # Step 18: Other user tries to view the solution AGAIN after unlockingCOMMENT
LOWtests/api/v1/test_solutions.py1014 # Step 19: Other user now solves the challengeCOMMENT
LOWtests/api/v1/test_solutions.py1024 # Step 20: After solving, other user should now see the solution_idCOMMENT
LOWtests/api/v1/test_solutions.py1031 # Step 21: Other user can now view the solution with full contentCOMMENT
LOWtests/api/v1/test_solutions.py915 # Step 8: User unlocks the solution via the unlock APICOMMENT
Excessive Try-Catch Wrapping15 hits · 16 pts
SeverityFileLineSnippetContext
LOWpopulate.py285 except Exception:CODE
LOWpopulate.py488 except Exception:CODE
LOWping.py29 except Exception as e:CODE
LOWtests/test_themes.py28 except Exception as e:CODE
LOWtests/api/test_tokens.py38 except Exception as e:CODE
LOWtests/api/test_tokens.py46 except Exception as e:CODE
LOWCTFd/views.py282 except Exception:CODE
LOWCTFd/utils/initialization/__init__.py360 except Exception:CODE
LOWCTFd/utils/exports/__init__.py176 except Exception:CODE
LOWCTFd/utils/exports/__init__.py264 except Exception:CODE
LOWCTFd/utils/exports/__init__.py487 except Exception:CODE
LOWCTFd/utils/sessions/__init__.py87 except Exception:CODE
LOWCTFd/utils/email/providers/smtp.py74 except Exception as e:CODE
LOWCTFd/cli/__init__.py84 except Exception as e:CODE
MEDIUMCTFd/cli/__init__.py81def import_ctf(path, delete_import_on_finish=False):CODE
AI Structural Patterns7 hits · 7 pts
SeverityFileLineSnippetContext
LOWtests/helpers.py129CODE
LOWCTFd/plugins/challenges/__init__.py127CODE
LOWCTFd/utils/__init__.py28CODE
LOWCTFd/utils/challenges/__init__.py127CODE
LOWCTFd/utils/user/__init__.py98CODE
LOWCTFd/utils/user/__init__.py132CODE
LOWCTFd/utils/exports/serializers.py36CODE
Fake / Example Data4 hits · 6 pts
SeverityFileLineSnippetContext
LOWCTFd/utils/security/sanitize.py40 "input": ["name", "type", "value", "placeholder"],CODE
LOWCTFd/utils/security/sanitize.py41 "select": ["name", "value", "placeholder"],CODE
LOWCTFd/utils/security/sanitize.py43 "textarea": ["name", "value", "placeholder"],CODE
LOW…hemes/admin/static/assets/pages/statistics-IfjpOVH0.js1import{_ as A,C as h,c,a as t,t as u,h as m,l as v,F as g,r as f,w as p,j as y,v as I,d as C,o as d,i as S,N as U,$ as kCODE
AI Slop Vocabulary1 hit · 2 pts
SeverityFileLineSnippetContext
LOWCTFd/api/v1/helpers/request.py39 # Check if the schema is for enums, if so, we just add in the "enum" keyCOMMENT