Skip to content

fix: recognise Flask login decorators as sign-in checks - #125

Merged
haydenschmitty merged 1 commit into
haydenschmitty:mainfrom
daniyyell-dev:fix/123-flask-login-guards
Nov 15, 2026
Merged

haydenschmitty merged 1 commit into
haydenschmitty:mainfrom
daniyyell-dev:fix/123-flask-login-guards

Conversation

@daniyyell-dev

Copy link
Copy Markdown
Contributor

What this changes

Fixes #123. The logging exclusion log\w* also matches Flask-Login's login_required and names such as login_required_json. Exclude the login word from that logging pattern so these routes count as protected.

The regression fixture includes protected read/write routes, three logging-only routes, and a misplaced login decorator. Logging-only endpoints and the misplaced decorator still produce warnings. The fixture is based on the issue's reported shape.

How I tested it

  • The new scan/build regression fails on unchanged main: the two protected endpoints are reported as open. It passes with this change.
  • npm test: 290 tests, 289 passed, 1 platform skip, 0 failed.
  • claude plugin validate .: passed.
  • Scanned and built Flask's official tutorial app (Python/Flask, one repo; pallets/flask at 49943b5a94413a530761350f04e896f76e8d620e) before and after. Both find the same 12 routes and identical Health findings. Its local login wrapper was already resolved; this checks for regressions on a real project.

Checklist

  • No new dependencies
  • Anything the map shows people is in plain language
  • No secret values stored or printed
  • No details of a real private project in code, comments, docs or screenshots
  • npm test passes
  • claude plugin validate . passes
  • CHANGELOG.md updated, if people will notice the change

@haydenschmitty

Copy link
Copy Markdown
Owner

Merged and released in 0.9.0. Thank you!

Update with claude plugin update floorplan@floorplan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Health: Flask @login_required routes reported as open (NOT_GUARD log\w* matches login_required)

2 participants