
Security News
PyPI Expands Trusted Publishing to GitLab Self-Managed as Adoption Passes 25 Percent
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads
Core business logic and state management for the wish penetration testing support system.
wish-core provides the central business logic, state management, and event processing capabilities for wish. It acts as the coordination layer between the AI components, tools, and user interface.
# Install dependencies in development environment
uv sync --dev
# Install as package (future release)
pip install wish-core
from wish_core import StateManager, EventBus, JobManager
from wish_models import EngagementState, SessionMetadata
# Initialize core components
state_manager = StateManager()
event_bus = EventBus()
job_manager = JobManager()
# Create and manage engagement state
session = SessionMetadata(engagement_name="Example Pentest")
engagement = EngagementState(name="Internal Network Assessment", session_metadata=session)
state_manager.set_engagement(engagement)
# Subscribe to events
@event_bus.subscribe("host.discovered")
async def on_host_discovered(event):
print(f"New host discovered: {event.data['ip_address']}")
# Execute tools asynchronously
job = await job_manager.execute_tool(
tool_name="nmap",
command="nmap -sS -p- 192.168.1.0/24",
callback=lambda result: process_nmap_results(result)
)
# Monitor job progress
status = await job_manager.get_job_status(job.id)
print(f"Job {job.id} status: {status}")
Manages the central engagement state and provides thread-safe access to shared data.
from wish_core import StateManager
manager = StateManager()
# Get current state
state = manager.get_current_state()
# Update specific parts
manager.update_hosts(new_hosts)
manager.add_finding(finding)
# Transaction support
with manager.transaction():
manager.update_hosts(hosts)
manager.update_services(services)
Provides event-driven communication between components.
from wish_core import EventBus
bus = EventBus()
# Subscribe to events
@bus.subscribe("tool.completed")
async def handle_tool_completion(event):
print(f"Tool {event.data['tool']} completed")
# Publish events
await bus.publish("scan.started", {"target": "192.168.1.0/24"})
Handles asynchronous execution of tools and long-running operations.
from wish_core import JobManager
job_manager = JobManager()
# Execute tool
job = await job_manager.execute_tool(
tool_name="nikto",
command="nikto -h http://target.com",
timeout=300
)
# Check status
status = await job_manager.get_job_status(job.id)
# Cancel job
await job_manager.cancel_job(job.id)
# Run all tests
uv run pytest
# Run with coverage
uv run pytest --cov=src --cov-report=html
# Run specific test file
uv run pytest tests/test_state_manager.py
# Run with verbose output
uv run pytest -v
# Run linting
uv run ruff check src/ tests/
# Format code
uv run ruff format src/ tests/
# Type checking
uv run mypy src/
packages/wish-core/
├── src/wish_core/
│ ├── __init__.py # Package exports
│ ├── state_manager.py # State management
│ ├── event_bus.py # Event system
│ ├── job_manager.py # Job execution
│ ├── workflow/ # Workflow management
│ │ ├── __init__.py
│ │ └── coordinator.py
│ └── utils/ # Utility functions
│ ├── __init__.py
│ └── threading.py
├── tests/
│ ├── test_state_manager.py
│ ├── test_event_bus.py
│ ├── test_job_manager.py
│ └── test_workflow.py
└── README.md
get_current_state(): Get the current engagement stateset_engagement(engagement): Set a new engagementupdate_hosts(hosts): Update host informationadd_finding(finding): Add a new findingtransaction(): Context manager for atomic updatessubscribe(event_type, handler): Subscribe to an event typeunsubscribe(event_type, handler): Unsubscribe from eventspublish(event_type, data): Publish an eventclear(): Clear all subscriptionsexecute_tool(tool_name, command, **kwargs): Execute a toolget_job_status(job_id): Get job statuscancel_job(job_id): Cancel a running jobget_job_logs(job_id): Get job output logslist_active_jobs(): List all active jobsThis project is published under [appropriate license].
wish-models: Core data models and validationwish-ai: AI-driven inference enginewish-tools: Pentest tool integrationwish-knowledge: Knowledge base managementwish-c2: C2 server integrationwish-cli: Command line interfaceIf you have issues or questions, you can get support through:
FAQs
Business logic and state management for wish
We found that wish-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.