Skip to content

Conversation

@mladjan
Copy link

@mladjan mladjan commented Feb 9, 2026

πŸ›‘οΈ Add SClawHub Security Badge Integration

This PR adds optional security badges from SClawHub to ClawHub skill pages, providing AI-powered security analysis alongside the existing VirusTotal integration.


πŸ“‹ What is SClawHub?

SClawHub is a community-driven, open-source security scanner for OpenClaw skills that provides:

  • βœ… Semgrep pattern matching for known vulnerabilities
  • βœ… Claude AI analysis for context-aware security review
  • βœ… Trust scores (0-100) for quick assessment
  • βœ… Detailed reports with findings and remediation guidance
  • βœ… 100% free and open source

Live site: https://sclawhub.com
Source code: https://github.com/mladjan/Sclawhub (MIT Licensed)


🎯 Changes

New Component: SClawHubBadge.tsx

A React component that:

  • Displays trust score badge for scanned skills
  • Non-intrusive: Only renders if skill has been scanned
  • Clickable: Opens full report on sclawhub.com
  • Two variants: Full (detailed) and compact (minimal)
  • Graceful degradation: Works if SClawHub API is down

```tsx
<SClawHubBadge
skill={skill}
ownerHandle={ownerHandle}
variant="full" // or "compact"
/>
```

Integration: SkillDetailPage.tsx

  • Added SClawHub badge below existing skill badges
  • Shows full variant with score and "View Report" link
  • Fully async: doesn't block page render
  • Zero impact if skill not scanned

Documentation: docs/sclawhub-integration.md

Comprehensive guide covering:

  • Integration overview and architecture
  • Trust score explanations
  • API endpoints and responses
  • Developer guide for improving security
  • Opt-out instructions
  • Future enhancement plans

🎨 Example

When viewing a skill that has been scanned on SClawHub:

```
πŸ›‘οΈ Security: 95/100 β†’ View Report
```

Trust score colors:

  • πŸ›‘οΈ 90-100 = Green (Excellent)
  • βœ… 70-89 = Light Green (Good)
  • ⚠️ 50-69 = Yellow (Review needed)
  • 🚨 0-49 = Red (High risk)

Clicking the badge opens the detailed report with:

  • Vulnerability findings by category
  • Severity classifications
  • Remediation recommendations
  • Code patterns detected

πŸ”’ Why This Matters

Defense in Depth

  • VirusTotal: Scans for malware signatures (existing)
  • SClawHub: AI-powered code analysis (new)
  • Together: More comprehensive security coverage

AI-Powered Analysis

  • Understands code intent and context
  • Detects obfuscation and evasion techniques
  • Provides human-readable explanations
  • Learns from OpenClaw-specific patterns

Community Transparency

  • Open source scanner - audit the code
  • Public scan reports - transparent methodology
  • MIT Licensed - community can fork/improve

⚑ Performance & Privacy

Performance

  • Async loading - no page blocking
  • Graceful degradation - works if API is down
  • No loading states - badge only appears when ready
  • External API - zero impact on ClawHub infrastructure

Privacy

  • No tracking - no analytics or cookies
  • Public data only - uses skill owner/slug
  • Opt-in scanning - skills must be submitted
  • Opt-out available - can request removal

API


πŸ§ͺ Testing

Manual Testing

  1. Visit a skill that has been scanned
  2. Badge should appear below skill badges
  3. Click badge β†’ opens report on sclawhub.com
  4. Visit a skill that hasn't been scanned β†’ no badge appears

πŸ”„ Future Enhancements

Planned Features

  • Compact badges in skill listings
  • Filter/sort by trust score
  • Scan status indicators (pending, failed)
  • Historical trust score tracking
  • Automated rescanning on version updates

🀝 For Skill Developers

Getting Your Skill Scanned

  1. Visit https://sclawhub.com/scan
  2. Paste your skill URL or code
  3. Wait for scan (~30 seconds)
  4. Badge automatically appears on ClawHub

Improving Your Score

  • Remove hardcoded secrets - Use environment variables
  • Validate network calls - Document API endpoints
  • Avoid obfuscation - Clear code scores higher
  • Add security comments - Explain sensitive operations

πŸ“ Documentation

Full integration guide: `docs/sclawhub-integration.md`


❓ FAQ

