-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working directory enforcement (#1305)
* Add current working directory enforcement. The working directory can be set as part of container image by WORKINGDIR Dockerfile directive or could be explicitly set inside CRI container config. Changing the CWD of container can change the expected behavior of a container. If the working_dir config is not present or empty inside the policy config, this information will be gathered from container image spec. Add logic to enforce CWD enforcement inside GCS and extend policy dev tool and policy structure to support this scenario. The enforcement is an exact string match between what's in the policy and what's in the generated container spec. If the paths don't match, the container will fail to start. * Minor refactor of securitypolicy_test Add a utility funcion that picks a random container from an array and generates a valid/invalid overlay for that container. Refactor tests to use the new utility function. * Add unit tests for enforcing working directory Signed-off-by: Maksim An <[email protected]>
- Loading branch information
Showing
8 changed files
with
301 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.