Shared contract tests (ci.yml) and Sonar analysis (sonar.yml) run
shivammathur/setup-php on unpinned hosted runners, and setup-php can run
apt-get itself. Write Acquire::Retries "0" before setup-php in both, so
the retry-after-redirect precondition of CVE-2026-109518 is absent (as in
cli#121 and waterline#300).
Both workflows are complex reviewed workflows, so register their exact new
byte identities in protected_policy_context.py. Add test_apt_no_retries
(collected by test_ci_trust) so every APT-capable job keeps the line
first. The bound setup-php-linux workflows refuse setup-php's APT paths
and are unchanged.
Refs #295
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of #295 (CVE-2026-109518: APT follows a redirect on retry, then installs a swapped package as root).
ci.yml(contracts) andsonar.yml(analysis) runshivammathur/setup-phponubuntu-latest. setup-php can callapt-getitself: its package-repair, extension and packaged-PHP paths do. Hosted runner images aren't pinned, so the runner's apt version can't be checked ahead of time.Change
Acquire::Retries "0";to/etc/apt/apt.conf.d/99-no-retriesbefore setup-php. Same pattern as cli#121 and waterline#300. The step sits afterbootstrap-patched-pipand before setup-php, so the Composer-trust order is unchanged.scripts/protected_policy_context.pygets a newREVIEWED_APT_NO_RETRIES_SOURCE_CI_SUCCESSORSentry. It holds the new exact SHA-256 of each workflow:ci.yml760de748…31719fc,sonar.ymlf7fad836…55038ed9c749fdfcd86e1312bfca3cced. Both workflows are reviewed complex workflows, so any byte change needs a registered identity. The earlier identities stay registered.tests/test_apt_no_retries.py, collected bytests.test_ci_trust, so neither workflow's unittest module list changes. It fails if any job reachesshivammathur/setup-phpor a networked APT step before that line. It also has a control for a late or missing line.Unchanged:
qualify-linux-php-initial.ymlandqualify-linux-php-ubuntu24.ymluse the local boundsetup-php-linux. Its derived runtime removes or refuses setup-php's APT paths (scripts/php_linux_recipe.pyGUARDS,php_linux_bootstrap.installer_source).qualification/vendor/setup-php-f3e473d/*.share reference bytes that are compared, never executed.Local results
test_pip_cert_alone_is_additive_but_exported_file_and_empty_directory_refuse, which fails the same way on unmodified main here.check_public_boundary.pypasses.qualification_policy.py validate --target github-control-planepasses.🤖 Generated with Claude Code