Skip to content

Release 2.8.1 - fix(client): security hardening - #233

Merged
david-ruiz-cko merged 1 commit into
masterfrom
release/2.8.1
Nov 4, 2026
Merged

david-ruiz-cko merged 1 commit into
masterfrom
release/2.8.1

Conversation

@david-ruiz-cko

Copy link
Copy Markdown
Contributor

Summary

Security hardening (reported internally) in the authentication client, error handling and request logging. No public API is removed; one exception type changes on the OAuth token request (see Breaking changes). Token request client errors (4xx) raise CheckoutAuthorizationException; server errors keep their Faraday class, without request data.

Changes

  • lib/checkout_sdk/api_client.rb: error handling for requests and file uploads; request log lines.
  • lib/checkout_sdk/events/events_client.rb: retrieve_all_event_types builds its query with URI.encode_www_form.
  • spec/checkout_sdk/oauth_sdk_credentials_spec.rb: new, OAuth token responses (success, 4xx, 5xx, timeout).
  • spec/checkout_sdk/api_client_spec.rb: request logging and error data tests.
  • spec/checkout_sdk/checkout_utils_spec.rb: new, loggable_path.
  • spec/checkout_sdk/events/events_client_spec.rb: new, event types query.
  • lib/checkout_sdk/checkout_utils.rb: shared helpers for log lines, exception messages and error data; default clients configure raise_error with include_request: false.
  • lib/checkout_sdk/error.rb: both exceptions build their message with the shared helper; CheckoutAuthorizationException exposes http_metadata.
  • lib/checkout_sdk/oauth_sdk_credentials.rb: token request errors handled through the shared helpers.
  • README.md: custom HTTP client note on include_request: false (Faraday 2.7.11 or later).

API Reference

None.

Breaking changes ⚠️

  • Exception message text only; no exception classes change.
  • OAuth token request: CheckoutAuthorizationException reads The OAuth token response status code (<status>) does not indicate success. followed by the response details, or The OAuth token request failed without a response. when there is no response.
  • API errors: CheckoutApiException details are limited to 256 characters, and nested values render as plain values.
  • Migration: read http_metadata / error_details instead of parsing messages.

Tests

  • Existing tests pass (unit suite and rubocop lib; integration tests run in CI against the sandbox)
  • Serialization tests cover every new or changed property (no request or response properties changed)
  • README updated if documented usage changed (documented usage unchanged)

Related

None.

@david-ruiz-cko
david-ruiz-cko requested a review from a team November 4, 2026 14:18
@agent-wall-e

agent-wall-e Bot commented Nov 4, 2026

Copy link
Copy Markdown

🟡 Risk Classification: MINOR

Approval route: AI Review + Human Approval
Rollback controls: Staged rollout + rollback

Classification reasons

  • no_low_class_matched
  • prod_source_modified

Operational gates

  • ✅ jira_ticket
  • ✅ independent_review

Files analysed: 1


wall-e 2026.06.19-02 · policy 6b4ce2b3b45a…

@agent-wall-e

agent-wall-e Bot commented Nov 4, 2026

Copy link
Copy Markdown
🔬 Debug — why this classification?

Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.

Reason code Kind Clause Meaning
no_low_class_matched informational §2.2 (fall-through) None of the deterministic Low classes (§2.2.3, §2.2.4, §2.2.7, docs-only) applied; classifier fell through to LLM evaluation.
prod_source_modified informational §2.1 M7 (informational) At least one file is non-doc, non-test, non-IaC — i.e. application source code was modified.

Kinds:

  • classifying — this rule contributed to the chosen tier.
  • informational — context only; did not by itself decide the tier.

See issue #3 for the proposal to formalise this map as Appendix A of the standards doc.

wall-e 2026.06.19-02 · debug

@agent-wall-e

agent-wall-e Bot commented Nov 4, 2026

Copy link
Copy Markdown

🟠 Advisory review: Concerns worth a look

This PR needs a human approval. Before you give it, these are the things I'd want resolved.

The diff contains only the version bump in version.rb, but the PR description claims substantive security hardening changes across at least 9 files (api_client, oauth_sdk_credentials, checkout_utils, error, events_client, README, and several specs). Either the diff is incomplete/truncated or the actual security changes are missing from this review.

Concerns

  • The diff is almost certainly partial — all claimed security-critical changes (error handling, request logging sanitization, OAuth token error handling, include_request: false) are absent from the diff entirely.
  • A reviewer cannot verify whether the security hardening was actually implemented correctly, whether sensitive request data is actually excluded from logs/exceptions, or whether the OAuth exception behavior change is correct, because none of that code is visible.
  • The version bump itself looks correct for a patch release (2.8.0 → 2.8.1), but approving solely on the basis of a version file change for a PR claiming security fixes would be inappropriate.

This is not an approval. wall-e cannot auto-approve this PR — it is an opinion to help whoever does. Advisory review · us.anthropic.claude-sonnet-4-6 · wall-e 2026.06.19-02

@sonarqubecloud

sonarqubecloud Bot commented Nov 4, 2026

Copy link
Copy Markdown

@david-ruiz-cko
david-ruiz-cko merged commit b53a48b into master Nov 4, 2026
5 checks passed
@david-ruiz-cko
david-ruiz-cko deleted the release/2.8.1 branch November 4, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants