Skip to content

πŸ›‘οΈ Sentinel: [HIGH] Harden account_manager against path traversal and symlink hijacking - #422

Merged
timerloggedout-spec merged 1 commit into
masterfrom
jules-5763956158267051655-8a11451c
Sep 2, 2026
Merged

timerloggedout-spec merged 1 commit into
masterfrom
jules-5763956158267051655-8a11451c

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

πŸ›‘οΈ Sentinel Security Improvement Report:

🚨 Severity: HIGH
πŸ’‘ Vulnerability: Unsanitized account names in cli-synthegration/account_manager.py could allow path traversal vectors (../, /etc/), and missing is_symlink() checks on CONFIG_DIR and account config files allowed potential symlink traversal hijacking vulnerabilities.
🎯 Impact: An attacker could craft account names or place symlinks in .deepcli to overwrite or leak sensitive credentials or system files.
πŸ”§ Fix:

  1. Enforced strict character validation (^[a-zA-Z0-9_-]+$) on account_name parameters in import_account and get_token.
  2. Checked is_symlink() on CONFIG_DIR and account target files prior to os.chmod and file write/read operations.
  3. Updated security unit tests (tests/test_sentinel_privileges.py, tests/test_nexuscli_privileges.py, tests/test_multi_ai_cache_privileges.py) with fallback module import resolvers.
  4. Added new security tests in tests/test_account_manager_privileges.py.
    βœ… Verification: Ran pytest tests/test_sentinel_privileges.py tests/test_nexuscli_privileges.py tests/test_multi_ai_cache_privileges.py tests/test_account_manager_privileges.py tests/test_obsidian_server_security.py tests/test_deepcli_waf_session.py with 23/23 tests passing.

PR created automatically by Jules for task 5763956158267051655 started by @timerloggedout-spec

… symlink hijacking

- Sanitize account_name inputs using regex validation in cli-synthegration/account_manager.py
- Add symlink safety checks before changing file permissions and reading/writing credential configs
- Update test suite module import handlers to support flexible PYTHONPATH execution
- Add comprehensive security test suite in tests/test_account_manager_privileges.py
@google-labs-jules

Copy link
Copy Markdown
Contributor Author

πŸ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a πŸ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@vercel

vercel Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
termux-monorepo Ready Ready Preview, v0 Sep 2, 2026 7:36pm UTC

@blocksorg

blocksorg Bot commented Sep 2, 2026

Copy link
Copy Markdown

Mention Blocks like a regular teammate with your question or request:

@blocks review this pull request
@blocks make the following changes ...
@blocks create an issue from what was mentioned in the following comment ...
@blocks explain the following code ...
@blocks are there any security or performance concerns?

Run @blocks /help for more information.

Workspace settings | Disable this message

@mintlify

mintlify Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
diasporic3lee7 🟒 Ready View Preview Sep 2, 2026, 10:11 PM

πŸ’‘ Tip: Enable Automations to automatically generate PRs for you.

@timerloggedout-spec timerloggedout-spec left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OPERATOR review β€” APPROVE

Reviewed as Grok (Administrator) against Issue #175 P1 Sentinel hygiene.

Evidence

  • HIGH path-traversal + symlink hijack on cli-synthegration/account_manager.py
  • SAFE_ACCOUNT_REGEX rejects ../, absolute paths, spaces, injection chars
  • Fail-closed symlink checks on CONFIG_DIR and account config files before chmod/write/read
  • New tests/test_account_manager_privileges.py plus fallback import resolvers so existing privilege tests still collect
  • Dual gates: hygiene + portability gate success, agentic termux smoke success, CodeQL (python/js/actions) success
  • Scope is 5 files / +164 βˆ’20 β€” small green, master-based, not a dirty mega-PR

Disposition: merge with merge method. Does not wholesale-merge PR #6 or #2.

Follow-up (not blocking): Team MVT lane a-ox-openrouter still hard-exits when Ox Alpha is absent from the live catalog. Next thin PR will fail-soft that lane like Felo.

Implements: sentinel-account-manager-hardening (P1 under #175)
Signed-off-by: Grok (OPERATOR)

@timerloggedout-spec
timerloggedout-spec merged commit a0febe6 into master Sep 2, 2026
31 of 35 checks passed

This branch was successfully deployed

2 active deployments
staging β€” 52f950e0 Deployed Sep 2, 2026 by mintlify[bot]
Preview β€” 52f950e0 Deployed Sep 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant