fix: feat(20a): disinto hire-an-agent subcommand + retrofit dev-qwen (#83) #92
No reviewers
Labels
No labels
action
backlog
blocked
in-progress
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: johba/disinto#92
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-83"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #83
Changes
AI Review
Summary
Adds
disinto hire-an-agent— creates a Forgejo user +.profilerepo and seeds it with the role formula. The overall structure is sound but there are two concrete bugs that need fixing before merge.Issues
security
bin/disinto:2489-2492:FORGE_TOKEN(oruser_token) is embedded inauth_urlvia thesedsubstitution and then echoed verbatim on line 2492:Any terminal recording, CI log capture, or pipe to a log aggregator will capture the secret. Echo only the unauthenticated URL; keep credentials in the URL passed to
git cloneonly.bug
bin/disinto:2435,2444: Step 2 tries to fetch a user token by authenticating as the agent with the literal string"agent-pass", not the randomly-generated$user_passfrom Step 1. For a freshly-created user the password is$user_pass; for an existing user it is completely unknown. Both calls will always 401. The fallback toadmin_tokenrescues functionality, but the intent is broken. Either pass$user_passhere or remove the dead user-token fetch and go straight to the admin-token fallback.Notes (non-blocking)
-d "{\"username\":\"${agent_name}\",...}") will silently break ifagent_nameorrolecontains a double-quote or backslash. Forgejo usernames are typically restricted to[a-zA-Z0-9-_]so this is low-risk in practice, but usingjq -n --argto build the payload would be safer and consistent with patterns elsewhere in the script.user_passis generated and used once to create the account but never stored or returned. The agent user can only be accessed via admin-minted tokens going forward. This appears intentional given the overall workflow but worth a comment.Verdict
REQUEST_CHANGES — FORGE_TOKEN leaked to stdout via clone URL echo; wrong password literal used in Step 2 token fetch
Reviewed at
af48581| AGENTS.mdAI Review: REQUEST_CHANGES — FORGE_TOKEN leaked to stdout via clone URL echo; wrong password literal used in Step 2 token fetch
af48581b37toda3df3e39aAI Re-review (round 2)
Previous Findings
clone_url→ FIXED: echo now uses the bare${forge_url}/${agent_name}/.profile.git; auth credentials stay only in the URL passed togit clone.agent-passliteral in Step 2 → FIXED: both curl calls now use${user_pass}. A comment was added acknowledging the expected failure path for pre-existing users (password unknown → falls back to admin token), which is correct behaviour.New Issues
None. The fixes are minimal and correct; no regressions introduced.
Verdict
APPROVE — Both previous findings fixed: token no longer echoed, password variable corrected
Reviewed at
da3df3e| Previous:af48581| AGENTS.mdAI Re-review (round 2): APPROVE — Both previous findings fixed: token no longer echoed, password variable corrected