fix: Make lighthouse report actually work#10863
fix: Make lighthouse report actually work#10863AaronDewes wants to merge 2 commits intofacebook:mainfrom
Conversation
Previously, this workflow just checked out the main branch, which caused the report to be pretty useless.
|
Hi @AaronDewes! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
⚡️ Lighthouse report for the deploy preview of this PR
|
slorber
left a comment
There was a problem hiding this comment.
Agree we have a problem, but what you proposes present a vulnerability risk.
TL;DR: Combining pull_request_target workflow trigger with an explicit checkout of an untrusted PR is a dangerous practice that may lead to repository compromise.
https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/
Given your security / hacker background found publicly, I wonder if you did it purposefully or if it's an honest mistake.
|
Hi @slorber. First, I actually found this issue when researching such insecure actions. I've reported a similar security issue in the facebook/lexical repository through your bug bounty program, as well as similar issues in other org's repositories. This PR is by no means a social engineering attempt or similar to introduce a vulnerability. As I am familiar with this issue, I was rather checking if this can be exploited. If you check the file again, it starts with This means the token exposed to this repository has only read access to the repo contents, and can not do anything. There are numerous examples on GitHub of repositories which use similar methods, I can search one and link it here later. |
|
An example from Microsoft would be: https://github.com/Azure/azure-cli-extensions/blob/main/.github/workflows/ProcessCodeReview.yml This checks out "untrusted" code, but the permission settings in the YML make it safe. Please re-open this PR if possible. |
Previously, this workflow just checked out the main branch, which caused the report to be pretty useless.
Pre-flight checklist
Motivation
Test Plan
Test links
Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
Related issues/PRs