-
-
Notifications
You must be signed in to change notification settings - Fork 385
feat(security): add Trust Tier system for skill security visualization #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This PR introduces a Trust Tier system to help users make informed decisions about skill safety before installing. ## Changes ### New: Trust Tier Utility (`src/lib/trustTier.ts`) - Computes trust level based on VT scan status + publisher GitHub age - Six tiers: verified, clean, pending, suspicious, malicious, unknown - `verified` = clean VT scan + publisher account 30+ days old - `clean` = clean VT scan but publisher is new - Helper functions: `isSafeTier()`, `isWarningTier()`, `isEstablishedPublisher()` ### New: TrustBadge Component (`src/components/TrustBadge.tsx`) - Visual badge showing trust tier with icon + label - Compact mode for skill cards (icon only) - Detailed mode for skill pages (with description + metadata) - Accessible with proper ARIA labels ### New: Trust Tier Styles (`src/styles.css`) - Color-coded badges matching severity (green/blue/yellow/orange/red/gray) - Dark mode support - Hover effects and responsive design ### New: Tests (`src/lib/trustTier.test.ts`) - Comprehensive test coverage for all tier computation logic - Tests for edge cases (missing data, moderation flags, etc.) ## Related Issues - Addresses openclaw#181 (tiered security labels) - Helps with security concerns in openclaw#159, openclaw#154, openclaw#152 ## Usage Example ```tsx import { getTrustTier } from '../lib/trustTier' import { TrustBadge } from '../components/TrustBadge' const tier = getTrustTier(skill, owner, latestVersion) <TrustBadge tier={tier} compact /> ```
|
Someone is attempting to deploy a commit to the Amantus Machina Team on Vercel. A member of the Team first needs to authorize it. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 files reviewed, 3 comments
| if (!vtStatus || vtStatus === 'pending' || vtStatus === 'not_found') { | ||
| return 'pending' | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending vs unknown
getTrustTier treats a missing vtAnalysis.status and vtStatus === 'not_found' as 'pending'. If not_found means “no VT report exists for this hash” (as opposed to “scan queued/in progress”), this will mislabel the tier and potentially mislead users into thinking a scan is running when it isn’t.
Consider mapping not_found to 'unknown' (or a dedicated tier) unless the backend guarantees not_found is a transient pending state.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/lib/trustTier.ts
Line: 124:126
Comment:
**Pending vs unknown**
`getTrustTier` treats a missing `vtAnalysis.status` and `vtStatus === 'not_found'` as `'pending'`. If `not_found` means “no VT report exists for this hash” (as opposed to “scan queued/in progress”), this will mislabel the tier and potentially mislead users into thinking a scan is running when it isn’t.
Consider mapping `not_found` to `'unknown'` (or a dedicated tier) unless the backend guarantees `not_found` is a transient pending state.
How can I resolve this? If you propose a fix, please make it concise.|
Hi maintainers 👋 The Vercel preview deployment requires authorization — could someone approve it when you get a chance? All other checks (Greptile Review, Vercel Agent Review) are passing. Thanks! |
|
Hi @0xRaini , this tiered system does not have a Check this discord message from @orlyjamie: https://discord.com/channels/1456350064065904867/1458861780976795782/1469764301098189040 |
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
| @@ -0,0 +1,183 @@ | |||
| // (remove unused import) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
This PR introduces a Trust Tier system to help users make informed decisions about skill safety before installing. It addresses the need for tiered security labels mentioned in #181.
Changes
New: Trust Tier Utility (
src/lib/trustTier.ts)isSafeTier(),isWarningTier(),isEstablishedPublisher()New: TrustBadge Component (
src/components/TrustBadge.tsx)New: Trust Tier Styles (
src/styles.css)New: Tests (
src/lib/trustTier.test.ts)Related Issues
Usage Example
Next Steps (follow-up PRs)
TrustBadgeintoSkillCard.tsxandSkillDetailPage.tsxTesting
Greptile Overview
Greptile Summary
This PR adds a Trust Tier system for skills: a new
src/lib/trustTier.tsutility to compute tiers from moderation + VirusTotal scan status + publisher GitHub account age, aTrustBadge/TrustBadgeWithDetailsUI component to render the tier, corresponding badge styles insrc/styles.css, and Vitest unit tests covering the tiering logic.The changes are currently self-contained (not yet integrated into pages), but they introduce new CSS and a new public-facing tier computation API intended to be consumed by skill cards/detail pages.
Confidence Score: 3/5
vtStatus === 'not_found'aspendingthat should be confirmed against backend semantics to avoid mislabeling tiers.Context used:
dashboard- AGENTS.md (source)