Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
AdnaneKhan committed Dec 7, 2024
1 parent 275c12b commit b56aa64
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
35 changes: 29 additions & 6 deletions gatox/attack/pwnrequest/steps/cache_poison.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,44 @@


class CachePoison(AttackStep):
""" """
"""Attack template that automates GitHub Actions cache poisoning
after obtaining execution within a default branch workflow.
"""

def __init__(self, payload_path: str):
""" """
"""
"""
self.poison_payload = payload_path

def setup(self, api):
"""
"""
# Check that the files exist

# Prepare the poisoned payload

return True

@AttackStep.require_params("cache_token", "cache_url")
def preflight(self, cache_token=None, cache_url=None):
"""Validates preconditions for executing this step."""

# Check that the cache JWT is valid by trying to read a value from the cache.

# Check that the cache entries we want to write are vacated.

pass

def execute(self, api):
""" """
pass

def handoff(self):
""" """
pass
# If we have a actions: write credential, purge the cache key we want to
# poison with it.

# Confirm successful purge of the cache key.

# Upload the payload to the cache.

# Confirm that we get a 204.

return True
2 changes: 1 addition & 1 deletion gatox/attack/pwnrequest/steps/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ class IssueStep(AttackStep):
GitHub API.
"""

def __init__(self):
def __init__(self, issue_body: str, issue_title: str):
""" """
pass

0 comments on commit b56aa64

Please sign in to comment.