Skip to content

Add TruffleHog secret-leak warnings for uploaded skills #2431

@Patrick-Erichsen

Description

@Patrick-Erichsen

Problem

Publishers can accidentally upload live API keys, tokens, private keys, or other credentials inside SKILL.md or bundled skill files. ClawHub currently has artifact security scanning, but leaked secrets need a narrower response: warn the publisher so they can rotate/remove the credential.

This should not become a ClawScan signal, moderation verdict, or install-blocking policy in v1.

Goal

Add async TruffleHog-based secret scanning for uploaded skill versions. When ClawHub detects a likely leaked secret, notify the publisher through owner-facing UI; when the secret is verified/live, also email the publisher so they see it quickly.

For a comparable implementation pattern, Hugging Face added TruffleHog to their automated scanning pipeline for uploaded repository content: https://huggingface.co/blog/trufflesecurity-partnership

Scope

  • Scan uploaded skill version files after publish.
  • Prefer the simplest hosted/API integration with Truffle Security if available.
  • If no suitable hosted async API exists, use the thinnest separate secret-scan worker path.
  • Store only sanitized finding metadata:
    • detector/type
    • verified/unverified status
    • redacted value
    • file path
    • line number when available
    • stable fingerprint/dedupe key
    • checked timestamp
  • Show private warning UI to the skill owner/uploader for detected secrets.
  • Send email notifications for verified/live secrets so publishers are alerted promptly.
  • Do not email on unverified detections in v1, to avoid noisy alerts.
  • Document that detected secrets should be rotated, not just removed from ClawHub.

Non-goals

  • Do not feed TruffleHog findings into ClawScan prompts.
  • Do not change ClawScan verdicts.
  • Do not auto-hide, block installs, or mark skills malicious from this alone.
  • Do not expose raw secrets publicly or privately.
  • Do not email on unverified secrets in v1.
  • Do not include packages/plugins in v1 unless it falls out naturally after skill support.

Proposed implementation notes

  1. Add a separate secretLeakScanJobs/result path rather than reusing securityScanJobs.
  2. On skill publish, enqueue a secret scan for the new skillVersionId.
  3. First investigate Truffle Security options:
    • hosted async scan API for arbitrary artifact files
    • signed URL/file upload scan flow
    • result webhook or polling model
  4. If hosted API is not available, run TruffleHog in a minimal separate scanner path, not inside the ClawScan worker.
  5. Persist sanitized findings on the skill version or in a small child table if findings can grow.
  6. Render owner-only warnings on skill detail/dashboard surfaces.
  7. Add email delivery for verified/live findings only, with dedupe so the same finding does not email repeatedly.

Acceptance criteria

  • Publishing a skill with a test credential fixture produces an owner-visible warning.
  • Publishing a skill with a verified/live test fixture sends an email notification.
  • Publishing a clean skill produces no warning and no email.
  • Unverified findings are visible owner-side but do not send email.
  • Raw secret values are never stored in Convex, logs, diagnostics, emails, or UI.
  • Duplicate scans do not repeatedly email the same finding.
  • TruffleHog findings do not affect ClawScan, moderation status, search visibility, or installability.
  • Re-publishing a fixed version clears the warning for the latest version.
  • Tests cover parsing/sanitization, storage, email gating/dedupe, and owner-only UI visibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.security

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions