airvzxf / airvzxf/ftp-deployment-action

fix(entrypoint): /home/lftp/.lftp-logs grows unbounded across runs

未关闭
#192 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
audit bug pending-design pending-human priority:medium
主要语言
Shell
星标
37
派生
9
平均合并
44 分钟
30 天内合并 PR
47

描述

gh issue create --title "fix(entrypoint): /home/lftp/.lftp-logs grows unbounded across runs" --label "bug,audit,priority:medium" --body "## Finding

lftp writes debug logs to \$HOME/.lftp-logs (when debug is enabled). The action runs in a fresh container per job, so within a single run the logs are bounded; but on a self-hosted runner with a persistent HOME, the directory accumulates across runs. No rotation, no cleanup.

## Affected code

- entrypoint.sh — lftp invocation does not rotate or clean \$HOME/.lftp-logs

## Reproduction

1. Run the action many times on a self-hosted runner with persistent HOME.
2. Inspect /home/lftp/.lftp-logs: file count grows unbounded.

## Suggested fix

Either:
- Add a rotate step at the start of entrypoint.sh that keeps the last N log files (e.g. find \$HOME/.lftp-logs -type f -mtime +7 -delete).
- Or document that \$HOME should be ephemeral on self-hosted runners.
- Or set lftp's debug-level to a value that does not write to disk by default.

The first option is the cleanest.

## Source

F2 audit 2026-09-03 (entrypoint.sh audit). Reporter: subagent-pekodbj7.

## Related

- Part of EPIC #[epic-number]
- Closes: #NONE (no existing issue)"

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。