Thanks for helping improve linux-temp-admin.
This project changes system users, sudoers files, SSH keys, and auto-revoke jobs. Keep changes small, auditable, and conservative.
The tool lives in cmd/ and internal/, and ships as a signed static Go binary. The shell in scripts/ is release and install tooling only.
- Read
README.md/README.en.md, the paired user guides underdocs/, andSECURITY.md. - Do not commit real invite bundles, private keys (including the release signing key), hostnames, server IPs,
/etc/shadowdata, orauthorized_keysfrom real systems. - Prefer focused pull requests: one behavior change, hardening fix, or documentation improvement at a time.
Go — requires Go 1.26.5+:
go build ./...
go vet -printf.funcs=printf,errorf,warnf ./...
go vet -tags integration -printf.funcs=printf,errorf,warnf ./...
test -z "$(gofmt -l .)" # gofmt must be clean
go test -count=1 ./...
go test -count=1 -race ./...
sudo -E env "PATH=$PATH" go test -count=1 -p 1 -tags integration ./...
sudo -E env "PATH=$PATH" go test -count=1 -race -p 1 -tags integration ./...
staticcheck ./...
staticcheck -tags integration ./...
govulncheck ./...The integration suites use fixed disposable account names and shared host account
databases. Each command serializes package processes with -p 1; also run the
two commands themselves serially, never concurrently, and only on a disposable
host.
Release/install scripts, if you touch scripts/:
bash -n scripts/*.sh
sh -n scripts/install.sh
python3 -B -m unittest -v scripts/mirror_receiver_test.py
shellcheck -S warning scripts/*.shIf a workflow changes, run actionlint too. Release changes must also exercise invalid version/tag rejection and static linux/amd64 plus linux/arm64 builds.
For changes that touch account creation, revoke, sudoers, systemd timers, or at, also test in a disposable VM/container. Do not test destructive paths on a machine with real users unless you fully understand the impact.
- Keep the tool dependency-light and portable across Debian/Ubuntu, RHEL-compatible systems, Alpine (musl/BusyBox), and Arch where practical. It depends only on the Go stdlib plus
golang.org/x/sys,golang.org/x/crypto, andgolang.org/x/term. - Validate all user-controlled values before using them in paths, shell commands, systemd units, sudoers, or registry records. In Go, never build a shell command string — use
os/execwith an argv slice. - Prefer root-owned temporary files plus atomic rename for managed root files; set owner/mode on the file descriptor and never follow a symlink at the target.
- Do not silently overwrite an existing installed command if doing so could break another registered user's auto-revoke task.
- Keep non-interactive automation explicit: dangerous actions need
--yesplus a specific confirmation value when relevant. - Update both languages of every affected user document when user-facing behavior changes.
- Add or update tests for validation, parsing, quoting, and safety boundary changes.
-
build,vet(with-printf.funcs),gofmt, andtest -racepass; integration tests pass or are unaffected. (scripts/changes: syntax checks, mirror receiver tests, and ShellCheck pass.) - README, affected user-guide pair, and CHANGELOG updated when behavior changes.
- Security-sensitive behavior was tested in a disposable environment or clearly explained.