Skip to content

fix(tier3): contain local Harbor directory transfers - #493

Merged
rng1995 merged 2 commits into
mainfrom
naren/local-transfer-harbor025
Nov 13, 2026
Merged

rng1995 merged 2 commits into
mainfrom
naren/local-transfer-harbor025

Conversation

@rng1995

@rng1995 rng1995 commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Harbor 0.25 local exclusion downloads fail when the SDK downloads its host /tmp archive; filtered downloads fail while uploading their /tmp file list. This inherited compatibility defect reproduces on main and on #479, independently of that PR's source-root guard (inline evidence).

Stage each archive and NUL-delimited file list privately under the run's existing protected TMPDIR, preserve Harbor's exclusion/include/exclude/protect semantics, and publish through the existing secure copier. Invalid sources fail before any command; failed directory scans propagate; unsafe destination links leave outputs unchanged. No general host /tmp access or global SDK setting is added. #479's source-root hardening is retained in combined validation; this PR does not duplicate its helper.

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

Validation used locked Harbor 0.25.0, Python 3.12.13 on macOS, and source head 04a02f0:

  • Before the repair, the 12 real transfer/source-boundary cases produced 5 failures and 7 passes. All 17 expanded cases now pass, including file bytes, exclusion/filtered/protect/no-match behavior, existing target overlays, quotes/Unicode/newline/leading-dash names, early source rejection, staging cleanup, destination link rejection, and directory traversal errors. Root independently passed the same 17; a separate reviewer passed 12 real cases and actual unreadable-directory/self-TMPDIR probes. Neither reviewer found a remaining source issue.
  • With test(tier3): cover run-directory checks on local directory downloads #479's production source-root guard retained, all 60 local-environment cases pass in a separate combined tree. Its older filtered success test was adapted to start the real environment and avoid asserting delegation to the incompatible SDK method. test(tier3): cover run-directory checks on local directory downloads #479's branch was not edited.
  • Six broader local-environment, secure-copy, upload, sandbox, local-mode and local-agent modules produced 594 passes, 8 skips, and 1 failure. The failure is an unchanged half-second timeout-cancellation fixture whose child PID was not ready. Both isolated variants reproduce the same failure on the untouched main baseline 90dfd5a and on this source; all exec/timeout/cleanup ASTs are identical. The failure receipt is retained; no unrelated test was weakened. A complete passing make test is not claimed.
  • make lint, changed-file formatting and diff checks pass. An isolated standard build produced both wheel and sdist. BSD tar was exercised locally; Linux CI supplies GNU tar coverage. No model request or paid evaluation was run.

Release Impact

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

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent source review completed at 04a02f0. Root reviewed the private staging, protected TMPDIR references, NUL-delimited file list, archive/source checks, and secure destination publication, and passed all 17 real transfer cases. A second reviewer passed 12 independent real cases plus actual unreadable-directory and self-TMPDIR source probes; no remaining source concern was identified. Combined #479 guard compatibility passes all 60 local-environment cases. Full lint and isolated wheel/sdist build pass. The six-module broad run recorded 594 passes, 8 skips and one unchanged timeout PID-readiness failure; both isolated variants reproduce on the untouched baseline main 90dfd5a. A passing full suite is not claimed. Current-head hosted CI is running; no paid evaluation was dispatched.

@rng1995
rng1995 enabled auto-merge (squash) November 13, 2026 10:19

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current-head adoption review: 62bcb61 is the exact clean automatic merge of reviewed 04a02f0 and main 81b1e27. Both local_environment.py and its complete test module are byte-for-byte identical to 04a02f0, so the independently reviewed transfer implementation, 17 real content/filter/source/cleanup regressions, and earlier 60-case #479 combined compatibility evidence are preserved. Those tests and the disclosed inherited timeout baseline reproduction were executed on the earlier reviewed source; a full rerun on this merge commit is not claimed. The new-head CI has started. #479 remains open and will be revalidated against actual main if it lands. No source change or main refresh was performed by this adoption review.

@rng1995
rng1995 merged commit 69584dd into main Nov 13, 2026
27 checks passed
@rng1995
rng1995 deleted the naren/local-transfer-harbor025 branch November 13, 2026 10:30
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