-
Notifications
You must be signed in to change notification settings - Fork 95
Expand file tree
/
Copy pathtypes.ts
More file actions
123 lines (113 loc) · 2.42 KB
/
types.ts
File metadata and controls
123 lines (113 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
export interface Skill {
id: string;
name: string;
version: string;
description: string;
installCommand: string;
hash: string;
tags: string[];
}
export interface FeedItem {
id: string;
date: string;
severity: 'low' | 'medium' | 'high' | 'critical';
title: string;
description: string;
}
export type AdvisoryType =
| 'malicious_skill'
| 'vulnerable_skill'
| 'prompt_injection'
| 'attack_pattern'
| 'best_practice'
| 'tampering_attempt'
// NVD CVE advisories use normalized weakness names (for example:
// "missing_authentication_for_critical_function", "os_command_injection").
// Keep this open for new categories without requiring type updates.
| string;
// Full advisory type from NVD CVE feed or community reports
export interface Advisory {
id: string;
severity: 'low' | 'medium' | 'high' | 'critical';
type: AdvisoryType;
title: string;
description: string;
affected?: string[];
action: string;
published: string;
references?: string[];
cvss_score?: number | null;
nvd_url?: string;
platforms?: string[];
// Community report fields (source defaults to "Prompt Security Staff" when absent)
source?: string;
github_issue_url?: string;
reporter?: {
agent_name?: string;
opener_type?: 'human' | 'agent';
};
}
export interface AdvisoryFeed {
version: string;
updated: string;
description: string;
advisories: Advisory[];
}
export interface NavItem {
label: string;
path: string;
external?: boolean;
}
// Multi-skill distribution types
export interface SkillMetadata {
id: string;
name: string;
version: string;
description: string;
emoji: string;
category: string;
tag: string;
}
export interface SkillsIndex {
version: string;
updated: string;
skills: SkillMetadata[];
}
export interface SkillChecksums {
skill: string;
version: string;
generated_at: string;
repository: string;
tag: string;
files: Record<string, {
sha256: string;
size: number;
path?: string;
url: string;
}>;
}
export interface SkillJson {
name: string;
version: string;
description: string;
author: string;
license: string;
homepage: string;
keywords: string[];
sbom: {
files: Array<{
path: string;
required: boolean;
description: string;
}>;
};
openclaw: {
emoji: string;
category: string;
feed_url?: string;
requires?: {
bins?: string[];
};
triggers: string[];
};
}