-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
Injecting netrc credentials into non-trusted containers does not work #2583
Comments
Diving deeper, I think the issue is that the "Only inject netrc credentials into trusted containers" option actually is limited to "trusted pipelines" or "trusted plugins" and "trusted clone images" but never applies to arbitrary steps and/or images.. woodpecker/pipeline/frontend/yaml/compiler/compiler.go Lines 189 to 194 in 05f96ab
Should the restriction to "trusted plugins" and "trusted clone images" be removed? I don't see why only these should be whitelisted if the repo owner actively deactivated the "Only inject netrc credentials into trusted containers" option. |
It might be that there only a minor modification to the if-clause needed (see PR) which currently prevents the injection into untrusted containers. |
As of now this is intentional and by default it should stay so, so enabling this behaviour a 'normal' repo admin should not be able to change only instance admins ... |
Closing as not planned -> description in UI updated in #4342. |
Component
agent
Describe the bug
By default netrc credentials (i.e. git credentials) are not injected into builds unless
However, the latter does not work as executing a "git push" back to the checked out repo does not work when the option is unchecked.
It only works if the repo is set to "trusted" - which cannot be enabled by a normal user.
Showcasing this in an example repo is hard as normal users cannot open the settings of a repo.
I've tested this multiple times in an example repo toggling different options on and off and running a simple
git push
at the end (after a dummy modification).Also I think the current docs are wrong
I think it should read as:
"By default, they're only injected if this option is enabled and the repo is trusted - or if the "inject" option is unchecked."
Also "git credentials will be injected into any container in clone step" -> should probably be "into any container in addition to the 'clone' step".
System Info
`next-8629a418f8`
Additional context
No response
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]The text was updated successfully, but these errors were encountered: