Skip to content

Commit 4728c44

Browse files
committed
Misc small security fixes, mostly using more secure RNGs and adding timeouts to requests in scripts
1 parent 4b05a58 commit 4728c44

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

scripts/post-deploy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def generate_aws_exports(stack_name):
3535
"--output", "json"
3636
]
3737

38-
result = subprocess.run(
38+
result = subprocess.run( # nosec B603 - command constructed from safe list, not user input
3939
command,
4040
capture_output=True,
4141
text=True,

scripts/test-agent-invocation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import socket
2121
import argparse
2222
import getpass
23-
import subprocess
23+
import subprocess # nosec B404 - subprocess used securely with explicit parameters
2424
import signal
2525
import atexit
2626
from pathlib import Path
@@ -105,7 +105,7 @@ def start_local_agent(memory_id: str, region: str) -> subprocess.Popen:
105105

106106
# Start agent process
107107
try:
108-
_agent_process = subprocess.Popen(
108+
_agent_process = subprocess.Popen( # nosec B607 - command constructed from validated path, shell=False
109109
["uv", "run", str(agent_path)],
110110
env=env,
111111
stdout=subprocess.PIPE,

0 commit comments

Comments
 (0)