Review the scan command and improve it , cover all the places people typically keep env…
- User
Review the scan command and improve it , cover all the places people typically keep env keys, i.e. .env, .env.local and so on
- User
why not look in .bashrc, .zshrc and so on
Assistant
We don't need to manually parse
.bashrc,.zshrc,.profile, orconfig.fishbecause any variables exported in those files are automatically loaded into your shell's active environment when it starts.The scan command already reads
os.environ(which captures the active shell environment). If you haveexport OPENAI_API_KEY=sk-...in your.zshrc, the scan will pick it up under the"environment"source.Dotenv files (like
.env,.env.local), on the other hand, usually aren't sourced automatically by the shell, which is why we have to manually parse them in the_scan_env_sourcesfunction. Furthermore, parsing shell scripts statically is error-prone since they can contain complex logic (ifstatements, command substitutions) that a simple key-value parser wouldn't understand.Does this make sense, or would you still like me to try and statically parse shell config files to find keys even if they aren't loaded in the current session?
- User
create push and pr
Assistant
I have successfully committed the changes, pushed the branch to the remote repository, and created the pull request. You can view the PR here: https://github.com/agentrhq/authsome/pull/370.