# Secret Env Vars and (Generic) File Storage files: control whether it's available in Pull Request builds

**URL:** <https://discuss.bitrise.io/t/secret-env-vars-and-generic-file-storage-files-control-whether-its-available-in-pull-request-builds/718>\
**Category:** Released\
**Tags:** released\
**Created:** [February 9, 2017, 2:08pm UTC](https://discuss.bitrise.io/t/secret-env-vars-and-generic-file-storage-files-control-whether-its-available-in-pull-request-builds/718 "2017-02-09T14:08:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [February 9, 2017, 2:08pm UTC](https://discuss.bitrise.io/t/secret-env-vars-and-generic-file-storage-files-control-whether-its-available-in-pull-request-builds/718/1 "2017-02-09T14:08:19Z")

</div>

_From Guido Marucci Blas on 2016/02/03 15:08:20 +0000_  
  
Currently secret env variables are not available for any PR no matter if it is an internal PR or a PR from a forked repo. I would be nice to have grained control over this and allow secret en variables to be visible for PR from the same repo.  
  
_Copied from original feature request: [http://bitrise.uservoice.com/forums/235233-general/suggestions/11701587-make-secret-env-variables-available-for-prs-from-t](http://bitrise.uservoice.com/forums/235233-general/suggestions/11701587-make-secret-env-variables-available-for-prs-from-t)_

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [February 9, 2017, 2:08pm UTC](https://discuss.bitrise.io/t/secret-env-vars-and-generic-file-storage-files-control-whether-its-available-in-pull-request-builds/718/2 "2017-02-09T14:08:20Z")

</div>

_From James Courtoy on 2016/08/23 18:09:23 +0000_  
  
It would also be nice to allow them for private Github repositories. Perhaps as an option on the Bitrise project that can explicitly enable private vars.

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [February 9, 2017, 2:08pm UTC](https://discuss.bitrise.io/t/secret-env-vars-and-generic-file-storage-files-control-whether-its-available-in-pull-request-builds/718/3 "2017-02-09T14:08:21Z")

</div>

_From Bitrise on 2016/07/11 20:27:26 +0000_  
  
Security note: [https://blog.travis-ci.com/2016-07-07-security-advisory-encrypted-variables](https://blog.travis-ci.com/2016-07-07-security-advisory-encrypted-variables)

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [February 9, 2017, 3:40pm UTC](https://discuss.bitrise.io/t/secret-env-vars-and-generic-file-storage-files-control-whether-its-available-in-pull-request-builds/718/4 "2017-02-09T15:40:01Z")

</div>

I’d say the best would be to have a toggle for this feature, whether you want to expose Secrets for PR builds or not, instead of only supporting it for pull requests from the same repository.

---

<div class="post-metadata">

**Author:** ![steven-at-truemotion](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/steven-at-truemotion/32/418_2.png) [@steven-at-truemotion](https://discuss.bitrise.io/u/steven-at-truemotion)\
**Post date:** [May 5, 2017, 6:29pm UTC](https://discuss.bitrise.io/t/secret-env-vars-and-generic-file-storage-files-control-whether-its-available-in-pull-request-builds/718/5 "2017-05-05T18:29:36Z")

</div>

Might want to make the expose toggle per secret, rather than global. I don’t have a use case, just suggesting that you think about it.

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 5, 2017, 6:38pm UTC](https://discuss.bitrise.io/t/secret-env-vars-and-generic-file-storage-files-control-whether-its-available-in-pull-request-builds/718/6 "2017-05-05T18:38:46Z")

</div>

Thanks for the feedback, I definitely agree 👍

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 12, 2017, 2:53pm UTC](https://discuss.bitrise.io/t/secret-env-vars-and-generic-file-storage-files-control-whether-its-available-in-pull-request-builds/718/7 "2017-05-12T14:53:59Z")

</div>

Note: the same option should be available for Bitrise File Storage download URLs.

Enable/disable whether a specific file should be available for pull request builds.

Defaults: default should be “yes” (expose) for files, and “no” (don’t expose) for secrets - basically how it works today.

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [September 22, 2017, 8:54am UTC](https://discuss.bitrise.io/t/secret-env-vars-and-generic-file-storage-files-control-whether-its-available-in-pull-request-builds/718/8 "2017-09-22T08:54:19Z")

</div>

We’re glad to announce that this feature is now available in production on [bitrise.io](http://bitrise.io) 🎉

Related #Changelog / #announcements :

> [@Secret Env Vars and (Generic) File Storage files: control whether it’s available in Pull Request builds](http://discuss.bitrise.io/t/secret-env-vars-and-generic-file-storage-files-control-whether-it-s-available-in-pull-request-builds/2790):
>
> Related #Feature Requests : [http://discuss.bitrise.io/t/secret-env-vars-and-generic-file-storage-files-control-whether-its-available-in-pull-request-builds/718](http://discuss.bitrise.io/t/secret-env-vars-and-generic-file-storage-files-control-whether-its-available-in-pull-request-builds/718) In short, from now on you can decide which secrets and which files should be exposed for / available in Pull Request builds. The defaults are the same as before, for existing and new Secrets and Files, so if you’re fine with how it worked before this will not change anything. But if you’d need a Secret to be available in a Pull Request b…

Thank you all for your comments and inputs, as wall as for your votes, it helped us a lot to deliver the right feature the right way 🙂

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [October 9, 2017, 4:11pm UTC](https://discuss.bitrise.io/t/secret-env-vars-and-generic-file-storage-files-control-whether-its-available-in-pull-request-builds/718/9 "2017-10-09T16:11:29Z")

</div>

Closed on October 9, 2017, 4:11pm UTC


