Light, flexible and extensible ASGI framework | Built to scale
This report presents the forensic synthetic code analysis of litestar-org/litestar, a Python project with 8,331 GitHub stars. SynthScan v2.0 examined 108,763 lines of code across 1169 source files, recording 3259 pattern matches distributed across 19 syntactic categories. The overall adjusted score of 42.8 places this repository in the Strong 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).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
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.
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.
The scanner identified 3259 distinct pattern matches across 19 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/prepare_release.py | 109 | async def get_closing_issues_references(self, pr_number: int) -> list[int]: | CODE |
| LOW | tools/prepare_release.py | 180 | async def _get_first_time_contributions(self, prs: dict[str, list[PRInfo]]) -> list[PRInfo]: | CODE |
| LOW | tools/sphinx_ext/missing_references.py | 36 | def get_module_global_imports(module_import_path: str, reference_target_source_obj: str) -> set[str]: | CODE |
| LOW | tools/sphinx_ext/missing_references.py | 52 | def on_warn_missing_reference(app: Sphinx, domain: str, node: Node) -> bool | None: | CODE |
| LOW | tests/conftest.py | 105 | def file_store_create_directories(tmp_path: Path) -> FileStore: | CODE |
| LOW | tests/conftest.py | 111 | def file_store_create_directories_flag_false(tmp_path: Path) -> FileStore: | CODE |
| LOW | tests/conftest.py | 129 | def cookie_session_backend_config() -> CookieBackendConfig: | CODE |
| LOW | tests/conftest.py | 149 | def server_side_session_config() -> ServerSideSessionConfig: | CODE |
| LOW | tests/conftest.py | 154 | def server_side_session_backend(server_side_session_config: ServerSideSessionConfig) -> ServerSideSessionBackend: | CODE |
| LOW | tests/conftest.py | 169 | def session_backend_config_memory(memory_store: MemoryStore) -> ServerSideSessionConfig: | CODE |
| LOW | tests/conftest.py | 179 | def cookie_session_middleware( | CODE |
| LOW⚡ | tests/conftest.py | 301 | def disable_warn_implicit_sync_to_thread() -> Generator[None, None, None]: | CODE |
| LOW⚡ | tests/conftest.py | 310 | def disable_warn_sync_to_thread_with_async(monkeypatch: MonkeyPatch) -> None: | CODE |
| LOW⚡ | tests/conftest.py | 315 | def enable_warn_implicit_sync_to_thread(monkeypatch: MonkeyPatch) -> None: | CODE |
| LOW | tests/helpers.py | 66 | def get_schema_for_field_definition( | CODE |
| LOW | tests/unit/test_pagination.py | 83 | def test_classic_pagination_data_shape(paginator: Any) -> None: | CODE |
| LOW | tests/unit/test_pagination.py | 109 | def test_classic_pagination_openapi_schema(paginator: Any) -> None: | CODE |
| LOW | tests/unit/test_pagination.py | 144 | def test_limit_offset_pagination_data_shape(paginator: Any) -> None: | CODE |
| LOW | tests/unit/test_pagination.py | 168 | def test_limit_offset_pagination_openapi_schema(paginator: Any) -> None: | CODE |
| LOW | tests/unit/test_pagination.py | 225 | def test_cursor_pagination_data_shape(paginator: Any) -> None: | CODE |
| LOW | tests/unit/test_pagination.py | 248 | def test_cursor_pagination_openapi_schema(paginator: Any) -> None: | CODE |
| LOW⚡ | tests/unit/test_concurrency.py | 45 | def test_sync_to_thread_asyncio(loop: AbstractEventLoop) -> None: | CODE |
| LOW⚡ | tests/unit/test_concurrency.py | 53 | def test_get_set_asyncio_executor() -> None: | CODE |
| LOW⚡ | tests/unit/test_concurrency.py | 60 | def test_get_set_trio_capacity_limiter() -> None: | CODE |
| LOW⚡ | tests/unit/test_concurrency.py | 67 | def test_asyncio_uses_executor(mocker: MockerFixture, loop: AbstractEventLoop) -> None: | CODE |
| LOW | tests/unit/test_concurrency.py | 78 | def test_set_asyncio_executor_from_running_loop_raises(loop: AbstractEventLoop) -> None: | CODE |
| LOW | tests/unit/test_concurrency.py | 98 | def test_set_trio_capacity_limiter_from_async_context_raises() -> None: | CODE |
| LOW | tests/unit/test_concurrency.py | 108 | def test_sync_to_thread_unsupported_lib(mocker: MockerFixture, loop: AbstractEventLoop) -> None: | CODE |
| LOW | tests/unit/conftest.py | 12 | def reset_cached_dto_backends() -> Generator[None, None, None]: | CODE |
| LOW | tests/unit/conftest.py | 21 | def use_experimental_dto_backend(request: FixtureRequest) -> bool: | CODE |
| LOW | tests/unit/test_websocket_class_resolution.py | 33 | def test_websocket_class_resolution_of_layers( | CODE |
| LOW | tests/unit/test_websocket_class_resolution.py | 78 | def test_listener_websocket_class_resolution_of_layers( | CODE |
| LOW | tests/unit/test_parsers.py | 102 | def test_query_parsing_of_escaped_values(values: tuple[tuple[str, str], tuple[str, str]]) -> None: | CODE |
| LOW | tests/unit/test_di.py | 115 | def test_provider_equality_check() -> None: | CODE |
| LOW⚡ | tests/unit/test_di.py | 141 | async def test_provide_for_callable(fn: Any, exp: Any, anyio_backend: str) -> None: | CODE |
| LOW⚡ | tests/unit/test_di.py | 146 | def test_sync_callable_without_sync_to_thread_warns() -> None: | CODE |
| LOW⚡ | tests/unit/test_di.py | 155 | def test_async_callable_with_sync_to_thread_warns(sync_to_thread: bool) -> None: | CODE |
| LOW⚡ | tests/unit/test_di.py | 163 | def test_generator_with_sync_to_thread_warns() -> None: | CODE |
| LOW | tests/unit/test_di.py | 181 | def test_dependency_has_async_callable(dep: Any, exp: bool) -> None: | CODE |
| LOW | tests/unit/test_di.py | 194 | def test_dependency_has_sync_generator(dep: Any, exp: bool) -> None: | CODE |
| LOW | tests/unit/test_di.py | 207 | def test_dependency_has_async_generator(dep: Any, exp: bool) -> None: | CODE |
| LOW | tests/unit/test_di.py | 211 | def test_raises_when_dependency_is_not_callable() -> None: | CODE |
| LOW | tests/unit/test_di.py | 223 | def test_raises_when_generator_dependency_is_cached(dep: Any) -> None: | CODE |
| LOW | tests/unit/test_di.py | 228 | def test_provide_raises_on_unsafe_signature_access() -> None: | CODE |
| LOW | tests/unit/test_di.py | 242 | async def test_stateful_sync_generator_with_cleanup() -> None: | CODE |
| LOW | tests/unit/test_di.py | 281 | async def test_stateful_async_generator_with_cleanup() -> None: | CODE |
| LOW | tests/unit/test_di.py | 319 | def test_bound_async_generator_method_detection() -> None: | CODE |
| LOW | tests/unit/test_di.py | 339 | def test_bound_sync_generator_method_detection() -> None: | CODE |
| LOW⚡ | tests/unit/test_typing.py | 157 | def test_field_definition_from_annotation(annotation: Any, expected: dict[str, Any]) -> None: | CODE |
| LOW⚡ | tests/unit/test_typing.py | 162 | def test_field_definition_kwarg_definition_from_extras() -> None: | CODE |
| LOW⚡ | tests/unit/test_typing.py | 170 | def test_field_definition_kwarg_definition_from_kwargs() -> None: | CODE |
| LOW⚡ | tests/unit/test_typing.py | 175 | def test_field_definition_with_annotated_kwarg_definition() -> None: | CODE |
| LOW⚡ | tests/unit/test_typing.py | 181 | def test_field_definition_from_union_annotation() -> None: | CODE |
| LOW⚡ | tests/unit/test_typing.py | 211 | def test_field_definition_is_type_var_predicate() -> None: | CODE |
| LOW⚡ | tests/unit/test_typing.py | 218 | def test_field_definition_is_union_predicate() -> None: | CODE |
| LOW⚡ | tests/unit/test_typing.py | 226 | def test_field_definition_is_optional_predicate() -> None: | CODE |
| LOW⚡ | tests/unit/test_typing.py | 235 | def test_field_definition_is_dataclass_predicate() -> None: | CODE |
| LOW⚡ | tests/unit/test_typing.py | 281 | def test_field_definition_has_inner_subclass_of() -> None: | CODE |
| LOW⚡ | tests/unit/test_typing.py | 288 | def test_field_definition_equality() -> None: | CODE |
| LOW⚡ | tests/unit/test_typing.py | 298 | def test_field_definition_hash() -> None: | CODE |
| 1633 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/build_docs.py | 1 | CODE | |
| LOW | tools/prepare_release.py | 1 | CODE | |
| LOW | tools/sphinx_ext/missing_references.py | 1 | CODE | |
| LOW | tools/sphinx_ext/__init__.py | 1 | CODE | |
| LOW | tools/sphinx_ext/run_examples.py | 1 | CODE | |
| LOW | tools/sphinx_ext/changelog.py | 11 | CODE | |
| LOW | tests/conftest.py | 3 | CODE | |
| LOW | tests/conftest.py | 16 | CODE | |
| LOW | tests/docker_service_fixtures.py | 1 | CODE | |
| LOW | tests/helpers.py | 1 | CODE | |
| LOW | tests/unit/test_concurrency.py | 1 | CODE | |
| LOW | tests/unit/test_typing.py | 1 | CODE | |
| LOW | tests/unit/test_guards.py | 14 | CODE | |
| LOW | tests/unit/test_guards.py | 15 | CODE | |
| LOW | tests/unit/test_stores.py | 1 | CODE | |
| LOW | tests/unit/test_app.py | 1 | CODE | |
| LOW | tests/unit/test_dto/conftest.py | 1 | CODE | |
| LOW | tests/unit/test_dto/test_msgspec.py | 1 | CODE | |
| LOW | tests/unit/test_dto/__init__.py | 1 | CODE | |
| LOW | tests/unit/test_dto/test_integration.py | 1 | CODE | |
| LOW | tests/unit/test_dto/test_interface.py | 1 | CODE | |
| LOW | tests/unit/test_dto/test_factory/test_base_dto.py | 1 | CODE | |
| LOW | tests/unit/test_dto/test_factory/test_dataclass_dto.py | 1 | CODE | |
| LOW | tests/unit/test_dto/test_factory/__init__.py | 1 | CODE | |
| LOW | tests/unit/test_dto/test_factory/test_field.py | 1 | CODE | |
| LOW | tests/unit/test_dto/test_factory/test_integration.py | 3 | CODE | |
| LOW | tests/unit/test_dto/test_factory/test_integration.py | 33 | CODE | |
| LOW | …unit/test_dto/test_factory/test_backends/test_utils.py | 1 | CODE | |
| LOW | …s/unit/test_dto/test_factory/test_backends/conftest.py | 1 | CODE | |
| LOW | …t/test_dto/test_factory/test_backends/test_base_dto.py | 3 | CODE | |
| LOW | …t/test_dto/test_factory/test_backends/test_backends.py | 3 | CODE | |
| LOW | tests/unit/test_types/test_protocols.py | 1 | CODE | |
| LOW | tests/unit/test_connection/test_connection_caching.py | 1 | CODE | |
| LOW | tests/unit/test_connection/test_request.py | 7 | CODE | |
| LOW | tests/unit/test_connection/test_websocket.py | 6 | CODE | |
| LOW | tests/unit/test_static_files/test_html_mode.py | 1 | CODE | |
| LOW | tests/unit/test_static_files/conftest.py | 1 | CODE | |
| LOW | …unit/test_static_files/test_file_serving_resolution.py | 1 | CODE | |
| LOW | …unit/test_static_files/test_static_files_validation.py | 1 | CODE | |
| LOW | …/unit/test_middleware/test_allowed_hosts_middleware.py | 1 | CODE | |
| LOW | …/unit/test_middleware/test_allowed_hosts_middleware.py | 14 | CODE | |
| LOW | …/unit/test_middleware/test_allowed_hosts_middleware.py | 14 | CODE | |
| LOW | …/unit/test_middleware/test_allowed_hosts_middleware.py | 14 | CODE | |
| LOW | …test_middleware/test_base_authentication_middleware.py | 24 | CODE | |
| LOW | tests/unit/test_middleware/test_base_middleware.py | 18 | CODE | |
| LOW | tests/unit/test_middleware/test_base_middleware.py | 18 | CODE | |
| LOW | tests/unit/test_middleware/test_base_middleware.py | 18 | CODE | |
| LOW | tests/unit/test_middleware/test_base_middleware.py | 18 | CODE | |
| LOW | tests/unit/test_middleware/test_base_middleware.py | 18 | CODE | |
| LOW | tests/unit/test_middleware/test_middleware_handling.py | 18 | CODE | |
| LOW | tests/unit/test_middleware/test_middleware_handling.py | 18 | CODE | |
| LOW | tests/unit/test_middleware/test_middleware_handling.py | 18 | CODE | |
| LOW | tests/unit/test_middleware/test_middleware_handling.py | 18 | CODE | |
| LOW | tests/unit/test_middleware/test_cors_middleware.py | 2 | CODE | |
| LOW | tests/unit/test_middleware/test_cors_middleware.py | 11 | CODE | |
| LOW | tests/unit/test_middleware/test_logging_middleware.py | 23 | CODE | |
| LOW | tests/unit/test_middleware/test_logging_middleware.py | 24 | CODE | |
| LOW | tests/unit/test_middleware/test_logging_middleware.py | 26 | CODE | |
| LOW | …sts/unit/test_middleware/test_rate_limit_middleware.py | 23 | CODE | |
| LOW | tests/unit/test_middleware/test_session/conftest.py | 7 | CODE | |
| 986 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/unit/test_connection/test_request.py | 0 | a large part of the tests in this file were adapted from: https://github.com/encode/starlette/blob/master/tests/test_res | STRING |
| HIGH | tests/unit/test_response/test_redirect_response.py | 0 | a large part of the tests in this file were adapted from: https://github.com/encode/starlette/blob/master/tests/test_res | STRING |
| HIGH | tests/unit/test_response/test_streaming_response.py | 0 | a large part of the tests in this file were adapted from: https://github.com/encode/starlette/blob/master/tests/test_res | STRING |
| HIGH | docs/examples/sqla/sqlalchemy_sync_repository.py | 0 | this provides a simple example demonstrating how to override the join options for the repository. | STRING |
| HIGH | docs/examples/sqla/sqlalchemy_repository_extension.py | 0 | this provides a simple example demonstrating how to override the join options for the repository. | STRING |
| HIGH | docs/examples/sqla/sqlalchemy_async_repository.py | 0 | this provides a simple example demonstrating how to override the join options for the repository. | STRING |
| HIGH | docs/examples/routing/mount_custom_app.py | 0 | asgi-callable. args: scope: the asgi connection scope. receive: the asgi receive function. send: the asgi send function. | STRING |
| HIGH | litestar/middleware/allowed_hosts.py | 0 | asgi-callable. args: scope: the asgi connection scope. receive: the asgi receive function. send: the asgi send function. | STRING |
| HIGH | litestar/middleware/csrf.py | 0 | asgi-callable. args: scope: the asgi connection scope. receive: the asgi receive function. send: the asgi send function. | STRING |
| HIGH | litestar/middleware/authentication.py | 0 | asgi-callable. args: scope: the asgi connection scope. receive: the asgi receive function. send: the asgi send function. | STRING |
| HIGH | litestar/middleware/rate_limit.py | 0 | asgi-callable. args: scope: the asgi connection scope. receive: the asgi receive function. send: the asgi send function. | STRING |
| HIGH | litestar/middleware/_internal/cors.py | 0 | asgi-callable. args: scope: the asgi connection scope. receive: the asgi receive function. send: the asgi send function. | STRING |
| HIGH | litestar/middleware/compression/middleware.py | 0 | asgi-callable. args: scope: the asgi connection scope. receive: the asgi receive function. send: the asgi send function. | STRING |
| HIGH | litestar/plugins/opentelemetry/middleware.py | 0 | asgi-callable. args: scope: the asgi connection scope. receive: the asgi receive function. send: the asgi send function. | STRING |
| HIGH | litestar/plugins/prometheus/middleware.py | 0 | asgi-callable. args: scope: the asgi connection scope. receive: the asgi receive function. send: the asgi send function. | STRING |
| HIGH | litestar/middleware/_internal/exceptions/middleware.py | 0 | asgi-callable. args: scope: the asgi connection scope. receive: the asgi receive function. send: the asgi send function. | STRING |
| HIGH | litestar/middleware/session/base.py | 0 | asgi-callable. args: scope: the asgi connection scope. receive: the asgi receive function. send: the asgi send function. | STRING |
| HIGH | litestar/controller.py | 0 | :class:`abstractdto <.dto.base_dto.abstractdto>` to use for serializing outbound response data. | STRING |
| HIGH | litestar/config/app.py | 0 | :class:`abstractdto <.dto.base_dto.abstractdto>` to use for serializing outbound response data. | STRING |
| HIGH | litestar/handlers/websocket_handlers/listener.py | 0 | :class:`abstractdto <.dto.base_dto.abstractdto>` to use for serializing outbound response data. | STRING |
| HIGH | litestar/controller.py | 0 | a mapping of names to types for use in forward reference resolution during signature modelling. | STRING |
| HIGH | litestar/config/app.py | 0 | a mapping of names to types for use in forward reference resolution during signature modelling. | STRING |
| HIGH | litestar/handlers/websocket_handlers/listener.py | 0 | a mapping of names to types for use in forward reference resolution during signature modelling. | STRING |
| HIGH | litestar/controller.py | 0 | type_decoders: a sequence of tuples, each composed of a predicate testing for type identity and a msgspec hook for deser | STRING |
| HIGH | litestar/config/app.py | 0 | type_decoders: a sequence of tuples, each composed of a predicate testing for type identity and a msgspec hook for deser | STRING |
| HIGH | litestar/handlers/websocket_handlers/listener.py | 0 | type_decoders: a sequence of tuples, each composed of a predicate testing for type identity and a msgspec hook for deser | STRING |
| HIGH | litestar/controller.py | 0 | type_encoders: a mapping of types to callables that transform them into types supported for serialization. | STRING |
| HIGH | litestar/config/app.py | 0 | type_encoders: a mapping of types to callables that transform them into types supported for serialization. | STRING |
| HIGH | litestar/security/base.py | 0 | type_encoders: a mapping of types to callables that transform them into types supported for serialization. | STRING |
| HIGH | litestar/security/jwt/auth.py | 0 | type_encoders: a mapping of types to callables that transform them into types supported for serialization. | STRING |
| HIGH | litestar/security/session_auth/auth.py | 0 | type_encoders: a mapping of types to callables that transform them into types supported for serialization. | STRING |
| HIGH | litestar/handlers/websocket_handlers/listener.py | 0 | type_encoders: a mapping of types to callables that transform them into types supported for serialization. | STRING |
| HIGH | litestar/middleware/session/server_side.py | 0 | key to use for the cookie inside the header, e.g. ``session=<data>`` where ``session`` is the cookie key and ``<data>`` | STRING |
| HIGH | litestar/middleware/session/client_side.py | 0 | key to use for the cookie inside the header, e.g. ``session=<data>`` where ``session`` is the cookie key and ``<data>`` | STRING |
| HIGH | litestar/middleware/session/base.py | 0 | key to use for the cookie inside the header, e.g. ``session=<data>`` where ``session`` is the cookie key and ``<data>`` | STRING |
| HIGH | litestar/middleware/session/server_side.py | 0 | scopes for the middleware - options are ``http`` and ``websocket`` with the default being both | STRING |
| HIGH | litestar/middleware/session/client_side.py | 0 | scopes for the middleware - options are ``http`` and ``websocket`` with the default being both | STRING |
| HIGH | litestar/middleware/session/base.py | 0 | scopes for the middleware - options are ``http`` and ``websocket`` with the default being both | STRING |
| HIGH | litestar/middleware/session/server_side.py | 0 | path fragment that must exist in the request url for the cookie to be valid. defaults to ``/``. | STRING |
| HIGH | litestar/middleware/session/client_side.py | 0 | path fragment that must exist in the request url for the cookie to be valid. defaults to ``/``. | STRING |
| HIGH | litestar/middleware/session/base.py | 0 | path fragment that must exist in the request url for the cookie to be valid. defaults to ``/``. | STRING |
| HIGH | litestar/datastructures/cookie.py | 0 | path fragment that must exist in the request url for the cookie to be valid. defaults to ``/``. | STRING |
| HIGH | litestar/security/jwt/auth.py | 0 | path fragment that must exist in the request url for the cookie to be valid. defaults to ``/``. | STRING |
| HIGH | litestar/middleware/session/server_side.py | 0 | forbids javascript to access the cookie via 'document.cookie'. | STRING |
| HIGH | litestar/middleware/session/client_side.py | 0 | forbids javascript to access the cookie via 'document.cookie'. | STRING |
| HIGH | litestar/middleware/session/base.py | 0 | forbids javascript to access the cookie via 'document.cookie'. | STRING |
| HIGH | litestar/middleware/session/server_side.py | 0 | controls whether or not a cookie is sent with cross-site requests. defaults to 'lax'. | STRING |
| HIGH | litestar/middleware/session/client_side.py | 0 | controls whether or not a cookie is sent with cross-site requests. defaults to 'lax'. | STRING |
| HIGH | litestar/middleware/session/base.py | 0 | controls whether or not a cookie is sent with cross-site requests. defaults to 'lax'. | STRING |
| HIGH | litestar/security/jwt/auth.py | 0 | controls whether or not a cookie is sent with cross-site requests. defaults to 'lax'. | STRING |
| HIGH | litestar/datastructures/cookie.py | 0 | controls whether or not a cookie is sent with cross-site requests. defaults to 'lax'. | STRING |
| HIGH | litestar/middleware/session/server_side.py | 0 | a pattern or list of patterns to skip in the session middleware. | STRING |
| HIGH | litestar/middleware/session/client_side.py | 0 | a pattern or list of patterns to skip in the session middleware. | STRING |
| HIGH | litestar/middleware/session/base.py | 0 | a pattern or list of patterns to skip in the session middleware. | STRING |
| HIGH | litestar/middleware/session/server_side.py | 0 | an identifier to use on routes to disable the session middleware for a particular route. | STRING |
| HIGH | litestar/middleware/session/client_side.py | 0 | an identifier to use on routes to disable the session middleware for a particular route. | STRING |
| HIGH | litestar/middleware/session/base.py | 0 | an identifier to use on routes to disable the session middleware for a particular route. | STRING |
| HIGH | litestar/repository/abc/_async.py | 0 | add multiple ``data`` to the collection. args: data: instance to be added to the collection. returns: the added instance | STRING |
| HIGH | litestar/repository/abc/_sync.py | 0 | add multiple ``data`` to the collection. args: data: instance to be added to the collection. returns: the added instance | STRING |
| HIGH | litestar/repository/testing/generic_mock_repository.py | 0 | add multiple ``data`` to the collection. args: data: instance to be added to the collection. returns: the added instance | STRING |
| 97 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …examples/sqla/sqlalchemy_repository_bulk_operations.py | 36 | Loads JSON file with the specified fixture name Args: fixtures_path (Path): The path to look for fixtures | STRING |
| HIGH | litestar/controller.py | 266 | Validate that the combination of path and decorator method or type are unique on the controller. Args: | STRING |
| HIGH | litestar/data_extractors.py | 147 | Extract data from the connection, returning a dictionary of values. Notes: - The value for ``body`` | STRING |
| HIGH | litestar/app.py | 826 | Receives a route handler name and returns an optional dictionary containing the route handler instance and list | STRING |
| HIGH | litestar/app.py | 863 | Receives a route handler name and path parameter values and returns the url path to the handler with filled path | STRING |
| HIGH | litestar/middleware/authentication.py | 96 | Receive the http connection and return an :class:`AuthenticationResult`. Notes: - This method must | STRING |
| HIGH | litestar/middleware/rate_limit.py | 193 | Create ratelimit response headers. Notes: * see the `IETF RateLimit draft <https://datatracker.ietf | STRING |
| HIGH | litestar/middleware/session/client_side.py | 74 | Given serializable data, including pydantic models and numpy types, dump it into a bytes string, encrypt, encode | STRING |
| HIGH | litestar/middleware/session/base.py | 118 | Serialize data into bytes for storage in the backend. Args: data: Session data of the current scope | STRING |
| HIGH | litestar/middleware/session/base.py | 172 | Load session data from a connection and return it as a dictionary to be used in the current application scope. | STRING |
| HIGH | litestar/repository/abc/_async.py | 63 | Delete instance identified by ``item_id``. Args: item_id: Identifier of instance to be deleted. | STRING |
| HIGH | litestar/repository/abc/_async.py | 101 | Get instance identified by ``item_id``. Args: item_id: Identifier of the instance to be retrieved. | STRING |
| HIGH | litestar/repository/abc/_async.py | 116 | Get an instance specified by the ``kwargs`` filters if it exists. Args: **kwargs: Instance attribut | STRING |
| HIGH | litestar/repository/abc/_async.py | 152 | Update instance with the attribute values present on ``data``. Args: data: An instance that should | STRING |
| HIGH | litestar/repository/abc/_async.py | 167 | Update multiple instances with the attribute values present on instances in ``data``. Args: data: A | STRING |
| HIGH | litestar/repository/abc/_async.py | 182 | Update or create instance. Updates instance with the attribute values present on ``data``, or creates a new ins | STRING |
| HIGH | litestar/repository/abc/_async.py | 201 | Update or create multiple instances. Update instances with the attribute values present on ``data``, or create | STRING |
| HIGH | litestar/repository/abc/_async.py | 244 | Filter the collection by kwargs. Has ``AND`` semantics where multiple kwargs name/value pairs are provided. | STRING |
| HIGH | litestar/repository/abc/_sync.py | 65 | Delete instance identified by ``item_id``. Args: item_id: Identifier of instance to be deleted. | STRING |
| HIGH | litestar/repository/abc/_sync.py | 103 | Get instance identified by ``item_id``. Args: item_id: Identifier of the instance to be retrieved. | STRING |
| HIGH | litestar/repository/abc/_sync.py | 118 | Get an instance specified by the ``kwargs`` filters if it exists. Args: **kwargs: Instance attribut | STRING |
| HIGH | litestar/repository/abc/_sync.py | 154 | Update instance with the attribute values present on ``data``. Args: data: An instance that should | STRING |
| HIGH | litestar/repository/abc/_sync.py | 169 | Update multiple instances with the attribute values present on instances in ``data``. Args: data: A | STRING |
| HIGH | litestar/repository/abc/_sync.py | 184 | Update or create instance. Updates instance with the attribute values present on ``data``, or creates a new ins | STRING |
| HIGH | litestar/repository/abc/_sync.py | 203 | Update or create multiple instances. Update instances with the attribute values present on ``data``, or create | STRING |
| HIGH | litestar/repository/abc/_sync.py | 246 | Filter the collection by kwargs. Has ``AND`` semantics where multiple kwargs name/value pairs are provided. | STRING |
| HIGH | litestar/repository/testing/generic_mock_repository.py | 127 | Delete instance identified by ``item_id``. Args: item_id: Identifier of instance to be deleted. | STRING |
| HIGH | litestar/repository/testing/generic_mock_repository.py | 176 | Get instance identified by ``item_id``. Args: item_id: Identifier of the instance to be retrieved. | STRING |
| HIGH | litestar/repository/testing/generic_mock_repository.py | 223 | Get instance identified by query filters. Args: **kwargs: Instance attribute value filters. | STRING |
| HIGH | litestar/repository/testing/generic_mock_repository.py | 262 | Update instance with the attribute values present on ``data``. Args: data: An instance that should | STRING |
| HIGH | litestar/repository/testing/generic_mock_repository.py | 281 | Update instances with the attribute values present on ``data``. Args: data: A list of instances tha | STRING |
| HIGH | litestar/repository/testing/generic_mock_repository.py | 302 | Update or create instance. Updates instance with the attribute values present on ``data``, or creates a new ins | STRING |
| HIGH | litestar/repository/testing/generic_mock_repository.py | 507 | Delete instance identified by ``item_id``. Args: item_id: Identifier of instance to be deleted. | STRING |
| HIGH | litestar/repository/testing/generic_mock_repository.py | 555 | Get instance identified by ``item_id``. Args: item_id: Identifier of the instance to be retrieved. | STRING |
| HIGH | litestar/repository/testing/generic_mock_repository.py | 601 | Get instance identified by query filters. Args: **kwargs: Instance attribute value filters. | STRING |
| HIGH | litestar/repository/testing/generic_mock_repository.py | 640 | Update instance with the attribute values present on ``data``. Args: data: An instance that should | STRING |
| HIGH | litestar/repository/testing/generic_mock_repository.py | 659 | Update instances with the attribute values present on ``data``. Args: data: A list of instances tha | STRING |
| HIGH | litestar/repository/testing/generic_mock_repository.py | 680 | Update or create instance. Updates instance with the attribute values present on ``data``, or creates a new ins | STRING |
| HIGH | litestar/_asgi/routing_trie/traversal.py | 25 | Traverses the application route mapping and retrieves the correct node for the request url. Args: root_node | STRING |
| HIGH | litestar/_asgi/routing_trie/traversal.py | 68 | Retrieve the handler tuple from the node. Args: node: The trie node to parse. method: The scope's m | STRING |
| HIGH | litestar/_asgi/routing_trie/traversal.py | 95 | Parse path parameters into a dictionary of values. Args: parameter_definitions: The parameter definitions t | STRING |
| HIGH | litestar/_asgi/routing_trie/traversal.py | 121 | Given a scope object, retrieve the asgi_handlers and is_mount boolean values from correct trie node. Args: | STRING |
| HIGH | litestar/_asgi/routing_trie/validate.py | 16 | Recursively traverses the trie from the given node upwards. Args: node: A trie node. Raises: I | STRING |
| HIGH | litestar/_kwargs/extractors.py | 283 | Extract the body from the request instance. Notes: - this extractor sets a Coroutine as the value in the kw | STRING |
| HIGH | litestar/_kwargs/extractors.py | 299 | Extract the data from request and insert it into the kwargs injected to the handler. Notes: - this extracto | STRING |
| HIGH | litestar/_kwargs/extractors.py | 316 | Extract the data from request and insert it into the kwargs injected to the handler. Notes: - this extracto | STRING |
| HIGH | litestar/_kwargs/kwargs_model.py | 214 | Get parameter_definitions for the construction of KwargsModel instance. Args: path_parameters: Any | STRING |
| HIGH | litestar/_kwargs/kwargs_model.py | 287 | Pre-determine what parameters are required for a given combination of route + route handler. It is executed duri | STRING |
| HIGH | litestar/_kwargs/parameter_definition.py | 31 | Create a ParameterDefinition for the given FieldDefinition. Args: field_definition: FieldDefinition instanc | STRING |
| HIGH | litestar/response/base.py | 159 | Emit the response body. Args: send: The ASGI send function. receive: The ASGI receive f | STRING |
| HIGH | litestar/connection/base.py | 300 | Return the url for a given route handler / handler name. Args: name: The ``name`` of the route hand | STRING |
| HIGH | litestar/datastructures/headers.py | 71 | Create headers from a send-message. Args: scope: The ASGI connection scope. Returns: | STRING |
| HIGH | litestar/datastructures/headers.py | 121 | Construct a header from a message object. Args: message: :class:`Message <.types.Message>`. | STRING |
| HIGH | litestar/datastructures/headers.py | 138 | Add a header to the scope. Notes: - This method keeps duplicates. Args: key: | STRING |
| HIGH | litestar/datastructures/headers.py | 153 | Get all values of a header. Args: key: Header key. default: Default value to return if | STRING |
| HIGH | litestar/datastructures/headers.py | 178 | Extend a multivalued header. Notes: - A multivalues header is a header that can take a comma separa | STRING |
| HIGH | litestar/datastructures/state.py | 84 | Get the value for the corresponding key from the wrapped state object using subscription notation. Args: | STRING |
| HIGH | litestar/datastructures/state.py | 114 | Get the value for the corresponding key from the wrapped state object using attribute notation. Args: | STRING |
| HIGH | litestar/datastructures/state.py | 242 | Delete the value from the key from the wrapped state object using subscription notation. Args: key: | STRING |
| HIGH | litestar/datastructures/state.py | 286 | Delete the value from the key from the wrapped state object using attribute notation. Args: key: Ke | STRING |
| 42 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | tests/unit/test_middleware/test_csrf_middleware.py | 202 | data = {"_csrf_token": html_soup.body.div.form.input.attrs.get("value")} # type: ignore[union-attr] | CODE |
| CRITICAL | tests/unit/test_utils/test_helpers.py | 7 | from litestar.utils.helpers import envflag, get_name, unique_name_for_scope, unwrap_partial | CODE |
| CRITICAL | tests/unit/test_openapi/test_schema.py | 54 | from litestar.utils.helpers import get_name | CODE |
| CRITICAL | …sts/unit/test_plugins/test_attrs/test_schema_plugin.py | 9 | from litestar.utils.helpers import get_name | CODE |
| CRITICAL | …/unit/test_plugins/test_pydantic/test_schema_plugin.py | 14 | from litestar.utils.helpers import get_name | CODE |
| CRITICAL | tests/unit/test_testing/test_test_client.py | 31 | from litestar.utils.helpers import get_exception_group | CODE |
| CRITICAL | .github/workflows/pr-merged.yml | 33 | const linkedIssues = res.repository.pullRequest.closingIssuesReferences.edges.map( | CODE |
| CRITICAL | .github/workflows/notify_released_issues/notify.js | 10 | const opts = github.rest.issues.listComments.endpoint.merge({ | CODE |
| CRITICAL | litestar/di.py | 12 | from litestar.utils.helpers import unwrap_partial | CODE |
| CRITICAL | litestar/dto/_codegen_backend.py | 34 | from litestar.utils.helpers import unique_name_for_scope | CODE |
| CRITICAL | litestar/_kwargs/kwargs_model.py | 40 | from litestar.utils.helpers import get_exception_group | CODE |
| CRITICAL | litestar/response/redirect.py | 13 | from litestar.utils.helpers import get_enum_string_value | CODE |
| CRITICAL | litestar/response/sse.py | 17 | from litestar.utils.helpers import get_enum_string_value | CODE |
| CRITICAL | litestar/response/file.py | 18 | from litestar.utils.helpers import get_enum_string_value | CODE |
| CRITICAL | litestar/response/streaming.py | 12 | from litestar.utils.helpers import get_enum_string_value | CODE |
| CRITICAL | litestar/response/base.py | 15 | from litestar.utils.helpers import get_enum_string_value | CODE |
| CRITICAL | litestar/utils/predicates.py | 40 | from litestar.utils.helpers import unwrap_partial | CODE |
| CRITICAL | litestar/cli/commands/core.py | 13 | from litestar.utils.helpers import envflag | CODE |
| CRITICAL | litestar/cli/commands/core.py | 34 | from litestar.utils.helpers import unwrap_partial | CODE |
| CRITICAL | litestar/_openapi/path_item.py | 14 | from litestar.utils.helpers import unwrap_partial | CODE |
| CRITICAL | litestar/_openapi/schema_generation/utils.py | 5 | from litestar.utils.helpers import get_name | CODE |
| CRITICAL | litestar/_openapi/schema_generation/examples.py | 13 | from polyfactory.utils.helpers import unwrap_annotation | CODE |
| CRITICAL | litestar/_openapi/schema_generation/schema.py | 44 | from litestar.utils.helpers import get_name | CODE |
| CRITICAL | litestar/handlers/base.py | 29 | from litestar.utils.helpers import unwrap_partial | CODE |
| CRITICAL | litestar/handlers/websocket_handlers/_utils.py | 13 | from litestar.utils.helpers import unwrap_partial | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …t/test_dto/test_factory/test_backends/test_backends.py | 77 | RAW = b'{"a":1,"nested":{"a":1,"b":"two"},"nested_list":[{"a":1,"b":"two"}],"nested_mapping":{"a":{"a":1,"b":"two"}},"in | CODE |
| HIGH | …t/test_dto/test_factory/test_backends/test_backends.py | 79 | COLLECTION_RAW = b'[{"a":1,"nested":{"a":1,"b":"two"},"nested_list":[{"a":1,"b":"two"}],"nested_mapping":{"a":{"a":1,"b" | CODE |
| HIGH | …st_middleware/test_session/test_client_side_backend.py | 246 | assert header_content.startswith(b"session=null;") | CODE |
| HIGH⚡ | …st_openapi/test_typescript_converter/test_converter.py | 334 | gender?: "A" | "F" | "M" | "O" | ("A" | "F" | "M" | "O")[] | null; | CODE |
| HIGH⚡ | …st_openapi/test_typescript_converter/test_converter.py | 335 | lucky_number?: 2 | 7 | null; | CODE |
| HIGH⚡ | …st_openapi/test_typescript_converter/test_converter.py | 345 | export type ResponseBody = undefined; | CODE |
| HIGH | litestar/openapi/plugins.py | 246 | if (csrf_token !== undefined) {{ | CODE |
| HIGH | litestar/openapi/plugins.py | 341 | b",undefined,document.getElementById('redoc-container'))</script></body>", | STRING |
| HIGH | litestar/openapi/plugins.py | 582 | if (csrf_token !== undefined) {{ | CODE |
| HIGH | litestar/testing/client/sync_client.py | 108 | self.exit_stack.push(super().__exit__) | CODE |
| HIGH⚡ | litestar/_openapi/typescript_converter/converter.py | 201 | return TypeScriptType("RequestBody", undefined) | CODE |
| HIGH⚡ | litestar/_openapi/typescript_converter/converter.py | 207 | parse_schema(schema) if body.required else TypeScriptUnion((parse_schema(schema), undefined)), | CODE |
| HIGH⚡ | litestar/_openapi/typescript_converter/converter.py | 210 | return TypeScriptType("RequestBody", undefined) | CODE |
| HIGH | litestar/_openapi/schema_generation/schema.py | 282 | """Return if the field is undefined, taking into account undefined types defined by plugins""" | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 192 | CODE | |
| LOW | litestar/params.py | 281 | CODE | |
| LOW | litestar/params.py | 414 | CODE | |
| LOW | litestar/data_extractors.py | 81 | CODE | |
| LOW | litestar/static_files.py | 45 | CODE | |
| LOW | litestar/app.py | 169 | CODE | |
| LOW | litestar/router.py | 79 | CODE | |
| LOW | litestar/middleware/logging.py | 48 | CODE | |
| LOW | litestar/response/redirect.py | 36 | CODE | |
| LOW | litestar/response/redirect.py | 85 | CODE | |
| LOW | litestar/response/sse.py | 192 | CODE | |
| LOW | litestar/response/file.py | 73 | CODE | |
| LOW | litestar/response/file.py | 227 | CODE | |
| LOW | litestar/response/template.py | 35 | CODE | |
| LOW | litestar/response/streaming.py | 35 | CODE | |
| LOW | litestar/response/base.py | 58 | CODE | |
| LOW | litestar/response/base.py | 259 | CODE | |
| LOW | litestar/response/base.py | 272 | CODE | |
| LOW | litestar/security/jwt/auth.py | 158 | CODE | |
| LOW | litestar/security/jwt/auth.py | 504 | CODE | |
| LOW | litestar/security/jwt/auth.py | 757 | CODE | |
| LOW | litestar/security/jwt/middleware.py | 44 | CODE | |
| LOW | litestar/security/jwt/middleware.py | 178 | CODE | |
| LOW | litestar/plugins/pydantic/__init__.py | 57 | CODE | |
| LOW | litestar/plugins/pydantic/plugins/init.py | 55 | CODE | |
| LOW | litestar/testing/request_factory.py | 130 | CODE | |
| LOW | litestar/testing/request_factory.py | 235 | CODE | |
| LOW | litestar/testing/request_factory.py | 312 | CODE | |
| LOW | litestar/testing/request_factory.py | 361 | CODE | |
| LOW | litestar/testing/request_factory.py | 415 | CODE | |
| LOW | litestar/testing/request_factory.py | 469 | CODE | |
| LOW | litestar/testing/request_factory.py | 523 | CODE | |
| LOW | litestar/testing/helpers.py | 54 | CODE | |
| LOW | litestar/testing/helpers.py | 309 | CODE | |
| LOW | litestar/testing/client/async_client.py | 126 | CODE | |
| LOW | litestar/testing/client/sync_client.py | 43 | CODE | |
| LOW | litestar/testing/client/sync_client.py | 125 | CODE | |
| LOW | litestar/handlers/asgi_handlers.py | 140 | CODE | |
| LOW | litestar/handlers/asgi_handlers.py | 34 | CODE | |
| LOW | litestar/handlers/base.py | 77 | CODE | |
| LOW | litestar/handlers/websocket_handlers/stream.py | 127 | CODE | |
| LOW | litestar/handlers/websocket_handlers/route_handler.py | 165 | CODE | |
| LOW | litestar/handlers/websocket_handlers/route_handler.py | 26 | CODE | |
| LOW | litestar/handlers/websocket_handlers/listener.py | 415 | CODE | |
| LOW | litestar/handlers/websocket_handlers/listener.py | 438 | CODE | |
| LOW | litestar/handlers/websocket_handlers/listener.py | 462 | CODE | |
| LOW | litestar/handlers/websocket_handlers/listener.py | 69 | CODE | |
| LOW | litestar/handlers/websocket_handlers/listener.py | 94 | CODE | |
| LOW | litestar/handlers/websocket_handlers/listener.py | 120 | CODE | |
| LOW | litestar/handlers/http_handlers/base.py | 133 | CODE | |
| LOW | litestar/handlers/http_handlers/decorators.py | 62 | CODE | |
| LOW | litestar/handlers/http_handlers/decorators.py | 234 | CODE | |
| LOW | litestar/handlers/http_handlers/decorators.py | 402 | CODE | |
| LOW | litestar/handlers/http_handlers/decorators.py | 574 | CODE | |
| LOW | litestar/handlers/http_handlers/decorators.py | 746 | CODE | |
| LOW | litestar/handlers/http_handlers/decorators.py | 918 | CODE | |
| LOW | litestar/handlers/http_handlers/decorators.py | 1089 | CODE | |
| LOW | litestar/channels/plugin.py | 38 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/prepare_release.py | 323 | CODE | |
| LOW | tools/sphinx_ext/run_examples.py | 72 | CODE | |
| LOW | tools/sphinx_ext/run_examples.py | 125 | CODE | |
| LOW | tests/unit/test_connection/test_connection_caching.py | 107 | CODE | |
| LOW | tests/unit/test_connection/test_connection_caching.py | 117 | CODE | |
| LOW | tests/unit/test_connection/test_connection_caching.py | 134 | CODE | |
| LOW | tests/unit/test_cli/test_core_commands.py | 358 | CODE | |
| LOW | tests/unit/test_response/test_sse.py | 68 | CODE | |
| LOW | tests/unit/test_response/test_sse.py | 70 | CODE | |
| LOW | tests/unit/test_response/test_sse.py | 71 | CODE | |
| LOW | tests/unit/test_testing/test_test_client.py | 261 | CODE | |
| LOW | tests/unit/test_testing/test_test_client.py | 309 | CODE | |
| LOW | tests/unit/test_template/test_template.py | 164 | CODE | |
| LOW | tests/e2e/test_router_registration.py | 45 | CODE | |
| LOW | tests/e2e/test_router_registration.py | 58 | CODE | |
| LOW | litestar/_multipart.py | 61 | CODE | |
| LOW | litestar/static_files.py | 253 | CODE | |
| LOW | litestar/app.py | 509 | CODE | |
| LOW | litestar/app.py | 660 | CODE | |
| LOW | litestar/typing.py | 72 | CODE | |
| LOW | litestar/typing.py | 442 | CODE | |
| LOW | litestar/file_system.py | 281 | CODE | |
| LOW | litestar/dto/base_dto.py | 255 | CODE | |
| LOW | litestar/middleware/constraints.py | 232 | CODE | |
| LOW | litestar/middleware/compression/middleware.py | 86 | CODE | |
| LOW | litestar/middleware/compression/middleware.py | 119 | CODE | |
| LOW | litestar/_asgi/routing_trie/mapping.py | 61 | CODE | |
| LOW | litestar/_kwargs/kwargs_model.py | 278 | CODE | |
| LOW | litestar/_kwargs/kwargs_model.py | 460 | CODE | |
| LOW | litestar/response/template.py | 100 | CODE | |
| LOW | litestar/connection/request.py | 180 | CODE | |
| LOW | litestar/connection/request.py | 249 | CODE | |
| LOW | litestar/datastructures/headers.py | 451 | CODE | |
| LOW | litestar/config/compression.py | 71 | CODE | |
| LOW | litestar/plugins/pydantic/dto.py | 86 | CODE | |
| LOW | litestar/cli/_utils.py | 352 | CODE | |
| LOW | litestar/openapi/config.py | 134 | CODE | |
| LOW | litestar/openapi/spec/base.py | 52 | CODE | |
| LOW | litestar/_openapi/responses.py | 282 | CODE | |
| LOW | litestar/_openapi/responses.py | 128 | CODE | |
| LOW | litestar/_openapi/responses.py | 210 | CODE | |
| LOW | litestar/_openapi/typescript_converter/converter.py | 48 | CODE | |
| LOW | litestar/_openapi/typescript_converter/converter.py | 140 | CODE | |
| LOW | litestar/_openapi/schema_generation/schema.py | 287 | CODE | |
| LOW | litestar/_openapi/schema_generation/schema.py | 588 | CODE | |
| LOW | litestar/_signature/model.py | 137 | CODE | |
| LOW | litestar/_signature/model.py | 225 | CODE | |
| LOW | litestar/handlers/websocket_handlers/stream.py | 27 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/prepare_release.py | 383 | def update_pyproject_version(new_version: str) -> None: | CODE |
| LOW | tests/unit/test_middleware/test_middleware_handling.py | 20 | logger = logging.getLogger(__name__) | CODE |
| LOW | tests/unit/test_middleware/test_logging_middleware.py | 292 | async def set_session(request: Request) -> None: | CODE |
| LOW | …st_middleware/test_session/test_client_side_backend.py | 150 | def set_session_data(request: Request) -> None: | CODE |
| LOW | tests/unit/test_testing/test_test_client.py | 111 | async def set_session_data(request: Request) -> None: | CODE |
| LOW | tests/unit/test_testing/test_test_client.py | 156 | async def set_session_data(request: Request) -> None: | CODE |
| LOW | docs/conf.py | 17 | __all__ = ["setup"] | CODE |
| LOW | docs/examples/responses/background_tasks_1.py | 7 | logger = logging.getLogger(__name__) | CODE |
| LOW | docs/examples/responses/background_tasks_2.py | 6 | logger = logging.getLogger(__name__) | CODE |
| LOW | docs/examples/responses/background_tasks_3.py | 7 | logger = logging.getLogger(__name__) | CODE |
| LOW | docs/examples/testing/test_get_session_data.py | 9 | def set_session_data(request: Request) -> None: | CODE |
| LOW | docs/examples/testing/test_get_session_data_async.py | 9 | def set_session_data(request: Request) -> None: | CODE |
| LOW | …/examples/application_state/using_application_state.py | 11 | logger = logging.getLogger(__name__) | CODE |
| LOW | …/examples/application_state/using_application_state.py | 14 | def set_state_on_startup(app: Litestar) -> None: | CODE |
| LOW | docs/examples/onboarding/flask/request_state.py | 4 | def set_user_on_request(request: Request) -> None: | CODE |
| LOW | docs/examples/onboarding/fastapi/background_tasks.py | 6 | logger = logging.getLogger(__name__) | CODE |
| LOW | litestar/concurrency.py | 71 | def set_asyncio_executor(executor: ThreadPoolExecutor | None) -> None: | CODE |
| LOW | litestar/concurrency.py | 92 | def set_trio_capacity_limiter(limiter: trio.CapacityLimiter | None) -> None: | CODE |
| LOW | litestar/app.py | 980 | def update_openapi_schema(self) -> None: | CODE |
| LOW | litestar/dto/data_structures.py | 57 | def _set_nested_dict_value(d: dict[str, Any], keys: list[str], value: Any) -> None: | CODE |
| LOW | litestar/middleware/response_cache.py | 20 | __all__ = ["ResponseCacheMiddleware"] | CODE |
| LOW | litestar/middleware/csrf.py | 163 | def _set_cookie_if_needed(self, message: HTTPSendMessage, token: str) -> None: | CODE |
| LOW | litestar/middleware/rate_limit.py | 165 | async def set_cached_history(self, key: str, cache_object: CacheObject, store: Store) -> None: | CODE |
| LOW | litestar/response/base.py | 256 | def set_cookie(self, /, cookie: Cookie) -> None: ... | CODE |
| LOW | litestar/response/base.py | 315 | def set_header(self, key: str, value: Any) -> None: | CODE |
| LOW | litestar/response/base.py | 327 | def set_etag(self, etag: str | ETag) -> None: | CODE |
| LOW | litestar/connection/base.py | 270 | def set_session(self, value: dict[str, Any] | DataContainerType | EmptyType) -> None: | CODE |
| LOW | litestar/plugins/prometheus/controller.py | 30 | __all__ = [ | CODE |
| LOW | litestar/cli/__init__.py | 25 | __all__ = ["litestar_group"] | CODE |
| LOW | litestar/testing/client/_base.py | 90 | async def _set_session_data(client: TestClient | AsyncTestClient, data: dict[str, Any]) -> None: | CODE |
| LOW | litestar/testing/client/async_client.py | 195 | def set_session_data(request: Request) -> None: | STRING |
| LOW | litestar/testing/client/async_client.py | 210 | async def set_session_data(self, data: dict[str, Any]) -> None: | CODE |
| LOW | litestar/testing/client/sync_client.py | 194 | def set_session_data(request: Request) -> None: | STRING |
| LOW | litestar/testing/client/sync_client.py | 209 | def set_session_data(self, data: dict[str, Any]) -> None: | CODE |
| LOW | litestar/_openapi/responses.py | 210 | def set_success_response_headers(self, response: OpenAPIResponse) -> None: | CODE |
| LOW | litestar/_openapi/datastructures.py | 183 | def set_reference_paths(name: str, registered_schema: RegisteredSchema) -> None: | CODE |
| LOW | litestar/events/listener.py | 16 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs/examples/security/using_session_auth.py | 98 | # and again, you can add whatever logic is required here, we | COMMENT |
| MEDIUM | …etheus/using_prometheus_exporter_with_extra_configs.py | 36 | # The given options are not necessary, you can use the default ones | COMMENT |
| MEDIUM | …a_transfer_objects/factory/tutorial/initial_pattern.py | 19 | # For demonstration purposes, a placeholder Person instance is returned | COMMENT |
| MEDIUM | …er_objects/factory/tutorial/field_renaming_strategy.py | 36 | # For demonstration purposes, a placeholder Person instance is returned | COMMENT |
| MEDIUM | …_objects/factory/tutorial/nested_collection_exclude.py | 33 | # For demonstration purposes, a placeholder Person instance is returned | COMMENT |
| MEDIUM | …er_objects/factory/tutorial/explicit_field_renaming.py | 36 | # For demonstration purposes, a placeholder Person instance is returned | COMMENT |
| MEDIUM | …ransfer_objects/factory/tutorial/simple_dto_exclude.py | 24 | # For demonstration purposes, a placeholder Person instance is returned | COMMENT |
| MEDIUM | …_transfer_objects/factory/tutorial/max_nested_depth.py | 36 | # For demonstration purposes, a placeholder Person instance is returned | COMMENT |
| MEDIUM | …ta_transfer_objects/factory/tutorial/nested_exclude.py | 32 | # For demonstration purposes, a placeholder Person instance is returned | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …est_plugins/test_pydantic/test_plugin_serialization.py | 112 | email_str=pydantic_v2.TypeAdapter(pydantic_v2.EmailStr).validate_python("info@example.org"), | CODE |
| LOW | …est_plugins/test_pydantic/test_plugin_serialization.py | 113 | name_email=pydantic_v2.NameEmail("info", "info@example.org"), | CODE |
| LOW | …est_plugins/test_pydantic/test_plugin_serialization.py | 143 | ("email_str", "info@example.org"), | CODE |
| LOW⚡ | tests/unit/test_security/test_jwt/test_auth.py | 149 | fake_token = Token( | CODE |
| LOW⚡ | tests/unit/test_security/test_jwt/test_auth.py | 157 | response = client.get("/my-endpoint", headers={auth_header: jwt_auth.format_auth_header(fake_token)}) | CODE |
| LOW⚡ | tests/unit/test_security/test_jwt/test_auth.py | 343 | fake_token = Token( | CODE |
| LOW⚡ | tests/unit/test_security/test_jwt/test_auth.py | 352 | response = client.get("/my-endpoint", headers={auth_header: jwt_auth.format_auth_header(fake_token)}) | CODE |
| LOW⚡ | tests/unit/test_security/test_jwt/test_auth.py | 355 | client.cookies = {auth_cookie: jwt_auth.format_auth_header(fake_token)} | CODE |
| LOW | tests/unit/test_security/test_jwt/test_token.py | 28 | @pytest.mark.parametrize("token_extras", [None, {"email": "test@test.com"}]) | CODE |
| LOW | tests/examples/test_dto/test_example_apps.py | 70 | "address": {"street": "123 Main St"}, | CODE |
| LOW | tests/examples/test_parameters/test_path_parameters.py | 12 | assert response.json() == {"id": 1, "name": "John Doe"} | CODE |
| LOW | …/test_parameters/test_header_and_cookies_parameters.py | 23 | assert response.json() == {"id": 1, "name": "John Doe"} | CODE |
| LOW | …ples/data_transfer_objects/factory/excluding_fields.py | 52 | data.address = Address(street="123 Main St", city="Anytown", state="NY", zip="12345") | CODE |
| LOW | …mples/data_transfer_objects/factory/included_fields.py | 49 | data.address = Address(street="123 Main St", city="Anytown", state="NY", zip="12345") | CODE |
| LOW | …er_objects/factory/tutorial/field_renaming_strategy.py | 37 | address = Address(street="123 Main St", city="Cityville", country="Countryland") | CODE |
| LOW | …_objects/factory/tutorial/nested_collection_exclude.py | 34 | address = Address(street="123 Main St", city="Cityville", country="Countryland") | CODE |
| LOW | …er_objects/factory/tutorial/explicit_field_renaming.py | 37 | address = Address(street="123 Main St", city="Cityville", country="Countryland") | CODE |
| LOW | …_transfer_objects/factory/tutorial/max_nested_depth.py | 37 | address = Address(street="123 Main St", city="Cityville", country="Countryland") | CODE |
| LOW | …ta_transfer_objects/factory/tutorial/nested_exclude.py | 33 | address = Address(street="123 Main St", city="Cityville", country="Countryland") | CODE |
| LOW | …cs/examples/parameters/header_and_cookie_parameters.py | 19 | 1: User(id=1, name="John Doe"), | CODE |
| LOW | docs/examples/parameters/path_parameters_1.py | 13 | USER_DB = {1: User(id=1, name="John Doe")} | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …etheus/using_prometheus_exporter_with_extra_configs.py | 35 | # Creating the instance of PrometheusConfig with our own custom options. | COMMENT |
| MEDIUM | …etheus/using_prometheus_exporter_with_extra_configs.py | 48 | # Creating the litestar app instance with our custom PrometheusConfig and PrometheusController. | COMMENT |
| MEDIUM | …amples/plugins/prometheus/using_prometheus_exporter.py | 12 | # Creating the litestar app instance with our custom PrometheusConfig and PrometheusController. | COMMENT |
| MEDIUM | docs/examples/caching/cache_response_filter.py | 13 | # Create the app with a custom cache response filter | COMMENT |
| MEDIUM⚡ | litestar/testing/request_factory.py | 97 | # Create a GET request | STRING |
| MEDIUM⚡ | litestar/testing/request_factory.py | 103 | # Create a POST request | STRING |
| MEDIUM⚡ | litestar/testing/request_factory.py | 109 | # Create a request with a special header | STRING |
| MEDIUM⚡ | litestar/testing/request_factory.py | 115 | # Create a request with a media type | STRING |
| MEDIUM | litestar/_openapi/schema_generation/schema.py | 568 | # This method is only called for enums, so this branch is always executed | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/unit/test_app.py | 238 | except Exception as e: | CODE |
| MEDIUM | tests/unit/test_app.py | 235 | def my_route_handler() -> None: | CODE |
| LOW | …t/test_middleware/test_exception_handler_middleware.py | 300 | except Exception as e: | CODE |
| LOW | docs/examples/sqla/sqlalchemy_repository_crud.py | 44 | except Exception: # noqa: BLE001 | CODE |
| LOW | litestar/data_extractors.py | 313 | except Exception as exc: | CODE |
| LOW | litestar/middleware/logging.py | 136 | except Exception: | CODE |
| LOW | litestar/middleware/_internal/exceptions/middleware.py | 131 | except Exception as exc: | CODE |
| LOW | litestar/_asgi/asgi_router.py | 103 | except Exception: | CODE |
| LOW | litestar/_kwargs/cleanup.py | 126 | except Exception as cleanup_exc: # noqa: BLE001 | CODE |
| LOW | litestar/plugins/prometheus/middleware.py | 162 | except Exception: | CODE |
| MEDIUM | litestar/cli/_utils.py | 562 | console.print(f"Error: {e}. Invalid regex pattern supplied: '{pattern}'. Omitting from querying results.") | CODE |
| LOW | litestar/testing/client/async_client.py | 122 | except Exception as exc: | CODE |
| LOW | litestar/testing/client/sync_client.py | 121 | except Exception as exc: | CODE |
| LOW | litestar/_signature/model.py | 178 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | litestar/events/listener.py | 74 | except Exception as exc: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/unit/test_utils/test_sync.py | 9 | def my_method(self, value: int) -> None: | CODE |
| LOW | tests/unit/test_utils/test_sync.py | 28 | async def my_method(self, value: int) -> None: | CODE |
| LOW | tests/unit/test_utils/test_sync.py | 45 | def my_function(new_value: int) -> None: | CODE |
| LOW | tests/unit/test_utils/test_sync.py | 60 | async def my_function(new_value: int) -> None: | CODE |
| LOW | tests/unit/test_openapi/test_schema.py | 188 | def test_function(self, summed: NamedDependency[int], handler_param: FromQuery[int]) -> str: | CODE |
| LOW | …jection/test_websocket_handler_dependency_injection.py | 100 | async def test_function( | CODE |
| LOW | …e/test_dependency_injection/test_inter_dependencies.py | 33 | def test_function(self, summed: NamedDependency[int]) -> str: | CODE |
| LOW | …cy_injection/test_http_handler_dependency_injection.py | 98 | def test_function(first: NamedDependency[int], second: NamedDependency[bool], third: NamedDependency[str]) -> None: | CODE |
| LOW | …test_dependency_injection/test_injection_of_classes.py | 34 | def test_function(self, container: NamedDependency[HandlerDependency]) -> str: | CODE |
| LOW | litestar/testing/transport.py | 219 | def handle_request(self, request: Request) -> Response: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/examples/security/using_session_auth.py | 61 | # we received log-in data via post. | COMMENT |
| LOW | docs/examples/lifecycle_hooks/before_request.py | 21 | # run: /?name=Luke | COMMENT |
| LOW | litestar/static_files.py | 261 | for directory in directories: | COMMENT |
| LOW | litestar/_asgi/routing_trie/mapping.py | 221 | # using this order however, since each middleware wraps the next callable, the | COMMENT |
| LOW | litestar/connection/__init__.py | 1 | # Some code in this module was adapted from https://github.com/encode/starlette/blob/master/starlette/requests.py and | COMMENT |
| LOW | litestar/connection/__init__.py | 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | COMMENT |
| LOW | litestar/_openapi/datastructures.py | 141 | if (existing_type := self._component_type_map[key]) != field and f"{field.raw!r}" != f"{existing_type.raw!r}": | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/unit/test_response/test_sse.py | 231 | CODE | |
| MEDIUM | tests/unit/test_response/test_sse.py | 298 | CODE | |
| MEDIUM | tests/unit/test_response/test_sse.py | 318 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | …t/test_handlers/test_websocket_handlers/test_stream.py | 62 | # ensure dependency injection also works with 'socket' present | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/examples/security/using_session_auth.py | 80 | # you can do whatever we want here. In this case, we will simply return the user data: | COMMENT |
| LOW | docs/examples/security/using_session_auth.py | 99 | # will simply return the user: | COMMENT |
| LOW | litestar/_signature/model.py | 295 | # DTOs have already validated their data, so we can just use Any here | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/examples/security/jwt/using_token_revocation.py | 42 | # Check if the token is already revoked in the BLOCKLIST | COMMENT |