You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@magpie.apache.org by "AmirF194 (via GitHub)" <gi...@apache.org> on 2026/09/05 10:44:15 UTC

[PR] fix(sandbox-lint): normalise every trailing slash, not just one [magpie]

AmirF194 opened a new pull request, #1149:
URL: https://github.com/apache/magpie/pull/1149

   ## Summary
   
   - `_normalise()` only stripped one trailing slash, so `~/.ssh//` (two slashes) never matched the normalised `~/.ssh` forbidden entry and `check_invariants()` passed a config it should have rejected.
   - Fixes #1148.
   
   ## Type of change
   
   - [x] Python package (`tools/*/` with `pyproject.toml`)
   
   ## Test plan
   
   - Added a double-trailing-slash case to the existing `allowRead`/`allowWrite` parametrized tests; both are red on main, green on this branch.
   - `ruff check`, `ruff format --check` and `mypy` on `tools/sandbox-lint` are clean (mypy needs `pytest` installed to resolve the test-file imports; not a change this PR introduces).
   - Full `tools/sandbox-lint` suite: 55 passed, in a clean `python:3.11-slim` container. Did not run `prek` itself (not available in this sandbox), ran the underlying ruff/mypy/pytest commands by hand instead.
   
   ## RFC-AI-0004 compliance
   
   - [x] **Sandbox**: no new host access, this only makes the existing credential-path check stricter.
   
   ## Linked issues
   
   Fixes #1148.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(sandbox-lint): normalise every trailing slash, not just one [magpie]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #1149:
URL: https://github.com/apache/magpie/pull/1149


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(sandbox-lint): normalise every trailing slash, not just one [magpie]

Posted by "AmirF194 (via GitHub)" <gi...@apache.org>.
AmirF194 commented on PR #1149:
URL: https://github.com/apache/magpie/pull/1149#issuecomment-5576560127

   Thanks for checking the call sites too, that was the part I hadn't fully convinced myself of. Good catch that the empty-string case is a behavior change, glad it fails closed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org