skill-check
Advanced tools
+7
-3
@@ -608,2 +608,4 @@ import fs from 'node:fs'; | ||
| function resolveValidationStatus(result) { | ||
| if (result.summary.skillCount === 0) | ||
| return 'SKIPPED'; | ||
| if (result.summary.errorCount > 0) | ||
@@ -615,5 +617,7 @@ return 'FAIL'; | ||
| } | ||
| function resolveSecurityStatus(enabled, scanExitCode) { | ||
| function resolveSecurityStatus(enabled, scanExitCode, skillCount) { | ||
| if (!enabled) | ||
| return 'SKIPPED'; | ||
| if (skillCount === 0) | ||
| return 'SKIPPED'; | ||
| return scanExitCode === 0 ? 'PASS' : 'FAIL'; | ||
@@ -853,3 +857,3 @@ } | ||
| validationStatus: resolveValidationStatus(result), | ||
| securityStatus: resolveSecurityStatus(scanOptions.enabled, scanExitCode), | ||
| securityStatus: resolveSecurityStatus(scanOptions.enabled, scanExitCode, result.summary.skillCount), | ||
| elapsedMs: performance.now() - checkStartedAt, | ||
@@ -863,3 +867,3 @@ runCommand, | ||
| } | ||
| if (checkOptions.share) { | ||
| if (checkOptions.share && result.summary.skillCount > 0) { | ||
| emitShareStatus(io, 'rendering share image...'); | ||
@@ -866,0 +870,0 @@ const shareOutputPath = path.resolve(process.cwd(), checkOptions.shareOut ?? 'skill-check-share.png'); |
@@ -1,2 +0,2 @@ | ||
| export type ValidationStatus = 'PASS' | 'WARN' | 'FAIL'; | ||
| export type ValidationStatus = 'PASS' | 'WARN' | 'FAIL' | 'SKIPPED'; | ||
| export type SecurityStatus = 'PASS' | 'FAIL' | 'SKIPPED'; | ||
@@ -3,0 +3,0 @@ export type ConclusionCardMode = 'default' | 'share'; |
@@ -58,2 +58,4 @@ import pc from 'picocolors'; | ||
| return c.yellow(status); | ||
| if (status === 'SKIPPED') | ||
| return c.dim(status); | ||
| return c.red(status); | ||
@@ -60,0 +62,0 @@ } |
@@ -1,2 +0,2 @@ | ||
| export const DEFAULT_INCLUDE = ['**/skills/*/SKILL.md']; | ||
| export const DEFAULT_INCLUDE = ['**/SKILL.md']; | ||
| export const DEFAULT_EXCLUDE = [ | ||
@@ -3,0 +3,0 @@ '**/node_modules/**', |
| import fs from 'node:fs'; | ||
| import path from 'node:path'; | ||
| import fg from 'fast-glob'; | ||
| import { DEFAULT_INCLUDE } from './defaults.js'; | ||
| export async function discoverSkillFiles(config) { | ||
| const found = new Set(); | ||
| const usesDefaultInclude = config.include.length === DEFAULT_INCLUDE.length && | ||
| config.include.every((pattern, index) => pattern === DEFAULT_INCLUDE[index]); | ||
| for (const root of config.rootsAbs) { | ||
@@ -26,17 +23,2 @@ if (fs.existsSync(root) && fs.statSync(root).isFile()) { | ||
| }); | ||
| if (matches.length === 0 && | ||
| usesDefaultInclude && | ||
| path.basename(path.resolve(root)) === 'skills') { | ||
| const fallbackMatches = await fg('**/SKILL.md', { | ||
| cwd: root, | ||
| ignore: config.exclude, | ||
| absolute: true, | ||
| onlyFiles: true, | ||
| dot: true, | ||
| }); | ||
| for (const match of fallbackMatches) { | ||
| found.add(path.resolve(match)); | ||
| } | ||
| continue; | ||
| } | ||
| for (const match of matches) { | ||
@@ -43,0 +25,0 @@ found.add(path.resolve(match)); |
@@ -87,2 +87,4 @@ import Table from 'cli-table3'; | ||
| function resolveValidationStatus(result) { | ||
| if (result.summary.skillCount === 0) | ||
| return 'SKIPPED'; | ||
| if (result.summary.errorCount > 0) | ||
@@ -89,0 +91,0 @@ return 'FAIL'; |
+1
-1
| { | ||
| "name": "skill-check", | ||
| "version": "1.0.0", | ||
| "version": "1.1.0", | ||
| "description": "Linter for agent skill files", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 6 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 6 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
185880
-0.22%4338
-0.23%