hardlinked source files are refused, remote schema URLs require an explicit flag, generated harvest artifacts use the hardened bundle writer, and task/handler/playbook YAML writes go through one safety gate.

This commit is contained in:
Miguel Jacq 2026-06-28 18:17:45 +10:00
parent f56f076765
commit 44d1a22db4
Signed by: mig5
GPG key ID: 03906B4110AAD3B8
11 changed files with 202 additions and 37 deletions

View file

@ -186,7 +186,11 @@ def _read_first_existing_text(
try:
fd = open_no_follow_path(path)
st = os.fstat(fd)
if not stat.S_ISREG(st.st_mode) or st.st_size > max_bytes:
if (
not stat.S_ISREG(st.st_mode)
or st.st_nlink > 1
or st.st_size > max_bytes
):
continue
data = os.read(fd, max_bytes + 1)
if len(data) > max_bytes: