T06 · System Persistence
- Location
scripts/setup_cron.py:20- Finding
Persistent system-wide scheduling of background transcript monitoring
- Content
View full analysis
> {LOG_DIR}/synthesize.log 2>&1", "end-of-day synthesis", ), ( "0 6 * * *", f"TZ=America/Los_Angeles python3 {SKILL_DIR}/scripts/redact_reports.py --validate-only" f" >> {LOG_DIR}/redaction_check.log 2>&1", "redaction integrity check", ), ] ``` ```python def set_crontab(content: str) -> None: proc = subprocess.run(["crontab", "-"], input=content, text=True, capture_output=True) if proc.returncode != 0: print(f"Error writing crontab: {proc.stderr}", file=sys.stderr) sys.exit(1) def cmd_install() -> None: LOG_DIR.mkdir(parents=True, exist_ok=True) (SKILL_DIR / "data" / "observations").mkdir(parents=True, exist_ok=True) (SKILL_DIR / "reports").mkdir(parents=True, exist_ok=True) current = get_crontab() lines = current.splitlines(keepends=True) added = 0 new_lines = list(lines) if new_lines and not new_lines[-1].endswith("\n"): new_lines[-1] += "\n" for schedule, command, label in ENTRIES: cron_line = f"{schedule} {command} {MARKER}\n" if command in current: print(f" ✓ Already registered: {label}") else: new_lines.append(cron_line) print(f" ➕ Added: {label}") added += 1 if added: set_crontab("".join(new_lines)) ``` ### Technical Analysis The setup script writes three entries to the user's system crontab. These entries survive the original Skill invocation and cause transcript observation to ...[truncated 1594 chars]- Remediation
View remediation
