test(e2e): enforce brew Git policy boundary - #6586
Conversation
Signed-off-by: J. Yaunches <jmyaunch@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughUpdates the live network-policy e2e test to assert that ChangesNetwork policy brew/github git egress test updates
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage remains at 96%, unchanged from the TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most impacted files.
Updated |
E2E Advisor RecommendationRequired E2E: None Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
|
E2E Target RecommendationRequired E2E targets: Dispatch required E2E targets:
Full E2E target advisor summaryE2E Target AdvisorBase: Required E2E targets
Optional E2E targets
Relevant changed files
|
PR Review Advisor — No blocking findingsMerge posture: No blocking advisor findings This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision. |
PR Review Advisor (Nemotron Ultra) — No blocking findingsMerge posture: No blocking advisor findings This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision. |
E2E Target Results — ✅ All requested jobs passedRun: 29034228621
|
<!-- markdownlint-disable MD041 --> ## Summary <!-- 1-3 sentences: what this PR does and why. --> Align the live network-policy E2E with the least-privilege `brew`/`github` split introduced by NVIDIA#6541. The test now proves Homebrew works without granting Git egress, then proves the explicit `github` preset enables that same Git operation. ## Related Issue <!-- Fixes #NNN or Closes #NNN. Remove this section if none. --> Refs NVIDIA#6502. Follow-up to NVIDIA#6541. ## Changes <!-- Bullet list of key changes. --> - Require a non-timeout policy denial when system Git targets GitHub under `brew` alone. - Keep the Homebrew install proof before applying `github`, then require Git to succeed after the preset is added. - Add regression coverage that pins policy preset changes to the deterministic `inference-policy` / `network-policy` E2E floor. ## Type of Change - [x] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates <!-- Check exactly one tests line and one docs line. Check other lines when applicable. Add every requested justification or approval reference. --> - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [ ] Tests not applicable — justification: - [ ] Docs updated for user-facing behavior changes - [x] Docs not applicable — justification: This corrects test coverage for the existing policy contract; CLI behavior, configuration, and user workflows are unchanged. - [x] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification <!-- Check each applicable item only when supported by the requested evidence. Run targeted tests once per relevant change set and rerun after later edits or hook autofixes that can affect the tested behavior. Do not rerun hook-covered checks. --> - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — `npx vitest run --project integration test/pr-risk-plan.test.ts test/brew-github-policy-boundary.test.ts` (24 passed); live E2E collection listed both network-policy tests; `npm run typecheck` passed. - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) - [ ] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) --- <!-- DCO sign-off is required in this PR description, and every commit must appear as Verified in GitHub. Run: git config user.name && git config user.email --> Signed-off-by: J. Yaunches <jmyaunch@gmail.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Strengthened network access enforcement for the Brew preset, blocking direct GitHub Git repository access where it should not be allowed. * Verified that GitHub Git access works only after the appropriate preset is applied, while preserving expected access to approved endpoints and installed tools. * **Tests** * Expanded end-to-end coverage to check both denied and allowed Git operations under the relevant policy presets. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: J. Yaunches <jmyaunch@gmail.com>
Summary
Align the live network-policy E2E with the least-privilege
brew/githubsplit introduced by #6541. The test now proves Homebrew works without granting Git egress, then proves the explicitgithubpreset enables that same Git operation.Related Issue
Refs #6502. Follow-up to #6541.
Changes
brewalone.github, then require Git to succeed after the preset is added.inference-policy/network-policyE2E floor.Type of Change
Quality Gates
Verification
Verifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run check:diffpassed when hooks were skipped or unavailablenpx vitest run --project integration test/pr-risk-plan.test.ts test/brew-github-policy-boundary.test.ts(24 passed); live E2E collection listed both network-policy tests;npm run typecheckpassed.npm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result:npm run docsbuilds without warnings (doc changes only)Signed-off-by: J. Yaunches jmyaunch@gmail.com
Summary by CodeRabbit