feat: allow relative target paths for git mounts
- Remove absolute path requirement from target_path validation - Resolve relative paths against working_directory at instance startup - Fall back to /home/user if no working_directory is configured - Update frontend to allow relative target paths - Update spec to document relative path support - Update tests to allow relative paths and test path traversal rejection
This commit is contained in:
@@ -16,7 +16,7 @@ The system SHALL allow config profiles to include git repository mounts that bin
|
||||
- **THEN** the system validates that:
|
||||
- `remote_url` is a valid git URL (starts with https://, git@, or ssh://)
|
||||
- `source_path` is a relative path (no leading `/`)
|
||||
- `target_path` is an absolute path (starts with `/`)
|
||||
- `target_path` can be absolute (starts with `/`) or relative (resolved against working directory, defaulting to `/home/user`)
|
||||
- `target_path` does not contain path traversal sequences (`..`)
|
||||
- No database lookup or repository existence check is performed (validation is deferred to clone time)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user