You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix argument injection in npm/pip/docker package validators (#23374)
* Initial plan
* Fix argument injection in npm/pip/docker package validators
- Add npm package name regex validation (validateNpmPackageName) in name_validation.go
- Add PyPI package name regex validation (validatePipPackageName) per PEP 508 in name_validation.go
- Add -- end-of-options separator to npm view command in npm_validation.go
- Apply npm name regex validation before invoking npm CLI
- Apply pip name regex validation in validatePythonPackagesWithPip
- Add tests for single-character names and injection-style names in argument_injection_test.go
Closes #XXX
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/db1ddaab-af87-4f48-8b54-597c4bcbe3de
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
* Fix npm name regex to allow version suffixes in package specifiers
The npmPackageNameRE regex rejected valid npm package specifiers that
include version suffixes (e.g. @sentry/mcp-server@0.29.0). This caused
mcp-inspector.md to fail compilation in CI (177/178 instead of 178/178).
Update the regex to accept an optional @Version suffix and add test
cases for scoped+versioned, unscoped+versioned, caret ranges, and tags.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Co-authored-by: Landon Cox <landon.cox@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments