Skip to content

Inquiries about security issues #73

Closed

Description

@iCodePoet

I happened to read the blog post.

https://systemweakness.com/why-not-to-use-dotenv-on-flutter-5d3a07abc971

According to this article, the .env file appears to be readable.
I'm storing key security information here.
Is there a security problem depending on the blog post? I wonder if it's reliable or if there's a security problem, how can you secure it?

Activity

  1. java-james commented on Oct 2, 2022

    @java-james
    Owner

    Thanks for raising the concern.
    Please see #51 (comment) for a related discussion on this. In short, you shouldn't use .env on the client side to store sensitive data. Please get back to me if we are missing a point here, especially if you have something in mind we may have not thought of yet.

  2. iCodePoet commented on Oct 5, 2022

    @iCodePoet
    Author

    Thank you for your comment.

    Is there an alternative to how sensitive data is managed?

    I would appreciate it if other people could suggest a good idea.

  3. java-james commented on Oct 14, 2024

    @java-james
    Owner

    See suggestion on linked thread

    Operations that involve truly sensitive keys should be proxied through an API call to a service that can securely host and use these values.

    There are env libraries that attempt to obfuscate your env variables. We could implement similar on this library, however, I think that would lull people into a false sense of security when in reality, no sensitive keys should be used on the front end of your application.

  4. java-james commented on Oct 18, 2024

    @java-james
    Owner

    Thanks for raising it as an issue.

    Related issues raised are
    #100
    #74
    #111

    I am going to close the issues for now but if someone would like to discuss if there is value in obfuscation or has another better idea please feel free to open or re open!

  5. sergembamba commented on Apr 14, 2026

    @sergembamba

    @java-james The issue has been marked as closed, but the proposed resolution may not be entirely sufficient. Even if the .env file is generated from managed secrets in CI, those values remain accessible once the APK is downloaded.

    Should we consider implementing a local symmetric encryption mechanism before packaging these assets into the APK to better protect the secret variables?

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