Skip to content

Commit

Permalink
Bandit: Disable B103: set_bad_file_permissions
Browse files Browse the repository at this point in the history
We need this permission for log files.
  • Loading branch information
lipoja authored and yashvardhannanavati committed Mar 14, 2023
1 parent e35bec7 commit c230c5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iib/workers/tasks/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ def wrapper(*args, **kwargs) -> None:
request_log_handler = logging.FileHandler(log_file_path)
request_log_handler.setLevel(log_level)
request_log_handler.setFormatter(log_formatter)
os.chmod(log_file_path, 0o664)
os.chmod(log_file_path, 0o664) # nosec
logger = logging.getLogger()
logger.addHandler(request_log_handler)
worker_info = f'Host: {socket.getfqdn()}; User: {getpass.getuser()}'
Expand Down

0 comments on commit c230c5a

Please sign in to comment.