Skip to content

Treat duplicate YAML and JSON target keys consistently and reject restore targets that escape the home directory - #62

Open
latedeployment wants to merge 1 commit into
arnica:mainfrom
latedeployment:main
Open

Treat duplicate YAML and JSON target keys consistently and reject restore targets that escape the home directory#62
latedeployment wants to merge 1 commit into
arnica:mainfrom
latedeployment:main

Conversation

@latedeployment

Copy link
Copy Markdown
Contributor

Summary

  • Fix YAML and JSON config readers to evaluate the last duplicate target key, matching common effective-value behavior.
  • Update YAML and JSON fixers to rewrite all duplicate target keys instead of only the first occurrence.
  • Harden backup restore path validation to reject parent-directory escapes, symlink restore targets, and canonical parent paths outside the home directory.
  • Add regression tests for duplicate key scanning/fixing and restore path escape rejection.

Testing

  • cargo fmt -- --check
  • cargo clippy -- -D warnings
  • cargo test
  • cargo build --release

Verified again after rebasing onto latest origin/main.

AI / agent disclosure

Codex — GPT-5.

Treat duplicate YAML and JSON target keys consistently and reject restore targets that escape the home directory.

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant