Skip to content

fix(security): redact credentials in declared component paths - #301

Merged
rng1995 merged 3 commits into
mainfrom
naren/redact-declared-component-paths
Oct 30, 2026
Merged

rng1995 merged 3 commits into
mainfrom
naren/redact-declared-component-paths

Conversation

@rng1995

@rng1995 rng1995 commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #260, from its "Not in this PR" list. Component-path findings and inventory rows quoted a declared manifest value as written. So a skills, commands, agents, hooks or other component entry holding a URL with userinfo (https://user:pw@host/...) or a query credential (./hooks.json?token=...) copied the credential into finding messages, plugin_component_ref metadata and broken inventory rows. Only mcpServers references were redacted (#260, R32).

The MCP reference redactor moves from plugin_mcp.py to plugin_paths.py as reported_ref. Every place that shows a declared path now uses it:

  • the shared declared-path findings: escape, missing, unsafe, invalid, style, root variable and unscanned folder;
  • broken inventory rows (name and path);
  • discovery's own messages: a non-path Codex entry, a wrong file kind, and an empty command folder;
  • the location of an unsafe-path finding. On Windows a declared styles?token=... cannot be opened (? is not allowed in file names), so it is reported as unsafe instead of missing, and that finding used the declared path as its location.

A value with no credentials is shown exactly as before.

This is private, not-yet-activated plugin analysis, so there is no CHANGELOG entry. The manifest record itself still keeps the source as written, as before; only report-facing text changes.

Verification

  • I am familiar with the Contributing Guidelines

  • Added or updated focused tests

  • Updated documentation for user-visible changes

  • Ran make lint

  • Ran make test

  • Ran make build

  • Did not add credentials, private datasets, or proprietary benchmark content

  • New tests: in tests/test_plugin_discovery.py, test_declared_component_references_never_show_their_credentials covers five Claude fields and a Codex non-path entry, and test_unsafe_declared_path_location_never_shows_its_credentials covers the unsafe-path location. Both fail on main and pass here. The Windows CI lane found the unsafe-path case.

  • Other tests: tests/test_plugin_discovery.py and tests/validators/test_plugin_mcp.py pass (77 tests), and ruff check and ruff format --check are clean on the touched files. The full suite and the Windows lane run in CI.

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

🤖 Generated with Claude Code

Component-path findings and inventory rows quoted the declared value as
written, so a skills, commands, agents, hooks or other component entry
holding a URL with userinfo or a query credential copied it into reports.
Only mcpServers references were redacted. The MCP redactor now lives in
plugin_paths as reported_ref, and every declared-path finding, broken
inventory row and discovery message uses it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995 and others added 2 commits October 30, 2026 13:21
Windows rejects '?' in file names, so a declared path such as
'styles?token=...' is reported as unsafe rather than missing, and that
finding used the declared path, credential included, as its location.
The location is now shown through reported_ref like the message.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
@rng1995
rng1995 merged commit b7e7395 into main Oct 30, 2026
20 checks passed
@rng1995
rng1995 deleted the naren/redact-declared-component-paths branch October 30, 2026 20:55
chrisknvidia pushed a commit that referenced this pull request Oct 30, 2026
* fix(security): redact credentials in declared component paths
* fix(security): redact the location of an unsafe declared path

Signed-off-by: Narendran Raghavan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant