Skip to content

fix(deps): PHPCS 3.13.6 security release and Renovate - #123

Merged
apermo merged 6 commits into
mainfrom
fix/phpcs-3.13.6-security
Aug 12, 2026
Merged

fix(deps): PHPCS 3.13.6 security release and Renovate#123
apermo merged 6 commits into
mainfrom
fix/phpcs-3.13.6-security

Conversation

@apermo

@apermo apermo commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Security fix

squizlabs/php_codesniffer is raised from ^3.13.5 to ^3.13.6 for
GHSA-hmqg-cxww-wqhq
/ CVE-2026-67434 (high). The Gitblame, Hgblame and Svnblame reports built shell commands from file names
without escaping, so scanning a file whose name contains shell metacharacters could execute attacker-controlled
commands on the scanning host. Runs on the default Full report are unaffected.

The floor is raised rather than only the lockfile refreshed, so consuming projects cannot resolve back to a
vulnerable version — same approach as 3.1.1.

Why it was not caught here

This repo had no security check of its own; the advisory only surfaced in a consuming project's CI. Renovate's
config has been in .github/renovate.json since March but has never produced a PR — no Dependency Dashboard
issue, no bot PRs. The config file alone does nothing; the GitHub App was never installed.

  • Security Audit job runs composer audit --locked on pull requests and pushes, plus a Monday cron so
    advisories published against versions already in the lockfile surface without needing a code change.
  • renovate.json tuned so that security updates raise the composer.json floor (rangeStrategy: bump) instead
    of only refreshing the lockfile, advisories come from OSV directly (no dependency on Dependabot alerts), and
    security PRs bypass the Monday window. Adds lockFileMaintenance for transitive updates and a three-day
    minimumReleaseAge before dev-dependency patches automerge.
  • Commit templates drop the vendor prefix and version so bot subjects stay within the repo's 50-character limit
    (longest case renders at 49); versions move to the commit body and the PR table.
  • Check Version Bump / Check CHANGELOG Entry are skipped for Renovate PRs. Both expect a release decision
    that dependency PRs do not carry, and their failure would permanently block the dev-dependency automerge that
    the config already requested.

Still required (cannot be done from here)

Install the Renovate GitHub App on the apermo org: https://github.com/apps/renovate — until then the config
stays inert and the weekly composer audit is the only safety net.

Verification

  • composer audit --locked — no advisories
  • composer test — 78 tests, 245 assertions, all passing
  • composer analyse — no PHPStan errors
  • renovate-config-validator (latest) — config valid, no warnings

apermo added 6 commits August 11, 2026 14:38
Bumps squizlabs/php_codesniffer from ^3.13.5 to ^3.13.6 to pull in
the fix for GHSA-hmqg-cxww-wqhq / CVE-2026-67434 (high): the
Gitblame, Hgblame and Svnblame reports built shell commands from
file names without escaping, allowing command injection when
scanning files with shell metacharacters in their names.

The floor is raised rather than only the lockfile refreshed, so
consuming projects cannot resolve back to a vulnerable version.
Documents the PHPCS 3.13.6 floor bump for GHSA-hmqg-cxww-wqhq /
CVE-2026-67434 and adds the 3.1.2 compare link.
Adds a Security Audit job running `composer audit --locked` so a
vulnerable lockfile fails pull requests, plus a Monday cron so newly
published advisories surface here instead of downstream: PHPCS
GHSA-hmqg-cxww-wqhq was only caught by a consuming project's CI.

Abandoned packages are reported, not failed, keeping the job scoped
to security advisories.
The config has been in the repo since March but never produced a PR
because the Renovate app was not installed; these changes make its
output fit this repo once it is.

- vulnerabilityAlerts uses rangeStrategy "bump" so a security update
  raises the composer.json floor instead of only refreshing the
  lockfile, matching the documented policy that consumers must not
  be able to resolve back to a vulnerable version.
- osvVulnerabilityAlerts sources advisories from OSV directly, so
  detection does not depend on Dependabot alerts being enabled.
- An explicit "at any time" schedule keeps security PRs from being
  held back by the Monday window.
- lockFileMaintenance refreshes transitive dependencies, which is
  where an unpatched advisory can otherwise sit unnoticed.
- Commit templates drop the vendor prefix and the version so
  subjects stay within the 50-character limit; longest case renders
  at 49. Versions move to the commit body and PR table.
- Dev-dependency patch automerge now waits 3 days, limiting
  exposure to a compromised release.
Check Version Bump and Check CHANGELOG Entry expect a release
decision that dependency PRs do not carry, so both failed on every
Renovate PR and blocked the automerge configured for dev-dependency
patches. Check CHANGELOG Entry skips along with it via `needs`.
Documents the Security Audit job, the Renovate config tuning and the
Renovate exemption from the version checks under 3.1.2.
@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.87%. Comparing base (ee9c5c2) to head (b869ae2).

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #123   +/-   ##
=========================================
  Coverage     93.87%   93.87%           
  Complexity      577      577           
=========================================
  Files            31       31           
  Lines          1599     1599           
=========================================
  Hits           1501     1501           
  Misses           98       98           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@apermo
apermo merged commit 5250dda into main Aug 12, 2026
9 checks passed
@apermo
apermo deleted the fix/phpcs-3.13.6-security branch August 12, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant