mirror of
https://github.com/fluxcd/flux2.git
synced 2026-04-15 16:25:43 +00:00
Add safe guards for relative paths
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: Hidde Beydals <hello@hidde.co>
This commit is contained in:
parent
008b3b8408
commit
5ea4e814f5
13 changed files with 180 additions and 71 deletions
1
go.mod
1
go.mod
|
|
@ -4,6 +4,7 @@ go 1.15
|
|||
|
||||
require (
|
||||
github.com/blang/semver/v4 v4.0.0
|
||||
github.com/cyphar/filepath-securejoin v0.2.2
|
||||
github.com/fluxcd/helm-controller/api v0.4.3
|
||||
github.com/fluxcd/image-automation-controller/api v0.1.0
|
||||
github.com/fluxcd/image-reflector-controller/api v0.1.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue