Files
sure/Gemfile
Frank Li b88deb3545 fix: use ES256 instead of EdDSA for Coinbase CDP JWT signing (#1888)
* fix: use ES256 instead of EdDSA for Coinbase CDP JWT signing

Coinbase Developer Platform issues EC P-256 keys, not Ed25519.
The previous EdDSA implementation would always return Unauthorized
for any key generated via portal.cdp.coinbase.com.

Switch to ES256 (ECDSA SHA-256) using OpenSSL, and convert the
DER-encoded signature to the raw r||s format required by the JWT spec.

API Secret field now accepts the full PEM private key directly
(including BEGIN/END headers) as provided by Coinbase.

* fix(coinbase): address PR review comments

- Normalize escaped \n in PEM key before parsing (fixes pasting directly
  from the Coinbase CDP JSON download file where newlines are \n literals)
- Extract parse_ec_private_key helper with docstring explaining both
  accepted PEM formats
- Fix double-space style nit on encoded_header assignment
- Remove ed25519 gem from Gemfile (no longer used after ES256 migration)
- Add Provider::CoinbaseTest covering: JWT 3-part structure, ES256 alg
  header, kid claim, CDP payload claims, 64-byte raw r||s signature,
  escaped-newline key acceptance, and cryptographic signature verification

* test(coinbase): fix base64url padding in JWT test assertions

* chore: update Gemfile.lock to remove ed25519 gem

* Sample credential in test

* Comments field, not real key use

* test(coinbase): generate EC key dynamically; drop scanner exclusions

Generate a fresh P-256 key per test run with OpenSSL::PKey::EC.generate
instead of hardcoding a PEM private key. This removes committed key
material and the need to exclude the provider and test files from the
pipelock secret scan, so those exclusions are removed too.

Addresses review findings on hardcoded test key + scan exclusions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Juan José Mata <jjmata@jjmata.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 06:37:33 +02:00

151 lines
2.9 KiB
Ruby

source "https://rubygems.org"
ruby file: ".ruby-version"
# Rails
gem "rails", "~> 8.1.0"
# Drivers
gem "pg", "~> 1.5"
gem "redis", "~> 5.4"
# Deployment
gem "puma", ">= 7.2.1"
gem "bootsnap", require: false
# Assets
gem "importmap-rails"
gem "propshaft"
gem "tailwindcss-rails"
gem "lucide-rails"
# Hotwire + UI
gem "stimulus-rails"
gem "turbo-rails"
gem "view_component"
# https://github.com/lookbook-hq/lookbook/issues/712
# TODO: Remove max version constraint when fixed
gem "lookbook", "2.3.11"
gem "hotwire_combobox"
# Background Jobs
gem "connection_pool", "~> 2.5" # pin to 2.x; 3.0 breaks sidekiq 8.x
gem "sidekiq"
gem "sidekiq-cron"
gem "sidekiq-unique-jobs"
# Monitoring
gem "vernier"
gem "rack-mini-profiler"
gem "sentry-ruby"
gem "sentry-rails"
gem "sentry-sidekiq"
gem "posthog-ruby"
gem "logtail-rails"
if ENV["SKYLIGHT_ENABLED"] == "true"
gem "skylight", group: :development, require: false
else
gem "skylight", group: :production
end
# Active Storage
gem "aws-sdk-s3", "~> 1.208.0", require: false
gem "google-cloud-storage", "~> 1.59", require: false
gem "image_processing", ">= 1.2"
# Other
gem "ostruct"
gem "bcrypt", "~> 3.1"
gem "jwt"
gem "jbuilder"
gem "countries"
# OAuth & API Security
gem "doorkeeper"
gem "rack-attack", "~> 6.6"
gem "rack-cors"
gem "pundit"
gem "faraday"
gem "faraday-retry"
gem "faraday-multipart"
gem "inline_svg"
gem "octokit"
gem "pagy"
gem "rails-i18n"
gem "rails-settings-cached"
gem "tzinfo-data", platforms: %i[windows jruby]
gem "csv"
gem "rchardet" # Character encoding detection
gem "redcarpet"
gem "stripe"
gem "plaid"
gem "snaptrade", "~> 2.0"
gem "httparty"
gem "rotp", "~> 6.3"
gem "rqrcode", "~> 3.0"
gem "webauthn", "~> 3.4"
gem "activerecord-import"
gem "rubyzip", "~> 2.3"
gem "pdf-reader", "~> 2.12"
# OpenID Connect, OAuth & SAML authentication
gem "omniauth", "~> 2.1"
gem "omniauth-rails_csrf_protection"
gem "omniauth_openid_connect"
gem "omniauth-google-oauth2"
gem "omniauth-github"
gem "omniauth-saml", "~> 2.1"
# State machines
gem "aasm"
gem "after_commit_everywhere", "~> 1.0"
# AI
gem "ruby-openai"
gem "anthropic", "~> 1.0"
gem "langfuse-ruby", "~> 0.1.4", require: "langfuse"
group :development, :test do
gem "debug", platforms: %i[mri windows]
gem "brakeman", require: false
gem "rubocop-rails-omakase", require: false
gem "i18n-tasks"
gem "erb_lint"
gem "dotenv-rails"
end
if ENV["BENCHMARKING_ENABLED"]
gem "dotenv-rails", groups: [ :production ]
end
group :development do
gem "hotwire-livereload"
gem "letter_opener"
gem "ruby-lsp-rails"
gem "web-console"
gem "faker"
gem "benchmark-ips"
gem "stackprof"
gem "derailed_benchmarks"
gem "foreman"
end
group :development, :test do
gem "rspec-rails"
gem "rswag-api"
gem "rswag-specs"
gem "rswag-ui"
end
group :test do
gem "capybara"
gem "selenium-webdriver"
gem "mocha"
gem "vcr"
gem "webmock"
gem "climate_control"
gem "simplecov", require: false
end