Repository navigation
Modernize dependencies, add MIT license, and automate releases - #7
Merged
Merged
Conversation
Requires omniauth 2.x, omniauth-oauth2 1.9.x and Ruby >= 3.2, which clears 39 advisories carried by the old locked tree (omniauth CVE-2020-36599 and CVE-2015-9284, oauth2 CVE-2026-54603, jwt CVE-2026-45363, faraday CVE-2026-54297, and 30 against rack 2.2.3). Two pins keep the OAuth exchange behaving as it did: - auth_scheme is pinned to :request_body. oauth2 1.4 defaulted to that; oauth2 2.0 defaults to :basic_auth, which would have moved client_id and client_secret out of the token request body. - callback_url no longer adds script_name. omniauth 1.9 excluded SCRIPT_NAME from callback_path, but omniauth 2 moved it in, so the old override would have doubled a mount prefix and sent redirect_uri=http://host/users/users/auth/fdc/callback. It still drops the query string, which is what the override was added for (#4). Also adds a default client_options[:site] of https://auth.fulfillment.com, matching what consuming apps set through a setup lambda, so the strategy works without one. Releases now come from the GitHub Releases UI: publishing a vX.Y.Z release reruns the test matrix, checks the tag against version.rb, and publishes to RubyGems.org via trusted publishing, so no API key is stored and the gemspec can keep rubygems_mfa_required. Travis is replaced by GitHub Actions across Ruby 3.2-3.4, plus a weekly bundle-audit run kept in its own workflow so a new advisory cannot block an otherwise-green release. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings
omniauth-fdcup to the same footing asomniauth-shipbob#11: OmniAuth 2.x, a clean dependency audit, and automated publishing to RubyGems.Dependencies
omniauth ~> 2.0+omniauth-oauth2 ~> 1.9(previously an unpinnedomniauth-oauth2, resolving toomniauth 1.9/oauth2 1.4), Ruby >= 3.2,.ruby-version→ 3.4.8. Dev toolchain moves to rspec 3.13, rake 13, rack-test 2.2, webmock 3.25; thebundler ~> 1.16dev pin is gone.This is breaking for host applications. They must upgrade to OmniAuth 2.x, and Rails apps also need
omniauth-rails_csrf_protectionbecause OmniAuth 2 only acceptsPOSTfor the request phase.Vulnerabilities
bundler-auditagainst the old lockfile reported 39 advisories; the new one reports 0. Notables:omniauthCVE-2020-36599 (Critical) and CVE-2015-9284,oauth2CVE-2026-54603,jwtCVE-2026-45363,faradayCVE-2026-54297, and 30 againstrack 2.2.3.Two pins that keep the OAuth exchange working
auth_scheme: :request_body. Verified from source thatoauth21.4.4 defaulted to:request_bodyand 2.0.25 defaults to:basic_auth— without the pin,client_id/client_secretwould move out of the token request body and Fulfillment.com would receive something different.callback_urlno longer addsscript_name. This is a genuine bug, not a port. omniauth 1.9 excludedSCRIPT_NAMEfromcallback_path; omniauth 2 moved it in, so carrying the oldfull_host + script_name + callback_pathforward double-counts the mount prefix. A test caught it emittingredirect_uri=http://example.org/users/users/auth/fdc/callback. It still drops the query string, which is what added callback url method #4 added the override for.Note
omniauth-shipbobhas the same latent bug — its override is stillfull_host + script_name + callback_path. It only bites when the strategy is mounted under aSCRIPT_NAME(e.g. Devise's/users), so it may be dormant there. Worth a one-line follow-up.Publishing
Releases are cut from the GitHub Releases UI: publishing a
vX.Y.Zrelease reruns the full test matrix, refuses to continue if the tag andversion.rbdisagree, and pushes the gem via RubyGems trusted publishing (OIDC) — no stored API key, and the gemspec keepsrubygems_mfa_required. The trusted publisher and thereleaseenvironment are already configured.Travis is replaced by GitHub Actions across Ruby 3.2–3.4.
bundle-auditruns on push/PR plus a weekly cron, deliberately in its own workflow so a newly-published advisory cannot block an otherwise-green release.Also
client_options[:site]ofhttps://auth.fulfillment.com, taken from thesetuplambdas indropstreamanddropstream-2xwhich override it with the identical value — so the strategy now works without one.LICENSE.txt, declared in the gemspec; realREADME.mdreplacing theTODOtemplate;CHANGELOG.md.lib/, README, CHANGELOG, LICENSE and the gemspec itself;bin/is no longer packaged as gem executables.bin/console, which required a non-existentomniauth/fdcfile..gembuild artifacts,pkg/, and.DS_Store.Testing
Suite goes from 3 examples to 16, adding integration coverage of the request phase, the token exchange (including credentials-in-body and the absence of a Basic auth fallback), the
redirect_urioverride, the mount-prefix case, and the auth hash — against both the default and an overridden auth host.Verified locally on Ruby 3.4.8 and 3.3.5: 16 examples, 0 failures,
bundle-auditclean, andrake buildproduces a gem containing only the intended files.🤖 Generated with Claude Code