Q: Is this replacing VirusTotal?
A: No! SClawHub is complementary. VirusTotal scans for malware; SClawHub analyzes code patterns.

Q: What if my skill isn't scanned?
A: No badge appears. Skills work normally.

Q: Can I opt out?
A: Yes! Email kondormit@gmail.com with your skill slug.

Q: Who maintains SClawHub?
A: Independent community project by @kondormit. Not affiliated with OpenClaw/ClawHub.

Q: Is SClawHub open source?
A: Yes! MIT Licensed: https://github.com/mladjan/Sclawhub


πŸ™ Feedback Welcome

This is a community contribution to improve OpenClaw ecosystem security. Looking forward to your feedback!

Contact:


Note: SClawHub is an independent project and is not officially affiliated with ClawHub or OpenClaw. This integration is non-intrusive and opt-in for skill scanning.

Greptile Overview

Greptile Summary

This PR introduces an optional SClawHubBadge React component that fetches a skill’s SClawHub security report (/api/skills/{owner}/{slug}) and, if present, renders a trust-score badge linking to the external report. The badge is integrated into SkillDetailPage and new documentation was added under docs/ describing the API/UX and planned extensions.

Confidence Score: 3/5

  • Reasonably safe to merge after fixing the badge fetch/error behavior and a formatting issue.
  • Changes are mostly additive and isolated to a new component plus a small integration point, but the current fetch/error handling can cause the badge to get stuck hidden on transient API failures, and the SkillDetailPage JSX block is mis-indented (likely failing formatting/lint).
  • src/components/SClawHubBadge.tsx, src/components/SkillDetailPage.tsx

(2/5) Greptile learns from your feedback when you react with thumbs up/down!

Context used:

  • Context from dashboard - AGENTS.md (source)

@vercel
Copy link
Contributor

vercel bot commented Feb 9, 2026

Someone is attempting to deploy a commit to the Amantus Machina Team on Vercel.

A member of the Team first needs to authorize it.

