Реализовать лабораторную 7
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
command = (
|
||||
"pip install --quiet --target /tmp/audit pip-audit==2.9.0 >/dev/null && "
|
||||
"PYTHONPATH=/tmp/audit python -m pip_audit "
|
||||
"--path /usr/local/lib/python3.13/site-packages --cache-dir /tmp/cache "
|
||||
"--format json --progress-spinner off"
|
||||
)
|
||||
with (ROOT / "evidence/dependency-audit.json").open("wb") as output:
|
||||
result = subprocess.run([
|
||||
"docker", "run", "--rm", "-e", "XDG_CACHE_HOME=/tmp/cache",
|
||||
"--entrypoint", "sh", "mtusi-messenger:lab7", "-c", command,
|
||||
], stdout=output, check=False)
|
||||
raise SystemExit(result.returncode)
|
||||
Reference in New Issue
Block a user