T09 · Insecure Skill Coding Practices
Error
- Location
- scripts/create-guiro.sh:55
- Finding
- Arbitrary User Data Is Published Through an Unauthenticated Public Share Link Without Disclosure Safeguards<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:18-22, 64-72, 165-177`; `scripts/create-guiro.sh:55-57, 76-82` **Vulnerability Type**: Uncontrolled disclosure of potentially sensitive user data to a third-party public-sharing service **Risk Level**: High ### Complete Code Snippets From `SKILL.md`: ```markdown **Guiro** (<https://guiro.io>) is an ephemeral Presentation Layer as a Service. You give it a structured JSON bundle describing a layout of visual components, and it returns a short-lived, publicly accessible share link (e.g. `https://guiro.io/s/{slug}`). The rendered page is a polished, read-only visual — a dashboard, report, chart, calendar, or status page. No login or account is needed to view it. Use this skill whenever you produce structured results — metrics, tables, timelines, financial data, event schedules, progress tracking — and want to turn them into a shareable visual artifact the user can open in a browser, send to a colleague, or print to PDF. ``` ```markdown # 2 – Write a sample payload (dashboard | calendar | chart | donut) bash "{baseDir}/scripts/write-sample-payload.sh" ./payload.json dashboard # 3 – Validate and create the guiro bash "{baseDir}/scripts/create-guiro.sh" --payload ./payload.json --idempotency-key run-001 ``` ```markdown The sample payloads are starting points. Replace the placeholder content with real data relevant to the user's request. ``` ```markdown Share the `url` with the user. Guiros are ephemeral — after `expires_at`, the link shows a standardized "This Guiro has Expired" page. ``` From `scripts/create-guiro.sh`: ```bash AUTH_HEADERS=(-H "X-API-Key: ${API_KEY}") validate_response="$(curl -sS -X POST "${API_ORIGIN}/v1/validate" "${AUTH_HEADERS[@]}" -H "Content-Type: application/json" --data-binary "@${PAYLOAD_FILE}")" ``` ```bash create_cmd=(curl -sS -X POST "${API_ORIGIN}/v1/create" "${AUTH_HEADERS[@]}" -H "Content-Type: application/json" --data-binary "@${PAYLOAD_FILE}") if [ -n "${IDEM ...[truncated 2417 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Require explicit user confirmation immediately before uploading non-sample payloads, clearly stating: - The destination domain. - That the data is being sent to a third party. - That the resulting link is publicly accessible without login. - The expected expiration time. 2. Add local pre-upload checks for common sensitive values: - API keys, tokens, passwords, private keys, and connection strings. - Email addresses, phone numbers, government identifiers, and payment data. - Fields commonly named `secret`, `password`, `token`, `authorization`, or `api_key`. 3. Reject detected credentials by default and require deliberate override for other potentially sensitive categories. 4. Present a payload summary or redacted preview before transmission, including the file path, byte size, top-level fields, and destination endpoints. 5. Add payload size and schema restrictions so that the command cannot be used as an unrestricted arbitrary-file uploader. 6. Prefer private or authenticated share links when the service supports them. Otherwise, clearly label every returned URL as public. 7. Add revocation support and expose the exact expiry time to the user. 8. Document the third party's retention, validation-request handling, link entropy, access controls, and privacy policy. ]]>
