Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default privileged plugins also are privileged when used as normal images #1525

Closed
6543 opened this issue Jan 3, 2023 · 5 comments · Fixed by #1646
Closed

default privileged plugins also are privileged when used as normal images #1525

6543 opened this issue Jan 3, 2023 · 5 comments · Fixed by #1646
Labels
bounty get some rewards if it got resolved enhancement improve existing features security
Milestone

Comments

@6543
Copy link
Member

6543 commented Jan 3, 2023

e.g.

var PrivilegedPlugins = []string{
"plugins/docker",
"plugins/gcr",
"plugins/ecr",
"woodpeckerci/plugin-docker",
"woodpeckerci/plugin-docker-buildx",
}

should only have privileged permissions in plugin usage ...

else you could use custom commands to escape jail


bounty 50$

@6543 6543 added security backport indicates that this pull needs/has a backport labels Jan 3, 2023
@6543 6543 added this to the 1.0.0 milestone Jan 3, 2023
@6543
Copy link
Member Author

6543 commented Jan 3, 2023

similar to #1344

@6543 6543 removed the backport indicates that this pull needs/has a backport label Jan 3, 2023
@6543
Copy link
Member Author

6543 commented Jan 3, 2023

well if we can backport it we should determine on the implementation .. but it would be nice if it's able to

@gapodo
Copy link
Contributor

gapodo commented Jan 3, 2023

There are use-cases where being able to use commands in privileged setups may be beneficial.

The question is, if it would make sense to have 2 lists, one with privileged plugins and one privileged "no matter what" (i.e. adding privileged in certain repos as an admin...), potentially even on a woodpecker-server level as some may prefer their things to be privilaged, as they have full control over the instance (i.e. on a dev PC, isolated networks,...)

In forgejo we are using a privileged container to run some tasks requiring it (though they could potentially be written into a plugin), so having an option to allow (at least on a repo level) additional privileged plugins and/or privileged "no matter what" would be great.

@6543
Copy link
Member Author

6543 commented Jan 3, 2023

well there is still a repo config that will allow to set that privileges so your usecase will work

but for the default config Im better save than sory

@gapodo
Copy link
Contributor

gapodo commented Jan 3, 2023

well there is still a repo config that will allow to set that privileges so your usecase will work

but for the default config Im better save than sory

Absolutely, 100%, the question on my part was (I may have been a bit confusing in that reply), if there could / should be 2 settings on the repo 1 for privileged plugins and another one for "always" privileged (there may be enough trust to allow additional plugins, but not "always" privileged setups)

Edit just to clarify our default is "" for escalateable images, so none at all globally, so being able to differentiate the 2 escalation / privileged levels would be great.

@6543 6543 added enhancement improve existing features bounty get some rewards if it got resolved labels Jan 3, 2023
anbraten added a commit that referenced this issue Mar 19, 2023
Closes #1525

Co-authored-by: Anbraten <anton@ju60.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty get some rewards if it got resolved enhancement improve existing features security
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants