-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[Resolver] Support custom env vars for Openhands agents #5156
base: main
Are you sure you want to change the base?
Conversation
This reverts commit 87d5133.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please document this functionality?
Also, what do you mean by "the downside is all secrets are passed to the reusable workflow"? I thought that only ones that start with OPENHANDS_ENV are passed.
Got it will update this PR with documentation.
The changes introduced in Ideally, the filtering is performed inside Now that I think about it, this PR doesn't address the fact that the resolver has access to ALL repo secrets at some point (either in the example or reusable workflow). It would make sense to migrate to using environment secrets. This will ensure |
Correction: environment secrets don't solve the problem of guaranteeing If the user doesn't want Thus, it also doesn't matter whether we process I believe the approach on this PR should suffice; will update with documentation shortly |
End-user friendly description of the problem this fixes or functionality that this introduces
Give a summary of what the PR does, explaining any non-trivial design decisions
This PR allows users to pass custom env variables to the openhands runtime. This is tough to achieve in Github actions natively as Github doesn't allow for dynamic manipulation of secrets. How this PR works -
OPENHANDS_ENV_
OPENHANDS_ENV_
and replaced withSANDBOX_ENV_
(this allows openhands agents to have access to env vars in its runtime)Pros/Cons
This is quite simple for the user to setup. The downside is ALL secrets are passed to the reusable workflow, which isn't ideal in terms of granularity.
Sample Test
Issue addressed
- This issue requires openhands to run an api with the custom env variable. Openhands would fail unless the env var exists in its runtime.
Workflow logs
Alternative approaches
1: Filter before sending
env job
")env job
would pass the encrypted value (through its output, which makes the encrypted value visible) to the job which invokes the reusable workflowOpenhands
We need an encryption scheme as github actions don't support a native way to pass secrets between jobs (and filtering secrets cannot be performed inside the job calling the reusable workflow).
I'm thinking symmetric key encryption using GNU Privacy Guard would work to achieve this. The user would need to perform just one additional step to setup a
PASSPHRASE
in their repo secrets.2: Key store
Add support for custom env vars via integrations to external key stores. For example, AWS Secrets Key manager.
Link of any specific issues this addresses
#5132