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

[Important] Limit secret access to plugins only #1071

Closed
6543 opened this issue Aug 3, 2022 · 4 comments · Fixed by #1344
Closed

[Important] Limit secret access to plugins only #1071

6543 opened this issue Aug 3, 2022 · 4 comments · Fixed by #1344
Assignees
Labels
bounty get some rewards if it got resolved enhancement improve existing features security server
Milestone

Comments

@6543
Copy link
Member

6543 commented Aug 3, 2022

similar to the images filter for secrets, add a checkbox to only inject secret if step is exec as plugin.

this ensure only the intended entry-point do get the secrets to handle.

this does help if a plugin is not based from scratch image but do contain an shell that could be used.


bounty: 50$

@6543 6543 added server enhancement improve existing features security labels Aug 3, 2022
@6543 6543 added this to the 1.0.0 milestone Aug 3, 2022
@anbraten
Copy link
Member

I don't see how this could protect secrets? You could just create a plugin (normal docker image) that leaks the secrets, couldn't you?

@lafriks
Copy link
Contributor

lafriks commented Aug 15, 2022

this could be helpful in combination with trusted images ex. currently setting trusted image woodpeckerci/plugin-git you can still use:

image: woodpeckerci/plugin-git
commands:
  - echo ${SECRET}

adding such option would prevent that

@6543
Copy link
Member Author

6543 commented Aug 15, 2022

image: woodpeckerci/plugin-git
commands:
  - echo ${SECRET} | base58

-> it's a trusted image
-> secret is leaked (you just have to decode it again)

I dont like to go more into details what else you could do ... - but It's a open risk (if repo is not gated)!

@6543 6543 changed the title Limit secret access to plugins only [Important] Limit secret access to plugins only Aug 15, 2022
@6543 6543 added the bounty get some rewards if it got resolved label Oct 26, 2022
@6543
Copy link
Member Author

6543 commented Oct 26, 2022

bounty: 50$

6543 pushed a commit that referenced this issue Oct 27, 2022
simmstein pushed a commit to simmstein/woodpecker that referenced this issue Dec 27, 2022
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 server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants