Skip to content

Floorplan 0.9.0

Choose a tag to compare

@haydenschmitty haydenschmitty released this 15 Nov 15:38
· 55 commits to main since this release
  • Flask login checks are recognised: routes protected by @login_required, @login_required_json or @logged_in_required were reported as open, because names starting with "log" were taken for logging decorators. Logging decorators such as @log_call still do not count as login checks, and a login decorator placed above the route remains a warning. Reported by @SmmSrg in #123, fixed by @daniyyell-dev in #125.
  • FastAPI apps protected by one HTTP middleware: an @app.middleware("http") function that turns callers away (a 401 or 403 response, or HTTPException) now counts as the app's login check, so its endpoints are no longer reported as open to anyone. It works the same way Flask's @app.before_request already does. A middleware that only adds headers, measures time or reads a 401 from the response still protects nothing, whatever its name, and neither protects a JavaScript server in the same repo. Reported by @ahmedjanwar in #86 and fixed by them in #87.
  • FastAPI checks named validate_…: a dependency like Depends(validate_jwt) or Depends(validate_api_key) now counts as a login check. One that validates a request's shape, like @validate or Depends(validate_payload), still doesn't. Reported by @doramirdor in #112.
  • FastAPI checks judged by what they do, not only their name: a route was reported as open when its check was the result of a factory (editor = require_role("editor"), then Depends(editor), on the route or on the whole APIRouter), a dependency with an ordinary name that turns callers away with a 401 or 403 (Depends(current_vehicle), or a class whose __call__ does), a Depends() kept in a variable (api = Depends(require_key), then dependencies=[api] or _: None = api), or a list kept in a constant (dependencies=WRITE). These now count. A dependency that checks nothing about the caller, like a page number or a lookup that answers 404, still protects nothing however it's passed. Reported by @RoelfA in #117 and @SomeRandomChad in #102.
  • Imports stay linked when TypeScript settings come from several files: local arrays in tsconfig.json's extends now preserve inherited path aliases. Later configurations and the project's own settings take precedence, and relative paths keep the correct starting directory. Reported by @daniyyell-dev in #126, fixed by @daniyyell-dev in #127.
  • Imports through package.json "imports" are linked: projects that import with Node subpath imports, like import { money } from '#lib/money' mapped by "imports": { "#*": "./src/*" }, had almost no links between their own files, so the map showed parts that seemed unconnected and Health listed most files as unused. Floorplan now follows the imports field of the nearest package.json the way Node does: an exact key first, then the most specific * key, trying each target and condition in turn (types last, since Node never picks it). tsconfig paths still apply when package.json has no match. Reported by @joelbeedle in #69, fixed by @joelbeedle in #68.
  • Python imports between Django apps are linked: in a project with its apps in a package (apps/orders/, apps/core/), from apps.orders.models import Order was linked to the importing app's own apps.py, so the map had no links between apps and Health listed much-used files as unused. Floorplan now looks for the whole module in every folder an import can start from before settling for part of it. Reported by @m1fril in #99.
  • Kotlin and Java files are linked to what they use: an import of a class, function, value or type alias that isn't named after its file (Kotlin files often hold several) was listed as an outside Maven package, often the app's own (com.example.app), and code a file uses from its own package, which needs no import, wasn't linked at all, so the map had few links between Kotlin files and descriptions said files were unused. Floorplan now knows every top-level declaration in a file, links a file to the files of its own package (and of a .* import) whose names it uses outside comments and strings, and never lists one of the project's own packages as an outside package. Private declarations, and test helpers used from outside the tests, aren't linked. Reported by @RoelfA in #115.
  • Fewer false "secret key" alarms in Health: a variable handed along (MYSQL_PWD="$DB_PASSWORD" in a shell script, "$password" in PHP, %DB_PASSWORD% on Windows), a path to one of the project's own files under a password-ish key ('confirm_password' => 'resources/js/pages/auth/confirm-password.tsx'), and a ULID record id under a plain …Token name are no longer reported as secrets written into the code. Access, auth and secret tokens are still checked whatever their value looks like. Fixed by @Basel-Alsemsam in #104, which also fixes #116 (reported by @BechtelCanDoIt).
  • More values that only look like secrets are left alone:
    • variables in more spellings: $(dbPassword) in Azure Pipelines and Makefiles, #{password} in Ruby, a few joined together ("$DB_USER:$DB_PASSWORD"), and psql variables in database set-up scripts (-v app_password="$APP_PASSWORD", then PASSWORD :'app_password'). Prompted by reports from @jeanlima17-cmd in #110 and @auroraferraz in #107 and #108;
    • publishable keys, which services make to be put in web pages: pk_… (Stripe, Clerk and others), Supabase's sb_publishable_… and PostHog's phc_…. A sk_… key is still flagged, and so is a password that happens to start with pk_. Reported by @notrdd in #119;
    • the two answers of a choice, like mode === 'signup' ? 'new-password' : 'current-password', and the browser's autofill words (new-password, one-time-code). Reported by @adlewis82 in #93;
    • made-up keys with a run of the alphabet or the digits in them (ghp_abcdefghij…0123456789…), even in a well-known format. A random-looking key is still flagged, in test files too. Reported by @lexerio-seth in #101.
  • Fewer files wrongly called unused: Expo Router finds every file in an app's app/ folder by its place, so in an app that uses expo-router those screens no longer look unused (a leftover file in a Next.js app/ folder, or anywhere else, still does). And a file with dots in its name, like users.service.ts, now counts as used when another file names it ('./users/users.service'), as users.ts already did; before, the dot hid the name, so NestJS services and controllers reached through an import the map couldn't follow looked unused. Reported by @axelmorand-afk in #88 and #89, with the dotted-name cause found by @xunguangzlj-cloud in #100.
  • Asking a question on the map no longer fails with “Prompt is too long”: two things could fill Claude Code’s context before it got to the question. On a computer with many MCP servers set up (connectors and plugins), each question loaded every one of their tool descriptions, though answers never use them; now questions run with no MCP servers at all, which also makes each one much cheaper. And Claude Code could open the map’s own generated floorplan/index.html (about 2 MB on one line); it’s now told not to read that file or the map’s other generated files. Codex has no switch that turns off only its MCP servers, so it still loads them. Reported by @Kadreev in #66, with the second fix by @psingh-valorx in #120.
  • JSON files saved on Windows work: Windows PowerShell's Set-Content and Out-File, and some editors, start a file with an invisible byte order mark, and Floorplan stopped with architecture.json is not valid JSON: Unexpected token. Every file you or an agent write for Floorplan (architecture.json, descriptions/, recent-work.json, plan.json, saved flows and Health dismissals) now reads the same with one. The guides also say that their commands are written for a POSIX shell, with the PowerShell way where it differs. Reported by @fjjjuv in #95, with a first version of the fix by @1oridevs in #97.
  • The map says what it leaves out: only code is mapped unless architecture.json's include names other kinds, so on a big project the map could look too small, as if the scan had failed. The scan and the build now say what isn't on the map, for example NOT MAPPED 140 asset · 52 docs · 38 config, and how to add a kind, and --json gives the same counts (notMapped). Reported by @fjjjuv in #95.
  • Open in editor opens your editor: Open in editor, Open handler and the right-click item always made a VS Code link. Now "editor" in architecture.json, or --editor on the map's server (also passed on by open.mjs, or FLOORPLAN_EDITOR), picks another: a name (cursor, windsurf, zed, vscode-insiders, vscodium, idea, phpstorm) or a link of your own like zed://file/{path}:{line}. Only editors' own link schemes are accepted, never a web, file:, javascript: or data: link, and the map checks again before it builds one. VS Code stays the default. File names with #, & or ? in them now open correctly too. See Choosing the editor. Asked for by @deniskern in #122.
  • Row-level security switched on in a loop is recognised: a Supabase migration that switches it on for many tables at once (foreach t in array array['wallets', …] loop execute format('alter table public.%I enable row level security', t); end loop;) left every one of those tables reported as "Anyone can read and change". The names in the loop's list now count as switched on, also for a list declared first, FOR … IN SELECT unnest(…) and statements glued together with ||. When a migration switches it on for tables it doesn't name (a loop over pg_tables, say), the tables it may cover are reported as "Floorplan can't tell whether … is protected", worth fixing rather than important, and a loop that does something else still leaves its tables reported. Reported by @doramirdor in #113.
  • Health says what it checked: a clean Health panel could mean "checked and fine" or "nothing to check", for example when the scan found no endpoints in an app that has them. Below its summary, the panel now has What was checked, one line per check (endpoints, Supabase tables, Firebase rules files, Stripe webhooks, files read for secrets), saying what it looked at or that it found nothing. The line stands out when code looks like it runs a server (createServer, Deno.serve, a Supabase Edge Function) but no endpoints were found, or the app uses Supabase but no migrations were found. The build prints the same lines under HEALTH, and --json has them as health.checked. Suggested by @jstncrwn in #53.
  • Nuxt pages connect to the components and composables they use: Nuxt auto-imports them, so pages had no import lines to follow and most Screens boards showed only the page itself. The scan now links a file to the components its template uses (<WorkspaceTeam />, <workspace-team>, Lazy…) and the composables and utils it calls, from the name lists Nuxt writes to .nuxt/components.d.ts and .nuxt/imports.d.ts (only those two files are read, and .nuxt/ stays off the map), or from Nuxt's folder conventions when the app hasn't been built yet. Names a file imports or defines itself are left alone. Reported by @deniskern in #121.
  • Express and Hono routes on routers with any name: the scan only read routes on routers called app, router, routes or …Router, so a Hono module's export const frentes = new Hono() or an Express profileRoutes = Router() lost all its endpoints, and Health could then call the app open. Routes on any router a file makes now count, a router mounted inside another one in the same file (api.route('/frentes', frentes)) gets both prefixes, and a login check for a path, like app.use('/api/*', auth), protects the endpoints under it. Reported by @gen116sertoes in #98, fixed by @xunguangzlj-cloud in #103.
  • Express endpoints get the right address through factories and index files: a mounted name that wasn't imported, like const billingRoutes = createBillingRoutes(), was taken for the mounting file itself, so everything that file served or mounted got the wrong prefix (GET /api/billing/health), sometimes several times over. Mounts now follow a function that returns a router, an index file that passes a router on (export { default as authRoutes } from './auth.routes.js'), export * and namespace imports, and a name handed to app.use() that isn't a router (middleware, a rate limiter) puts no prefix on anything. Reported by @xumbou in #71.
  • Open Express endpoints no longer hidden by look-alike middleware: an app-wide app.use(...) counted as a login check whenever a guard-like word appeared anywhere in it, so Health stopped reporting every open endpoint behind it. A header name inside a string (cors({ exposedHeaders: ['X-Refreshed-Token'] })), an option's name, middleware that never turns anyone away (cors, helmet, express-session, passport.session() and the like) or only loads someone (loadUser, optionalAuth), a router (app.use(authRoutes)), a line that's commented out and a name that only says "guard" (createShutdownGuard()) no longer count. Real checks still do, including one listed after other middleware (app.use(cors(), requireUser)), passport.authenticate('jwt') and authenticate, which were missed before. When an app-wide check is all that protects some endpoints, the Health panel and the build's summary name it and where it is, so a clean result shows what it rests on. The "None of your endpoints check who is calling" title no longer shows . in place of a name for a project that is one repo at its root. Reported by @xumbou in #72, fixed by @ahmedjanwar in #85.

Update with claude plugin update floorplan@floorplan.