Repository navigation
Conversation
Command npm/npx imports are limited to a browser Origin request, never the MCP import tool. npm/npx always run with --ignore-scripts, archive and skill copies reject symbolic links, browser agent identity is taken from the owner transport header, subagent front matter is quoted, and spawn prompt files are created mode 0600. Co-authored-by: Salim <salim4n@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #63
Problem
On local mode,
POST /api/skills/importrannpx/npmon the host. The MCP toolcogitator_import_skillscould trigger that, including after a prompt injection. Archives kept symbolic links,/api/browser/agenttrustedconversationIdfrom the JSON body, subagent front matter was unquoted, and spawn prompt files used default permissions (0644).Fix
OriginmatchingHost). MCP and other non-UI callers getimport par commande réservé à une action humaine dans l'interface.cogitator_import_skillsrejects npm/npx sources before HTTP; description no longer offers a CLI command. The Agents UI has an explicit command mode.npm/npxalways get--ignore-scriptsandnpm_config_ignore_scripts=true, and run with cwd in the skills destination (not the Cogitator install).x-cogitator-conversation-id(from the process env). A bodyconversationIdis ignored.Proof: exploit tests fail on
dev, pass on this branchCommand:
On
dev(10 fail / 0 pass)On this branch (10 pass / 0 fail)
Targeted suite + typecheck / build
No project lint script.
Pre-existing failures (same 4 as
dev, none added)Same environment,
npx tsx --test test/*.test.ts:devThe extra 10 tests are the new exploit cases (all passing). The four remaining failures are unchanged:
cloneRepo : reprise par forme d'URL équivalente, refus d'une vraie autre source (M2, critère 10)folder picker explains an empty root and retains a named add actionsubagent panel: loading, model/status, visible refresh failure, explicit retry and recovery in both languagessubagent panel: changing conversations or closing aborts requests and ignores late responses(Issue #55 / PR #70 territory; not touched here.)
Draft PRs #65–#74 were not modified. No push to
dev, no deploy.