Skip to content

apikey and secretkey stored in plain text in (world readable) history file #157

Closed

Description

@hrak

When set apikey xyz or set secretkey xyz are executed on the cloudmonkey prompt, the command is stored verbatim into the history, potentially exposing sensitive data into a file that is world readable by default.

Activity

  1. DaanHoogland commented on Apr 11, 2025

    @DaanHoogland
    Contributor

    @hrak any way forward (exept not writing out history) that you know of?

  2. hrak commented on Apr 11, 2025

    @hrak
    Author

    Move away from using github.com/chzyer/readline as it appears to be abandoned (no changes since 2017) and has insecure defaults.

    There's a small bit of activity in feb this year. I will open a ticket there and see if it gains any traction.

  3. hrak commented on Apr 14, 2025

    @hrak
    Author
  4. yadvr commented on Apr 14, 2025

    @yadvr
    Member

    Or we can add a workaround in our CLI

  5. DaanHoogland commented on Apr 14, 2025

    @DaanHoogland
    Contributor

    well, if they do not respond, I'd rather go for a replacement (provided it is drop-in) instead of maintaining such a workaround.

  6. shwstppr commented on Jul 24, 2025

    @shwstppr
    Contributor

    @rohityadavcloud @DaanHoogland any suggestion, should we go for a different fork or in-code workaround?

    Tentatively adding to 6.5.0 milestone

  7. added this to the 6.5.0 milestone on Jul 24, 2025
  8. yadvr commented on Jul 30, 2025

    @yadvr
    Member

    suggestions;

    • ensure the config file is not world readable (i.e. modbit - 640)
    • base64 encoding of apikey/secrekey & passwords
    • explore using OS provided keyring to https://github.com/zalando/go-keyring
  9. added a commit that references this issue on Aug 4, 2025
    134a5d5
  10. added a commit that references this issue on Aug 7, 2025
    4673829
  11. shwstppr commented on Aug 7, 2025

    @shwstppr
    Contributor

    @hrak @rohityadavcloud I've implemented #166 to handle the file permissions.
    I'll look into the feasibility of improvements in #157 (comment)
    Feel free to re-open if any issues

  12. added a commit that references this issue on Aug 13, 2025
    4797c90
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions