docs(network-policy): add Gmail policy preset and integration example#5415
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
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)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughThis PR adds a new ChangesGmail Network Policy Preset
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
docs/network-policy/integration-policy-examples.mdx (1)
364-366: 💤 Low valueConsider active voice for prerequisites.
These lines use passive constructions ("enabled," "downloaded"). While acceptable in a requirements list, rephrasing in active voice improves clarity:
- "Enable the Gmail API in a Google Cloud project."
- "Create an OAuth2 client ID and client secret, or configure a service account with domain-wide delegation."
- "Download a
credentials.jsonfile from the Google Cloud Console."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/network-policy/integration-policy-examples.mdx` around lines 364 - 366, The prerequisites list in the integration-policy-examples.mdx file uses passive voice constructions that should be converted to active voice for improved clarity. Rewrite the three prerequisite bullet points to start with action verbs: replace "A Google Cloud project with the Gmail API enabled" with a statement beginning with "Enable the Gmail API in a Google Cloud project", replace the line about OAuth2 and service accounts with a statement beginning with "Create an OAuth2 client ID and client secret, or configure a service account", and replace "A credentials.json file downloaded from the Google Cloud Console" with "Download a credentials.json file from the Google Cloud Console". Keep all technical details and links intact while converting the grammatical structure from passive to active voice.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@nemoclaw-blueprint/policies/presets/gmail.yaml`:
- Around line 8-39: There is a mismatch between the gmail preset and
documentation: the preset in nemoclaw-blueprint/policies/presets/gmail.yaml
(lines 8-39) defines REST API access but does not include the imap.gmail.com
endpoint on port 993, while the documentation in
docs/network-policy/integration-policy-examples.mdx (lines 435-449) provides an
IMAP connection example that requires this endpoint. Decide whether IMAP support
is in scope: if yes, add a new endpoint entry to the gmail_api policy in the
preset for imap.gmail.com on port 993 with appropriate protocol (connect or
tcp), and update the documentation statement around line 360 to clarify that
IMAP is supported; if no, remove the IMAP code example from the documentation
(lines 435-449) and keep only the REST API OAuth2 flow example.
---
Nitpick comments:
In `@docs/network-policy/integration-policy-examples.mdx`:
- Around line 364-366: The prerequisites list in the
integration-policy-examples.mdx file uses passive voice constructions that
should be converted to active voice for improved clarity. Rewrite the three
prerequisite bullet points to start with action verbs: replace "A Google Cloud
project with the Gmail API enabled" with a statement beginning with "Enable the
Gmail API in a Google Cloud project", replace the line about OAuth2 and service
accounts with a statement beginning with "Create an OAuth2 client ID and client
secret, or configure a service account", and replace "A credentials.json file
downloaded from the Google Cloud Console" with "Download a credentials.json file
from the Google Cloud Console". Keep all technical details and links intact
while converting the grammatical structure from passive to active voice.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: c1c3cbef-73c0-48d0-9b68-9c26dcc3ddd6
📒 Files selected for processing (2)
docs/network-policy/integration-policy-examples.mdxnemoclaw-blueprint/policies/presets/gmail.yaml
|
✨ Thanks for adding the Gmail network policy preset and integration example with OAuth2 and App Password workflows. This proposes a way to document Gmail API access setup for NemoClaw sandbox users. Related open issues: |
Signed-off-by: Kunal Somani <kkunal_be23@thapar.edu>
Signed-off-by: Kunal Somani <kkunal_be23@thapar.edu>
bece3ce to
cb8ee6d
Compare
Thanks for taking a look and happy to make any adjustments if the preset or docs need tightening up. |
Signed-off-by: Kunal Somani <kkunal_be23@thapar.edu>
2864877 to
b1d5368
Compare
cv
left a comment
There was a problem hiding this comment.
The proposed Gmail workflow does not solve the reported App-Password and attachment case: the preset excludes IMAP and SMTP while docs still upload an App Password; pip install lacks the pypi policy; localhost OAuth callback reachability is unexplained; service-account support is claimed but the sample does not implement it; and a Read and Send policy grants PUT, DELETE, and PATCH. Add a coherent supported auth path, credential cleanup, least-privilege endpoint and method policy, and semantic tests beyond preset-list presence.
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Exact head The current head addresses every item from the older change request: App Password-only IMAP/SMTP guidance, exact hosts/ports and @cv, please re-review or dismiss the outdated change request from |
<!-- markdownlint-disable MD041 --> ## Summary Adds the pre-tag v0.0.79 release notes entry to `docs/about/release-notes.mdx` so the release plan can be generated after docs merge. The entry summarizes the merged v0.0.79 release train across inference, diagnostics, runtime hardening, policies, onboarding recovery, and release validation. ## Changes - Added the v0.0.79 release notes section with linked follow-up documentation for OpenRouter onboarding, managed vLLM changes, completion and logging, Deep Agents runtime limits, policy updates, onboarding recovery, and release validation. - Source summary: - #6461 -> `docs/about/release-notes.mdx`: Documents OpenRouter onboarding support and links to inference/provider references. - #6271 and #6272 -> `docs/about/release-notes.mdx`: Documents shell completion and structured logging highlights. - #6465, #6539, #6570, and #6528 -> `docs/about/release-notes.mdx`: Documents status route-drift, orphaned sandbox, gateway cleanup, and DGX Spark express-install diagnostics. - #6523, #6551, #6484, #6488, #6324, and #6542 -> `docs/about/release-notes.mdx`: Documents managed vLLM, Qwen3.6 tool parser, compaction, and timeout/readiness improvements. - #6559, #6538, #6560, #6568, #6552, #6567, and #6587 -> `docs/about/release-notes.mdx`: Documents runtime, credential, proxy, PID namespace, TOML, and provider-state hardening. - #6541, #5415, #6246, #6496, and #6573 -> `docs/about/release-notes.mdx`: Documents GitHub policy, Gmail policy, MCP allowlist, WhatsApp, and messaging-variant updates. - #6253, #6572, #6444, #6536, and #5860 -> `docs/about/release-notes.mdx`: Documents onboarding resume and create-step recovery improvements. - #6508, #6527, #5506, #6588, #6446, #6447, #6582, #6296, #6367, #6397, and #6505 -> `docs/about/release-notes.mdx`: Documents docs, release-risk, and E2E validation updates. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [x] 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. --> - [ ] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: Release-note prose only. - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] 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 — command/result or justification: Tests not applicable, release-note prose only. - [ ] 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) - [x] 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) Docs validation note: `npm run docs:check-agent-variants && npm run docs:check-routes && git diff --check` passed. Full `npm run docs` is currently blocked before Fern validation because the pinned `fern-api@5.65.2` package is unavailable from npm (`ETARGET No matching version found`). --- <!-- 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: Julie Yaunches <jyaunches@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added release notes for v0.0.79 with a new summary of recent improvements, including onboarding and inference options, operator/CLI diagnostics, sandbox recovery hardening, runtime limits, network policy behavior, and release validation updates. * Added updated references and links for the latest release. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
…NVIDIA#5415) ## Summary Adds a least-privilege `gmail` network policy preset and a complete Gmail App Password workflow for Python scripts in NemoClaw sandboxes. The preset and documentation now cover the IMAP attachment-download and SMTP send case reported in NVIDIA#3714 without claiming unsupported OAuth, service-account, or Gmail REST API behavior. ## Related Issue Closes NVIDIA#3714 ## Changes - `nemoclaw-blueprint/policies/presets/gmail.yaml` allows only `/usr/bin/python3` to open raw TLS connections to `imap.gmail.com:993` and `smtp.gmail.com:465`. - `docs/network-policy/integration-policy-examples.mdx` documents App Password prerequisites, safe upload/download commands, standard-library attachment and send examples, and credential/access cleanup. - `test/gmail-policy.test.ts` locks the exact hosts, ports, raw-TLS shape, and binary allowlist. - `test/policies.test.ts` includes `gmail` in preset discovery without increasing the file's ratcheted line budget. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [x] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [ ] Tests not applicable — justification: - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [x] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [x] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: Maintainer implementation narrows egress to exact Gmail hosts, ports, and `/usr/bin/python3`; `test/gmail-policy.test.ts` rejects broader endpoint or method policy. - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification - [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/gmail-policy.test.ts test/policies.test.ts test/validate-config-schemas.test.ts` (260 tests passed) - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — not applicable to this focused preset and documentation change - [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) — 0 errors; two unrelated baseline warnings remain for unauthenticated redirect checking and existing light-theme contrast - [x] 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) Additional validation: `npm run checks`, `npm run typecheck:cli`, `npm run test:projects:check`, `npm run test-size:check`, and syntax parsing for both embedded Python examples passed. --- Signed-off-by: Kunal Somani <kkunal_be23@thapar.edu> --------- Signed-off-by: Kunal Somani <kkunal_be23@thapar.edu> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com> Co-authored-by: Apurv Kumaria <akumaria@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary Adds the pre-tag v0.0.79 release notes entry to `docs/about/release-notes.mdx` so the release plan can be generated after docs merge. The entry summarizes the merged v0.0.79 release train across inference, diagnostics, runtime hardening, policies, onboarding recovery, and release validation. ## Changes - Added the v0.0.79 release notes section with linked follow-up documentation for OpenRouter onboarding, managed vLLM changes, completion and logging, Deep Agents runtime limits, policy updates, onboarding recovery, and release validation. - Source summary: - NVIDIA#6461 -> `docs/about/release-notes.mdx`: Documents OpenRouter onboarding support and links to inference/provider references. - NVIDIA#6271 and NVIDIA#6272 -> `docs/about/release-notes.mdx`: Documents shell completion and structured logging highlights. - NVIDIA#6465, NVIDIA#6539, NVIDIA#6570, and NVIDIA#6528 -> `docs/about/release-notes.mdx`: Documents status route-drift, orphaned sandbox, gateway cleanup, and DGX Spark express-install diagnostics. - NVIDIA#6523, NVIDIA#6551, NVIDIA#6484, NVIDIA#6488, NVIDIA#6324, and NVIDIA#6542 -> `docs/about/release-notes.mdx`: Documents managed vLLM, Qwen3.6 tool parser, compaction, and timeout/readiness improvements. - NVIDIA#6559, NVIDIA#6538, NVIDIA#6560, NVIDIA#6568, NVIDIA#6552, NVIDIA#6567, and NVIDIA#6587 -> `docs/about/release-notes.mdx`: Documents runtime, credential, proxy, PID namespace, TOML, and provider-state hardening. - NVIDIA#6541, NVIDIA#5415, NVIDIA#6246, NVIDIA#6496, and NVIDIA#6573 -> `docs/about/release-notes.mdx`: Documents GitHub policy, Gmail policy, MCP allowlist, WhatsApp, and messaging-variant updates. - NVIDIA#6253, NVIDIA#6572, NVIDIA#6444, NVIDIA#6536, and NVIDIA#5860 -> `docs/about/release-notes.mdx`: Documents onboarding resume and create-step recovery improvements. - NVIDIA#6508, NVIDIA#6527, NVIDIA#5506, NVIDIA#6588, NVIDIA#6446, NVIDIA#6447, NVIDIA#6582, NVIDIA#6296, NVIDIA#6367, NVIDIA#6397, and NVIDIA#6505 -> `docs/about/release-notes.mdx`: Documents docs, release-risk, and E2E validation updates. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [x] 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. --> - [ ] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: Release-note prose only. - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] 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 — command/result or justification: Tests not applicable, release-note prose only. - [ ] 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) - [x] 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) Docs validation note: `npm run docs:check-agent-variants && npm run docs:check-routes && git diff --check` passed. Full `npm run docs` is currently blocked before Fern validation because the pinned `fern-api@5.65.2` package is unavailable from npm (`ETARGET No matching version found`). --- <!-- 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: Julie Yaunches <jyaunches@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added release notes for v0.0.79 with a new summary of recent improvements, including onboarding and inference options, operator/CLI diagnostics, sandbox recovery hardening, runtime limits, network policy behavior, and release validation updates. * Added updated references and links for the latest release. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Add the shrike-security preset to the supported-presets table and a short integration section following the Gmail-preset precedent (NVIDIA#5415): apply commands, credential activation note, and the enforce contract. Signed-off-by: Habirua <samarow29@gmail.com>
Summary
Adds a least-privilege
gmailnetwork policy preset and a complete Gmail App Password workflow for Python scripts in NemoClaw sandboxes.The preset and documentation now cover the IMAP attachment-download and SMTP send case reported in #3714 without claiming unsupported OAuth, service-account, or Gmail REST API behavior.
Related Issue
Closes #3714
Changes
nemoclaw-blueprint/policies/presets/gmail.yamlallows only/usr/bin/python3to open raw TLS connections toimap.gmail.com:993andsmtp.gmail.com:465.docs/network-policy/integration-policy-examples.mdxdocuments App Password prerequisites, safe upload/download commands, standard-library attachment and send examples, and credential/access cleanup.test/gmail-policy.test.tslocks the exact hosts, ports, raw-TLS shape, and binary allowlist.test/policies.test.tsincludesgmailin preset discovery without increasing the file's ratcheted line budget.Type of Change
Quality Gates
/usr/bin/python3;test/gmail-policy.test.tsrejects broader endpoint or method policy.Verification
Verifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run check:diffpassed when hooks were skipped or unavailablenpx vitest run --project integration test/gmail-policy.test.ts test/policies.test.ts test/validate-config-schemas.test.ts(260 tests passed)npm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — not applicable to this focused preset and documentation changenpm run docsbuilds without warnings (doc changes only) — 0 errors; two unrelated baseline warnings remain for unauthenticated redirect checking and existing light-theme contrastAdditional validation:
npm run checks,npm run typecheck:cli,npm run test:projects:check,npm run test-size:check, and syntax parsing for both embedded Python examples passed.Signed-off-by: Kunal Somani kkunal_be23@thapar.edu
Summary by CodeRabbit
New Features
Documentation