fix: resolve TODO/FIXME markers across tool handlers and providers - #74
Merged
Conversation
… refusals
Widen the OS-temp exception from an openbuff-owned name gate to any path strictly inside a temp root (os.tmpdir() plus /tmp on POSIX), reads AND writes, and close the gaps that widening opens.
- Owned-temp write exemption for file-changing tools via OWNED_TEMP_WRITE_EXEMPT_TOOLS in tool-executor.ts; external-read allowlist stays read-only and code_search/glob/find_files_matching_content temp cwds stay hard-blocked because their handlers do not contain.
- New fail-closed mandatory-sensitive refusal (lexical + dereferenced + Win32-aliased, both scopes) keeps <tmp>/.env, credentials.json, private keys, and path-aware carriers like .aws/config unreachable for reads and writes.
- Win32 trailing dot/space alias guards in all four resolvers and in ownedTempMutationRefusal: a lexical payload.sh (trailing space/dot) whose raw extname misses OWNED_TEMP_REFUSED_EXTENSIONS can no longer stage an executable, clobber openbuff-*.log job artifacts, or forge tmux-captures-* evidence on Windows.
- ownedTempMutationRefusal now also refuses interpreter-executed extensions (.js/.mjs/.cjs/.jsx/.ts/.tsx/.mts/.cts/.py/.pyw/.pl/.rb/.lua/.php/.r/.jl/.tcl) so write_file /tmp/x.js followed by node /tmp/x.js cannot execute staged code under terminal profiles that permit node <file> (create/overwrite/move refused; delete stays allowed for cleanup).
- Fix findOutsideAbsolutePath false positive where a bare / inside a quoted sed/awk expression delimiter ('s/^/X /') was treated as an absolute path operand; re-refuse quoted root-only operand of filesystem-mutating executables (rm -rf '/', cp x '/').
- Consolidate duplicated containment fixtures (makeOutsideRoot/outsideRootsUsable/removeScratchParentIfEmpty) into common/src/testing/fixtures/containment-fixtures.ts, re-export from common/src/testing/index.ts, rewire six consuming suites, add ./testing and ./testing/* export-map entries in common/package.json, and gitignore .containment-test-scratch/ so escape-target fixtures sit outside both boundaries.
- Drop dead OWNED_TEMP_SEGMENT_PATTERNS_FS_AWARE re-export alias; import OWNED_TEMP_SEGMENT_PATTERNS directly from common and reuse isOwnedTempPathForFileSystem instead of a private fs-aware duplicate.
- Add truthful knowledge-refresh entries documenting the widening and the quoted-slash terminal fix.
Make COLLECT_FULL_FILE_CONTEXT configurable per-repo via OPENBUFF_COLLECT_FULL_FILE_CONTEXT env var or openbuff.json, and rename the upload stub to prepareExpandedFileContextForTraining with a documenting TODO about the missing upload mechanism. Extract the git-committer gate filter into filterSpawnAgentsGate/resolveSpawnGateAbort so it is unit-testable and reusable. Restore Chunk type safety in the OpenAI-compatible stream transform by capturing this.chunkSchema in the closure. Add provider-defined tool support in the OpenRouter mapping. Clarify context-pruner onResponseChunk comment.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Addresses TODO/FIXME markers across the codebase:
This change is