feat: implement local registry loader (packages/registry)#433
Conversation
|
Meticulous was unable to execute a test run for this PR because the most recent commit is associated with multiple PRs. To execute a test run, please try pushing up a new commit that is only associated with this PR. Last updated for commit |
- Add packages/registry/ package with actions.json, skills.json, packs.json - Add TypeScript loader module (loadActionsRegistry, loadSkillsRegistry, loadPacksRegistry) - Add unit tests for all loaders - Add packages/cli/src/lib/registry.ts re-export for CLI commands - Register @profullstack/sh1pt-registry dependency in CLI package
vu1nz Security Review1 finding(s) in PR #433 MEDIUM: 1 Findings
Full AI AnalysisLooking at this pull request, I can see it's adding a new registry package that manages local index files for actions, skills, and packs. Let me analyze each component for security vulnerabilities. Security AnalysisAfter reviewing the code thoroughly, I found one potential security issue:
Detailed AnalysisThe Security IssueThe Current usage (safe): loadJsonFile<ActionRegistryEntry>(join(REGISTRY_DIR, 'actions.json'))Potential risk: If this function were ever called with user input, it could lead to reading arbitrary files. What's NOT a Security Issue✅ Hardcoded file paths - The JSON files ( ✅ Trust levels - The ✅ Workspace dependencies - Using ✅ File system operations - Reading from predetermined registry files in the package directory is expected behavior ✅ JSON parsing - Standard JSON.parse() usage with proper error handling RecommendationThe identified issue is relatively low risk given current usage, but implementing path validation would follow security best practices and prevent future vulnerabilities if the code evolves. |
The CLI had no central index for discovering available action packs, skills, and packs. Per the PRD, a
packages/registry/directory with JSON index files is the canonical local source for this metadata.Changes
New package:
@profullstack/sh1pt-registryactions.json/skills.json/packs.json— index files listing all built-in entries withname,publisher,version,description,trustLevel,category, andpathfieldssrc/index.ts— exportsloadActionsRegistry(),loadSkillsRegistry(),loadPacksRegistry()with descriptive error wrapping on I/O and parse failuresCLI integration
packages/cli/src/lib/registry.ts— thin re-export so CLI commands import from a stable local pathpackages/cli/package.json— adds@profullstack/sh1pt-registry: workspace:^Initial registry entries
vu1nz-scan,node-pnpm-ci,node-pnpm-testmodern-web