-
Notifications
You must be signed in to change notification settings - Fork 42
Implement global_files_allowlist in .librarian/config.yaml #1656
Copy link
Copy link
Description
To securely manage which global files a container can modify, an allowlist will be introduced and stored in a new, hand-edited configuration file.
- The command contract for configure and release supports a write-only
/outputdirectory mount for the container to write updated global files. - A new
config.yamlfile is created in the.librariandirectory for repository-specific, hand-edited settings. - Librarian can parse a
global_files_allowlistfrom this file, specifying file paths and permissions (read-write,read-only,write-only). - A read-only input mount (
/repo) is provided to the container with the contents of global files declared for reading in the allowlist. - New or updated global files are copied from the container's
/outputdirectory back into the repository. - Only files explicitly allowlisted for writing are copied into the repository.
Example config.yaml:
# .librarian/config.yaml
global_files_allowlist:
# Allow the container to read and write the root go.work file
# during the 'configure' step to add new modules.
- path: "go.work"
permissions: "read-write"
# Allow the container to read a template.
- path: "internal/README.md.template"
permissions: "read-only"
# Allow publishing the updated root README.md
- path: "README.md"
permissions: "write-only"Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels