@skill-mine/complyment-connectors-sdk 0.1.0

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.
package/README.md ADDED
@@ -0,0 +1,396 @@
1
+ # @skill-mine/complyment-connectors-sdk
2
+
3
+ > Enterprise Security Tool Connectors SDK — built at Skill-Mine Technology
4
+
5
+ A TypeScript SDK that abstracts 6+ enterprise security tool integrations with built-in AI agent compatibility, circuit breakers, rate limiting, and human-in-the-loop controls.
6
+
7
+ [![npm version](https://img.shields.io/badge/npm-0.1.0-blue)](https://www.npmjs.com/package/@skill-mine/complyment-connectors-sdk)
8
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.x-blue)](https://www.typescriptlang.org/)
9
+ [![Build](https://img.shields.io/badge/build-passing-brightgreen)](#)
10
+ [![License](https://img.shields.io/badge/license-MIT-green)](#)
11
+
12
+ ---
13
+
14
+ ## Features
15
+
16
+ - **6 Connectors** — Qualys, SentinelOne, Checkpoint, ManageEngine, Jira, Zoho
17
+ - **AI Agent Ready** — MCP, LangChain, Vercel AI SDK, OpenAI Agents SDK
18
+ - **Resilience** — Circuit breaker, retry with backoff, rate limiting, caching
19
+ - **Observability** — OpenTelemetry tracing, structured logging, audit logs
20
+ - **Security** — Human-in-the-loop approvals for critical actions
21
+ - **Normalization** — Unified vulnerability, asset, threat schemas across connectors
22
+ - **Semantic Search** — TF-IDF based natural language queries on security data
23
+ - **Dual Build** — ESM + CJS, full TypeScript declarations
24
+
25
+ ---
26
+
27
+ ## Installation
28
+ ```bash
29
+ npm install @skill-mine/complyment-connectors-sdk
30
+ ```
31
+
32
+ ---
33
+
34
+ ## Quick Start
35
+ ```typescript
36
+ import {
37
+ QualysConnector,
38
+ SentinelOneConnector,
39
+ JiraConnector,
40
+ registry,
41
+ } from '@skill-mine/complyment-connectors-sdk'
42
+
43
+ // Initialize connectors
44
+ const qualys = new QualysConnector({
45
+ name: 'qualys',
46
+ baseUrl: 'https://qualysapi.qualys.com',
47
+ auth: {
48
+ type: 'basic',
49
+ credentials: {
50
+ username: process.env.QUALYS_USERNAME!,
51
+ password: process.env.QUALYS_PASSWORD!,
52
+ },
53
+ },
54
+ })
55
+
56
+ // Register globally
57
+ registry.register('qualys', qualys)
58
+
59
+ // Fetch critical vulnerabilities
60
+ const vulns = await qualys.getCriticalVulnerabilities()
61
+ console.log(vulns.data)
62
+ ```
63
+
64
+ ---
65
+
66
+ ## Connectors
67
+
68
+ ### Qualys
69
+ ```typescript
70
+ const qualys = new QualysConnector({ ...config })
71
+
72
+ await qualys.getAssets({ hostname: 'web-server-01' })
73
+ await qualys.getCriticalVulnerabilities()
74
+ await qualys.launchScan({ scannerName: 'External Scanner', title: 'Weekly Scan' })
75
+ await qualys.getNormalizedVulnerabilities()
76
+ ```
77
+
78
+ ### SentinelOne
79
+ ```typescript
80
+ const s1 = new SentinelOneConnector({ ...config })
81
+
82
+ await s1.getThreats({ severity: 'critical', status: 'active' })
83
+ await s1.quarantineThreat('threat-id-123')
84
+ await s1.killThreat('threat-id-123')
85
+ await s1.getInfectedAgents()
86
+ ```
87
+
88
+ ### Checkpoint
89
+ ```typescript
90
+ const checkpoint = new CheckpointConnector({ ...config })
91
+
92
+ await checkpoint.getPolicies()
93
+ await checkpoint.addRule({ layer: 'Network', position: 'top', action: 'Drop' })
94
+ await checkpoint.blockThreat('threat-id')
95
+ await checkpoint.installPolicy({ policyPackage: 'Standard', targets: ['gateway-1'] })
96
+ ```
97
+
98
+ ### ManageEngine
99
+ ```typescript
100
+ const me = new ManageEngineConnector({ ...config })
101
+
102
+ await me.getMissingPatches()
103
+ await me.getCriticalPatches()
104
+ await me.createDeployment({ patchIds: ['patch-1'], computerIds: ['pc-1'] })
105
+ ```
106
+
107
+ ### Jira
108
+ ```typescript
109
+ const jira = new JiraConnector({ ...config })
110
+
111
+ await jira.getIssues({ projectKey: 'SEC', status: 'Open' })
112
+ await jira.createSecurityTicket('SEC', 'Critical CVE Found', 'Details...', 'critical', 'qualys')
113
+ await jira.transitionIssue('SEC-123', 'transition-id')
114
+ ```
115
+
116
+ ### Zoho CRM
117
+ ```typescript
118
+ const zoho = new ZohoConnector({ ...config })
119
+
120
+ await zoho.getContacts()
121
+ await zoho.createLead({ lastName: 'Doe', company: 'Acme', email: 'doe@acme.com' })
122
+ await zoho.getDeals({ stage: 'Qualification' })
123
+ ```
124
+
125
+ ---
126
+
127
+ ## AI Agent Integration
128
+
129
+ ### MCP (Model Context Protocol)
130
+ ```typescript
131
+ import { MCPServer, createQualysMCPTools } from '@skill-mine/complyment-connectors-sdk'
132
+
133
+ const mcp = new MCPServer({ name: 'security-mcp' })
134
+
135
+ mcp.registerConnectorTools('qualys', createQualysMCPTools(qualys))
136
+
137
+ // Expose to AI agents
138
+ const manifest = mcp.generateManifest()
139
+ const result = await mcp.executeTool('qualys_get_critical_vulnerabilities', {})
140
+ ```
141
+
142
+ ### LangChain
143
+ ```typescript
144
+ import { LangChainAdapter } from '@skill-mine/complyment-connectors-sdk'
145
+
146
+ const tools = LangChainAdapter.createAllTools({ qualys, sentinelone, jira })
147
+
148
+ // Use with LangChain agent
149
+ const agent = createReactAgent({ llm, tools })
150
+ ```
151
+
152
+ ### Vercel AI SDK
153
+ ```typescript
154
+ import { VercelAIAdapter } from '@skill-mine/complyment-connectors-sdk'
155
+
156
+ const tools = VercelAIAdapter.createFullToolSet({ qualys, sentinelone, jira })
157
+
158
+ const result = await generateText({
159
+ model: openai('gpt-4o'),
160
+ tools,
161
+ prompt: 'What critical vulnerabilities need immediate attention?',
162
+ })
163
+ ```
164
+
165
+ ### OpenAI Agents SDK
166
+ ```typescript
167
+ import { OpenAIAgentsAdapter } from '@skill-mine/complyment-connectors-sdk'
168
+
169
+ const agent = OpenAIAgentsAdapter.createSecurityAnalystAgent({
170
+ qualys, sentinelone, jira,
171
+ })
172
+
173
+ // agent.tools ready for OpenAI Agents SDK
174
+ ```
175
+
176
+ ---
177
+
178
+ ## Human-in-the-Loop (HITL)
179
+ ```typescript
180
+ import { HITLManager } from '@skill-mine/complyment-connectors-sdk'
181
+
182
+ const hitl = new HITLManager({
183
+ autoApproveRiskLevels: ['low'],
184
+ onApprovalRequired: (req) => {
185
+ // Send Slack/email notification to security team
186
+ notifyTeam(req)
187
+ },
188
+ })
189
+
190
+ hitl.registerHandler('threat.quarantine', async ({ threatId }) => {
191
+ return s1.quarantineThreat(threatId as string)
192
+ })
193
+
194
+ // AI agent requests approval
195
+ const request = await hitl.requestApproval({
196
+ actionType: 'threat.quarantine',
197
+ connector: 'sentinelone',
198
+ description: 'Quarantine ransomware on DESKTOP-XYZ',
199
+ riskLevel: 'high',
200
+ params: { threatId: 'threat-123' },
201
+ requestedBy: 'SecurityAgent',
202
+ })
203
+
204
+ // Human approves via dashboard
205
+ await hitl.approve(request.id, 'john.doe@skill-mine.com')
206
+ ```
207
+
208
+ ---
209
+
210
+ ## Resilience Features
211
+
212
+ ### Circuit Breaker
213
+ ```typescript
214
+ // Built into BaseConnector - automatic
215
+ // Opens after 5 failures, recovers after 60s
216
+ const qualys = new QualysConnector({
217
+ ...config,
218
+ circuitBreaker: {
219
+ failureThreshold: 5,
220
+ recoveryTimeMs: 60000,
221
+ },
222
+ })
223
+ ```
224
+
225
+ ### Rate Limiting
226
+ ```typescript
227
+ const qualys = new QualysConnector({
228
+ ...config,
229
+ rateLimit: {
230
+ maxRequests: 100,
231
+ windowMs: 60000, // 100 req/min
232
+ },
233
+ })
234
+ ```
235
+
236
+ ### Retry with Backoff
237
+ ```typescript
238
+ const qualys = new QualysConnector({
239
+ ...config,
240
+ retry: {
241
+ maxRetries: 3,
242
+ initialDelayMs: 1000,
243
+ backoffMultiplier: 2,
244
+ },
245
+ })
246
+ ```
247
+
248
+ ### Caching
249
+ ```typescript
250
+ const qualys = new QualysConnector({
251
+ ...config,
252
+ cache: {
253
+ enabled: true,
254
+ ttlMs: 300000, // 5 minutes
255
+ maxSize: 1000,
256
+ },
257
+ })
258
+ ```
259
+
260
+ ---
261
+
262
+ ## Normalization
263
+ ```typescript
264
+ import { normalizationEngine } from '@skill-mine/complyment-connectors-sdk'
265
+
266
+ // Normalize across multiple connectors
267
+ const result = normalizationEngine.normalizeVulnerabilities([
268
+ { connector: 'qualys', data: qualysVulns, mapper: qualysMapper },
269
+ { connector: 'sentinelone', data: s1Threats, mapper: s1Mapper },
270
+ ])
271
+
272
+ // Deduplicated by CVE, highest severity wins
273
+ console.log(result.data) // NormalizedVulnerability[]
274
+ console.log(result.sources) // ['qualys', 'sentinelone']
275
+
276
+ // Severity stats
277
+ const stats = normalizationEngine.getSeverityStats(result.data)
278
+ // { critical: 3, high: 7, medium: 12, low: 5, info: 2 }
279
+ ```
280
+
281
+ ---
282
+
283
+ ## Semantic Search
284
+ ```typescript
285
+ import { semanticSearch } from '@skill-mine/complyment-connectors-sdk'
286
+
287
+ // Index connector data
288
+ semanticSearch.indexVulnerabilities(qualysVulns)
289
+ semanticSearch.indexThreats(s1Threats)
290
+ semanticSearch.indexAssets(qualysAssets)
291
+
292
+ // Natural language queries
293
+ const results = await semanticSearch.search('critical ransomware on windows server')
294
+ const threats = await semanticSearch.findCriticalThreats()
295
+ const vulns = await semanticSearch.findVulnerableAssets('web-server-01')
296
+ ```
297
+
298
+ ---
299
+
300
+ ## Audit Logging
301
+ ```typescript
302
+ import { auditLogger } from '@skill-mine/complyment-connectors-sdk'
303
+
304
+ auditLogger.logSuccess('data.fetch', 'qualys', { count: 42 }, 320)
305
+ auditLogger.logFailure('auth.login', 'sentinelone', 'Invalid token')
306
+
307
+ const stats = auditLogger.getStats('qualys')
308
+ // { total: 100, success: 95, failure: 5, successRate: '95.00%' }
309
+
310
+ // Export for compliance
311
+ const csv = auditLogger.exportAsCsv()
312
+ const json = auditLogger.exportAsJson()
313
+ ```
314
+
315
+ ---
316
+
317
+ ## Environment Variables
318
+ ```bash
319
+ # Qualys
320
+ COMPLYMENT_QUALYS_BASE_URL=https://qualysapi.qualys.com
321
+ COMPLYMENT_QUALYS_USERNAME=your_username
322
+ COMPLYMENT_QUALYS_PASSWORD=your_password
323
+
324
+ # SentinelOne
325
+ COMPLYMENT_SENTINELONE_BASE_URL=https://your-instance.sentinelone.net
326
+ COMPLYMENT_SENTINELONE_API_TOKEN=your_api_token
327
+
328
+ # Jira
329
+ COMPLYMENT_JIRA_BASE_URL=https://your-org.atlassian.net
330
+ COMPLYMENT_JIRA_EMAIL=your@email.com
331
+ COMPLYMENT_JIRA_API_TOKEN=your_api_token
332
+
333
+ # ManageEngine
334
+ COMPLYMENT_MANAGEENGINE_BASE_URL=https://your-manageengine
335
+ COMPLYMENT_MANAGEENGINE_CLIENT_ID=your_client_id
336
+ COMPLYMENT_MANAGEENGINE_CLIENT_SECRET=your_client_secret
337
+ COMPLYMENT_MANAGEENGINE_REFRESH_TOKEN=your_refresh_token
338
+ ```
339
+
340
+ ---
341
+
342
+ ## Built Output
343
+ ```
344
+ dist/
345
+ ├── index.js 163 KB (CJS - Node.js)
346
+ ├── index.mjs 159 KB (ESM - Bundlers)
347
+ ├── index.d.ts 74 KB (TypeScript)
348
+ └── index.d.mts 74 KB (TypeScript ESM)
349
+ ```
350
+
351
+ ---
352
+
353
+ ## Architecture
354
+ ```
355
+ @skill-mine/complyment-connectors-sdk
356
+ ├── Connectors (Qualys, SentinelOne, Checkpoint, ManageEngine, Jira, Zoho)
357
+ ├── Core (BaseConnector, Registry, Types, Errors)
358
+ ├── Middleware (CircuitBreaker, RateLimiter, RetryHandler, CacheLayer)
359
+ ├── Telemetry (Logger, OpenTelemetry Tracer)
360
+ ├── Normalization (Cross-connector unified schemas)
361
+ ├── Audit (Compliance audit logging)
362
+ ├── Streaming (Paginated streaming, real-time polling)
363
+ ├── Secrets (Vault + Env based credential management)
364
+ ├── Webhook (Inbound webhook processing with HMAC verification)
365
+ └── AI
366
+ ├── MCP (Model Context Protocol server)
367
+ ├── LangChain (LangChain tool adapters)
368
+ ├── Vercel AI (Vercel AI SDK tool adapters)
369
+ ├── OpenAI Agents (OpenAI Agents SDK adapters)
370
+ ├── HITL (Human-in-the-loop approval system)
371
+ ├── Orchestration (Multi-agent workflow orchestration)
372
+ ├── Semantic (TF-IDF semantic search on security data)
373
+ └── Workflows (Pre-built security automation workflows)
374
+ ```
375
+
376
+ ---
377
+
378
+ ## Tech Stack
379
+
380
+ - **TypeScript 5.x** strict mode
381
+ - **tsup** — ESM + CJS dual build
382
+ - **axios** — HTTP client
383
+ - **zod** — Runtime schema validation
384
+
385
+ ---
386
+
387
+ ## Author
388
+
389
+ **Immanuvel** — Backend Developer, Skill-Mine Technology Consulting
390
+ Built as internal tooling for the Complyment compliance platform serving 50+ enterprise clients.
391
+
392
+ ---
393
+
394
+ ## License
395
+
396
+ MIT