Repository navigation
Wire Noema to a same-job contextual-orchestrator sidecar #1120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
963b454
feat(noema): wire Noema to a same-job contextual-orchestrator sidecar
seonghobae c964271
feat(opencode): wire the real dispatch model pool to contextual-orche…
seonghobae d1454e0
fix(noema): allow-list GitHub CLI execution
seonghobae de0cbf7
test(opencode): pin updated review workflow blob
seonghobae 2c6530a
fix: pin orchestrator sidecar source and bound readiness
seonghobae a83257e
test: pin sidecar routing security contracts
seonghobae c233890
ci: repair contextual sidecar review blockers
seonghobae c4428dc
chore: remove inert one-shot repair workflow
seonghobae 8105d55
fix(review): enforce sidecar privacy and provider allowlist
seonghobae 07d7d9e
fix(security): start orchestrator sidecar only for public reviews
seonghobae ae090ab
fix(security): validate sidecar licenses before install
seonghobae 5dd18d0
test(sidecar): bind license evidence to lock artifacts
seonghobae b63f0ff
test: expose process-local sidecar credential gap
seonghobae 7044963
fix: keep sidecar bootstrap and credentials in one process
seonghobae d224ced
fix: bind sidecar licenses to locked artifacts
seonghobae 3268c25
test: bind cleanup disarm to successful readiness
seonghobae 3d45c3e
test: require a non-overridable sidecar source pin
seonghobae ee277c4
fix: make the sidecar source pin non-overridable
seonghobae cd9f025
test: complete sidecar contract docstrings
seonghobae 4006c43
fix(noema): confine optional codegraph context
seonghobae 82b5aa7
docs(noema): record codegraph context boundary
seonghobae 81c1872
fix(noema): reject platform path separators
seonghobae 3840d87
docs(noema): cite current NIST control release
seonghobae 101e690
Merge remote-tracking branch 'origin/main' into HEAD
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # Noema CodeGraph Context Boundary | ||
|
|
||
| ## Customer action | ||
|
|
||
| Keep `NOEMA_CODEGRAPH_CONTEXT_PATH` unset unless the review job has generated a | ||
| context file inside its checked-out workspace. When it is set, use a relative | ||
| regular-file path such as `.codegraph/review-context.md`; absolute paths, | ||
| `..` traversal, and symlinked components are rejected before any bytes are read. | ||
|
|
||
| ## Root-cause record | ||
|
|
||
| The Noema reviewer accepted an environment-provided filename directly in | ||
| `load_codegraph_context()`. A review-job process that inherited an unintended | ||
| absolute or traversal path could therefore read files outside the repository. | ||
| This is CWE-22 path traversal: canonicalization must remain inside a restricted | ||
| parent, and error output must not disclose the rejected path. | ||
|
|
||
| The repair establishes one bounded trust boundary: | ||
|
|
||
| 1. accept only a non-empty relative path without `..` components; | ||
| 2. reject symlinks in every path component; | ||
| 3. resolve the candidate and require it to remain below the current workspace; | ||
| 4. require a regular file and read at most `MAX_REVIEW_CONTEXT_CHARS + 1` bytes; | ||
| 5. return a generic diagnostic so the untrusted environment value is not echoed. | ||
|
|
||
| ## Verification | ||
|
|
||
| The contract tests cover a valid workspace file, absolute traversal, relative | ||
| traversal, a symlink escape, bounded reads, and the existing review-context | ||
| assembly. The check is intentionally fail-closed: missing or invalid context | ||
| reduces evidence rather than expanding file access. | ||
|
|
||
| ## Standards and authoritative references (APA 7th) | ||
|
|
||
| Joint Task Force. (2020/2025). *Security and privacy controls for information | ||
| systems and organizations* (NIST Special Publication 800-53, Revision 5, | ||
| Release 5.2.0). National Institute of Standards and Technology. | ||
| https://doi.org/10.6028/NIST.SP.800-53r5 | ||
|
|
||
| MITRE. (n.d.). *CWE-22: Improper limitation of a pathname to a restricted | ||
| directory ('Path traversal')* (Version 4.20). Common Weakness Enumeration. | ||
| Retrieved August 21, 2026, from https://cwe.mitre.org/data/definitions/22 | ||
|
|
||
| OWASP Foundation. (n.d.). *Path traversal*. Retrieved August 21, 2026, from | ||
| https://owasp.org/www-community/attacks/Path_Traversal |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.