T09 · Insecure Skill Coding Practices
- Location
scripts/publish.js:96- Finding
Public post publication is not protected by an executable confirmation gate
- Content
View full analysis
Vulnerability Details
File Location:
scripts/publish.js, lines 96–103 and 154–173
Vulnerability Type: Missing authorization confirmation for a public, identity-bearing action
Risk Level: HighRelevant code:
js async function main() { const [, , htmlPath] = process.argv; if (!htmlPath) { console.error('Usage: node publish.js <html-file-path>'); process.exit(1); } let content = fs.readFileSync(htmlPath, 'utf-8'); console.log(`Content length: ${content.length} chars`); // ... const postData = { type: 'text', content, ...(locInfo ? { lng: locInfo.lng, lat: locInfo.lat, locationName: locInfo.name, isLocationExposed: true, } : { isLocationExposed: false }), }; console.log('\nPublishing...'); try { const post = await publishWithRetry(postData);Technical Analysis
SKILL.mdlines 301–318 require the agent to show the complete post, account, location, images, and preview and then wait for an explicit publish decision. However, this requirement is not enforced bypublish.js.The script accepts only a draft path, loads the authenticated session, uploads referenced local images, and submits the post. It does not require an approval token, a confirmation argument, an interactive prompt, or evidence that the user approved the final content. Consequently, direct invocation bypasses the workflow’s stated authorization boundary.
This is particularly significant because publication is externally visible, occurs under the authenticated user’s identity, and may expose a selected location on the public map.
Attack Path
- The user has a valid PowPow session stored in the configured state directory.
- An agent, automation component, or adversarially influenced caller selects or creates an HTML draft.
- The caller invokes:
bash node scripts/publish.js <html-file-path> - No user-approval artifact is required.
- Ref ...[truncated 573 chars]
- Remediation
View remediation
Remediation Suggestions
Require a code-enforced approval artifact before uploading images or submitting the post:
- Generate a preview containing the final account, content, image manifest, and location.
- Compute a cryptographic digest over the final draft and manifest.
- After explicit user approval, issue a short-lived approval token bound to the digest, authenticated account, and intended operation.
- Make
publish.jsreject requests without a valid token or when the draft has changed after approval. - For direct human CLI use, provide an interactive confirmation that displays the account and public-map consequences.
- Provide a non-mutating
--dry-runmode and ensure image uploads do not occur during dry runs.
