Engine messages hard-code CLI flag names; give them structured codes instead
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- go
- Domain
- backend-api-design, cli
Research direction
Start by reading the message strings in internal/scan/runner.go, options.go, scope.go, verdict.go, internal/dns/resolver.go and transport.go, then inspect the rewrite tables in pkg/subenum/subenum.go and their tests. The issue allows either structured codes and settings or neutral setting names, but replacing message parsing across engine and front ends is broad design work. Done means no engine message hard-codes CLI flags and the CLI, TUI and pkg/subenum each present settings in their own terms without parsing message text.
Written by the indexing model from the issue text.
Description
Why it matters
Engine messages name command-line flags ("Use -force to scan anyway", "set -max-queries or -force", "concurrency (-t) must be at least 1"). That reads well in the CLI but is wrong anywhere else: the TUI has form fields, and pkg/subenum callers have Config fields, not flags.
Evidence
- About 40 flag references in message strings across
internal/scan/runner.go,options.go,scope.go,verdict.goandinternal/dns/resolver.go,transport.go. pkg/subenumworks around this with a regexp that rewrites-flagto the matchingConfigfield (flagFieldsandfieldNamesinpkg/subenum/subenum.go). It works and is tested, but a new message that names a flag missing from the table gets through unchanged.
Suggested approach
- Give events and validation errors a structured part: a code such as
wildcard_refusedorcap_reached, and the setting involved (force,max_queries). Each front end then writes its own wording. - Or, as a smaller step, have the engine refer to settings by neutral names and let each front end map them.
- Delete the regexp rewrite in
pkg/subenumonce the engine no longer writes flag names.
Done when
No engine message hard-codes a CLI flag, and the CLI, the TUI and pkg/subenum each name settings in their own terms without parsing message text.
- Dominant language
- Go
- Stars
- 1
- Forks
- 1
- Avg merge
- 5d 2h
- Merged PRs (30d)
- 3
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from TMHSDigital/subenum
-
area: cli enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
TMHSDigital/subenum#136 ·
Maintainers usually reply within 1 day
-
community documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
TMHSDigital/subenum#135 ·
Maintainers usually reply within 1 day
-
area: dns enhancement good first issue
Difficulty 2/5 Under an hour Newbie friendliness 90/100
TMHSDigital/subenum#134 ·
Maintainers usually reply within 1 day
-
community marketing priority: low
Difficulty 5/5 Over a week Newbie friendliness 35/100
TMHSDigital/subenum#132 · 1 comment ·
Maintainers usually reply within 1 day
-
feature priority: low
Difficulty 5/5 Over a week Newbie friendliness 35/100
TMHSDigital/subenum#131 ·
Maintainers usually reply within 1 day
All issues in TMHSDigital/subenum
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
evilmartians/lefthook#1588 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
kubernetes-sigs/kubebuilder#6084 ·
Maintainers usually reply within 3 days
-
agent-research-recommend agent-review-finding chore
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
jordansmall/spindrift#4821 · 1 comment ·
Maintainers usually reply within 1 day
-
area:web
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
praetorianer777/GoTome#178 ·
Maintainers usually reply within 1 day