You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should the DevRel and Marketing teams inform users about this change?
Yes
No
Summary by CodeRabbit
Bug Fixes
Enhanced shell command safety in Git operations to ensure secure argument processing and execution.
Tests
Added comprehensive test coverage for Git operations, including security scenarios, edge cases, and injection prevention validation across multiple test suites.
✏️ Tip: You can customize this high-level summary in your review settings.
This change implements shell command injection protection by introducing a shellEscape utility method in BashService that wraps arguments in POSIX-compliant single quotes. The method is integrated into command building logic and supported by comprehensive security-focused test coverage across multiple test suites.
Added private shellEscape(String) utility method for POSIX-compliant single-quote wrapping of shell arguments; updated buildFullCommand to use escaped values in variable assignments. Test suite adds 482 lines of comprehensive security coverage including command injection patterns (command substitution, backticks, variable expansion), edge cases (null, quotes, newlines), and integration validation.
Added 113 lines of security test cases validating GitProfile payload handling for git author metadata and branch name collection with injection-like inputs, confirming downstream escaping by BashService.
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Single quotes defend the command line's gate, 🛡️
Shell escapes prevent injection's cruel fate,
Arguments wrapped in safety's embrace,
Security tests run at a brisk pace,
Shell safety levels the battleground straight.
Docstring coverage is 12.24% which is insufficient. The required threshold is 80.00%.
Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check
❓ Inconclusive
PR description provides detailed vulnerability context with reproduction steps and dangerous payload examples, but lacks required template sections.
Add issue link formatting, confirm DevRel/Marketing communication checkbox selection, and clarify if this is a security fix requiring special announcement procedures.
✅ Passed checks (1 passed)
Check name
Status
Explanation
Title check
✅ Passed
The title 'fix: os command injection vulnerability when in-memory Git is enabled' clearly and specifically identifies the main security fix in the changeset.
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing touches
📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
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
BugSomething isn't workingok-to-testRequired label for CI
2 participants
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.
Description
Exploitation Proof
Set Malicious Git Profile:
Generated Bash Script (what BashService creates):
Trigger Git Operation:
GET /api/v1/git/pull/app/{applicationId}Result: The $(sleep 5) is executed during bash variable assignment, causing a 5-second delay confirming RCE.
More Dangerous Payloads
Fixes https://linear.app/appsmith/issue/V2-2529/vulnerability-os-command-injection-in-in-memory-git
Fixes https://github.com/appsmithorg/appsmith/security/advisories/GHSA-2j8h-44vf-xp8p
Shadow EE PR: https://github.com/appsmithorg/appsmith-ee/pull/8565
Automation
/ok-to-test tags="@tag.All"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/21347209127
Commit: f86dd26
Cypress dashboard.
Tags:
@tag.AllSpec:
Tue, 27 Jan 2026 14:43:24 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.