Giter VIP home page Giter VIP logo

Comments (3)

zkamvar avatar zkamvar commented on June 14, 2024

Interesting development: The PR action that is run comes from the repository of the requestor.

from sandpaper.

zkamvar avatar zkamvar commented on June 14, 2024

I've confirmed that it is possible for someone to modify a PR action to create bogus artifacts: zkamvar/testme@348d663

What I need is a sentinel action using pull_request_target to get a list of the changed files since that action will run in the base of the repository.

from sandpaper.

zkamvar avatar zkamvar commented on June 14, 2024

Update: Based on the workflow in https://securitylab.github.com/research/github-actions-preventing-pwn-requests, I've created an action that will check that the incoming PR is valid and conditionally run the other steps based on that action: https://github.com/zkamvar/check-valid-pr/

In action, it looks like this:

https://github.com/zkamvar/testme/blob/d81af212590c18ea02756645408effaabf238f50/.github/workflows/comment-pr.yaml#L62-L77

Because it's in the action that's triggered by the completion of another action, we don't have to worry about the action creating bogus artifacts to spoof another pull request that IS valid. That being said, at the moment, it's possible to force the PR to successfully complete the action it will take the outputs and comment on a separate PR if it is still an open PR: zkamvar/testme#23 (comment)

from sandpaper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.