Skip to content
Snippets Groups Projects
  • Hidde Beydals's avatar
    5ea4e814
    Add safe guards for relative paths · 5ea4e814
    Hidde Beydals authored
    
    This commit adds multiple safe guards for relative paths, ensuring they
    never traverse outside the working directory.
    
    The `SafeRelativePath` flag calculates the safe relative path based on a
    relative base dir, which results in a flattened path.
    
    The write methods of `manifestgen` make use of the `SecureJoin` as well,
    to ensure writes are never outside of the given directory when used as
    a lib outside of the CLI.
    
    Signed-off-by: default avatarHidde Beydals <hello@hidde.co>
    5ea4e814
    History
    Add safe guards for relative paths
    Hidde Beydals authored
    
    This commit adds multiple safe guards for relative paths, ensuring they
    never traverse outside the working directory.
    
    The `SafeRelativePath` flag calculates the safe relative path based on a
    relative base dir, which results in a flattened path.
    
    The write methods of `manifestgen` make use of the `SecureJoin` as well,
    to ensure writes are never outside of the given directory when used as
    a lib outside of the CLI.
    
    Signed-off-by: default avatarHidde Beydals <hello@hidde.co>