T01 · Skill Instruction Hijacking
- Location
scripts/council.py:35- Finding
Automatic Prompt Transformation to Bypass Model Safety Refusals
- Content
View full analysis
str: """ If model is known-censored, wrap prompt with the stored technique. Returns original prompt if model is clean/unknown. """ profile = profiles.get(model_id) if not profile: return prompt if profile.get("status") != "censored": return prompt technique_name = profile.get("technique") if not technique_name: return prompt try: from probe import TECHNIQUES, apply_technique technique = next((t for t in TECHNIQUES if t["name"] == technique_name), None) if technique: return apply_technique(prompt, technique) except ImportError: pass return prompt async def _ensure_model_profiled(model_id: str): """Probe model if not yet in profiles (non-blocking best-effort).""" if not _god_mode_available: return try: from probe import probe_model, load_profiles, save_profiles profiles = load_profiles() if model_id not in profiles: print(f" 🔍 New model detected — running god-mode probe: {model_id}") result = await probe_model(model_id, verbose=False) profiles[model_id] = result save_profiles(profiles) status = result.get("status", "?") technique = result.get("technique") or "none" print(f" 📋 Profile saved: {model_id} → {status} (technique: {technique})") except Exception as e: print(f" ⚠️ Probe skipped for {model_id}: {e}") ``` The transformed prompt is subsequently submitted to the local inference API: ```python # Auto-probe model if not yet profiled await _ensure_model_profiled(mod ...[truncated 3571 chars]- Remediation
View remediation
