mirror of
https://github.com/mblanke/GooseStrike.git
synced 2026-03-01 14:00:21 -05:00
Add roadmap API and mock dashboard
This commit is contained in:
29
app/agents/privesc_agent.py
Normal file
29
app/agents/privesc_agent.py
Normal file
@@ -0,0 +1,29 @@
|
||||
"""Privilege escalation agent."""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Dict
|
||||
|
||||
from .base_agent import AgentResult, BaseAgent
|
||||
|
||||
|
||||
class PrivEscAgent(BaseAgent):
|
||||
name = "privesc"
|
||||
|
||||
def build_prompt(self, context: Dict[str, Any]) -> str:
|
||||
host = context.get("host")
|
||||
findings = context.get("findings", [])
|
||||
lines = ["Suggest legal privilege escalation checks for a lab machine."]
|
||||
if host:
|
||||
lines.append(f"Host: {host}")
|
||||
for finding in findings:
|
||||
lines.append(f"Finding: {finding}")
|
||||
lines.append("Provide checklists only; no exploit payloads.")
|
||||
return "\n".join(lines)
|
||||
|
||||
def parse(self, raw: str) -> Dict[str, Any]:
|
||||
steps = [line.strip() for line in raw.split('\n') if line.strip()]
|
||||
return {"privesc_checks": steps}
|
||||
|
||||
|
||||
def run(context: Dict[str, Any]) -> AgentResult:
|
||||
return PrivEscAgent().run(context)
|
||||
Reference in New Issue
Block a user