Skip to content

fix: audit findings (2026-11-12, round 6) - #37

Merged
franciscbalint merged 1 commit into
developfrom
fix/audit6-2026-11-12
Nov 12, 2026
Merged

franciscbalint merged 1 commit into
developfrom
fix/audit6-2026-11-12

Conversation

@franciscbalint

Copy link
Copy Markdown
Collaborator

Fixes from the sixth audit (Medium).

  • The key in errors built from a 2xx body (Security). A 2xx body that quoted the key reached the caller in ApiResponseError on all 52 client methods (4xx bodies were already redacted). ApiResponseError#initialize now redacts its message, so every raise inherits it; the three JSON-parse raises (client and Warmup) use cause: nil, since the parser's error quotes the body. A sweep over all 52 client and 26 Warmup methods with 7 key-echoing bodies failed 76 of 79 examples before.
  • Warmup add_sending_account sent the wrong fields. It dropped the documented company_website, company_description, example_email, weekdays_only and timezone and sent undocumented industry, website and daily_limit (since v3.0.0). It now sends the documented set, matching Python and the API docs. The old website key is sent as company_website; industry, daily_limit and other unknown keys are still dropped, now with a warning that lists the documented fields. weekdays_only is a strict boolean, timezone must be a String, and timezone_offset accepts fractional hours.
  • Strict booleans on every parameter — spec/strict_booleans_spec.rb finds every boolean parameter (signatures plus the **options list, checked against the source) and asserts "false"/"junk" are rejected.

Specs 700 → 804; RuboCop clean; also run on Ruby 3.4 with the gem build/load step.

@franciscbalint
franciscbalint merged commit 86e9a5c into develop Nov 12, 2026
9 checks passed
@franciscbalint
franciscbalint deleted the fix/audit6-2026-11-12 branch November 12, 2026 12:10
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