T09 · Insecure Skill Coding Practices
- Location
scripts/rentahuman.mjs:184- Finding
Authenticated bounty creation bypasses the documented preview and confirmation gate
- Content
View full analysis
Vulnerability Details
File Location:
scripts/rentahuman.mjs:184-195
Supporting Locations:SKILL.md:26-30,SKILL.md:82-86,references/API.md:325
Vulnerability Type: Missing authorization confirmation for a financial action
Risk Level: HighVulnerable Code
scripts/rentahuman.mjs:184-195:javascript async 'create-bounty'(args) { const params = JSON.parse(args[0]); const id = loadIdentity(); const verification = agentVerification(id, 'create_bounty'); const body = { ...params, agentType: params.agentType || 'other', agentId: id.agentId, agentVerification: verification, }; console.log(JSON.stringify(await authPost('/bounties', body), null, 2)); },The primary invocation documented at
SKILL.md:26-30also omits a preview or confirmation step:markdown ### 2. Post a bounty (requires API key) ```bash RENTAHUMAN_API_KEY=rah_your_key node {baseDir}/scripts/rentahuman.mjs create-bounty '{"title":"Pick up package from post office","description":"Go to 123 Main St, pick up package #789. Must have valid ID.","priceType":"fixed","price":35,"estimatedHours":1}'text In contrast, `references/API.md:325` explicitly requires the following workflow: ```markdown **IMPORTANT: Always call with dryRun=true first** to preview the bounty. A preview never creates a bounty, reserves funds, or starts a checkout. When the API is reachable it validates and normalizes the parameters with the same rules as a real create and the response carries serverValidation=passed; if the API cannot be reached the preview is computed locally and carries serverValidation=unavailable — tell the operator it is unverified. Dry-run `preview.fundingTotal` is the total funding requirement before any existing wallet balance is applied. Show that estimate to the operator before posting. Show the preview to the user and ask 'Here's your bounty — would you like to edit anythi ...[truncated 2966 chars]- Remediation
View remediation
Remediation Suggestions
- Change
create-bountyso its first invocation always forcesdryRun: true, regardless of the supplied JSON. - Display the server-normalized bounty details and
preview.fundingTotalto the user before allowing creation. - Require a separate, explicit confirmation invocation before sending
dryRun: false. Prefer a short-lived, server-issued preview identifier bound to the normalized parameters and authenticated account. - Reject direct creation when no valid preview identifier or explicit confirmation proof is present.
- Ensure confirmation is invalidated whenever financially relevant fields change, including
price,priceType,estimatedHours, orspotsAvailable. - Add an idempotency key to confirmed creation requests to prevent duplicate commitments caused by retries.
- Update every
SKILL.mdbounty example to show the complete two-stage workflow: preview, display of the total, explicit user approval, and final creation. - Add automated tests proving that direct creation, changed parameters after preview, and creation without confirmation are rejected.
- Change
