Repository navigation
Don't confirm .env CRITICAL from an HTML login page - #48
Draft
cursor[bot] wants to merge 1 commit into
Draft
cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
check_http_admin_panels treated any HTTP 200 at /.env whose body contained "password" as an exposed environment file. A custom 200 error page or CMS chrome with a login form then fusion-pinned a CRITICAL finding. Require KEY=value dotenv lines, matching the web_fingerprint validator. Co-authored-by: dmitryflynn <dmitryflynn@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug and impact
check_http_admin_panelsconfirmed CRITICAL Environment File Exposed whenGET /.env(or/.env.backup) returned HTTP 200 and the body contained the substringpassword/SECRET/API_KEY/DB_.Fusion treats every service-probe finding as
source=probe+ high reliability, so the gate pins it as un-droppable.Trigger: Scan a site whose custom 200 error page (or CMS chrome) includes a login form. The random-path baseline is a different 200 (the requested path is echoed in the title), so the CDN/SPA baseline filter does not apply. The probe then fusion-pins a CRITICAL env leak that is just an HTML password field.
A real dotenv file is still reported.
Root cause
Confirmation was keyword-only.
passwordmatches<input type="password">and "Forgot password" copy.web_fingerprintalready rejects HTML and requiresKEY=valuelines; the service prober did not.Fix
Require dotenv structure (
KEY=valuelines, not an HTML shell) before confirming/.envor/.env.backup. Real files such asDB_PASSWORD=hunter2still confirm CRITICAL.Validation
test_admin_panel_env_with_creds— real dotenv still CRITICALtest_admin_panel_env_html_login_form_not_critical— HTML login 200 is not a findingtest_looks_like_dotenv_accepts_real_rejects_htmltest_admin_panel_spa_catchall_no_false_criticalstill passespython3 -m pytest test_probers.py test_web_fingerprint.py -q— 74 passed