Only grant privileged to plugins (#1646)

Closes https://github.com/woodpecker-ci/woodpecker/issues/1525

Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
qwerty287
2023-03-19 03:07:10 +01:00
committed by GitHub
parent 51168db9fd
commit 7ddc18348f

View File

@@ -84,7 +84,7 @@ func (c *Compiler) createProcess(name string, container *yaml.Container, section
}
}
if matchImage(container.Image, c.escalated...) {
if matchImage(container.Image, c.escalated...) && container.IsPlugin() {
privileged = true
}