Browse Source

More aggressive umasking

master
SporeStack 3 months ago
parent
commit
b3efea151e
  1. 6
      CHANGELOG.md
  2. 4
      src/sporestack/cli.py

6
CHANGELOG.md

@ -7,13 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- Nothing yet.
### Fixed
- Nothing yet.
- Protect files in ~/.sporestack with aggressive `umask`.
## [6.0.0a1 - 2022-03-31]

4
src/sporestack/cli.py

@ -59,6 +59,9 @@ HOME = Path(_home)
SPORESTACK_DIR = HOME / ".sporestack"
# Try to protect files in ~/.sporestack
os.umask(0o0077)
cli = typer.Typer(help=HELP)
token_cli = typer.Typer()
@ -251,7 +254,6 @@ def save_machine_info(machine_info: Dict[str, Any], overwrite: bool = False) ->
"""
Save info to disk.
"""
os.umask(0o0077)
directory = server_info_path()
hostname = machine_info["vm_hostname"]
json_file = directory / f"{hostname}.json"

Loading…
Cancel
Save