mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Enable some more bandit checks (#30857)
* Enable B108 (hardcoded tmp dir), address findings * Enable B602 (subprocess popen with shell), address findings * Enable B604 (start process with shell), address findings * Enable B306 (mktemp), B307 (eval), and B325 (tempnam), no issues to address
This commit is contained in:
@@ -72,20 +72,20 @@ def main():
|
||||
if args.template != "integration":
|
||||
generate.generate(args.template, info)
|
||||
|
||||
pipe_null = "" if args.develop else "> /dev/null"
|
||||
pipe_null = {} if args.develop else {"stdout": subprocess.DEVNULL}
|
||||
|
||||
print("Running hassfest to pick up new information.")
|
||||
subprocess.run(f"python -m script.hassfest {pipe_null}", shell=True)
|
||||
subprocess.run(["python", "-m", "script.hassfest"], **pipe_null)
|
||||
print()
|
||||
|
||||
print("Running gen_requirements_all to pick up new information.")
|
||||
subprocess.run(f"python -m script.gen_requirements_all {pipe_null}", shell=True)
|
||||
subprocess.run(["python", "-m", "script.gen_requirements_all"], **pipe_null)
|
||||
print()
|
||||
|
||||
if args.develop:
|
||||
print("Running tests")
|
||||
print(f"$ pytest -vvv tests/components/{info.domain}")
|
||||
subprocess.run(f"pytest -vvv tests/components/{info.domain}", shell=True)
|
||||
subprocess.run(["pytest", "-vvv", "tests/components/{info.domain}"])
|
||||
print()
|
||||
|
||||
docs.print_relevant_docs(args.template, info)
|
||||
|
||||
Reference in New Issue
Block a user