fix: use pull_request_target for integration tests #1035
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relates to:
https://github.com/ai16z/eliza/pull/993/files#r1883351009
https://discord.com/channels/1253563208833433701/1308960830670377070/1317011277155012631
Risks
Medium
There are potential risks with exposing this secret (see: https://nathandavison.com/blog/github-actions-and-the-threat-of-malicious-pull-requests )
Response + Mitigations were provided by GitHub here: https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/
I'd recommend a 'spend limit' on the OpenAI API in question. As well as a plan to quickly revoke the api key if required.
Background
What does this PR do?
Allows OpenAI API Secret Value to be used by pull requests that come from forked repos
What kind of change is this?
Bug fixes
Why are we doing this? Any context or related work?
Allows testing of new code coming from forked repos
Documentation changes needed?
N/A
Testing
Where should a reviewer start?
Review the github docs above.
Unfortunately, this would require landing in
develop
then landing inmain
to work.Detailed testing steps
Trigger an integration test: https://github.com/ai16z/eliza/actions/workflows/integrationTests.yaml