Skip to content

Conversation

@AdnaneKhan
Copy link
Owner

Pull Request Overview

As of December 8th pull requests to non-default branches use workflows from the default branch. As a result, the "Non Default Branch Pwn Request" no longer exists as a vulnerability class. This PR removes code related to it.

What does this PR add/solve?

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Security enhancement
  • CI/CD improvement

Areas affected

  • Enumeration functionality
  • Attack/Exploitation features
  • GitHub API integration
  • Workflow analysis
  • Runner detection
  • MCP Server
  • CLI/User interface
  • Documentation
  • Tests
  • Configuration

Testing Steps

Manual Testing

Automated Testing

  • All existing unit tests pass
  • New unit tests added for new functionality
  • Integration tests updated/added if applicable
  • Code coverage maintained or improved

Testing Commands

# Add specific commands to test this PR
# Example:
# python -m pytest unit_test/test_new_feature.py
# python -m gatox enumerate --help

Security Considerations

  • This change does not introduce new security risks
  • This change has been reviewed for potential security vulnerabilities
  • This change improves existing security measures
  • N/A - No security implications

Documentation

  • Code changes are documented with appropriate comments
  • Public API changes are documented
  • README.md updated if needed
  • Documentation site updated if needed (docs/ folder)
  • CHANGELOG.md updated if applicable

Checklist

  • My code follows the project's coding style and conventions
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

Screenshots (if applicable)

Performance Impact

Breaking Changes

Related Issues/PRs

Closes #
Related to #

@AdnaneKhan AdnaneKhan marked this pull request as ready for review January 2, 2026 19:51
Copilot AI review requested due to automatic review settings January 2, 2026 19:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the deep-dive enumeration functionality for non-default branch pwn requests in response to a GitHub platform change from December 8th, 2024. Since pull requests to non-default branches now use workflows from the default branch, the "Non Default Branch Pwn Request" vulnerability class is obsolete.

Key Changes:

  • Removed the --deep-dive CLI flag and associated enumeration logic that analyzed workflows in non-default branches
  • Removed the --pwn-request persistence attack technique that created malicious workflows on non-default branches
  • Simplified the Workflow model by removing the non_default parameter, now using only default_branch

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.

Show a summary per file
File Description
unit_test/test_ingest_non_default.py Deleted entire test file for non-default branch ingestion functionality
unit_test/test_cli.py Removed deep_dive=False parameter from test
unit_test/test_app_enum.py Removed deep_dive=True parameter and assertion from test
unit_test/persistence/test_persistence_attack.py Removed unused import and tests for pwn-request workflow creation
gatox/models/workflow.py Removed non_default parameter and simplified branch assignment logic
gatox/mcp/mcp_server.py Removed deep_dive field from MCP authentication parameters
gatox/github/api.py Changed parameter name from non_default=ref to default_branch=ref
gatox/git/git.py Removed get_non_default() method and unused Workflow import
gatox/enumerate/finegrained_enumeration.py Removed deep_dive parameter from constructor and docstring
gatox/enumerate/enumerate.py Removed deep-dive logic, IngestNonDefault imports, and related parameters
gatox/enumerate/deep_dive/ingest_non_default.py Deleted entire class handling non-default branch ingestion
gatox/enumerate/app_enumerate.py Removed deep_dive parameter from app enumeration
gatox/cli/persistence/config.py Removed --pwn-request and --branch-name CLI arguments
gatox/cli/enumeration/config.py Removed --deep-dive CLI argument
gatox/cli/cli.py Removed deep_dive parameter passing and pwn-request handling
gatox/cli/app/config.py Removed --deep-dive argument from app command
gatox/attack/persistence/persistence_attack.py Removed create_pwn_request_workflow() method and Payloads import
gatox/attack/payloads/payloads.py Removed PWN_REQUEST_WORKFLOW payload template
docs/user-guide/use-cases/scanning.md Removed deep-dive analysis section from documentation
docs/user-guide/concepts/workflows.md Removed reference to non-default branch analysis
docs/user-guide/command-reference/enumerate.md Removed --deep-dive option documentation and examples
docs/user-guide/advanced/continuous-scanning.md Removed deep-dive mode references from scanning options

The changes are comprehensive and consistently remove all references to the obsolete functionality across the codebase, tests, and documentation. No issues were identified in the modified files.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AdnaneKhan AdnaneKhan merged commit afb4f70 into main Jan 2, 2026
9 checks passed
@AdnaneKhan AdnaneKhan deleted the update/remove-deep-dive branch January 2, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants