Skip to content

Consider using stronger ACL on Environment files #2016

Open

Description

@DanaEpp

Issue

When an Environment file is created, it is typically stored in the environments directory. On 'nix/BSD environments, those files are stored with world-readable perms (644 to be exact). While there is already some protection for sensitive data by using the "Secrets" checkbox, I could see people who accidentally/mistakenly still store sensitive creds and keys which could expose them.

I'd recommend you set an ACL for the Environment files to 600 by default. I can confirm that Bruno will continue to read and write to them just fine with those permissions set.

Activity

  1. added
    good first issue
    help wanted
    on Apr 5, 2024
  2. PushpenderSaini0 commented on Apr 7, 2024

    @PushpenderSaini0
    Contributor

    Interesting !

    It looks like we can add a mode param in the writeFile method here !

    As fs won't change the permission when writing to the file this mode 600 is only required to be set in the create environment renderer:create-environment here.

    I made these changes to verify this (works on my machine 😄)

    If these changes look good i can raise a PR for this !

    image

    • My Machine

    image

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions