mercedes-benz / sechub

SecHub provides a central API to test software with different security tools.
https://mercedes-benz.github.io/sechub/
MIT License
259 stars 58 forks source link

Reduce visibility of deployment variables inside PDS caller scripts #3142

Closed de-jcup closed 1 month ago

de-jcup commented 1 month ago

:warning: Important information:

With #3220 we no longer use PDS_SCRIPT_ENV_WHITELIST but provide the functionality via pds config entry env-whitelist.

Situation

PDSExecutionCallable does currently only add calculated parts to the process environment of the PDS caller script and executes it.

But... the scripts have access to any environment variable of the PDS server. This is a security flaw.

Wanted

The scripts shall have no access to sensitive data.

Solution

For some special PDS solutions like prepare-solution which need special parts must add those parts to their whitelist. So the responsibility is not inside the script but at PDS side and secure per default