@skillsmith/core 0.1.2 → 0.2.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/dist/.tsbuildinfo +1 -1
- package/dist/src/analysis/CodebaseAnalyzer.d.ts +4 -134
- package/dist/src/analysis/CodebaseAnalyzer.d.ts.map +1 -1
- package/dist/src/analysis/CodebaseAnalyzer.js +7 -315
- package/dist/src/analysis/CodebaseAnalyzer.js.map +1 -1
- package/dist/src/analysis/framework-detector.d.ts +47 -0
- package/dist/src/analysis/framework-detector.d.ts.map +1 -0
- package/dist/src/analysis/framework-detector.js +151 -0
- package/dist/src/analysis/framework-detector.js.map +1 -0
- package/dist/src/analysis/index.d.ts +6 -1
- package/dist/src/analysis/index.d.ts.map +1 -1
- package/dist/src/analysis/index.js +10 -1
- package/dist/src/analysis/index.js.map +1 -1
- package/dist/src/analysis/parsers.d.ts +43 -0
- package/dist/src/analysis/parsers.d.ts.map +1 -0
- package/dist/src/analysis/parsers.js +219 -0
- package/dist/src/analysis/parsers.js.map +1 -0
- package/dist/src/analysis/types.d.ts +138 -0
- package/dist/src/analysis/types.d.ts.map +1 -0
- package/dist/src/analysis/types.js +25 -0
- package/dist/src/analysis/types.js.map +1 -0
- package/dist/src/analytics/AnalyticsRepository.d.ts.map +1 -1
- package/dist/src/analytics/AnalyticsRepository.js +4 -4
- package/dist/src/analytics/AnalyticsRepository.js.map +1 -1
- package/dist/src/api/cache.d.ts +108 -0
- package/dist/src/api/cache.d.ts.map +1 -0
- package/dist/src/api/cache.js +216 -0
- package/dist/src/api/cache.js.map +1 -0
- package/dist/src/api/client.d.ts +152 -0
- package/dist/src/api/client.d.ts.map +1 -0
- package/dist/src/api/client.js +221 -0
- package/dist/src/api/client.js.map +1 -0
- package/dist/src/api/index.d.ts +10 -0
- package/dist/src/api/index.d.ts.map +1 -0
- package/dist/src/api/index.js +10 -0
- package/dist/src/api/index.js.map +1 -0
- package/dist/src/benchmarks/BenchmarkRunner.d.ts +6 -175
- package/dist/src/benchmarks/BenchmarkRunner.d.ts.map +1 -1
- package/dist/src/benchmarks/BenchmarkRunner.js +6 -123
- package/dist/src/benchmarks/BenchmarkRunner.js.map +1 -1
- package/dist/src/benchmarks/MemoryProfiler.d.ts +4 -262
- package/dist/src/benchmarks/MemoryProfiler.d.ts.map +1 -1
- package/dist/src/benchmarks/MemoryProfiler.js +4 -400
- package/dist/src/benchmarks/MemoryProfiler.js.map +1 -1
- package/dist/src/benchmarks/comparator.d.ts +38 -0
- package/dist/src/benchmarks/comparator.d.ts.map +1 -0
- package/dist/src/benchmarks/comparator.js +81 -0
- package/dist/src/benchmarks/comparator.js.map +1 -0
- package/dist/src/benchmarks/formatters.d.ts +30 -0
- package/dist/src/benchmarks/formatters.d.ts.map +1 -0
- package/dist/src/benchmarks/formatters.js +88 -0
- package/dist/src/benchmarks/formatters.js.map +1 -0
- package/dist/src/benchmarks/index.d.ts +5 -1
- package/dist/src/benchmarks/index.d.ts.map +1 -1
- package/dist/src/benchmarks/index.js +9 -2
- package/dist/src/benchmarks/index.js.map +1 -1
- package/dist/src/benchmarks/memory/MemoryProfiler.d.ts +165 -0
- package/dist/src/benchmarks/memory/MemoryProfiler.d.ts.map +1 -0
- package/dist/src/benchmarks/memory/MemoryProfiler.js +312 -0
- package/dist/src/benchmarks/memory/MemoryProfiler.js.map +1 -0
- package/dist/src/benchmarks/memory/baseline-manager.d.ts +64 -0
- package/dist/src/benchmarks/memory/baseline-manager.d.ts.map +1 -0
- package/dist/src/benchmarks/memory/baseline-manager.js +95 -0
- package/dist/src/benchmarks/memory/baseline-manager.js.map +1 -0
- package/dist/src/benchmarks/memory/index.d.ts +12 -0
- package/dist/src/benchmarks/memory/index.d.ts.map +1 -0
- package/dist/src/benchmarks/memory/index.js +12 -0
- package/dist/src/benchmarks/memory/index.js.map +1 -0
- package/dist/src/benchmarks/memory/leak-detector.d.ts +23 -0
- package/dist/src/benchmarks/memory/leak-detector.d.ts.map +1 -0
- package/dist/src/benchmarks/memory/leak-detector.js +46 -0
- package/dist/src/benchmarks/memory/leak-detector.js.map +1 -0
- package/dist/src/benchmarks/memory/regression-detector.d.ts +17 -0
- package/dist/src/benchmarks/memory/regression-detector.d.ts.map +1 -0
- package/dist/src/benchmarks/memory/regression-detector.js +56 -0
- package/dist/src/benchmarks/memory/regression-detector.js.map +1 -0
- package/dist/src/benchmarks/memory/types.d.ts +111 -0
- package/dist/src/benchmarks/memory/types.d.ts.map +1 -0
- package/dist/src/benchmarks/memory/types.js +7 -0
- package/dist/src/benchmarks/memory/types.js.map +1 -0
- package/dist/src/benchmarks/memory/utils.d.ts +17 -0
- package/dist/src/benchmarks/memory/utils.d.ts.map +1 -0
- package/dist/src/benchmarks/memory/utils.js +29 -0
- package/dist/src/benchmarks/memory/utils.js.map +1 -0
- package/dist/src/benchmarks/types.d.ts +175 -0
- package/dist/src/benchmarks/types.d.ts.map +1 -0
- package/dist/src/benchmarks/types.js +20 -0
- package/dist/src/benchmarks/types.js.map +1 -0
- package/dist/src/index.d.ts +4 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +7 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/repositories/QuarantineRepository.d.ts +4 -251
- package/dist/src/repositories/QuarantineRepository.d.ts.map +1 -1
- package/dist/src/repositories/QuarantineRepository.js +4 -441
- package/dist/src/repositories/QuarantineRepository.js.map +1 -1
- package/dist/src/repositories/quarantine/QuarantineRepository.d.ts +168 -0
- package/dist/src/repositories/quarantine/QuarantineRepository.d.ts.map +1 -0
- package/dist/src/repositories/quarantine/QuarantineRepository.js +341 -0
- package/dist/src/repositories/quarantine/QuarantineRepository.js.map +1 -0
- package/dist/src/repositories/quarantine/index.d.ts +10 -0
- package/dist/src/repositories/quarantine/index.d.ts.map +1 -0
- package/dist/src/repositories/quarantine/index.js +10 -0
- package/dist/src/repositories/quarantine/index.js.map +1 -0
- package/dist/src/repositories/quarantine/queries.d.ts +58 -0
- package/dist/src/repositories/quarantine/queries.d.ts.map +1 -0
- package/dist/src/repositories/quarantine/queries.js +88 -0
- package/dist/src/repositories/quarantine/queries.js.map +1 -0
- package/dist/src/repositories/quarantine/query-builder.d.ts +44 -0
- package/dist/src/repositories/quarantine/query-builder.d.ts.map +1 -0
- package/dist/src/repositories/quarantine/query-builder.js +87 -0
- package/dist/src/repositories/quarantine/query-builder.js.map +1 -0
- package/dist/src/repositories/quarantine/types.d.ts +155 -0
- package/dist/src/repositories/quarantine/types.d.ts.map +1 -0
- package/dist/src/repositories/quarantine/types.js +13 -0
- package/dist/src/repositories/quarantine/types.js.map +1 -0
- package/dist/src/scripts/__tests__/scan-imported-skills.test.d.ts +1 -0
- package/dist/src/scripts/__tests__/scan-imported-skills.test.d.ts.map +1 -1
- package/dist/src/scripts/__tests__/scan-imported-skills.test.js +7 -43
- package/dist/src/scripts/__tests__/scan-imported-skills.test.js.map +1 -1
- package/dist/src/scripts/github-import/checkpoint.d.ts +21 -0
- package/dist/src/scripts/github-import/checkpoint.d.ts.map +1 -0
- package/dist/src/scripts/github-import/checkpoint.js +52 -0
- package/dist/src/scripts/github-import/checkpoint.js.map +1 -0
- package/dist/src/scripts/github-import/deduplication.d.ts +15 -0
- package/dist/src/scripts/github-import/deduplication.d.ts.map +1 -0
- package/dist/src/scripts/github-import/deduplication.js +33 -0
- package/dist/src/scripts/github-import/deduplication.js.map +1 -0
- package/dist/src/scripts/github-import/github-client.d.ts +29 -0
- package/dist/src/scripts/github-import/github-client.d.ts.map +1 -0
- package/dist/src/scripts/github-import/github-client.js +184 -0
- package/dist/src/scripts/github-import/github-client.js.map +1 -0
- package/dist/src/scripts/github-import/index.d.ts +29 -0
- package/dist/src/scripts/github-import/index.d.ts.map +1 -0
- package/dist/src/scripts/github-import/index.js +198 -0
- package/dist/src/scripts/github-import/index.js.map +1 -0
- package/dist/src/scripts/github-import/output.d.ts +12 -0
- package/dist/src/scripts/github-import/output.d.ts.map +1 -0
- package/dist/src/scripts/github-import/output.js +34 -0
- package/dist/src/scripts/github-import/output.js.map +1 -0
- package/dist/src/scripts/github-import/types.d.ts +108 -0
- package/dist/src/scripts/github-import/types.d.ts.map +1 -0
- package/dist/src/scripts/github-import/types.js +44 -0
- package/dist/src/scripts/github-import/types.js.map +1 -0
- package/dist/src/scripts/github-import/utils.d.ts +13 -0
- package/dist/src/scripts/github-import/utils.d.ts.map +1 -0
- package/dist/src/scripts/github-import/utils.js +28 -0
- package/dist/src/scripts/github-import/utils.js.map +1 -0
- package/dist/src/scripts/import-github-skills.d.ts +3 -12
- package/dist/src/scripts/import-github-skills.d.ts.map +1 -1
- package/dist/src/scripts/import-github-skills.js +18 -398
- package/dist/src/scripts/import-github-skills.js.map +1 -1
- package/dist/src/scripts/scan-imported-skills.d.ts +7 -7
- package/dist/src/scripts/scan-imported-skills.d.ts.map +1 -1
- package/dist/src/scripts/scan-imported-skills.js +8 -397
- package/dist/src/scripts/scan-imported-skills.js.map +1 -1
- package/dist/src/scripts/skill-scanner/categorizer.d.ts +43 -0
- package/dist/src/scripts/skill-scanner/categorizer.d.ts.map +1 -0
- package/dist/src/scripts/skill-scanner/categorizer.js +61 -0
- package/dist/src/scripts/skill-scanner/categorizer.js.map +1 -0
- package/dist/src/scripts/skill-scanner/file-scanner.d.ts +43 -0
- package/dist/src/scripts/skill-scanner/file-scanner.d.ts.map +1 -0
- package/dist/src/scripts/skill-scanner/file-scanner.js +90 -0
- package/dist/src/scripts/skill-scanner/file-scanner.js.map +1 -0
- package/dist/src/scripts/skill-scanner/index.d.ts +22 -0
- package/dist/src/scripts/skill-scanner/index.d.ts.map +1 -0
- package/dist/src/scripts/skill-scanner/index.js +43 -0
- package/dist/src/scripts/skill-scanner/index.js.map +1 -0
- package/dist/src/scripts/skill-scanner/logger.d.ts +59 -0
- package/dist/src/scripts/skill-scanner/logger.d.ts.map +1 -0
- package/dist/src/scripts/skill-scanner/logger.js +104 -0
- package/dist/src/scripts/skill-scanner/logger.js.map +1 -0
- package/dist/src/scripts/skill-scanner/reporter.d.ts +56 -0
- package/dist/src/scripts/skill-scanner/reporter.d.ts.map +1 -0
- package/dist/src/scripts/skill-scanner/reporter.js +166 -0
- package/dist/src/scripts/skill-scanner/reporter.js.map +1 -0
- package/dist/src/scripts/skill-scanner/scanner.d.ts +44 -0
- package/dist/src/scripts/skill-scanner/scanner.d.ts.map +1 -0
- package/dist/src/scripts/skill-scanner/scanner.js +140 -0
- package/dist/src/scripts/skill-scanner/scanner.js.map +1 -0
- package/dist/src/scripts/skill-scanner/trust-scorer.d.ts +59 -0
- package/dist/src/scripts/skill-scanner/trust-scorer.d.ts.map +1 -0
- package/dist/src/scripts/skill-scanner/trust-scorer.js +62 -0
- package/dist/src/scripts/skill-scanner/trust-scorer.js.map +1 -0
- package/dist/src/scripts/skill-scanner/types.d.ts +98 -0
- package/dist/src/scripts/skill-scanner/types.d.ts.map +1 -0
- package/dist/src/scripts/skill-scanner/types.js +7 -0
- package/dist/src/scripts/skill-scanner/types.js.map +1 -0
- package/dist/src/scripts/validate-skills.d.ts +3 -172
- package/dist/src/scripts/validate-skills.d.ts.map +1 -1
- package/dist/src/scripts/validate-skills.js +6 -519
- package/dist/src/scripts/validate-skills.js.map +1 -1
- package/dist/src/scripts/validation/deduplication.d.ts +23 -0
- package/dist/src/scripts/validation/deduplication.d.ts.map +1 -0
- package/dist/src/scripts/validation/deduplication.js +127 -0
- package/dist/src/scripts/validation/deduplication.js.map +1 -0
- package/dist/src/scripts/validation/field-validators.d.ts +9 -0
- package/dist/src/scripts/validation/field-validators.d.ts.map +1 -0
- package/dist/src/scripts/validation/field-validators.js +135 -0
- package/dist/src/scripts/validation/field-validators.js.map +1 -0
- package/dist/src/scripts/validation/index.d.ts +29 -0
- package/dist/src/scripts/validation/index.d.ts.map +1 -0
- package/dist/src/scripts/validation/index.js +84 -0
- package/dist/src/scripts/validation/index.js.map +1 -0
- package/dist/src/scripts/validation/normalizers.d.ts +29 -0
- package/dist/src/scripts/validation/normalizers.d.ts.map +1 -0
- package/dist/src/scripts/validation/normalizers.js +79 -0
- package/dist/src/scripts/validation/normalizers.js.map +1 -0
- package/dist/src/scripts/validation/pipeline.d.ts +13 -0
- package/dist/src/scripts/validation/pipeline.d.ts.map +1 -0
- package/dist/src/scripts/validation/pipeline.js +126 -0
- package/dist/src/scripts/validation/pipeline.js.map +1 -0
- package/dist/src/scripts/validation/types.d.ts +128 -0
- package/dist/src/scripts/validation/types.d.ts.map +1 -0
- package/dist/src/scripts/validation/types.js +43 -0
- package/dist/src/scripts/validation/types.js.map +1 -0
- package/dist/src/security/index.d.ts +5 -4
- package/dist/src/security/index.d.ts.map +1 -1
- package/dist/src/security/index.js +8 -2
- package/dist/src/security/index.js.map +1 -1
- package/dist/src/security/rate-limiter/RateLimiter.d.ts +86 -0
- package/dist/src/security/rate-limiter/RateLimiter.d.ts.map +1 -0
- package/dist/src/security/rate-limiter/RateLimiter.js +260 -0
- package/dist/src/security/rate-limiter/RateLimiter.js.map +1 -0
- package/dist/src/security/rate-limiter/constants.d.ts +15 -0
- package/dist/src/security/rate-limiter/constants.d.ts.map +1 -0
- package/dist/src/security/rate-limiter/constants.js +15 -0
- package/dist/src/security/rate-limiter/constants.js.map +1 -0
- package/dist/src/security/rate-limiter/errors.d.ts +22 -0
- package/dist/src/security/rate-limiter/errors.d.ts.map +1 -0
- package/dist/src/security/rate-limiter/errors.js +32 -0
- package/dist/src/security/rate-limiter/errors.js.map +1 -0
- package/dist/src/security/rate-limiter/index.d.ts +12 -0
- package/dist/src/security/rate-limiter/index.d.ts.map +1 -0
- package/dist/src/security/rate-limiter/index.js +16 -0
- package/dist/src/security/rate-limiter/index.js.map +1 -0
- package/dist/src/security/rate-limiter/metrics-manager.d.ts +55 -0
- package/dist/src/security/rate-limiter/metrics-manager.d.ts.map +1 -0
- package/dist/src/security/rate-limiter/metrics-manager.js +144 -0
- package/dist/src/security/rate-limiter/metrics-manager.js.map +1 -0
- package/dist/src/security/rate-limiter/presets.d.ts +52 -0
- package/dist/src/security/rate-limiter/presets.d.ts.map +1 -0
- package/dist/src/security/rate-limiter/presets.js +53 -0
- package/dist/src/security/rate-limiter/presets.js.map +1 -0
- package/dist/src/security/rate-limiter/queue-manager.d.ts +59 -0
- package/dist/src/security/rate-limiter/queue-manager.d.ts.map +1 -0
- package/dist/src/security/rate-limiter/queue-manager.js +189 -0
- package/dist/src/security/rate-limiter/queue-manager.js.map +1 -0
- package/dist/src/security/rate-limiter/storage.d.ts +34 -0
- package/dist/src/security/rate-limiter/storage.d.ts.map +1 -0
- package/dist/src/security/rate-limiter/storage.js +80 -0
- package/dist/src/security/rate-limiter/storage.js.map +1 -0
- package/dist/src/security/rate-limiter/token-bucket.d.ts +44 -0
- package/dist/src/security/rate-limiter/token-bucket.d.ts.map +1 -0
- package/dist/src/security/rate-limiter/token-bucket.js +99 -0
- package/dist/src/security/rate-limiter/token-bucket.js.map +1 -0
- package/dist/src/security/rate-limiter/types.d.ts +104 -0
- package/dist/src/security/rate-limiter/types.d.ts.map +1 -0
- package/dist/src/security/rate-limiter/types.js +7 -0
- package/dist/src/security/rate-limiter/types.js.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.d.ts +94 -0
- package/dist/src/security/scanner/SecurityScanner.d.ts.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.js +403 -0
- package/dist/src/security/scanner/SecurityScanner.js.map +1 -0
- package/dist/src/security/scanner/index.d.ts +11 -0
- package/dist/src/security/scanner/index.d.ts.map +1 -0
- package/dist/src/security/scanner/index.js +14 -0
- package/dist/src/security/scanner/index.js.map +1 -0
- package/dist/src/security/scanner/patterns.d.ts +14 -0
- package/dist/src/security/scanner/patterns.d.ts.map +1 -0
- package/dist/src/security/scanner/patterns.js +147 -0
- package/dist/src/security/scanner/patterns.js.map +1 -0
- package/dist/src/security/scanner/regex-utils.d.ts +33 -0
- package/dist/src/security/scanner/regex-utils.d.ts.map +1 -0
- package/dist/src/security/scanner/regex-utils.js +41 -0
- package/dist/src/security/scanner/regex-utils.js.map +1 -0
- package/dist/src/security/scanner/types.d.ts +63 -0
- package/dist/src/security/scanner/types.d.ts.map +1 -0
- package/dist/src/security/scanner/types.js +7 -0
- package/dist/src/security/scanner/types.js.map +1 -0
- package/dist/src/security/scanner/weights.d.ts +15 -0
- package/dist/src/security/scanner/weights.d.ts.map +1 -0
- package/dist/src/security/scanner/weights.js +28 -0
- package/dist/src/security/scanner/weights.js.map +1 -0
- package/dist/src/session/SessionHealthMonitor.d.ts +5 -168
- package/dist/src/session/SessionHealthMonitor.d.ts.map +1 -1
- package/dist/src/session/SessionHealthMonitor.js +22 -91
- package/dist/src/session/SessionHealthMonitor.js.map +1 -1
- package/dist/src/session/health-checks.d.ts +37 -0
- package/dist/src/session/health-checks.d.ts.map +1 -0
- package/dist/src/session/health-checks.js +64 -0
- package/dist/src/session/health-checks.js.map +1 -0
- package/dist/src/session/health-types.d.ts +78 -0
- package/dist/src/session/health-types.d.ts.map +1 -0
- package/dist/src/session/health-types.js +16 -0
- package/dist/src/session/health-types.js.map +1 -0
- package/dist/src/session/index.d.ts +5 -1
- package/dist/src/session/index.d.ts.map +1 -1
- package/dist/src/session/index.js +9 -0
- package/dist/src/session/index.js.map +1 -1
- package/dist/src/session/metrics-collector.d.ts +23 -0
- package/dist/src/session/metrics-collector.d.ts.map +1 -0
- package/dist/src/session/metrics-collector.js +44 -0
- package/dist/src/session/metrics-collector.js.map +1 -0
- package/dist/src/session/typed-event-emitter.d.ts +70 -0
- package/dist/src/session/typed-event-emitter.d.ts.map +1 -0
- package/dist/src/session/typed-event-emitter.js +79 -0
- package/dist/src/session/typed-event-emitter.js.map +1 -0
- package/dist/src/sources/BaseSourceAdapter.d.ts +1 -1
- package/dist/src/sources/BaseSourceAdapter.d.ts.map +1 -1
- package/dist/src/sources/BaseSourceAdapter.js +2 -2
- package/dist/src/sources/BaseSourceAdapter.js.map +1 -1
- package/dist/src/telemetry/index.d.ts +1 -0
- package/dist/src/telemetry/index.d.ts.map +1 -1
- package/dist/src/telemetry/index.js +2 -0
- package/dist/src/telemetry/index.js.map +1 -1
- package/dist/src/telemetry/posthog.d.ts +125 -0
- package/dist/src/telemetry/posthog.d.ts.map +1 -0
- package/dist/src/telemetry/posthog.js +198 -0
- package/dist/src/telemetry/posthog.js.map +1 -0
- package/dist/tests/RateLimiter.test.js +4 -4
- package/dist/tests/RateLimiter.test.js.map +1 -1
- package/dist/tests/e2e/security/security.e2e.test.js +3 -3
- package/dist/tests/e2e/security/security.e2e.test.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SMI-1189: Scanner
|
|
3
|
+
*
|
|
4
|
+
* Main scanning logic for imported skills.
|
|
5
|
+
*/
|
|
6
|
+
import * as path from 'path';
|
|
7
|
+
import { SecurityScanner } from '../../security/index.js';
|
|
8
|
+
import { shouldQuarantine, DEFAULT_TRUST_CONFIG } from './trust-scorer.js';
|
|
9
|
+
import { determineSeverityCategory } from './categorizer.js';
|
|
10
|
+
import { extractScannableContent, readImportedSkills, ensureDirectoryExists, fileExists, writeJsonFile, } from './file-scanner.js';
|
|
11
|
+
import { formatDuration, logHeader, logFindings, logProgress, logCompletion, logFileOutput, } from './logger.js';
|
|
12
|
+
import { logSummary, generateSecurityReport, generateQuarantineOutput, generateSafeSkillsOutput, logRecommendations, } from './reporter.js';
|
|
13
|
+
/** Default scanner configuration */
|
|
14
|
+
export const DEFAULT_CONFIG = {
|
|
15
|
+
defaultInput: './data/imported-skills.json',
|
|
16
|
+
outputDir: './data',
|
|
17
|
+
scannerOptions: {
|
|
18
|
+
riskThreshold: 40,
|
|
19
|
+
},
|
|
20
|
+
trustConfig: DEFAULT_TRUST_CONFIG,
|
|
21
|
+
progressInterval: 100,
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Scan a single skill and return the result
|
|
25
|
+
*
|
|
26
|
+
* @param skill - The skill to scan
|
|
27
|
+
* @param scanner - The security scanner instance
|
|
28
|
+
* @param config - Trust scorer configuration
|
|
29
|
+
* @returns The scan result
|
|
30
|
+
*/
|
|
31
|
+
export function scanSkill(skill, scanner, config = DEFAULT_TRUST_CONFIG) {
|
|
32
|
+
const content = extractScannableContent(skill);
|
|
33
|
+
const report = scanner.scan(skill.id, content);
|
|
34
|
+
const isQuarantined = shouldQuarantine(report, config);
|
|
35
|
+
const severityCategory = determineSeverityCategory(report.findings);
|
|
36
|
+
return {
|
|
37
|
+
skillId: skill.id,
|
|
38
|
+
skillName: skill.name,
|
|
39
|
+
author: skill.author || 'unknown',
|
|
40
|
+
source: skill.source || 'unknown',
|
|
41
|
+
scanReport: report,
|
|
42
|
+
severityCategory,
|
|
43
|
+
isQuarantined,
|
|
44
|
+
scanTimestamp: new Date().toISOString(),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Scan all imported skills
|
|
49
|
+
*
|
|
50
|
+
* @param inputPath - Path to the imported skills JSON file
|
|
51
|
+
* @param config - Scanner configuration
|
|
52
|
+
*/
|
|
53
|
+
export async function scanImportedSkills(inputPath, config = DEFAULT_CONFIG) {
|
|
54
|
+
const startTime = performance.now();
|
|
55
|
+
logHeader('SMI-864: Security Scanner for Imported Skills');
|
|
56
|
+
console.log(`Input file: ${inputPath}`);
|
|
57
|
+
console.log(`Output directory: ${config.outputDir}`);
|
|
58
|
+
console.log();
|
|
59
|
+
// Validate input file exists
|
|
60
|
+
if (!fileExists(inputPath)) {
|
|
61
|
+
console.error(`Error: Input file not found: ${inputPath}`);
|
|
62
|
+
console.error('Usage: npx tsx packages/core/src/scripts/scan-imported-skills.ts [path-to-imported-skills.json]');
|
|
63
|
+
process.exit(1);
|
|
64
|
+
}
|
|
65
|
+
// Ensure output directory exists
|
|
66
|
+
ensureDirectoryExists(config.outputDir);
|
|
67
|
+
// Read and parse imported skills
|
|
68
|
+
console.log('Reading imported skills...');
|
|
69
|
+
let skills;
|
|
70
|
+
try {
|
|
71
|
+
skills = await readImportedSkills(inputPath);
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
console.error(`Error reading/parsing input file: ${error.message}`);
|
|
75
|
+
process.exit(1);
|
|
76
|
+
}
|
|
77
|
+
console.log(`Found ${skills.length} skills to scan\n`);
|
|
78
|
+
// Initialize scanner
|
|
79
|
+
const scanner = new SecurityScanner(config.scannerOptions);
|
|
80
|
+
// Scan all skills
|
|
81
|
+
const results = [];
|
|
82
|
+
const allFindings = [];
|
|
83
|
+
let processedCount = 0;
|
|
84
|
+
console.log('Scanning skills...');
|
|
85
|
+
for (const skill of skills) {
|
|
86
|
+
processedCount++;
|
|
87
|
+
const result = scanSkill(skill, scanner, config.trustConfig);
|
|
88
|
+
results.push(result);
|
|
89
|
+
// Collect findings with skill context
|
|
90
|
+
for (const finding of result.scanReport.findings) {
|
|
91
|
+
allFindings.push({ ...finding, skillId: skill.id });
|
|
92
|
+
}
|
|
93
|
+
// Log progress
|
|
94
|
+
if (processedCount % config.progressInterval === 0) {
|
|
95
|
+
logProgress(processedCount, skills.length);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
logCompletion(processedCount, skills.length);
|
|
99
|
+
// Log critical and high findings
|
|
100
|
+
const criticalFindings = allFindings.filter((f) => f.severity === 'critical');
|
|
101
|
+
const highFindings = allFindings.filter((f) => f.severity === 'high');
|
|
102
|
+
logFindings(criticalFindings, 20, 'CRITICAL FINDINGS');
|
|
103
|
+
logFindings(highFindings, 10, 'HIGH SEVERITY FINDINGS');
|
|
104
|
+
// Print summary
|
|
105
|
+
logSummary(results);
|
|
106
|
+
// Generate output files
|
|
107
|
+
console.log('Generating output files...\n');
|
|
108
|
+
// 1. Full security report
|
|
109
|
+
const securityReport = generateSecurityReport(results, allFindings, inputPath);
|
|
110
|
+
const reportPath = path.join(config.outputDir, 'security-report.json');
|
|
111
|
+
await writeJsonFile(reportPath, securityReport);
|
|
112
|
+
logFileOutput('security-report.json', results.length);
|
|
113
|
+
// 2. Quarantine list
|
|
114
|
+
const quarantineOutput = generateQuarantineOutput(results);
|
|
115
|
+
const quarantinePath = path.join(config.outputDir, 'quarantine-skills.json');
|
|
116
|
+
await writeJsonFile(quarantinePath, quarantineOutput);
|
|
117
|
+
logFileOutput('quarantine-skills.json', quarantineOutput.count, 'blocked');
|
|
118
|
+
// 3. Safe skills list
|
|
119
|
+
const safeOutput = generateSafeSkillsOutput(results);
|
|
120
|
+
const safePath = path.join(config.outputDir, 'safe-skills.json');
|
|
121
|
+
await writeJsonFile(safePath, safeOutput);
|
|
122
|
+
logFileOutput('safe-skills.json', safeOutput.count, 'approved');
|
|
123
|
+
// Final timing
|
|
124
|
+
const endTime = performance.now();
|
|
125
|
+
const duration = formatDuration(endTime - startTime);
|
|
126
|
+
console.log('\n' + '='.repeat(60));
|
|
127
|
+
console.log(' SCAN COMPLETE');
|
|
128
|
+
console.log('='.repeat(60));
|
|
129
|
+
console.log(` Duration: ${duration}`);
|
|
130
|
+
console.log(` Skills per second: ${((results.length / (endTime - startTime)) * 1000).toFixed(1)}`);
|
|
131
|
+
console.log();
|
|
132
|
+
console.log(' Output files:');
|
|
133
|
+
console.log(` - ${reportPath}`);
|
|
134
|
+
console.log(` - ${quarantinePath}`);
|
|
135
|
+
console.log(` - ${safePath}`);
|
|
136
|
+
console.log('='.repeat(60) + '\n');
|
|
137
|
+
// Recommendations
|
|
138
|
+
logRecommendations(results, criticalFindings.length);
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=scanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scanner.js","sourceRoot":"","sources":["../../../../src/scripts/skill-scanner/scanner.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAMzD,OAAO,EAAE,gBAAgB,EAA0B,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAClG,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAk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AAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAA;IAC3B,OAAO,CAAC,GAAG,CAAC,4BAA4B,QAAQ,EAAE,CAAC,CAAA;IACnD,OAAO,CAAC,GAAG,CACT,4BAA4B,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAC3F,CAAA;IACD,OAAO,CAAC,GAAG,EAAE,CAAA;IACb,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;IAC9B,OAAO,CAAC,GAAG,CAAC,SAAS,UAAU,EAAE,CAAC,CAAA;IAClC,OAAO,CAAC,GAAG,CAAC,SAAS,cAAc,EAAE,CAAC,CAAA;IACtC,OAAO,CAAC,GAAG,CAAC,SAAS,QAAQ,EAAE,CAAC,CAAA;IAChC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;IAElC,kBAAkB;IAClB,kBAAkB,CAAC,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;AACtD,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SMI-1189: Trust Scorer
|
|
3
|
+
*
|
|
4
|
+
* Trust score calculation and quarantine decision logic.
|
|
5
|
+
*/
|
|
6
|
+
import type { ScanReport } from '../../security/index.js';
|
|
7
|
+
/**
|
|
8
|
+
* Configuration for trust scoring
|
|
9
|
+
*/
|
|
10
|
+
export interface TrustScorerConfig {
|
|
11
|
+
/** Risk threshold for quarantine (skills at or above this are quarantined) */
|
|
12
|
+
quarantineThreshold: number;
|
|
13
|
+
}
|
|
14
|
+
/** Default trust scorer configuration */
|
|
15
|
+
export declare const DEFAULT_TRUST_CONFIG: TrustScorerConfig;
|
|
16
|
+
/**
|
|
17
|
+
* Determines if a skill should be quarantined based on findings
|
|
18
|
+
*
|
|
19
|
+
* A skill is quarantined if:
|
|
20
|
+
* 1. Has critical or high severity findings
|
|
21
|
+
* 2. Risk score exceeds threshold
|
|
22
|
+
* 3. Scan failed (passed = false)
|
|
23
|
+
*
|
|
24
|
+
* @param report - The scan report for the skill
|
|
25
|
+
* @param config - Trust scorer configuration
|
|
26
|
+
* @returns true if the skill should be quarantined
|
|
27
|
+
*/
|
|
28
|
+
export declare function shouldQuarantine(report: ScanReport, config?: TrustScorerConfig): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Calculate average risk score from results
|
|
31
|
+
*
|
|
32
|
+
* @param results - Array of scan results with risk scores
|
|
33
|
+
* @returns Average risk score (0 if no results)
|
|
34
|
+
*/
|
|
35
|
+
export declare function calculateAverageRiskScore(results: Array<{
|
|
36
|
+
scanReport: ScanReport;
|
|
37
|
+
}>): number;
|
|
38
|
+
/**
|
|
39
|
+
* Calculate maximum risk score from results
|
|
40
|
+
*
|
|
41
|
+
* @param results - Array of scan results with risk scores
|
|
42
|
+
* @returns Maximum risk score (0 if no results)
|
|
43
|
+
*/
|
|
44
|
+
export declare function calculateMaxRiskScore(results: Array<{
|
|
45
|
+
scanReport: ScanReport;
|
|
46
|
+
}>): number;
|
|
47
|
+
/**
|
|
48
|
+
* Get pass/fail statistics from results
|
|
49
|
+
*
|
|
50
|
+
* @param results - Array of scan results
|
|
51
|
+
* @returns Object with passed and quarantined counts
|
|
52
|
+
*/
|
|
53
|
+
export declare function getPassFailStats(results: Array<{
|
|
54
|
+
isQuarantined: boolean;
|
|
55
|
+
}>): {
|
|
56
|
+
passed: number;
|
|
57
|
+
quarantined: number;
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=trust-scorer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trust-scorer.d.ts","sourceRoot":"","sources":["../../../../src/scripts/skill-scanner/trust-scorer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEzD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,8EAA8E;IAC9E,mBAAmB,EAAE,MAAM,CAAA;CAC5B;AAED,yCAAyC;AACzC,eAAO,MAAM,oBAAoB,EAAE,iBAElC,CAAA;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,UAAU,EAClB,MAAM,GAAE,iBAAwC,GAC/C,OAAO,CAMT;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,KAAK,CAAC;IAAE,UAAU,EAAE,UAAU,CAAA;CAAE,CAAC,GACzC,MAAM,CAMR;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,KAAK,CAAC;IAAE,UAAU,EAAE,UAAU,CAAA;CAAE,CAAC,GACzC,MAAM,CAGR;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,KAAK,CAAC;IAAE,aAAa,EAAE,OAAO,CAAA;CAAE,CAAC,GACzC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAKzC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SMI-1189: Trust Scorer
|
|
3
|
+
*
|
|
4
|
+
* Trust score calculation and quarantine decision logic.
|
|
5
|
+
*/
|
|
6
|
+
/** Default trust scorer configuration */
|
|
7
|
+
export const DEFAULT_TRUST_CONFIG = {
|
|
8
|
+
quarantineThreshold: 40,
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Determines if a skill should be quarantined based on findings
|
|
12
|
+
*
|
|
13
|
+
* A skill is quarantined if:
|
|
14
|
+
* 1. Has critical or high severity findings
|
|
15
|
+
* 2. Risk score exceeds threshold
|
|
16
|
+
* 3. Scan failed (passed = false)
|
|
17
|
+
*
|
|
18
|
+
* @param report - The scan report for the skill
|
|
19
|
+
* @param config - Trust scorer configuration
|
|
20
|
+
* @returns true if the skill should be quarantined
|
|
21
|
+
*/
|
|
22
|
+
export function shouldQuarantine(report, config = DEFAULT_TRUST_CONFIG) {
|
|
23
|
+
return (!report.passed ||
|
|
24
|
+
report.riskScore >= config.quarantineThreshold ||
|
|
25
|
+
report.findings.some((f) => f.severity === 'critical' || f.severity === 'high'));
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Calculate average risk score from results
|
|
29
|
+
*
|
|
30
|
+
* @param results - Array of scan results with risk scores
|
|
31
|
+
* @returns Average risk score (0 if no results)
|
|
32
|
+
*/
|
|
33
|
+
export function calculateAverageRiskScore(results) {
|
|
34
|
+
const total = results.length;
|
|
35
|
+
if (total === 0)
|
|
36
|
+
return 0;
|
|
37
|
+
const sum = results.reduce((acc, r) => acc + r.scanReport.riskScore, 0);
|
|
38
|
+
return sum / total;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Calculate maximum risk score from results
|
|
42
|
+
*
|
|
43
|
+
* @param results - Array of scan results with risk scores
|
|
44
|
+
* @returns Maximum risk score (0 if no results)
|
|
45
|
+
*/
|
|
46
|
+
export function calculateMaxRiskScore(results) {
|
|
47
|
+
if (results.length === 0)
|
|
48
|
+
return 0;
|
|
49
|
+
return Math.max(...results.map((r) => r.scanReport.riskScore));
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Get pass/fail statistics from results
|
|
53
|
+
*
|
|
54
|
+
* @param results - Array of scan results
|
|
55
|
+
* @returns Object with passed and quarantined counts
|
|
56
|
+
*/
|
|
57
|
+
export function getPassFailStats(results) {
|
|
58
|
+
const passed = results.filter((r) => !r.isQuarantined).length;
|
|
59
|
+
const quarantined = results.filter((r) => r.isQuarantined).length;
|
|
60
|
+
return { passed, quarantined };
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=trust-scorer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trust-scorer.js","sourceRo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AG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,MAAM,CAAA;IAC7D,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,MAAM,CAAA;IAEjE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAA;AAChC,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SMI-1189: Skill Scanner Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for the security scanner script.
|
|
5
|
+
*/
|
|
6
|
+
import type { ScanReport, SecurityFinding, SecuritySeverity } from '../../security/index.js';
|
|
7
|
+
/**
|
|
8
|
+
* Structure of an imported skill in imported-skills.json
|
|
9
|
+
*/
|
|
10
|
+
export interface ImportedSkill {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
author?: string;
|
|
15
|
+
content?: string;
|
|
16
|
+
repo_url?: string;
|
|
17
|
+
source?: string;
|
|
18
|
+
tags?: string[];
|
|
19
|
+
instructions?: string;
|
|
20
|
+
trigger?: string;
|
|
21
|
+
metadata?: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Severity categories for output organization
|
|
25
|
+
*/
|
|
26
|
+
export type SeverityCategory = 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW';
|
|
27
|
+
/**
|
|
28
|
+
* Skill scan result with categorization
|
|
29
|
+
*/
|
|
30
|
+
export interface SkillScanResult {
|
|
31
|
+
skillId: string;
|
|
32
|
+
skillName: string;
|
|
33
|
+
author: string;
|
|
34
|
+
source: string;
|
|
35
|
+
scanReport: ScanReport;
|
|
36
|
+
severityCategory: SeverityCategory;
|
|
37
|
+
isQuarantined: boolean;
|
|
38
|
+
scanTimestamp: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Full security report output structure
|
|
42
|
+
*/
|
|
43
|
+
export interface SecurityReportOutput {
|
|
44
|
+
scanDate: string;
|
|
45
|
+
inputFile: string;
|
|
46
|
+
summary: {
|
|
47
|
+
totalScanned: number;
|
|
48
|
+
passed: number;
|
|
49
|
+
quarantined: number;
|
|
50
|
+
bySeverity: Record<SeverityCategory, number>;
|
|
51
|
+
averageRiskScore: number;
|
|
52
|
+
maxRiskScore: number;
|
|
53
|
+
};
|
|
54
|
+
results: SkillScanResult[];
|
|
55
|
+
topFindings: Array<{
|
|
56
|
+
type: string;
|
|
57
|
+
count: number;
|
|
58
|
+
severity: SecuritySeverity;
|
|
59
|
+
}>;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Quarantine list output structure
|
|
63
|
+
*/
|
|
64
|
+
export interface QuarantineOutput {
|
|
65
|
+
generatedAt: string;
|
|
66
|
+
reason: string;
|
|
67
|
+
count: number;
|
|
68
|
+
skills: Array<{
|
|
69
|
+
skillId: string;
|
|
70
|
+
skillName: string;
|
|
71
|
+
author: string;
|
|
72
|
+
riskScore: number;
|
|
73
|
+
severityCategory: SeverityCategory;
|
|
74
|
+
topFindings: string[];
|
|
75
|
+
}>;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Safe skills list output structure
|
|
79
|
+
*/
|
|
80
|
+
export interface SafeSkillsOutput {
|
|
81
|
+
generatedAt: string;
|
|
82
|
+
count: number;
|
|
83
|
+
skills: Array<{
|
|
84
|
+
skillId: string;
|
|
85
|
+
skillName: string;
|
|
86
|
+
author: string;
|
|
87
|
+
source: string;
|
|
88
|
+
riskScore: number;
|
|
89
|
+
}>;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Finding with skill context
|
|
93
|
+
*/
|
|
94
|
+
export interface FindingWithContext extends SecurityFinding {
|
|
95
|
+
skillId: string;
|
|
96
|
+
}
|
|
97
|
+
export type { ScanReport, SecurityFinding, SecuritySeverity };
|
|
98
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/scripts/skill-scanner/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE5F;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACnC;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAA;AAErE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,UAAU,CAAA;IACtB,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,aAAa,EAAE,OAAO,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE;QACP,YAAY,EAAE,MAAM,C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
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/scripts/skill-scanner/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -1,180 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* SMI-863: Skill Validation and Deduplication Pipeline
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* This file re-exports from the split validation module for backwards compatibility.
|
|
5
|
+
* See ./validation/ for the implementation.
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
8
|
* npx tsx packages/core/src/scripts/validate-skills.ts [--input skills.json] [--output-dir data]
|
|
9
|
-
*
|
|
10
|
-
* Validation Rules:
|
|
11
|
-
* 1. Name present (non-empty)
|
|
12
|
-
* 2. Author present (use repo owner if missing)
|
|
13
|
-
* 3. Description present (use first 100 chars of name if missing)
|
|
14
|
-
* 4. Valid ID format (author/name)
|
|
15
|
-
* 5. Quality score 0-100
|
|
16
|
-
* 6. Valid trust tier enum
|
|
17
|
-
*
|
|
18
|
-
* Deduplication:
|
|
19
|
-
* - Primary key: repo_url
|
|
20
|
-
* - Source priority: anthropic-official (100) > github (80) > claude-plugins (40)
|
|
21
|
-
* - Keep higher quality score on conflict
|
|
22
|
-
* - Semantic similarity detection (threshold 0.85)
|
|
23
|
-
*/
|
|
24
|
-
declare const CONFIG: {
|
|
25
|
-
/** Default input file path */
|
|
26
|
-
readonly DEFAULT_INPUT: "./data/skills.json";
|
|
27
|
-
/** Default output directory */
|
|
28
|
-
readonly DEFAULT_OUTPUT_DIR: "./data";
|
|
29
|
-
/** Semantic similarity threshold for duplicate detection */
|
|
30
|
-
readonly SIMILARITY_THRESHOLD: 0.85;
|
|
31
|
-
/** Source priority scores */
|
|
32
|
-
readonly SOURCE_PRIORITY: Record<string, number>;
|
|
33
|
-
/** Valid trust tiers */
|
|
34
|
-
readonly VALID_TRUST_TIERS: readonly ["verified", "community", "experimental", "unknown"];
|
|
35
|
-
};
|
|
36
|
-
type TrustTier = (typeof CONFIG.VALID_TRUST_TIERS)[number];
|
|
37
|
-
/** Raw skill input that may have missing or invalid fields */
|
|
38
|
-
interface RawSkillInput {
|
|
39
|
-
id?: string;
|
|
40
|
-
name?: string;
|
|
41
|
-
description?: string | null;
|
|
42
|
-
author?: string | null;
|
|
43
|
-
repo_url?: string | null;
|
|
44
|
-
repoUrl?: string | null;
|
|
45
|
-
quality_score?: number | null;
|
|
46
|
-
qualityScore?: number | null;
|
|
47
|
-
trust_tier?: string | null;
|
|
48
|
-
trustTier?: string | null;
|
|
49
|
-
tags?: string[];
|
|
50
|
-
source?: string;
|
|
51
|
-
stars?: number;
|
|
52
|
-
[key: string]: unknown;
|
|
53
|
-
}
|
|
54
|
-
/** Validated skill with all required fields */
|
|
55
|
-
interface ValidatedSkill {
|
|
56
|
-
id: string;
|
|
57
|
-
name: string;
|
|
58
|
-
description: string;
|
|
59
|
-
author: string;
|
|
60
|
-
repo_url: string | null;
|
|
61
|
-
quality_score: number;
|
|
62
|
-
trust_tier: TrustTier;
|
|
63
|
-
tags: string[];
|
|
64
|
-
source: string;
|
|
65
|
-
}
|
|
66
|
-
/** Validation error for a single field */
|
|
67
|
-
interface ValidationFieldError {
|
|
68
|
-
field: string;
|
|
69
|
-
message: string;
|
|
70
|
-
value?: unknown;
|
|
71
|
-
}
|
|
72
|
-
/** Result of validating a single skill */
|
|
73
|
-
interface SkillValidationResult {
|
|
74
|
-
valid: boolean;
|
|
75
|
-
skill: ValidatedSkill | null;
|
|
76
|
-
original: RawSkillInput;
|
|
77
|
-
errors: ValidationFieldError[];
|
|
78
|
-
warnings: string[];
|
|
79
|
-
fixes: string[];
|
|
80
|
-
}
|
|
81
|
-
/** Duplicate detection result */
|
|
82
|
-
interface DuplicateEntry {
|
|
83
|
-
kept: ValidatedSkill;
|
|
84
|
-
discarded: ValidatedSkill;
|
|
85
|
-
reason: 'repo_url' | 'semantic_similarity';
|
|
86
|
-
similarity?: number;
|
|
87
|
-
}
|
|
88
|
-
/** Overall validation report */
|
|
89
|
-
interface ValidationReport {
|
|
90
|
-
timestamp: string;
|
|
91
|
-
summary: {
|
|
92
|
-
total_input: number;
|
|
93
|
-
valid_skills: number;
|
|
94
|
-
invalid_skills: number;
|
|
95
|
-
duplicates_removed: number;
|
|
96
|
-
auto_fixes_applied: number;
|
|
97
|
-
errors_by_field: Record<string, number>;
|
|
98
|
-
};
|
|
99
|
-
errors: Array<{
|
|
100
|
-
skill_id: string | undefined;
|
|
101
|
-
skill_name: string | undefined;
|
|
102
|
-
errors: ValidationFieldError[];
|
|
103
|
-
}>;
|
|
104
|
-
warnings: Array<{
|
|
105
|
-
skill_id: string | undefined;
|
|
106
|
-
skill_name: string | undefined;
|
|
107
|
-
warnings: string[];
|
|
108
|
-
}>;
|
|
109
|
-
fixes: Array<{
|
|
110
|
-
skill_id: string | undefined;
|
|
111
|
-
skill_name: string | undefined;
|
|
112
|
-
fixes: string[];
|
|
113
|
-
}>;
|
|
114
|
-
}
|
|
115
|
-
/** Duplicates report */
|
|
116
|
-
interface DuplicatesReport {
|
|
117
|
-
timestamp: string;
|
|
118
|
-
summary: {
|
|
119
|
-
total_duplicates: number;
|
|
120
|
-
by_repo_url: number;
|
|
121
|
-
by_semantic_similarity: number;
|
|
122
|
-
};
|
|
123
|
-
duplicates: DuplicateEntry[];
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Extract owner from repo URL
|
|
127
|
-
*/
|
|
128
|
-
declare function extractOwnerFromRepoUrl(repoUrl: string | null | undefined): string | null;
|
|
129
|
-
/**
|
|
130
|
-
* Generate skill ID from author and name
|
|
131
|
-
*/
|
|
132
|
-
declare function generateSkillId(author: string, name: string): string;
|
|
133
|
-
/**
|
|
134
|
-
* Normalize quality score to 0-100 range
|
|
135
|
-
*/
|
|
136
|
-
declare function normalizeQualityScore(score: number | null | undefined): number;
|
|
137
|
-
/**
|
|
138
|
-
* Normalize trust tier to valid enum value
|
|
139
|
-
*/
|
|
140
|
-
declare function normalizeTrustTier(tier: string | null | undefined): TrustTier;
|
|
141
|
-
/**
|
|
142
|
-
* Normalize source name
|
|
143
|
-
*/
|
|
144
|
-
declare function normalizeSource(source: string | null | undefined): string;
|
|
145
|
-
/**
|
|
146
|
-
* Generate hash for repo URL deduplication
|
|
147
|
-
*/
|
|
148
|
-
declare function hashRepoUrl(repoUrl: string): string;
|
|
149
|
-
/**
|
|
150
|
-
* Validate a single skill and apply auto-fixes where possible
|
|
151
|
-
*/
|
|
152
|
-
declare function validateSkill(raw: RawSkillInput): SkillValidationResult;
|
|
153
|
-
/**
|
|
154
|
-
* Compare two skills and determine which to keep based on source priority and quality
|
|
155
|
-
*/
|
|
156
|
-
declare function compareSkillsForDedup(a: ValidatedSkill, b: ValidatedSkill): 'a' | 'b';
|
|
157
|
-
/**
|
|
158
|
-
* Deduplicate skills by repo_url
|
|
159
|
-
*/
|
|
160
|
-
declare function deduplicateByRepoUrl(skills: ValidatedSkill[]): {
|
|
161
|
-
unique: ValidatedSkill[];
|
|
162
|
-
duplicates: DuplicateEntry[];
|
|
163
|
-
};
|
|
164
|
-
/**
|
|
165
|
-
* Detect semantic duplicates using embedding similarity
|
|
166
|
-
*/
|
|
167
|
-
declare function detectSemanticDuplicates(skills: ValidatedSkill[], threshold?: number): Promise<{
|
|
168
|
-
unique: ValidatedSkill[];
|
|
169
|
-
duplicates: DuplicateEntry[];
|
|
170
|
-
}>;
|
|
171
|
-
/**
|
|
172
|
-
* Run the complete validation and deduplication pipeline
|
|
173
9
|
*/
|
|
174
|
-
export
|
|
175
|
-
validatedSkills: ValidatedSkill[];
|
|
176
|
-
validationReport: ValidationReport;
|
|
177
|
-
duplicatesReport: DuplicatesReport;
|
|
178
|
-
}>;
|
|
179
|
-
export { CONFIG, validateSkill, deduplicateByRepoUrl, detectSemanticDuplicates, compareSkillsForDedup, extractOwnerFromRepoUrl, generateSkillId, normalizeQualityScore, normalizeTrustTier, normalizeSource, hashRepoUrl, type RawSkillInput, type ValidatedSkill, type ValidationFieldError, type SkillValidationResult, type DuplicateEntry, type ValidationReport, type DuplicatesReport, type TrustTier, };
|
|
10
|
+
export * from './validation/index.js';
|
|
180
11
|
//# sourceMappingURL=validate-skills.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-skills.d.ts","sourceRoot":"","sources":["../../../src/scripts/validate-skills.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"validate-skills.d.ts","sourceRoot":"","sources":["../../../src/scripts/validate-skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,cAAc,uBAAuB,CAAA"}
|