#544

fix(make): restore the config target and drop stale make connect hints

OpenLuckVdwants to merge intofrom

Description

Fixes #518

make config fails with "No rule to make target 'config'" because PR #493's Makefile rewrite removed the config: target, while the interactive setup script and the container entrypoint still instruct users to run it:

  • scripts/entrypoint.sh:97 — "Please run 'make config' and select OpenRouter option"
  • scripts/entrypoint.sh:110 — "Please run 'make config' and select Anthropic option"
  • scripts/config.sh — generated-config comments "# Generated by make config" (4 places)

The historical config: target (commit aeb3eb6) was a thin wrapper running the interactive scripts/config.sh, which still exists and works. This change restores it.

Additionally, scripts/config.sh printed four hints pointing at make connect, a target that was deliberately removed together with the old Docker workflow in #493 (the current flow is docker-build/docker-login/docker-shell, and the local entry point is make run). Those hints were verified to be broken (make connect → "No rule to make target"). They now point at real targets.

Change

  • Makefile: re-add config: target → ./scripts/config.sh (also added to .PHONY).
  • scripts/config.sh:
    • "After running 'make connect', execute 'claude login' inside the container" → "After running 'make docker-shell', ..." (the in-container entry point).
    • "CCR will be configured automatically when you run 'make connect'" → "... when you start the agent" (CCR is configured by the container entrypoint at agent start; make connect no longer exists).
    • "Run 'make connect' to start PentestGPT" → "Run 'make run TARGET=' to start PentestGPT" (2 places).
  • Leave scripts/entrypoint.sh unchanged: its make config hints are correct again once the target is restored.

Scope note

None — the fix restores a target that existed before PR #493 and corrects stale usage hints. make connect itself is intentionally not restored: it belonged to the deleted Docker workflow (AUTH_MODE-driven docker attach), for which the current equivalents are make docker-shell / make run.

Type of Change

  • 🐛 Bug fix

Related Issue

  • Fixes #518

Testing

  • make -n config → prints ./scripts/config.sh.
  • make config driven with a menu selection exercises the full interactive flow end-to-end (menu renders, selection 2 saves PENTESTGPT_AUTH_MODE=openrouter to .env.auth, completion hints show the new commands). Artifact .env.auth removed after verification.
  • bash -n scripts/config.sh — no syntax errors.
  • git grep -n "make connect" across the repo (Makefile + shell scripts) — no remaining references.
  • Root README intentionally untouched (project rule); tests not affected (shell/Makefile-only change; no Python touched).

Checklist

  • git diff --check origin/main...HEAD passes
  • Changed source files are formatted
  • Targeted tests for the changed packages/components pass (n/a — Makefile + shell script only; interactive flow exercised manually)
  • Diff-scoped lint passes where applicable (shell syntax check)
  • Full-repository checks were run, or any unrelated/environment-dependent failures are documented above
  • Self-reviewed the code
  • Added/updated tests covering the change (n/a — Makefile/shell; no test harness exists for Make targets)
  • Breaking changes are clearly called out in the description above (none)