You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-11-29 21:48:14 +02:00
Add blocklist of environment variables who could alter execution of plugins (#3934)
This commit is contained in:
@@ -131,9 +131,14 @@ func (c *Compiler) createProcess(container *yaml_types.Container, stepType backe
|
||||
return nil, err
|
||||
}
|
||||
|
||||
toUpperTarget := strings.ToUpper(requested.Target)
|
||||
if !environmentAllowed(toUpperTarget, stepType) {
|
||||
continue
|
||||
}
|
||||
|
||||
environment[requested.Target] = secretValue
|
||||
// TODO: deprecated, remove in 3.x
|
||||
environment[strings.ToUpper(requested.Target)] = secretValue
|
||||
environment[toUpperTarget] = secretValue
|
||||
}
|
||||
|
||||
if utils.MatchImage(container.Image, c.escalated...) && container.IsPlugin() {
|
||||
|
||||
Reference in New Issue
Block a user