Skip to content

Security concerns due to lazy-imports package in the python generator #21831

Open

Description

@Thommy257

I don't want to be a buzzkill or step on someone's toes. Still, with that change, you are potentially pushing a dependency with nine GitHub stars and two maintainers into millions of micro-services. I'd reconsider...

Originally posted by @Thommy257 in #21486 (comment)

Hi all,

In your latest release, v7.15.0, you included a package called lazy-imports required to run the generated API client code (see #21486). Due to a lack of maintenance and public verification, this package poses a significant security risk. I suggest undoing this change or internalising it into openapi-generator.

Also, this PR probably broke many CI/CD pipelines. And for those that didn't break, many microservices got silently injected with a package not verified by a large open source community.

Activity

  1. Trolldemorted commented on Sep 5, 2025

    @Trolldemorted
    Contributor

    Is there a measurable benefit from using lazy-imports that would make the supply chain security risk worth it?

  2. katrinm86 commented on Sep 5, 2025

    @katrinm86

    they package itself is not that important i guess but the effect is: goauthentik/authentik#10865

    some generated clients took very long on importing, which makes it really cumbersome for scripts

  3. tamird commented on Jul 23, 2026

    @tamird
    Contributor

    The Python generator can preserve deferred model and API imports without introducing a third-party runtime dependency or replacing entries in sys.modules. #24402 implements standard-library PEP 562 lazy exports, retains typing, public exports and caching, and removes lazy-imports from all generated Python packaging metadata.

    — tamirdex

  4. tamird commented on Jul 31, 2026

    @tamird
    Contributor

    I think this issue can be closed out now? @wing328

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