Skip to content

Add dotsec rm (remove an engagement)#7

Merged
Dxsk merged 2 commits into
mainfrom
feat/dotsec-rm
Jun 10, 2026
Merged

Add dotsec rm (remove an engagement)#7
Dxsk merged 2 commits into
mainfrom
feat/dotsec-rm

Conversation

@Dxsk

@Dxsk Dxsk commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

dotsec rm <target> [--archive] — the destructive counterpart to new/archive/stop.

  • Guards: valid target name (^[a-zA-Z0-9._-]+$, blocks //..), existing workspace, [y/N] confirmation (EOF-safe).
  • --archive tar.gz's the workspace first (via cmd_archive).
  • Stops containers (mitmproxy-<t>, oob-<t>) + kills the Exegol tmux session.
  • Removes the workspace: host rm -rf first, then a throwaway container (docker run --rm … alpine rm -rf) for the root-owned proxy certs (no sudo); falls back to a sudo rm -rf hint if anything remains.
  • Router (rm/remove), usage, completions.

Test Plan

  • make test — 59/59 (3 new: abort keeps workspace, confirm removes it, invalid name refused; via docker stub + host rm)
  • make lint — shellcheck clean
  • Manual: dotsec rm acme on a real engagement with root-owned proxy certs → container-fallback wipes them

@Dxsk Dxsk merged commit 29aff91 into main Jun 10, 2026
4 checks passed
@Dxsk Dxsk deleted the feat/dotsec-rm branch June 10, 2026 20:16
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