From c338fadd4f1aa68578b8f6127bb0007c9e63c956 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Wed, 10 Apr 2019 19:41:08 -0700 Subject: [PATCH] specify a user for the pipeline step, issue #2651 --- CHANGELOG.md | 9 ++++++++- go.mod | 4 ++-- go.sum | 4 ++++ plugin/secret/encrypted.go | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06ef01b7..d6d7043c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.0.1] +## Unreleased +### Added + +- specify a user for the pipeline step, by [@bradrydzewski](https://github.com/bradrydzewski). [#2651](https://github.com/drone/drone/issues/2651). +- update drone-yaml to version 1.0.7. +- update drone-runtime to version 1.0.5. + +## [1.0.1] - 2019-04-10 ### Added - pass stage environment variables to pipeline steps, by [@bradrydzewski](https://github.com/bradrydzewski). diff --git a/go.mod b/go.mod index 7669dfcf..c664ab3f 100644 --- a/go.mod +++ b/go.mod @@ -16,9 +16,9 @@ require ( github.com/docker/go-connections v0.3.0 github.com/docker/go-units v0.3.3 github.com/drone/drone-go v0.0.0-20190217024616-3e8b71333e59 - github.com/drone/drone-runtime v1.0.4 + github.com/drone/drone-runtime v1.0.5 github.com/drone/drone-ui v0.0.0-20190318215801-d6c3d11a1c3f - github.com/drone/drone-yaml v1.0.6 + github.com/drone/drone-yaml v1.0.7 github.com/drone/envsubst v1.0.1 github.com/drone/go-license v1.0.2 github.com/drone/go-login v1.0.3 diff --git a/go.sum b/go.sum index 002a296a..aeb73f5b 100644 --- a/go.sum +++ b/go.sum @@ -38,6 +38,8 @@ github.com/drone/drone-runtime v1.0.3 h1:0p7ASt0WXbLZRzMOw20e1ahV3YkamRhtZFkm8Uv github.com/drone/drone-runtime v1.0.3/go.mod h1:+osgwGADc/nyl40J0fdsf8Z09bgcBZXvXXnLOY48zYs= github.com/drone/drone-runtime v1.0.4 h1:UdKcFPqh/7tTUE4fKakK2vqEyIaK9pKS3SZLG0EKeSE= github.com/drone/drone-runtime v1.0.4/go.mod h1:+osgwGADc/nyl40J0fdsf8Z09bgcBZXvXXnLOY48zYs= +github.com/drone/drone-runtime v1.0.5 h1:fEdUvKd5+l8BQaPXntjUtSIVLvGWo3Blgb/zrXLKJoM= +github.com/drone/drone-runtime v1.0.5/go.mod h1:+osgwGADc/nyl40J0fdsf8Z09bgcBZXvXXnLOY48zYs= github.com/drone/drone-ui v0.0.0-20190318170755-1ca48466a158 h1:u80WYtaGkKWVmxj1BMX9SukAqTxILzGFIKvY5as9zAc= github.com/drone/drone-ui v0.0.0-20190318170755-1ca48466a158/go.mod h1:NBtVWW7NNJpD9+huMD/5TAE1db2nrEh0i35/9Rf1MPI= github.com/drone/drone-ui v0.0.0-20190318215801-d6c3d11a1c3f h1:yMdZ/2BZFKrfMbWlc0cNH2TCXdC8MsSR0pnu3Dq4UH4= @@ -49,6 +51,8 @@ github.com/drone/drone-yaml v1.0.5 h1:LC74aQhyagrBYFTI3XmLEYNkMpEq4QZSQbwiLGyHrs github.com/drone/drone-yaml v1.0.5/go.mod h1:eM365p3g9M5sroFBTR/najiGrZnd/GiIpWHC2UW8PoI= github.com/drone/drone-yaml v1.0.6 h1:fsuxVXgoxTM9fdQEydEkqHzUgMYKH8M//sqOx4UxsU4= github.com/drone/drone-yaml v1.0.6/go.mod h1:eM365p3g9M5sroFBTR/najiGrZnd/GiIpWHC2UW8PoI= +github.com/drone/drone-yaml v1.0.7 h1:qHUI1HA5v3dOCzHfmvPRQTEXbCx8vnaqwHSStbZO/50= +github.com/drone/drone-yaml v1.0.7/go.mod h1:1yrotgyD94qoYwgWWm71vAMbcw7Zd3gDersjeT9lYAk= github.com/drone/envsubst v1.0.1 h1:NOOStingM2sbBwsIUeQkKUz8ShwCUzmqMxWrpXItfPE= github.com/drone/envsubst v1.0.1/go.mod h1:bkZbnc/2vh1M12Ecn7EYScpI4YGYU0etwLJICOWi8Z0= github.com/drone/go-license v1.0.2 h1:7OwndfYk+Lp/cGHkxe4HUn/Ysrrw3WYH2pnd99yrkok= diff --git a/plugin/secret/encrypted.go b/plugin/secret/encrypted.go index 9f1d54cd..5270fa36 100644 --- a/plugin/secret/encrypted.go +++ b/plugin/secret/encrypted.go @@ -52,7 +52,7 @@ func (c *encrypted) Find(ctx context.Context, in *core.SecretArgs) (*core.Secret // if the build event is a pull request and the source // repository is a fork, the secret is not exposed to // the pipeline, for security reasons. - if in.Repo.Private && + if in.Repo.Private == false && in.Build.Event == core.EventPullRequest && in.Build.Fork != "" { logger.Trace("secret: encrypted: restricted from forks")