INNER CODE UNIT · Python

is_risky

Far-Se/tabame · plugins/api-client/main.py:220

def is_risky(method):
    """Heuristic: mutating verb + an active environment whose name suggests production."""
    ln = (STATE.get("activeEnv") or "").lower()
    return (method or "GET").upper() not in ("GET", "HEAD", "OPTIONS") and (
        "prod" in ln or "live" in ln
    )


def env_color(name=None):
    name = name or STATE["activeEnv"]
    return STATE["environments"].get(name, {}).get("color", "#6B7280")


def extract_json_path(body_text, path):
    try:
        data = json.loads(body_text)
    except Exception:
        return None

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…