You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.
Is your feature request related to a problem? Please describe.
Our current installation process requires users to manually update the gopath and point it to the cache folder if they want to use gosec. This is error prone and complicates deployment.
Describe the solution you'd like
Using the env parameter of child_process.spawn(), we can inject the gopath into spawned gosec processes. This removes the need for additional configuration and gives us more flexibility to handle save paths since every spawned gosec instance could have a different gopath specific to the current PR save location (currently all go source must be in /cache/go/src for this reason). This could allow us to use a more sensible directory layout in the cache and remove the need to have two code branches in all of the file save logic.
Additionally this removes the need to pollute the global namespace.
Describe alternatives you've considered
We could alternatively use the .env file to inject environmental variables in the program.
Is your feature request related to a problem? Please describe.
Our current installation process requires users to manually update the gopath and point it to the cache folder if they want to use gosec. This is error prone and complicates deployment.
Describe the solution you'd like
Using the
env
parameter ofchild_process.spawn()
, we can inject the gopath into spawned gosec processes. This removes the need for additional configuration and gives us more flexibility to handle save paths since every spawned gosec instance could have a different gopath specific to the current PR save location (currently all go source must be in /cache/go/src for this reason). This could allow us to use a more sensible directory layout in the cache and remove the need to have two code branches in all of the file save logic.Additionally this removes the need to pollute the global namespace.
Describe alternatives you've considered
We could alternatively use the .env file to inject environmental variables in the program.
Additional context
More info: Node JS child process handling
The text was updated successfully, but these errors were encountered: