Skip to content

Environment Variables and Shells implementation behaves like Malware #2434

@AmmarAbouZor

Description

@AmmarAbouZor

The current implementation for running shell commands from within Chipmunk, runs the commands as system-processes without running the shell at first. This led to problem with loading environment variables which is solved currently with the crate envvars which execute all available shells at runtime to extract their environment variables so it can apply it to the spawned process (Which on its own a none expected behavior from a log analyzer to execute all available shells when it starts).

However, the implementation of envvars, creates an external executable binary with a name generated from UUID inside system temp directory then execute it separately, which is a really suspicious behavior that can get caught be Antiviruses marking Chipmunk app as Malware.

We can solve the original problem without having to execute the shells by simply run the commands by spawning a shell process and giving it the command as argument.
With that the shell will load its env variables and it will parse the command itself instead of the current primitive command parsing that is implemented in Chipmunk which fails on many edge-cases (like setting env variable before running the command and command piping, etc)

Metadata

Metadata

Assignees

Labels

newnewly created issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions