Complete Tailtest runtime hardening - #17
Open
BananaAccurate wants to merge 26 commits into
Open
Conversation
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.
Root cause
The stacked Tailtest repair branch fixed the clean-Git mtime false positive, then further review identified adjacent hardening gaps: hook launch commands and automatic Git probes depended on ambient executable lookup from untrusted project directories, Stop defer authority accepted some data-like text too broadly, malformed hook payloads could crash SessionStart/PostToolUse, and the direct-clone initializer could execute project-local helpers (
python3,python,cygpath, or related shell helpers) when a project path appeared first onPATH.Change
require_git_change=Truesweeps.gitshims and relative PATH entries are not selected.TAILTEST_PROJECT_CWD.scripts/init.shhelper resolution so relative PATH entries, project-contained PATH entries, project-local helper shims, and project-contained symlink targets are not executed.readlink/greadlinkwhen available, without GNU-onlyreadlink -for--assumptions.event.cwd, thenTAILTEST_PROJECT_CWD, then process cwd.tool_inputto safe empty dictionaries before field access.Validation
Validated at head
6af8902289e968e9990e6b869a37245b4766faf8:340ce256f64f16b20a5ee742094bba4641b46ef1: applying only the new initializer project-PATH test failed withfake-python3-ran; temporary red worktree was removed.python -m pytest -q tests/test_hooks_manifest.py-- 12 passed, 1 skipped in 45.89s on Windows.python3 -m pytest -q tests/test_hooks_manifest.py::test_initializer_tolerates_non_gnu_readlink tests/test_hooks_manifest.py-- 8 passed, 5 skipped in 6.47s.python -m pytest -q-- 458 passed, 1 skipped in 82.75s;python -m ruff check .;python -m ruff format --check .;git diff --check-- all passed.python3 -m pytest -q && python3 -m ruff check . && python3 -m ruff format --check .-- 452 passed, 7 skipped in 27.11s; Ruff check passed; 30 files already formatted.6af8902: https://github.com/BananaAccurate/tailtest-codex/actions/runs/30516204249 -- success onwindows-latestandubuntu-latest.readlink -fportability issue; fix rounds addressed GNU-f, symlink fallback, and GNU--concerns; final scoped re-review marked all findings addressed with no new Critical/Important breakage.eefbecbplus format commit340ce25were scoped re-reviewed clean.git ls-remoteconfirmedactions/checkoutv7.0.1resolves to3d3c42e5aac5ba805825da76410c181273ba90b1andactions/setup-pythonv7.0.0resolves to5fda3b95a4ea91299a34e894583c3862153e4b97.Security scan status
89e2182d-4590-40fe-9950-c1b7cf6eeddefound confirmed initializer issuecand_init_path_exec_001at stale head340ce256f64f16b20a5ee742094bba4641b46ef1.7e01bc7,dd9691f,31b76b5,9f60954, and follow-up test-routing commits through6af8902.61132f9e6c4f9703ec707d7bf0d561fa49e64a2a..9f609542969fdb7706b40ef68a5a4544e86cae19, butawait_codex_security_scan_starttimed out waiting for setup Start. Repaired-head scan completion is thereforeBLOCKED/UNVERIFIED, not claimed as pass.Safety boundaries
mainstill lacks the prerequisite hook/runtime fixes.