@mladjan mladjan marked this pull request as ready for review February 9, 2026 13:10
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment on lines 34 to 43
useEffect(() => {
let cancelled = false
setLoading(true)
setError(false)

// Fetch security report from SClawHub API
fetch(`https://sclawhub.com/api/skills/${skillSlug}`)
.then((res) => {
if (!res.ok) {
throw new Error('Not scanned yet')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Badge never shows

fetch(...).then(res => { if (!res.ok) throw ... }) treats all non-2xx responses as errors and the component returns null when error is set, so if SClawHub returns anything other than 200 (e.g. a transient 500/timeout), the badge will permanently never render for that skill until a re-mount. If the intended behavior is β€œonly hide on 404 (not scanned) but show on other errors once the API recovers”, don’t set a sticky error flag; instead distinguish 404 from retryable failures and allow subsequent renders to re-attempt (or just drop error state entirely and rely on report === null).

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/components/SClawHubBadge.tsx
Line: 34:43

Comment:
**Badge never shows**

`fetch(...).then(res => { if (!res.ok) throw ... })` treats *all* non-2xx responses as errors and the component returns `null` when `error` is set, so if SClawHub returns anything other than 200 (e.g. a transient 500/timeout), the badge will permanently never render for that skill until a re-mount. If the intended behavior is β€œonly hide on 404 (not scanned) but show on other errors once the API recovers”, don’t set a sticky `error` flag; instead distinguish `404` from retryable failures and allow subsequent renders to re-attempt (or just drop `error` state entirely and rely on `report === null`).

How can I resolve this? If you propose a fix, please make it concise.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this! You're absolutely right - the sticky error state would prevent recovery from transient failures.

Fixed in 75b11bc:

  • Now only permanently hides on 404 (skill not scanned)
  • Transient errors (500, timeout) allow retry on next render
  • Removed the sticky error state entirely

Badge will now gracefully handle temporary API issues. πŸŽ‰

Comment on lines 530 to 534
<div className="skill-actions">
{/* SClawHub security badge - shows trust score if skill has been scanned */}
<div style={{ marginTop: '0.5rem' }}>
<SClawHubBadge skill={skill} ownerHandle={ownerHandle} variant="full" />
</div>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid JSX indentation

The new comment + <div> under .skill-actions is mis-indented relative to the surrounding JSX, which will trip the repo’s formatter/linting (Biome) and makes this block render harder to read. Please align it with the other children of <div className="skill-actions">.

Suggested change
<div className="skill-actions">
{/* SClawHub security badge - shows trust score if skill has been scanned */}
<div style={{ marginTop: '0.5rem' }}>
<SClawHubBadge skill={skill} ownerHandle={ownerHandle} variant="full" />
</div>
{/* SClawHub security badge - shows trust score if skill has been scanned */}
<div style={{ marginTop: '0.5rem' }}>
<SClawHubBadge skill={skill} ownerHandle={ownerHandle} variant="full" />
</div>
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/components/SkillDetailPage.tsx
Line: 530:534

Comment:
**Invalid JSX indentation**

The new comment + `<div>` under `.skill-actions` is mis-indented relative to the surrounding JSX, which will trip the repo’s formatter/linting (Biome) and makes this block render harder to read. Please align it with the other children of `<div className="skill-actions">`.

```suggestion
                {/* SClawHub security badge - shows trust score if skill has been scanned */}
                <div style={{ marginTop: '0.5rem' }}>
                  <SClawHubBadge skill={skill} ownerHandle={ownerHandle} variant="full" />
                </div>
```

How can I resolve this? If you propose a fix, please make it concise.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Fixed the indentation in 75b11bc to align with the other children of skill-actions.

Should pass Biome linting now. βœ…

Pablo (OpenClaw Assistant) added 3 commits February 10, 2026 10:43
This PR adds optional security badges from SClawHub (https://sclawhub.com)
to ClawHub skill pages.

SClawHub is a community-driven, open-source security scanner for OpenClaw
skills that provides:
- Semgrep pattern matching for known vulnerabilities
- Claude AI-powered security analysis
- Trust scores (0-100) for quick assessment
- Detailed security reports with remediation guidance

- Displays trust score badge for scanned skills
- Non-intrusive: only shows if skill has been scanned
- Clickable: opens full report on sclawhub.com
- Two variants: full (detailed) and compact (minimal)

- Added SClawHub badge below existing skill badges
- Shows full variant with score and view report link
- Fully async: doesn't block page render
- Graceful degradation: works if SClawHub is down

- Comprehensive integration guide in docs/sclawhub-integration.md
- Explains badge variants, trust scores, API endpoints
- Developer guide for improving security scores
- Opt-out instructions for privacy

βœ… **Non-blocking** - Skills work without SClawHub scans
βœ… **Open source** - Scanner code is public and auditable
βœ… **Free forever** - No costs or subscriptions
βœ… **Complementary** - Works alongside VirusTotal
βœ… **Privacy-friendly** - No tracking or analytics
βœ… **Developer-friendly** - Clear remediation guidance

When viewing a skill that has been scanned:

```
πŸ›‘οΈ Security: 95/100 β†’ View Report
```

Clicking the badge opens the detailed report with:
- Vulnerability findings
- Severity classifications
- Remediation recommendations
- Code patterns detected

While VirusTotal scans for malware signatures, SClawHub adds:
- Context-aware code analysis via AI
- Detection of obfuscation and evasion techniques
- Understanding of OpenClaw-specific security patterns
- Human-readable security explanations

Together, they provide defense in depth for the OpenClaw ecosystem.

- Endpoint: `GET https://sclawhub.com/api/skills/{owner}/{slug}`
- Returns 404 if not scanned (badge doesn't render)
- Async loading: no impact on page performance
- No ClawHub infrastructure dependency

Full scanner code: https://github.com/mladjan/Sclawhub
- MIT Licensed
- Community contributions welcome
- Transparent scan methodology

---

**Note:** SClawHub is an independent community project, not officially
affiliated with ClawHub or OpenClaw. This integration is opt-in and
non-intrusive.
- Badge was incorrectly placed inside the staffVisibilityTag ternary
- Now correctly positioned after the ternary, before skill-actions
- Fixes JSX compilation error
1. Improve error handling in SClawHubBadge:
   - Only permanently hide on 404 (skill not scanned)
   - Allow retries on transient errors (500, timeout)
   - Remove sticky error state to prevent permanent hiding

2. Fix JSX indentation in SkillDetailPage:
   - Align badge div with other skill-actions children
   - Matches Biome formatter requirements

Addresses greptile-apps review comments
@mladjan mladjan force-pushed the feature/sclawhub-security-badges branch from 75b11bc to 02b1836 Compare February 10, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant