Added enable_preload configuration with a default value of False for security purposes.
modified: internal/types/config.go
Updated the configuration structure to include the EnablePreload parameter.
modified: internal/service/nodejs.go
Added logic to retrieve the EnablePreload setting from the configuration. If EnablePreload is disabled, the preload field is set to an empty string.
modified: internal/service/python.go
Added logic to retrieve the EnablePreload setting from the configuration. If EnablePreload is disabled, the preload field is set to an empty string.
Summarize:
After making the modifications and running compilation tests, the command injection attack has been successfully prevented.
After discussing with the project maintainer, it was concluded that this parameter is theoretically deprecated. Therefore, it is disabled by default and will not be updated through environment variables. Currently, disabling the preload parameter does not negatively impact other functionalities.
What i modified:
modified: conf/config.yaml
enable_preload
configuration with a default value ofFalse
for security purposes.modified: internal/types/config.go
EnablePreload
parameter.modified: internal/service/nodejs.go
EnablePreload
setting from the configuration. IfEnablePreload
is disabled, thepreload
field is set to an empty string.modified: internal/service/python.go
EnablePreload
setting from the configuration. IfEnablePreload
is disabled, thepreload
field is set to an empty string.Summarize:
preload
parameter does not negatively impact other functionalities.