skill-sentinel 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- skill_sentinel-0.1.0/.gitignore +21 -0
- skill_sentinel-0.1.0/LICENSE +191 -0
- skill_sentinel-0.1.0/PKG-INFO +302 -0
- skill_sentinel-0.1.0/README.md +280 -0
- skill_sentinel-0.1.0/pyproject.toml +45 -0
- skill_sentinel-0.1.0/src/skill_sentinel/__init__.py +3 -0
- skill_sentinel-0.1.0/src/skill_sentinel/cli.py +806 -0
- skill_sentinel-0.1.0/src/skill_sentinel/config/agents.yaml +63 -0
- skill_sentinel-0.1.0/src/skill_sentinel/config/tasks.yaml +227 -0
- skill_sentinel-0.1.0/src/skill_sentinel/crew.py +133 -0
- skill_sentinel-0.1.0/src/skill_sentinel/data/report_schema.json +289 -0
- skill_sentinel-0.1.0/src/skill_sentinel/data/threat_categories.md +424 -0
- skill_sentinel-0.1.0/src/skill_sentinel/main.py +137 -0
- skill_sentinel-0.1.0/src/skill_sentinel/tools/__init__.py +11 -0
- skill_sentinel-0.1.0/src/skill_sentinel/tools/custom_tool.py +272 -0
- skill_sentinel-0.1.0/src/skill_sentinel/tools/file_discovery.py +161 -0
- skill_sentinel-0.1.0/src/skill_sentinel/tools/virustotal_tool.py +370 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding any notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
Copyright 2025 Enkrypt AI, Inc.
|
|
180
|
+
|
|
181
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
182
|
+
you may not use this file except in compliance with the License.
|
|
183
|
+
You may obtain a copy of the License at
|
|
184
|
+
|
|
185
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
186
|
+
|
|
187
|
+
Unless required by applicable law or agreed to in writing, software
|
|
188
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
189
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
190
|
+
See the License for the specific language governing permissions and
|
|
191
|
+
limitations under the License.
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: skill-sentinel
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Scan Agent Skill packages for security threats using multi-agent AI analysis
|
|
5
|
+
Author: Enkrypt AI
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Keywords: agent,crewai,llm,scanner,security,skill
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Topic :: Security
|
|
17
|
+
Requires-Python: <3.14,>=3.10
|
|
18
|
+
Requires-Dist: crewai[tools]<2.0,>=1.9
|
|
19
|
+
Requires-Dist: httpx>=0.27
|
|
20
|
+
Requires-Dist: python-dotenv>=1.0
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# <img src="assets/skill-sentinel.png" alt="Skill Sentinel" width="32" style="vertical-align: middle;"> Enkrypt AI Skill Sentinel
|
|
24
|
+
|
|
25
|
+
A security scanner for Agent Skill packages. Skill Sentinel uses multi-agent AI analysis to detect prompt injection, data exfiltration, command injection, malware, and other threats hiding in skill packages for Cursor, Claude Code, Codex, and OpenClaw.
|
|
26
|
+
|
|
27
|
+
<div align="center">
|
|
28
|
+
<img src="assets/skill-sentinel-features.png" width="800" alt="Skill Sentinel">
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
Agent Skills extend AI coding assistants with custom instructions and scripts — but they also create a new attack surface. A single malicious skill can steal credentials, inject hidden prompts, exfiltrate code, or execute arbitrary commands. Skill Sentinel catches these threats before they reach your agent.
|
|
32
|
+
|
|
33
|
+
### Supported Platforms
|
|
34
|
+
|
|
35
|
+
<table>
|
|
36
|
+
<tr>
|
|
37
|
+
<td align="center" width="120"><img src="assets/cursor.png" alt="Cursor" width="40"><br><b>Cursor</b></td>
|
|
38
|
+
<td align="center" width="120"><img src="assets/claude.png" alt="Claude Code" width="40"><br><b>Claude Code</b></td>
|
|
39
|
+
<td align="center" width="120"><img src="assets/codex.png" alt="Codex" width="40"><br><b>Codex</b></td>
|
|
40
|
+
<td align="center" width="120"><img src="assets/openclaw.png" alt="OpenClaw" width="40"><br><b>OpenClaw</b></td>
|
|
41
|
+
<td align="center" width="120"><i>and other agents</i></td>
|
|
42
|
+
</tr>
|
|
43
|
+
</table>
|
|
44
|
+
|
|
45
|
+
## Key Features
|
|
46
|
+
|
|
47
|
+
### 🔍 Multi-Agent Security Pipeline
|
|
48
|
+
|
|
49
|
+
Specialized agents work together to analyze Skills from multiple angles — manifest inspection, file verification, cross-referencing, and threat correlation.
|
|
50
|
+
|
|
51
|
+
### 🦠 Built-in Malware Detection
|
|
52
|
+
|
|
53
|
+
Automatic VirusTotal integration scans binary files (executables, archives, PDFs) for known malware before any LLM analysis begins.
|
|
54
|
+
|
|
55
|
+
### 📄 No Truncation Limits
|
|
56
|
+
|
|
57
|
+
Reads complete file contents without arbitrary cutoffs — catching malicious instructions hidden deep in documentation where other scanners stop looking.
|
|
58
|
+
|
|
59
|
+
### 🔗 Cross-File Threat Correlation
|
|
60
|
+
|
|
61
|
+
Detects sophisticated attacks that span multiple files by tracking data flows and verifying that script behavior matches documented claims.
|
|
62
|
+
|
|
63
|
+
### 🎯 AI Agent Attack Detection
|
|
64
|
+
|
|
65
|
+
Purpose-built for prompt injection, command injection, credential theft, and other threats specific to AI coding assistants.
|
|
66
|
+
|
|
67
|
+
### ⚡ Parallel Bulk Scanning
|
|
68
|
+
|
|
69
|
+
Scan entire directories of Skills concurrently with organized reports — audit all your Cursor, Claude Code, Codex, and OpenClaw Skills in one command.
|
|
70
|
+
|
|
71
|
+
## Installation
|
|
72
|
+
|
|
73
|
+
Requires Python >= 3.10, < 3.14.
|
|
74
|
+
|
|
75
|
+
### Using uv (recommended)
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
uv venv --python 3.13 .venv
|
|
79
|
+
source .venv/bin/activate
|
|
80
|
+
uv pip install .
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Using pip
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pip install .
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
For development (editable mode):
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
uv pip install -e .
|
|
93
|
+
# or
|
|
94
|
+
pip install -e .
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Quick Start
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# 1. Export your OpenAI API key
|
|
101
|
+
export OPENAI_API_KEY="sk-..."
|
|
102
|
+
|
|
103
|
+
# 2. (Optional) Export your VirusTotal API key for binary malware scanning
|
|
104
|
+
export VIRUSTOTAL_API_KEY="your-vt-api-key"
|
|
105
|
+
|
|
106
|
+
# 3. Scan a skill directory
|
|
107
|
+
skill-sentinel scan /path/to/skill/directory
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Alternatively, create a `.env` file in the project root instead of exporting variables:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
cp .env.example .env
|
|
114
|
+
# Edit .env with your keys
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Usage
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
skill-sentinel scan [provider] [OPTIONS]
|
|
121
|
+
|
|
122
|
+
Positional:
|
|
123
|
+
provider cursor / claude / codex / openclaw to auto-discover that
|
|
124
|
+
provider's skills, or omit to discover all.
|
|
125
|
+
Can also be a direct path to a skill directory.
|
|
126
|
+
|
|
127
|
+
Path flags (mutually exclusive):
|
|
128
|
+
--skill PATH Scan a single skill directory.
|
|
129
|
+
--dir PATH Scan all skill subdirectories inside a parent directory.
|
|
130
|
+
|
|
131
|
+
Options:
|
|
132
|
+
-o, --output PATH Single scan: output file (default: report.json).
|
|
133
|
+
Multi-scan: output directory (default: ./skill_sentinel_reports).
|
|
134
|
+
--parallel Scan multiple skills in parallel (5 concurrent).
|
|
135
|
+
-m, --model MODEL OpenAI model to use (default: gpt-4.1).
|
|
136
|
+
--api-key KEY OpenAI API key (prefer OPENAI_API_KEY env var).
|
|
137
|
+
-V, --version Show version and exit.
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Examples
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# Scan a single skill directory
|
|
144
|
+
skill-sentinel scan --skill ./my-skill
|
|
145
|
+
skill-sentinel scan --skill ./my-skill -o report.json
|
|
146
|
+
|
|
147
|
+
# Scan all skills inside a parent directory
|
|
148
|
+
skill-sentinel scan --dir ./all-my-skills/
|
|
149
|
+
skill-sentinel scan --dir ./all-my-skills/ -o ./reports/
|
|
150
|
+
|
|
151
|
+
# Scan in parallel (5 concurrent)
|
|
152
|
+
skill-sentinel scan --dir ./all-my-skills/ --parallel
|
|
153
|
+
|
|
154
|
+
# Auto-discover and scan ALL skills from cursor, claude, codex, and openclaw paths
|
|
155
|
+
skill-sentinel scan
|
|
156
|
+
|
|
157
|
+
# Auto-discover only Cursor skills, in parallel
|
|
158
|
+
skill-sentinel scan cursor --parallel
|
|
159
|
+
|
|
160
|
+
# Scan only Claude skills
|
|
161
|
+
skill-sentinel scan claude
|
|
162
|
+
|
|
163
|
+
# Custom output directory for auto-discovery
|
|
164
|
+
skill-sentinel scan codex -o ./my-reports/
|
|
165
|
+
|
|
166
|
+
# Use a different model
|
|
167
|
+
skill-sentinel scan --skill ./my-skill -m gpt-4o
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Auto-Discovery
|
|
171
|
+
|
|
172
|
+
When no path is given (or a provider keyword is used), the scanner searches these well-known locations for skill directories containing a `SKILL.md`:
|
|
173
|
+
|
|
174
|
+
| Location | Scope |
|
|
175
|
+
|---|---|
|
|
176
|
+
| `.cursor/skills/` | Project-level (Cursor) |
|
|
177
|
+
| `.claude/skills/` | Project-level (Claude) |
|
|
178
|
+
| `.codex/skills/` | Project-level (Codex) |
|
|
179
|
+
| `skills/` | Agent workspace-level (OpenClaw) |
|
|
180
|
+
| `~/.cursor/skills/` | User-level global (Cursor) |
|
|
181
|
+
| `~/.claude/skills/` | User-level global (Claude) |
|
|
182
|
+
| `~/.codex/skills/` | User-level global (Codex) |
|
|
183
|
+
| `~/.openclaw/skills/` | User-level global (OpenClaw) |
|
|
184
|
+
|
|
185
|
+
Reports are saved as `<provider>__<skill_name>.json` in `./skill_sentinel_reports/` (or the directory specified with `-o`).
|
|
186
|
+
|
|
187
|
+
### Programmatic Usage
|
|
188
|
+
|
|
189
|
+
```python
|
|
190
|
+
from skill_sentinel.main import scan
|
|
191
|
+
|
|
192
|
+
report = scan("/path/to/skill", output_path="report.json", model="gpt-4.1")
|
|
193
|
+
print(report["overall_risk_assessment"]["skill_verdict"])
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## What It Does
|
|
197
|
+
|
|
198
|
+
The scanner performs a multi-step security analysis:
|
|
199
|
+
|
|
200
|
+
1. **File Discovery** — lists all files in the skill directory (static, no LLM).
|
|
201
|
+
2. **VirusTotal Binary Scan** *(optional)* — if binary files (executables, archives, images, PDFs, etc.) are found and a `VIRUSTOTAL_API_KEY` is set, each binary is checked against VirusTotal's malware database via SHA-256 hash lookup. Results are passed to the report synthesizer.
|
|
202
|
+
3. **SKILL.md Analysis** — an agent reads the SKILL.md manifest and instructions, looking for prompt injection, trust abuse, discovery abuse, and other threats.
|
|
203
|
+
4. **File Verification** *(conditional)* — if the skill contains scripts or referenced files beyond SKILL.md, a second agent reads each file and checks alignment with SKILL.md claims, searching for command injection, data exfiltration, hardcoded secrets, obfuscation, etc.
|
|
204
|
+
5. **Report Synthesis** — a final agent combines all findings (including VirusTotal results), filters false positives, prioritizes findings, and produces a structured JSON report.
|
|
205
|
+
|
|
206
|
+
### Malware Scanning (VirusTotal)
|
|
207
|
+
|
|
208
|
+
If a `VIRUSTOTAL_API_KEY` environment variable is set, Skill Sentinel automatically scans binary files found in skill packages against VirusTotal's malware database. This runs **before** the agent pipeline — no LLM calls are needed.
|
|
209
|
+
|
|
210
|
+
**Supported binary types:** executables (`.exe`, `.dll`, `.so`, `.dylib`, `.bin`), archives (`.zip`, `.tar`, `.gz`, `.7z`, `.rar`), documents (`.pdf`, `.doc`, `.xls`), images (`.png`, `.jpg`, `.gif`), JVM/WASM (`.jar`, `.war`, `.wasm`, `.class`), and more.
|
|
211
|
+
|
|
212
|
+
**Getting a free API key:** Sign up at [virustotal.com](https://www.virustotal.com/) — the free tier allows 500 lookups/day, which is more than enough for skill scanning.
|
|
213
|
+
|
|
214
|
+
## Output
|
|
215
|
+
|
|
216
|
+
The scanner writes a JSON report containing:
|
|
217
|
+
|
|
218
|
+
- `skill_path` — absolute path to the scanned skill directory
|
|
219
|
+
- `validated_findings` — confirmed threats with severity, evidence, remediation
|
|
220
|
+
- `false_positives` — dismissed findings with reasoning
|
|
221
|
+
- `priority_order` — ranked list of finding IDs
|
|
222
|
+
- `correlations` — related findings grouped together
|
|
223
|
+
- `recommendations` — actionable next steps
|
|
224
|
+
- `references` — VirusTotal scan links and other reference URLs
|
|
225
|
+
- `overall_risk_assessment` — risk level, verdict (SAFE / SUSPICIOUS / MALICIOUS), reasoning
|
|
226
|
+
- `token_usage` — LLM token usage metrics for the scan
|
|
227
|
+
|
|
228
|
+
## Project Structure
|
|
229
|
+
|
|
230
|
+
```
|
|
231
|
+
skill_scanner_package/
|
|
232
|
+
├── pyproject.toml # Package build config
|
|
233
|
+
├── README.md
|
|
234
|
+
└── src/skill_sentinel/
|
|
235
|
+
├── __init__.py # Package version
|
|
236
|
+
├── cli.py # CLI entry point
|
|
237
|
+
├── main.py # Programmatic API
|
|
238
|
+
├── crew.py # Multi-agent crew definition
|
|
239
|
+
├── config/
|
|
240
|
+
│ ├── agents.yaml # Agent definitions
|
|
241
|
+
│ └── tasks.yaml # Task definitions
|
|
242
|
+
├── data/
|
|
243
|
+
│ ├── threat_categories.md # Threat taxonomy
|
|
244
|
+
│ └── report_schema.json # Output JSON schema
|
|
245
|
+
└── tools/
|
|
246
|
+
├── custom_tool.py # ReadFile & Grep tools
|
|
247
|
+
├── file_discovery.py # Static file listing
|
|
248
|
+
└── virustotal_tool.py # VirusTotal binary malware scanning
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Environment Variables
|
|
252
|
+
|
|
253
|
+
| Variable | Description | Default |
|
|
254
|
+
|---|---|---|
|
|
255
|
+
| `OPENAI_API_KEY` | Your OpenAI API key (required) | — |
|
|
256
|
+
| `OPENAI_MODEL_NAME` | Model to use for analysis | `gpt-4.1` |
|
|
257
|
+
| `VIRUSTOTAL_API_KEY` | VirusTotal API key for binary malware scanning (optional) | — |
|
|
258
|
+
|
|
259
|
+
## Threat Categories
|
|
260
|
+
|
|
261
|
+
Skill Sentinel detects the following threat categories, mapped to [OWASP Top 10 for LLM Applications 2025](https://genai.owasp.org/llm-top-10/) and [OWASP Top 10 for Agentic Applications](https://genai.owasp.org/agentic-top-10/):
|
|
262
|
+
|
|
263
|
+
| Category | Severity | Description |
|
|
264
|
+
|---|---|---|
|
|
265
|
+
| Prompt Injection | HIGH–CRITICAL | Override attempts, mode changes, policy bypass hidden in SKILL.md |
|
|
266
|
+
| Transitive Trust Abuse | HIGH | Instructions that delegate trust to external/untrusted data sources |
|
|
267
|
+
| Data Exfiltration | CRITICAL | Network calls that steal credentials, files, or environment variables |
|
|
268
|
+
| Command Injection | CRITICAL | Dangerous `eval()`, `exec()`, `os.system()`, shell injection |
|
|
269
|
+
| Hardcoded Secrets | CRITICAL | API keys, passwords, private keys embedded in code |
|
|
270
|
+
| Obfuscation | HIGH | Base64 blobs + exec, hex-encoded payloads, deliberately unreadable code |
|
|
271
|
+
| Unauthorized Tool Use | HIGH | Code that violates the skill's own `allowed-tools` declaration |
|
|
272
|
+
| Skill Discovery Abuse | HIGH | Brand impersonation, keyword baiting, misleading descriptions |
|
|
273
|
+
| Tool Chaining Abuse | HIGH | Multi-step workflows that read sensitive data then transmit it |
|
|
274
|
+
| Resource Abuse | MEDIUM | Infinite loops, unbounded memory allocation, recursive bombs |
|
|
275
|
+
| Autonomy Abuse | MEDIUM | Unsolicited activation, unbounded retries, no user confirmation |
|
|
276
|
+
| Over-Collection | MEDIUM | Disproportionate data access relative to stated purpose |
|
|
277
|
+
| Cross-Context Bridging | MEDIUM | Accessing data from other sessions, conversations, or workspaces |
|
|
278
|
+
| Dependency Risk | MEDIUM | Unpinned `pip install`, typosquatting, unknown GitHub repos |
|
|
279
|
+
| Malware | MEDIUM–CRITICAL | Binary files flagged by VirusTotal or unverifiable binaries |
|
|
280
|
+
|
|
281
|
+
## Contributing
|
|
282
|
+
|
|
283
|
+
Contributions are welcome! To get started:
|
|
284
|
+
|
|
285
|
+
1. Fork the repository
|
|
286
|
+
2. Create a feature branch (`git checkout -b feature/my-feature`)
|
|
287
|
+
3. Set up the development environment:
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
uv venv --python 3.13 .venv
|
|
291
|
+
source .venv/bin/activate
|
|
292
|
+
uv pip install -e .
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
4. Make your changes
|
|
296
|
+
5. Submit a pull request
|
|
297
|
+
|
|
298
|
+
## License
|
|
299
|
+
|
|
300
|
+
This project is licensed under the [Apache License 2.0](LICENSE).
|
|
301
|
+
|
|
302
|
+
Copyright 2025 [Enkrypt AI, Inc.](https://www.enkryptai.com/)
|