an atomdrift project
Hostile 99% python Download

local-operator 0.111.7

“A team of proactive AI assistants that can work together behind the scenes to help you get mundane tasks done so you can focus on the fun s…”

Agent skill exfiltrates environment secretsMarker condition restarts server services

Evidence

imports os resolve.py · lines 31–78
31:45… less.
32"""
33
34from __future__ import annotations
35
36import dataclasses
37import fnmatch
38import itertools
39import os
40import re
41import shutil
42import stat
43import sys
44from collections.abc import Callable, Mapping, Sequence
45from contextvars import ContextVar
46from dataclasses import dataclass, field
47
48from local_operator.tools.search_guard import (
49 _DURATION_RE,
50 _MAX_PEEL_DEPTH,
51 _SHELL_C_WORDS,
52 _WRAPPER_LONG_VALUE_FLAGS,
53 _WRAPPER_OWN_LONG_VALUE_FLAGS,
54 _WRAPPER_VALUE_FLAGS,
55 HEREDOC_UNREADABLE,
56 WRAPPER_WORDS,
57 _unquote,
58 heredoc_opener,
59 lex,
60)
61
62
63
64
65
66
67_CONTAINED_PROGRAMS = frozenset({"date", "gdate", "uuidgen", "hostname", "whoami", "id"})
68
69
70
71
72
73_CONTAINED_PROGRAM_PATHS = frozenset(
74 f"{prefix}/{program}"
75 for prefix in ("/bin", "/usr/bin", "/usr/local/bin", "/opt/homebrew/bin")
76 for program in _CONTAINED_PROGRAMS
77)
78
Python for-range-over-len(X) loop resolve.py · lines 333–343
333:79… one.
334
335 Depth-counted so a subscript (``$[a[1]<<2]``) stays inside the span.
336 """
337 depth = 1
338 for j in range(i, len(text)):
339 if text[j] == "[":
340 depth += 1
341 elif text[j] == "]":
342 depth -= 1
343 if de …
Shell recursively deletes the home directory resolve.py · lines 3678–3683
3678:63… tarts in a piece.
3679
3680 WHY (review R1, PR #4188): :func:`lex` splits on ``;``/newlines only, so
3681 ``{ f(){ rm -rf ~; }; f; }`` yields the piece ``{ f(){ rm -rf ~`` and an
3682 anchored header match never registered the body: the call inlined nothing
3683 and ranked LOW. The definition may follow lead words (` …
Marker condition restarts server services doctor.py · lines 516–528
516:56… parts[:-1])
517 if _unit_main_pid(unit, user=user) != pid:
518 return None
519 if user:
520 return f"systemctl --user restart {unit}"
521 return f"sudo systemctl restart {unit}"
522 return None
⋯6 lines
Inline getattr on concatenated string literals deadline_http.py · lines 147–153
147:3… }
148 proxy = httpx.Proxy(proxy_url)
149 options["proxy_" + "auth"] = getattr(proxy, "raw_" + "auth")
150 if proxy.url.scheme in {"socks5", "socks5h"}:
151 pool = httpcore.SOCKSProxy(proxy_url=str(proxy.url), **options)
152 else:
153 pool = htt …

Showing the top 5 files — 6 more files (204 regions) not shown.

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.