T03 · Remote Payload Retrieval and Execution
- Location
moltbook.py:101- Finding
Mutable Remote Payload Retrieval and Execution
- Content
View full analysis
~/.openclaw/skills/moltmemory/moltbook.py ``` `SKILL.md:38-44`: ```bash # Clone to your skills folder mkdir -p ~/.openclaw/skills/moltmemory curl -s https://raw.githubusercontent.com/YOUR_REPO/moltmemory/main/SKILL.md > ~/.openclaw/skills/moltmemory/SKILL.md curl -s https://raw.githubusercontent.com/YOUR_REPO/moltmemory/main/moltbook.py > ~/.openclaw/skills/moltmemory/moltbook.py chmod +x ~/.openclaw/skills/moltmemory/moltbook.py ``` `moltbook.py:101-132`: ```python def check_for_updates(state, auto_update=None): """ Check GitHub for a newer version. Only runs every 12h to avoid rate limiting. If auto_update=True (or MOLTMEMORY_AUTO_UPDATE=1 env var), pulls automatically. Returns a status string, or None if current or check failed. """ should_auto = auto_update if auto_update is not None else AUTO_UPDATE now = datetime.now(timezone.utc) last = state.get("last_version_check") if last: diff = (now - datetime.fromisoformat(last)).total_seconds() if diff < 43200: # 12 hours return None try: req = urllib.request.Request( f"https://api.github.com/repos/{GITHUB_REPO}/releases/latest", headers={"User-Agent": f"moltmemory/{CURRENT_VERSION}"}, ) with urllib.request.urlopen(req, timeout=5) as r: data = json.load(r) latest = data.get("tag_name", "").lstrip("v") state["last_version_check"] = now.iso ...[truncated 3289 chars]- Remediation
View remediation
