mirror of
https://github.com/github/codeql.git
synced 2025-12-18 18:10:39 +01:00
16 lines
296 B
Python
16 lines
296 B
Python
import pathlib
|
|
|
|
|
|
def get_password():
|
|
return "password"
|
|
|
|
|
|
def write_password(filename):
|
|
password = get_password()
|
|
|
|
path = pathlib.Path(filename)
|
|
path.write_text(password) # NOT OK
|
|
path.write_bytes(password.encode("utf-8")) # NOT OK
|
|
|
|
path.open("w").write(password) # NOT OK
|