Skip to content

fix(guard): judge the geectl leaves the switch left unguarded - #179

Closed
plusky wants to merge 9 commits into
mainfrom
fix/geectl-guard-gaps
Closed

plusky wants to merge 9 commits into
mainfrom
fix/geectl-guard-gaps

Conversation

@plusky

@plusky plusky commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

request change-review-state, an accept that forwards, a home: source filed straight to Factory, environment logins and a geectl merge inside program text all passed unjudged; an unknown leaf with --live now asks. The one-time config import from the previous client is allowed again (it copies the instance mapping only), and a file-descriptor redirection is no longer taken for a write to the hooks. Still open, listed under Known limits: a bare printenv or set alone in a call, which needs the prefilter and both plugin copies changed together.

…r decline

Accepting or declining a review with --live moves a request just as
request accept and request decline do (osc review accept|decline asked
on the osc side), yet the leaf was missing from the guard's tables and
ran silently. With --live, accepted now goes through the same ownership
check as request accept, declined asks as a decline, and new as a
reopen of someone else's request; a dry run is still not judged.
Leaves missing from the option table were parsed with the global options
only and passed every rule, and any leaf the guard did not know ran with
--live unjudged. The table now lists every leaf geectl 0.3.0 ships (with
the meta, person and prjconf groups); gitea build-comment posts a public
comment and asks as one, gitea cleanup-forks --live deletes forks and
test projects and asks, branch create, meta set and remote
delete-file/lock/unlock are placed for the maintenance-project rule, and
config import-oscrc reads osc's credential file and is refused like any
other credential read. A --live run of a leaf still unknown asks, while
its dry run passes.
geectl takes its logins only from the environment (GEECTL_OBS_PASSWORD,
GEECTL_OBS_APIKEY, GEECTL_GITEA_TOKEN, GEECTL_SCM_TOKEN, each with
_FILE and per-alias variants, and GEECTL_GITEA_SSH_KEY), so a dump of the
environment or an echo of one of those variables shows a secret the
credential-file rules were written to keep out of transcripts. An
environment dump (env or printenv with no command or name, export -p,
declare -x/-p, a bare set), printenv/echo/printf of a login variable,
a read of /proc/<pid>/environ, and a read of the file a *_FILE variable
names (by the variable, or by the literal path the environment maps it
to) are now refused under credential-read. env running a command,
set with options and plain assignments stay allowed.
…ripts

The program-text and Write/Edit rules searched for tea and git-obs PR
merges only, so a python3 -c subprocess, a perl -e system() or a written
script running geectl pull-request merge (or approve, on which the bot
merges a Gitea PR) passed. The line parse cannot tell the reference or
--live there, and agents never merge, so either form is refused on any
reference, as the tea form is.
Builds are native only, and the osc-era guard refused an emulated build
(emulated-build); the geectl switch dropped the rule on the grounds that
geectl refuses a foreign arch itself, while the docstring still promised
the refusal. A local-build build or chroot whose --arch the host does
not run natively is refused again, with the route to a server build, so
the agent learns the rule from the guard rather than from a failed run.
…tself

geectl request accept --live forwards the accepted package to its link
parent unless --no-forward is given, and pull-request merge obs:ID
--live always forwards. The skill's rule is that an accept never
forwards: the forward is a request of its own, filed after
forward-check, where an accepted FIXABLE review can hold it. The option
tables did not list --no-forward and the guard never saw the implicit
forward, so a live accept without --no-forward, and a live merge of an
OBS request, now ask (accept-forwards) on top of the accept's own
judgement; an accept with --no-forward keeps the previous behaviour.
The incoming-approve message and the pull-request docstring now say
what the code does: geectl's approve of a gitea: reference is refused
with or without --commit, git-obs at the reviewed head is the route.
The skill gains a self-migration step that runs it. geectl reads osc's
config itself, keeps only the alias to apiurl mapping, never reads the
password into a value and prints no secret, so the command leaks
nothing the credential rules protect. An agent's own direct read of
osc's config (cat, grep and the rest) stays refused.
A redirection that duplicates a descriptor held in a variable
(exec {diefd}>&2, then >&"$diefd" or >&$diefd) writes no file, but the
guard counted its target as an unplaced write and, in a call naming the
harness files, refused the container launcher as a harness write. >&N
and >&- were already exempt; >&$var is now too. A script's redirection
into the hooks directory is still refused.
geectl's own Factory check lets a filing through when the target
package does not exist yet or Factory records no devel project for it,
and the guard skipped every home: source in its forward judgement, so
request file or refile from a home branch straight to Factory ran
unasked. A package goes to its devel project first, and the static
harness deny that covered Factory targets is going away, so a live
request file/refile from home: to openSUSE:Factory (or a project below
it) is now refused as devel-first. A dry run, and a filing to a devel
project, pass; a devel-project source keeps the forward judgement.
@plusky

plusky commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator Author

Carried in the combined follow-up PR.

@plusky plusky closed this Dec 1, 2026
@plusky
plusky deleted the fix/geectl-guard-gaps branch December 2, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant