π‘οΈ Sentinel: [HIGH] Fix path traversal via missing dot encoding#270
π‘οΈ Sentinel: [HIGH] Fix path traversal via missing dot encoding#270davidruzicka wants to merge 1 commit into
Conversation
β¦encoding - `encodeURIComponent` does not encode dot (`.`) characters. - When path parameters are substituted into a URL path, injected dots (`..`) can still lead to directory traversal if evaluated by the HTTP client or intermediate proxies. - Added explicit `.replace(/\./g, '%2E')` string replacements to `CompositeExecutor` and `MCPServer` `encodePathSegment` methods. - Updated security unit tests to expect proper dot encoding (`%2E`). - Logged the critical learning to Sentinel's journal. Co-authored-by: davidruzicka <14172985+davidruzicka@users.noreply.github.com>
|
π 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Codecov Reportβ
All modified and coverable lines are covered by tests. π’ Thoughts on this report? Let us know! |
π¨ Severity: HIGH
π‘ Vulnerability: Path traversal vulnerability due to insufficient URL encoding.
encodeURIComponentdoes not encode.characters.π― Impact: Attackers could exploit path segments to access unauthorized endpoints or directories by injecting
..into tool arguments.π§ Fix: Post-processed
encodeURIComponentresults with.replace(/\./g, '%2E')to strictly encode dots.β Verification: Updated
composite-executor-security.test.tsto assert that the encoded dots (%2E%2E) are produced instead of raw... Ran the full test suite successfully.PR created automatically by Jules for task 7140422164168563748 started by @davidruzicka