Skip to content

Commit

Permalink
Set /home/cnb file mode to 0750
Browse files Browse the repository at this point in the history
The permission for this directory were 0777 which is too permissive.

0750 complies with security recommendations such as those made by CIS.

Signed-off-by: Craig Andrews <candrews@integralblue.com>
  • Loading branch information
candrews authored and sophiewigmore committed Aug 2, 2023
1 parent a20b85b commit a255494
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/ihop/user_layer_creator.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (c UserLayerCreator) Create(image Image, def DefinitionImage, _ SBOM) (Laye
err = tw.WriteHeader(&tar.Header{
Typeflag: tar.TypeDir,
Name: "home/cnb",
Mode: int64(os.ModePerm),
Mode: int64(os.FileMode(0750)),
Uid: def.UID,
Gid: def.GID,
})
Expand Down

0 comments on commit a255494

Please sign in to comment.