ci/security-scan-apt-timeouts #70
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/security-scan-apt-timeouts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
🔎 ojo scan results
No findings.
Codecov Results 📊
✅ Patch coverage is 100.00%. Project has 5549 uncovered lines.
Generated by Codecov Action
Summary
CI jobs could hang indefinitely: the
mainrun after #69 sat in a silentapt-get updatefor over two hours. This PR moves every workflow's inlineapt-get update && apt-get installinto a sharedscripts/ci-apt-install.sh. The script skips packages that are already installed and sets apt network timeouts and retries (Acquire::http(s)::Timeout=30,Acquire::Retries=3). Each install step now has a 15-minute cap. The PR also adds job caps: security-scan 30 min, build 60 min. claude-review already had a 40-minute cap.The changes match the commit messages. The PR metadata does not describe them: the title is the branch name (
ci/security-scan-apt-timeouts) and the description is empty. The second commit also changesbuild.yml,claude-review.ymlandtest.yml, which the title doesn't suggest.Findings
scripts/ci-apt-install.sh:92:dpkg -s "$pkg"exits 0 for a package that was removed but not purged (Status: deinstall ok config-files). That package would be reported as installed and skipped, so a later step fails on a missing binary. This is unlikely on fresh runner images. Fix:dpkg-query -W -f='${Status}' "$pkg" 2>/dev/null | grep -q 'install ok installed' || missing+=("$pkg").scripts/ci-apt-install.sh:100-101:DEBIAN_FRONTENDis not set. The old inline commands didn't set it either, so this is not a regression. But the script exists to stop apt hanging, and a debconf prompt is another way it can stall. Fix: addexport DEBIAN_FRONTEND=noninteractivenear the top.scripts/ci-apt-install.sh:94-96: with no arguments the script printsalready installed:and exits 0. Consider exiting with a usage error when$# -eq 0.No correctness or security problems found:
actions/checkoutbefore calling the script (build.yml:22,claude-review.yml:22,security-scan.yml:19,test.yml:44).lcovstep attest.yml:58-61has noworking-directory, soscripts/...resolves correctly.claude-review.yml, running a script from the checkout is not a new trust boundary. The job already runsscripts/claude-pr-review.shfrom the checkout, and it is limited to same-repo PRs (claude-review.yml:14).The tenant-isolation, secrets, crypto and RBAC conventions in
AGENTS.mddon't apply because no application code changed.Completeness
Not run by this PR's CI:
build.ymlpath, which triggers only onworkflow_dispatchorschedule.lcovstep intest.yml, which runs only onpush.Only security-scan and claude-review used the new script on this PR. Trigger
build-and-pushmanually once after merge to confirm it.I could not check whether 30 minutes is enough for security-scan on
main, or 60 minutes for build. The PR's security-scan took 26s, butmainruns also upload findings and the SBOM, and the Docker build runtime is unknown. The commit messages give no evidence for these caps.There is no test for
ci-apt-install.sh. Other scripts havescripts/test_*.shtests, but a skip-logic test is optional for a script this small.No API, migration, frontend or
AGENTS.mdchanges are needed.STATUS.mdhas no CI section, so leaving it unchanged is reasonable.No leftover TODOs or debug code.
The PR title and description need updating (see Summary).
CI and comments
codecov/patch: success (100.00% >= target 80%)codecov/project: success (54.97%, no base report)security-scan / security-scan (pull_request): success (26s)test / go (pull_request): success (4m46s)test / web (pull_request): success (1m16s)test / coverage-badge (pull_request): skipped (runs only onpush)Comments:
Recommendations
Before merging:
DEBIAN_FRONTEND=noninteractiveand thedpkg-querystatus check toscripts/ci-apt-install.sh.Follow-ups:
build-and-pushmanually once after merge to exercise the new install path and the 60-minute cap.mainsecurity-scan run against the 30-minute job cap.Verdict
Ready to merge: a small, correct CI hardening change, and the only open items are nits and missing PR metadata.
Claude code review of
46fe5502e0· claude-opus-5-5