Skip to content

Commit

Permalink
Fix code scanning alert no. 58: Overly permissive file permissions
Browse files Browse the repository at this point in the history
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
1 parent be7ca10 commit a728e79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pds_doi_service/core/db/transaction_on_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def write(self, transaction_dir, input_ref=None, output_content=None, output_con
r.close()

# Set up permissions for copied input
os.chmod(full_input_name, 0o0664)
os.chmod(full_input_name, 0o0600)

# Write output file with provided content
# The extension of the file is determined by the provided content type
Expand All @@ -181,7 +181,7 @@ def write(self, transaction_dir, input_ref=None, output_content=None, output_con
outfile.write(output_content)

# Set up permissions for copied output
os.chmod(full_output_name, 0o0664)
os.chmod(full_output_name, 0o0600)

logger.info(f"Transaction files saved to {transaction_dir}")

Expand Down

0 comments on commit a728e79

Please sign in to comment.