Skip to content

Jakarta finder marks any method with an HttpServletRequest parameter as an entrypoint, which blocks parameter binding on DayTrader's real dispatch path #263

Closed

Description

@rahlk

Problem

JakartaEntrypointFinder.isEntrypointMethod (javaee/jakarta/JakartaEntrypointFinder.java:50) returns true for any callable with an HttpServletRequest / HttpServletResponse parameter. On daytrader8 that marks TradeServletAction.requestDispatch(ServletContext, HttpServletRequest, HttpServletResponse, String page) — a plain helper with ~20 in-project callers — as an entrypoint. Both interprocedural tiers (ConfigUses, ViewDispatches; DataflowTiers.InterprocTier / interprocAll) refuse to bind an entrypoint's parameter from call sites, because a container-bound parameter has values no call site shows. The refusal is right; the mark is wrong. Consequence after #261: 34 table edges land on TradeConfigServlet's two sites, but the site on the real action path (doGet → TradeServletAction.doX → requestDispatch(…, TradeConfig.getPage(N))) stays non-literal at -a 4, so a taint path from a servlet entrypoint to a JSP still stops one hop short.

Scope boundary

The finder's method rule only. Not the tiers' refusal (keep it), not the type-level rule (extends HttpServlet / @WebServlet is fine), not routes.

Goals

  • isEntrypointMethod marks servlet lifecycle methods — service, doGet / doPost / doPut / doDelete / doHead / doOptions / doTrace, doFilter, init, destroy — and methods on a @WebServlet / HttpServlet type that override them; a helper that merely takes servlet-typed parameters is not an entrypoint.
  • entrypoint_report.unresolved counts the near-misses the old rule used to mark, so the change is visible in the report rather than silent.
  • daytrader8 at -a 4: requestDispatch's site closes on the webUI table (prov: ["table"]), and TradeServletAction's callables are no longer entrypoints.

Caveats and known risks

  • Entrypoint counts drop on servlet-heavy corpora (DayTrader: helpers in TradeServletAction and TradeConfigServlet lose the mark). Consumers filtering on is_entrypoint see fewer, truer nodes; the report says why.
  • Entrypoint vocabulary is shared (roadmap Group B / E); this narrows a finder's rule and coins nothing.

Definition of done

  • A fixture with doGet(req, res) and helper(req, res, String page) on the same servlet marks exactly doGet; ConfigDataflowTierTest / ViewDispatchDataflowTierTest fixtures no longer need to avoid servlet-typed parameters on helpers (their comments say so today).
  • daytrader8: view_dispatches has a table edge from requestDispatch's include site; entrypoint_report.frameworks_detected unchanged.

Activity

  1. rahlk commented on Sep 11, 2026

    @rahlk
    CollaboratorAuthor

    Shipped: merged as 25baec6 (#264), released as v3.3.2 — GitHub Release (codeanalyzer-3.3.2.jar, installer, schema.neo4j.json) and codeanalyzer-java 3.3.2 on PyPI. Gates on the tagged commit: 603 tests green (Docker-only integration test excluded). daytrader8: view_dispatches 37 → 54 with requestDispatch's site closing on the webUI table; entrypoint marks 135 → 196 (21 helpers dropped, 82 lifecycle methods gained). Not done: the entrypoint_report.unresolved near-miss tally — the finder interface has no report access, and the old marks were a wrong rule rather than near-misses.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions