Repository navigation
fix(secret): secret_file_dirs hardening follow-ups - #2032
Merged
Merged
Conversation
Bounded data-dir identity walk, doctor/diagnostics finding for ${file:} refs
outside the allow-list, startup warning for unusable roots, stderr warning for
standalone CLI saves, refuse saves over an undecodable file holding
secret_file_dirs, pin tests for wildcard swap and the api_key override lookup.
refs #2031
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Deploying mcpproxy-docs with
|
| Latest commit: |
a743253
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://658a95a7.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://fix-secret-file-dirs-hardeni.mcpproxy-docs.pages.dev |
…reads, case-insensitive key guard Review round 1 (Sol 6.2): the shared walk budget could starve the state directories the old walk always compared; os.ReadDir enumerated whole directories; the undecodable-file guard missed upper-case keys and a file with a syntax error after the setting. refs #2031 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…s accuracy Review round 1 (Sol 6.2, chunk 4). refs #2031 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ck, ELOOP chains, escaped keys Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 45492191787 --repo smart-mcp-proxy/mcpproxy-go
|
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… a non-directory Review round 3 (Sol 6.2). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…alk budget Review round 4 (Sol 6.2). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ped pass-1 entries Review round 5 (Sol 6.2). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
8 tasks
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.
Refs #2031. Each item was confirmed against
mainfirst; tests written red, then fixed.denyPathsAtReadwalks the data dir breadth-first: 8 levels, 4096 entries per read, shallow first,secrets/skipped. Fixed budgets keep the cost independent of data-dir size (bleve segments). Past the budget a file is still refused by path containment and link count; only a post-check path swap onto it goes unmatched.readOpenedSecretfor wildcard too (file_policy.go:257,266). Swap test added as a pin; docs sentence corrected.mcpproxy doctor/GET /api/v1/diagnostics, server names only, scoped callers see their own servers. No contract change (no OAS/Web UI change).secret_file_dirs: []ErrSecretFileDirsUnverified) when the file is undecodable but still shows the key; non-JSON/no-key files stay overwritable.process_overrides.go; read as the missing-entry assertion inrunningAPIKeyFromReference(api_key_env.go). Please confirm that was the intended spot.*_windows_test.gorun in the Windows unit job (go test ./..., passed on a main run), but that job runs on pushes to main only, not on PRs.Left unticked in #2031: item 7 (target uncertain) until confirmed.
Checks:
go test -racesecret/config/runtime/management,scripts/test-api-e2e.sh, golangci-lint bare +--build-tags server(0 new issues), build/vet for windows, linux, server tag.Independent review (opencode
github-copilot/gpt-6.2-sol, high, merge-base diff, 6 rounds): every real finding was fixed with a test (budget starvation, unboundedReadDir, FIFO/non-directory open, case-insensitive and escaped keys in the undecodable-file guard, live-config doctor lookup, scope-filter before resolving paths, root warnings from both loaders, stderr control characters). Final state: chunk 4 (management) CLEAN; chunks 2a/2b/3 only low/edge findings accepted below; chunk 1 (walk) still reports the items below on the last round.Accepted, not fixed:
Lstatand open can add files outside the data dir to the deny set (false refusal of an unrelated read). Needs write access to the data dir, which can already replace the config.servesave; root with mode 000 passes the resolve check; the existing scan-default runtime warning naming other servers to scoped callers (pre-existing, not from this change);doctor --serverdropping string warnings.Review is therefore not fully clean, so auto-merge is not armed.
🤖 Generated with Claude Code