# Unable to inject Context variables into workflow initiated from fork

**URL:** <https://discuss.circleci.com/t/unable-to-inject-context-variables-into-workflow-initiated-from-fork/32878>\
**Category:** Bug Reports\
**Tags:** contexts\
**Created:** [October 13, 2019, 7:25pm UTC](https://discuss.circleci.com/t/unable-to-inject-context-variables-into-workflow-initiated-from-fork/32878 "2019-10-13T19:25:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dannyrb](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/dannyrb/32/23383_2.png) [@dannyrb](https://discuss.circleci.com/u/dannyrb)\
**Post date:** [October 13, 2019, 7:25pm UTC](https://discuss.circleci.com/t/unable-to-inject-context-variables-into-workflow-initiated-from-fork/32878/1 "2019-10-13T19:25:54Z")

</div>

I’m not sure where to post this topic, as it could be a bug, or simply my own misunderstanding.

This CircleCI Blog post: [Triggering trusted CI jobs on untrusted forks | CircleCI](https://circleci.com/blog/triggering-trusted-ci-jobs-on-untrusted-forks/)

Ends with this snippet:

> Something new to explore is [CircleCI’s recent announcement of restricted contexts](https://circleci.com/blog/protect-secrets-with-restricted-contexts/) which includes the possibility of injecting secrets into a portion of the workflow graph, triggered by a manual approval step. That could be the foundation for a more convenient and flexible approach to letting reviewers trigger trusted builds.

Is this currently possible, or is the author alluding to a potential future enhancement?

I have a workflow that has:

- Unrestricted jobs
- Manual approval job
- Job with restricted context

However, my job with a restricted context does not spin up with the context’s environment variables if initially triggered from a fork, even if the approver meet’s the restricted context’s requirements.

---

<div class="post-metadata">

**Author:** ![Lalli](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/lalli/32/27292_2.png) [@Lalli](https://discuss.circleci.com/u/Lalli)\
**Post date:** [May 4, 2021, 9:42pm UTC](https://discuss.circleci.com/t/unable-to-inject-context-variables-into-workflow-initiated-from-fork/32878/2 "2021-05-04T21:42:08Z")

</div>

Any updates on this? I would like to use contexts for fork PRs but it doesn’t seem to be working at the moment.

---

<div class="post-metadata">

**Author:** ![yannCI](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/yannci/32/24866_2.png) [@yannCI](https://discuss.circleci.com/u/yannCI)\
**Post date:** [May 4, 2021, 10:47pm UTC](https://discuss.circleci.com/t/unable-to-inject-context-variables-into-workflow-initiated-from-fork/32878/3 "2021-05-04T22:47:29Z")

</div>

Hi @Lalli and welcome to the CircleCI Discuss community!

Is the [“_Pass secrets to builds from forked pull requests_”](https://circleci.com/docs/2.0/oss/#pass-secrets-to-builds-from-forked-pull-requests) feature enabled in your project settings?

---

<div class="post-metadata">

**Author:** ![m7913d](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@m7913d](https://discuss.circleci.com/u/m7913d)\
**Post date:** [November 10, 2024, 11:16pm UTC](https://discuss.circleci.com/t/unable-to-inject-context-variables-into-workflow-initiated-from-fork/32878/4 "2024-11-10T23:16:10Z")

</div>

I encounter the same problem. “Pass secrets to builds from forked pull requests” is not set, as it will expose too many secrets (e.g. read-write deploy keys).

If I read the blog post “_Using context with the Build pull requests from forked repositories_” well, a manual approval step by an authorised user should expose the context to the workflow. However, this doesn’t seem to be the case.
