Skip to content

Disable APT download retries before every networked APT path - #1128

Merged
rmcdaniel merged 1 commit into
mainfrom
chore/295-apt-no-retries
Nov 13, 2026
Merged

rmcdaniel merged 1 commit into
mainfrom
chore/295-apt-no-retries

Conversation

@rmcdaniel

Copy link
Copy Markdown
Member

Workflow repo slice of durable-workflow/.github#295 (CVE-2026-109518), the paths General listed.

  • setup-php jobs (setup-php can run apt-get): Acquire::Retries "0" is written to /etc/apt/apt.conf.d/99-no-retries before the first apt-capable step in each job. That's php.yml ×5 jobs, dependency-security.yml and release-verification.yml.
  • Dockerfiles: the same line before apt-get in .github/tracing-performance/Dockerfile (unpinned php:8.3.35-cli-bookworm) and examples/embedded-http/runtime/Dockerfile (old bookworm parent).
  • Test: scripts/ci/test-apt-no-retries.py, copied from sdk-php#399, is extended to check every Dockerfile build stage. It fails if any job or stage reaches networked APT before the line, and its self-tests cover late, missing, --with-deps and per-stage cases. It runs in php.yml's routing job.

Locally the new test passes, along with the public-boundary check. test-build-routing.py can't run here because it needs php in temp directories, so CI covers it.

🤖 Generated with Claude Code

durable-workflow/.github#295 (CVE-2026-109518): vulnerable APT can follow a redirect on a retried package download. Write Acquire::Retries "0" before the first APT-capable step of each job that runs shivammathur/setup-php (php.yml x5, dependency-security.yml, release-verification.yml) and before apt-get in the tracing-performance and embedded-http runtime Dockerfiles.

scripts/ci/test-apt-no-retries.py (copied from sdk-php#399, extended to Dockerfiles per build stage) fails when a job or stage runs networked APT without the line first; it runs in php.yml's routing job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel

Copy link
Copy Markdown
Member Author

Security PASS at e122736 (.github#295). Guards precede setup-php in the five php.yml jobs, dependency-security.yml and release-verification.yml. Both Dockerfiles write the line before their first apt RUN. The test covers workflows and every Dockerfile stage, fails on revert, and runs in 'Validate repository contracts'. Non-blocking test gaps: the Dockerfile check only sees apt on the same line as RUN (a RUN set -eux; \\ followed by apt-get on the next line would slip through), and it only matches files named Dockerfile*.

@rmcdaniel
rmcdaniel merged commit 2cd14d6 into main Nov 13, 2026
31 checks passed
@rmcdaniel
rmcdaniel deleted the chore/295-apt-no-retries branch November 13, 2026 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant