-
Notifications
You must be signed in to change notification settings - Fork 35
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
Query Environment Information for Workflow Jobs #119
Comments
This is a good idea! WDYT? |
Are there additional significant details within the protection rules, @AdnaneKhan ? If there are, we should consider representing them as individual nodes; otherwise, I agree we can track them as a Boolean property associated with a Job. Implementing this could be beneficial in reducing false positives. However, if an exploit is indeed present, we will still report it. The information about the protection rules would be used as context for the disclosure process. |
There are 2 information classes that are relevant from an exploitability standpoint:
I think adding it as a node with with the required approvals property to start will allow Raven to better handle future checks or conditions that GitHub adds to environments. |
Also, curious about where in the code it would be best to add the query to the environments API endpoint? Should Raven make the call when it is creating a job from dict and the environment field is present or at the same time it pulls the workflow from the contents API? |
Is your feature request related to a problem? Please describe.
Many workflows that would be vulnerable to pwn requests or injection use a deployment environment with required approvals to protect a job from running. Usually this will manifest as a single job that runs in an environment in the beginning, and all other jobs will depend on that check succeeding.
It is possible to query a list of environments and their rules using the REST API without authentication. By adding this feature it will be possible to update cypher queries to reduce false positives.
Describe the solution you'd like
I'd like to see an
Environment
graph object attached to each job. The environment object should track the environment name and if theprotection_rules
array contains one or more entries of therequired_reviewers
class.Here is an example of a repository that uses deployment environments: https://api.github.com/repos/netflix/mantis/environments
Describe alternatives you've considered
None, this is pretty clear cut because environment gating with required approvals will require manual verification to ensure a detection is not a false positive.
Additional context
Mentioned this in an earlier issue - #111, so this covers adding the environment check.
I'm actually working on implementing this and will have a PR open soon!
The text was updated successfully, but these errors were encountered: