Skip to content

chore(deps): bump pinned dependencies to clear security advisories - #153

Open
smarcet wants to merge 1 commit into
mainfrom
chore/bump-pinned-deps-security-advisories
Open

chore(deps): bump pinned dependencies to clear security advisories#153
smarcet wants to merge 1 commit into
mainfrom
chore/bump-pinned-deps-security-advisories

Conversation

@smarcet

@smarcet smarcet commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

ref: OpenStackweb/summit-api#570 (same shape, ported to openstackid)

Resolve open Dependabot alerts by updating:

  • laravel/framework 12.0 -> 12.62.0
  • guzzlehttp/guzzle 7.9.3 -> 7.15.2 (bumped past the source PR's 7.12.1 to also clear a newer high-severity guzzle advisory)
  • vladimir-yuldashev/laravel-queue-rabbitmq v14.2.0 -> v14.5.3 (14.2.0's Consumer::stop() override is incompatible with the Illuminate\Queue\Worker::stop() signature shipped in Laravel 12.62)

Also fixes a Laravel 12.62 compat break surfaced by the bump: CustomValidator::validateBoolean() widened to accept $parameters, matching the new base Illuminate\Validation\Validator::validateBoolean() signature (was a fatal declaration-incompatible error otherwise). Method body unchanged.

Transitive packages refreshed within existing constraints via -W (guzzlehttp/psr7, guzzlehttp/promises, league/commonmark, several symfony packages, etc.), clearing 34 open advisories in total.

Remaining advisories (deliberately out of scope, documented in the plan):

  • phpseclib/phpseclib — blocked by smarcet/jose4php 2.0.0's exact pin on phpseclib 3.0.43; needs a jose4php release first.
  • firebase/php-jwt (low) — needs the 6.x -> 7.x major in the token-validation path.
  • aws/aws-sdk-php, google/protobuf, phpunit, psy/psysh, symfony/cache, symfony/dom-crawler, symfony/yaml — outside this bump's three-package shape; a separate sweep.

Verification (local, matching CI's OTEL_SDK_DISABLED=true OTEL_SERVICE_ENABLED=false):

  • Default suite: 177 tests, 632 assertions, 0 errors, 0 failures.
  • OTEL Functionality suite: 23 tests, 0 errors.
  • OTEL Custom Formatters suite: 12 tests, 0 errors.
  • Boot smoke: php artisan about (Laravel 12.62.0), route:list (178 routes), config:clear — all exit 0.
  • Queue worker: php artisan queue:work rabbitmq --max-jobs=1 --stop-when-empty against local rabbitmq — exit 0, no Consumer::stop() signature fatal.
  • composer audit before/after: laravel/framework (4->0), guzzlehttp/guzzle (9->0), guzzlehttp/psr7 (4->0), league/commonmark (8->0), symfony http-foundation/mailer/mime/polyfill-intl-idn/process/routing (9->0 combined).

Full plan with investigation notes and per-task evidence: docs/plans/2026-08-11-bump-pinned-deps-security-advisories.md.

Summary by CodeRabbit

  • Bug Fixes

    • Improved compatibility for boolean validation without changing existing validation behavior.
  • Security

    • Updated core application components and messaging integrations to address known security advisories.
    • Cleared 34 reported advisories while preserving documented, out-of-scope items.
  • Documentation

    • Added upgrade documentation covering verification, compatibility checks, testing, and remaining advisories.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request updates three pinned Composer dependencies, adjusts the custom boolean validator signature, and adds a completed plan with upgrade verification and advisory audit results.

Changes

Dependency upgrade

Layer / File(s) Summary
Dependency pins and validator compatibility
composer.json, app/Validators/CustomValidator.php
Guzzle, Laravel Framework, and Laravel Queue RabbitMQ use newer pinned versions. validateBoolean accepts an optional $parameters argument while retaining its existing checks.
Upgrade verification and audit
docs/plans/2026-08-11-bump-pinned-deps-security-advisories.md
The completed plan records Composer resolution, regression and runtime checks, boot verification, and advisory audit results.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the dependency updates and their security advisory objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/bump-pinned-deps-security-advisories

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

📘 OpenAPI / Swagger preview

➡️ https://OpenStackweb.github.io/openstackid/openapi/pr-153/

This page is automatically updated on each push to this PR.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/Validators/CustomValidator.php (1)

46-56: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Handle boolean:strict in the active validator.

CustomValidator::validateBoolean() ignores $parameters, so boolean:strict would accept strings and integers. No current rule uses boolean:strict, but the custom validator is active.

Remove the default from $parameters. Delegate the strict branch to parent::validateBoolean(...). Preserve existing conversions for unqualified boolean rules.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/Validators/CustomValidator.php` around lines 46 - 56, Update
CustomValidator::validateBoolean() to require the $parameters argument and
delegate validation to parent::validateBoolean(...) when the strict parameter is
present. Preserve the current string, integer, and boolean acceptance behavior
for unqualified boolean rules.

Sources: MCP tools, Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/plans/2026-08-11-bump-pinned-deps-security-advisories.md`:
- Around line 85-90: Update the verification checklist items in the Task 1 and
Task 2 sections to reflect the reported successful results, marking each
completed composer constraint, lockfile, package-preservation, and validation
check as [x]. If any check lacks evidence, leave it unchecked and explicitly
identify it as incomplete rather than retaining an inconsistent COMPLETE status.
- Line 28: Reconcile the security-advisory summary with the authoritative
composer audit --locked result: update the line-28 list, the remaining
symfony/cache entry around the documented audit details, and all affected
advisory totals so symfony/cache is consistently classified as cleared or
remaining.
- Line 179: The recorded status summary incorrectly treats the plan file as
unrelated. Update the status-check description in the plan to include
docs/plans/2026-08-11-bump-pinned-deps-security-advisories.md as a changed file
while distinguishing the unrelated pre-existing untracked directories, and
ensure the listed files match the actual git status.
- Line 141: Add a regression check covering OTEL-enabled tests when the
configured OTLP collector is unreachable, using the documented
otel-collector:4318 configuration and an unavailable endpoint scenario. Verify
the dependency bump does not produce Doctrine cleanup or foreign-key errors, or
isolate exporter retry behavior from Doctrine cleanup so the test remains
stable. Update the documented finding only after this behavior is validated.

---

Outside diff comments:
In `@app/Validators/CustomValidator.php`:
- Around line 46-56: Update CustomValidator::validateBoolean() to require the
$parameters argument and delegate validation to parent::validateBoolean(...)
when the strict parameter is present. Preserve the current string, integer, and
boolean acceptance behavior for unqualified boolean rules.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7fc113da-759a-41a7-bf75-8e2a8fe8a94b

📥 Commits

Reviewing files that changed from the base of the PR and between f08dd62 and c115599.

⛔ Files ignored due to path filters (1)
  • composer.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • app/Validators/CustomValidator.php
  • composer.json
  • docs/plans/2026-08-11-bump-pinned-deps-security-advisories.md


## Context

Dependabot has open advisories against openstackid's PHP dependencies, including 8 high-severity ones covered by this bump: `laravel/framework < 12.60.0` (high) and `guzzlehttp/guzzle < 7.15.2` (high), plus medium/low items cleared as transitive side effects (`guzzlehttp/psr7 < 2.12.3`, `symfony/mime`, `symfony/http-foundation`, `symfony/routing`, `symfony/mailer`, `symfony/cache`, `symfony/polyfill-intl-idn`, `league/commonmark < 2.9.0`, `symfony/process`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Correct the contradictory symfony/cache audit result.

Line 28 lists symfony/cache among advisories cleared by the bump. Lines 173-177 list one symfony/cache advisory as remaining. Reconcile the list and totals with one composer audit --locked result.

Also applies to: 173-177

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/plans/2026-08-11-bump-pinned-deps-security-advisories.md` at line 28,
Reconcile the security-advisory summary with the authoritative composer audit
--locked result: update the line-28 list, the remaining symfony/cache entry
around the documented audit details, and all affected advisory totals so
symfony/cache is consistently classified as cleared or remaining.

Comment on lines +85 to +90
- [ ] The three constraints in `composer.json` read `12.62.0`, `7.15.2`, `v14.5.3`; no other `require`/`require-dev` line changed.
- [ ] `composer.lock` regenerated with `laravel/framework v12.62.0`, `guzzlehttp/guzzle 7.15.2`, `vladimir-yuldashev/laravel-queue-rabbitmq v14.5.3`.
- [ ] `phpseclib/phpseclib` still at `3.0.43` and `smarcet/jose4php` still resolvable (the hard pin was not broken).
- [x] Verify: `composer validate && composer install --dry-run` exits 0.

**Task 1 result (completed):** constraints at `12.62.0` / `7.15.2` / `v14.5.3`; lock regenerated (861 insertions, 682 deletions); `webmozart/assert` removed, `symfony/polyfill-php85` added; `phpseclib 3.0.43` and `smarcet/jose4php 2.0.0` intact. Installed versions confirmed in `vendor/composer/installed.php`. `composer install --dry-run` → "Nothing to install, update or remove"; `composer validate` → exit 0.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Mark completed verification items as complete.

The plan says Status: COMPLETE, but the Task 1 checks at Lines 85-87 and the Task 2 checks at Lines 126-128 remain unchecked. Later result sections report that these checks passed. Mark them [x], or state which checks are still incomplete.

Also applies to: 124-130

🧰 Tools
🪛 LanguageTool

[grammar] ~90-~90: Ensure spelling is correct
Context: ...ll-php85added;phpseclib 3.0.43andsmarcet/jose4php 2.0.0intact. Installed versions confirmed invendor...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/plans/2026-08-11-bump-pinned-deps-security-advisories.md` around lines
85 - 90, Update the verification checklist items in the Task 1 and Task 2
sections to reflect the reported successful results, marking each completed
composer constraint, lockfile, package-preservation, and validation check as
[x]. If any check lacks evidence, leave it unchecked and explicitly identify it
as incomplete rather than retaining an inconsistent COMPLETE status.

- OTEL Functionality Test Suite: `OK (23 tests, 52 assertions)`.
- OTEL Custom Formatters Test Suite: `OK (12 tests, 49 assertions)`.
- **Boot smoke:** `php artisan about` (Laravel Version 12.62.0, exit 0), `php artisan route:list` (178 routes, exit 0), `php artisan config:clear` (exit 0).
- **Regression-attribution finding (investigated, not a blocker):** with OTEL left enabled and the local `otel-collector` unreachable at the configured endpoint (`localhost:4318` from inside the app container — a pre-existing local dev misconfiguration, collector is actually reachable at `otel-collector:4318`), the bumped Guzzle/promises' export-retry timing triggered 18 spurious test errors (FK violations from Doctrine `UnitOfWork` flushes leaking across `TestSeeder` cleanup ordering). Isolated via an old-deps baseline run in the identical container/DB (same fresh-schema procedure): 0 errors with OTEL enabled on old deps, 18 errors with OTEL enabled on bumped deps, 0 errors on bumped deps once OTEL is disabled. Since CI (`pull_request_unit_tests.yml`, `nightly_unit_tests.yml`) always sets `OTEL_SDK_DISABLED=true`/`OTEL_SERVICE_ENABLED=false`, this local-only condition never reaches CI and is not part of this plan's scope — noted here for visibility, not filed as a task.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

rg -n -C 3 \
  'OTEL_SDK_DISABLED|OTEL_SERVICE_ENABLED|OTEL_EXPORTER_OTLP|localhost:4318|otel-collector:4318' \
  . --glob '!vendor/**' || true

Repository: OpenStackweb/openstackid

Length of output: 8015


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- workflow OTEL settings ---'
rg -n -C 5 \
  'pull_request_unit_tests|nightly_unit_tests|OTEL_SDK_DISABLED|OTEL_SERVICE_ENABLED|OTEL_EXPORTER_OTLP_ENDPOINT' \
  .github . --glob '*.yml' --glob '*.yaml' --glob '!vendor/**' || true

printf '%s\n' '--- OTEL configuration and package wiring ---'
sed -n '1,190p' config/opentelemetry.php
sed -n '145,190p' config/app.php
sed -n '1,100p' app/Http/Middleware/TrackRequestMiddleware.php
rg -n -C 4 \
  'OpenTelemetry|OTLP|otlp|otel-collector|4318|OTEL_' \
  composer.json docker-compose.yml docker-compose.*.yml .env* docs app config tests .github \
  --glob '!vendor/**' 2>/dev/null || true

printf '%s\n' '--- relevant plan context ---'
sed -n '120,185p' docs/plans/2026-08-11-bump-pinned-deps-security-advisories.md

Repository: OpenStackweb/openstackid

Length of output: 50380


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- application and collector services ---'
sed -n '1,115p' docker-compose.yml
sed -n '115,155p' .env.example
sed -n '1,75p' .github/workflows/pull_request_unit_tests.yml
sed -n '1,75p' .github/workflows/push.yml

printf '%s\n' '--- test bootstrap and cleanup paths ---'
rg -n -C 8 \
  'TestSeeder|tearDown|UnitOfWork|foreign key|Schema::|migrate|fresh|OTEL_SDK_DISABLED|opentelemetry.enabled' \
  tests phpunit.xml* database app \
  --glob '!vendor/**' \
  --glob '*.php' \
  --glob 'phpunit.xml*' | head -n 500

printf '%s\n' '--- dependency versions and OTEL package references ---'
rg -n -C 2 \
  'guzzlehttp/guzzle|guzzlehttp/promises|open-telemetry|keepsuit/laravel-open-telemetry' \
  composer.json composer.lock

Repository: OpenStackweb/openstackid

Length of output: 50380


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
import re

compose = Path("docker-compose.yml").read_text()
env_example = Path(".env.example").read_text()
otel_config = Path("config/opentelemetry.php").read_text()
workflow_files = [
    Path(".github/workflows/pull_request_unit_tests.yml"),
    Path(".github/workflows/push.yml"),
]

def service_block(name):
    match = re.search(
        rf"(?ms)^  {re.escape(name)}:\n(.*?)(?=^  [A-Za-z0-9_-]+:\n|\Z)",
        compose,
    )
    assert match, f"missing service: {name}"
    return match.group(1)

app = service_block("app")
collector = service_block("otel-collector")

assert "idp-local-net" in app
assert "idp-local-net" in collector
assert "OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318" in env_example
assert "'endpoint' => env(Variables::OTEL_EXPORTER_OTLP_ENDPOINT, 'http://localhost:4318')" in otel_config

for workflow in workflow_files:
    text = workflow.read_text()
    assert re.search(r"(?m)^\s+OTEL_SDK_DISABLED:\s+true\s*$", text)
    assert re.search(r"(?m)^\s+OTEL_SERVICE_ENABLED:\s+false\s*$", text)

print("compose: app and otel-collector share idp-local-net")
print("documented endpoint: http://otel-collector:4318")
print("application fallback endpoint: http://localhost:4318")
print("CI workflows: OTEL_SDK_DISABLED=true and OTEL_SERVICE_ENABLED=false")
print("plan-reported outage result: 18 errors after the bump, 0 with OTEL disabled")
PY

Repository: OpenStackweb/openstackid

Length of output: 459


Add a collector-failure regression check.

The documented Docker configuration uses http://otel-collector:4318, so localhost:4318 is a local configuration error. The dependency bump still causes 18 test errors when an OTLP collector is unreachable, and CI does not cover this OTEL-enabled path. Add a regression check or isolate exporter retries from Doctrine cleanup before treating this behavior as out of scope.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/plans/2026-08-11-bump-pinned-deps-security-advisories.md` at line 141,
Add a regression check covering OTEL-enabled tests when the configured OTLP
collector is unreachable, using the documented otel-collector:4318 configuration
and an unavailable endpoint scenario. Verify the dependency bump does not
produce Doctrine cleanup or foreign-key errors, or isolate exporter retry
behavior from Doctrine cleanup so the test remains stable. Update the documented
finding only after this behavior is validated.


Remaining advisories (unchanged before/after, out of scope per the plan's Context section): `aws/aws-sdk-php` (2), `firebase/php-jwt` (1, needs 6.x→7.x major), `google/protobuf` (1), `phpseclib/phpseclib` (4, blocked by `smarcet/jose4php` 2.0.0's exact pin), `phpunit/phpunit` (1, dev-only), `psy/psysh` (1, dev-only), `symfony/cache` (1), `symfony/dom-crawler` (1, dev-only), `symfony/yaml` (3).

`git status --short` diff: `app/Validators/CustomValidator.php`, `composer.json`, `composer.lock` — exactly the plan's `Files:` plus the Laravel-compat fix documented in Task 2. Pre-existing untracked dirs (`.codegraph/`, `.codex/`, `docs/`, `tests/e2e/`) unrelated to this change.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Reconcile the recorded changed-file list.

The reviewed PR includes docs/plans/2026-08-11-bump-pinned-deps-security-advisories.md, but Line 179 describes docs/ as pre-existing and unrelated and lists only the application and Composer files. Re-run the status check and distinguish this plan from unrelated untracked directories.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/plans/2026-08-11-bump-pinned-deps-security-advisories.md` at line 179,
The recorded status summary incorrectly treats the plan file as unrelated.
Update the status-check description in the plan to include
docs/plans/2026-08-11-bump-pinned-deps-security-advisories.md as a changed file
while distinguishing the unrelated pre-existing untracked directories, and
ensure the listed files match the actual git status.

@smarcet
smarcet requested review from romanetar and a lite review from Copilot August 12, 2026 01:49
Port the dependency bump from summit-api PR #570 to openstackid:

- laravel/framework 12.0 -> 12.62.0
- guzzlehttp/guzzle 7.9.3 -> 7.15.2 (7.12.1 in the source PR; bumped
  further here to also clear a newer high-severity guzzle advisory)
- vladimir-yuldashev/laravel-queue-rabbitmq v14.2.0 -> v14.5.3
  (Consumer::stop() must match the Illuminate\Queue\Worker::stop()
  signature shipped in Laravel 12.62)

Also fixes a Laravel 12.62 compat break: CustomValidator::validateBoolean()
override widened to accept $parameters, matching the new base
Illuminate\Validation\Validator::validateBoolean() signature (was a
fatal declaration-incompatible error otherwise).

Clears 34 open Dependabot advisories across laravel/framework,
guzzlehttp/guzzle, guzzlehttp/psr7, league/commonmark, and several
symfony packages refreshed as transitives.

Remaining advisories (phpseclib, firebase/php-jwt, aws-sdk-php,
google/protobuf, phpunit, psy/psysh, symfony/cache, symfony/dom-crawler,
symfony/yaml) are out of scope - see the plan for why each is blocked
or deferred.

Full regression verified locally: default suite (177 tests) + OTEL
Functionality suite (23 tests) + OTEL Custom Formatters suite (12
tests), all green. Queue worker boot-tested against local rabbitmq.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@smarcet
smarcet force-pushed the chore/bump-pinned-deps-security-advisories branch from c115599 to a5a5caf Compare August 12, 2026 02:14
@github-actions

Copy link
Copy Markdown

📘 OpenAPI / Swagger preview

➡️ https://OpenStackweb.github.io/openstackid/openapi/pr-153/

This page is automatically updated on each push to this PR.

@smarcet smarcet self-assigned this Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants