mirror of
https://github.com/hwchase17/langchain.git
synced 2025-04-28 11:55:21 +00:00
Use pull_request
not pull_request_target
in GitHub Actions. (#139)
`pull_request` runs on the merge commit between the opened PR and the target branch where the PR is to be merged — `master` in this case. This is desirable because that way the new changes get linted and tested. The existing `pull_request_target` specifier causes lint and test to run _on the target branch itself_ (i.e. `master` in this case). That way the new code in the PR doesn't get linted and tested at all. This can also lead to security vulnerabilities, as described in the GitHub docs:  Screenshot from here: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target Link from the screenshot: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
This commit is contained in:
parent
9f223e6ccc
commit
1a95252f00
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@ -1,6 +1,6 @@
|
||||
name: lint
|
||||
|
||||
on: [push, pull_request_target]
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -1,6 +1,6 @@
|
||||
name: test
|
||||
|
||||
on: [push, pull_request_target]
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
Loading…
Reference in New Issue
Block a user