We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8861406 commit 69de59fCopy full SHA for 69de59f
job_executor/adapter/fs/private_keys_directory.py
@@ -14,7 +14,12 @@ def create(self) -> bool:
14
return False
15
16
def save_private_key(self, microdata_private_key_pem: bytes) -> None:
17
- with open(self._get_private_key_location(), "wb") as file:
+ fd = os.open(
18
+ self._get_private_key_location(),
19
+ os.O_CREAT | os.O_WRONLY | os.O_EXCL,
20
+ 0o600,
21
+ )
22
+ with os.fdopen(fd, "wb") as file:
23
file.write(microdata_private_key_pem)
24
25
def clean_up(self) -> bool:
0 commit comments