smile-identity-core 2.3.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39966ea73f1a7ad317cf4bb110622c9b5c67efcf5246487b2a7a4124d418a8f6
4
- data.tar.gz: cc969bff36cdb9a725e4776d0879b8159cb88b22f2e7d316a9b43848c7ddc388
3
+ metadata.gz: 93af320b6183d3f3975d74e1dd0ea7bf6c7da3ee3dd8db612d0410db826cc278
4
+ data.tar.gz: df7978dd7585ff27d41662f1ec0ace415cb7ff69e503eaf0e1724ed641851b6f
5
5
  SHA512:
6
- metadata.gz: db43ee16f48ec3f8c87069f21aac2b5ba1cc509abfa54531efd4695a9d56c98beeb3d78b45ec1841e386d48c4847d116d6464545fca5bf4fbd33fafc5e508242
7
- data.tar.gz: 8827bbbf277fbb9687aae8cdbf567de94e1f3deeeea9d9913a8088c4a0d47a0399d5c02a80d2acc9a218f0a577122a22e397457dbebb9075f55ebc593d07b8cc
6
+ metadata.gz: dcc1946711b63d2eadbb6f451da20d8d24cdda4c308fd2d545572e42815345a8ae70f76259308efd28bc059b8ca426eb1c4e9ce2755e4a2e771d094f8d210243
7
+ data.tar.gz: a3195d58f992b7c85086372d99fbc797ec9c58ad17ae6a01b64181bf054599145d9334cba1839b9e162fc4a161ed5b08de8a226d26eac3d3bb38966c09b2d458
@@ -1,12 +1,16 @@
1
1
  version: 2
2
2
  updates:
3
- - package-ecosystem: github-actions
4
- directory: /
5
- schedule:
6
- interval: monthly
7
- day: tuesday
8
- time: '15:00'
9
- groups:
10
- github-actions:
11
- patterns:
12
- - '*'
3
+ - package-ecosystem: bundler
4
+ open-pull-requests-limit: 0
5
+ directory: /
6
+ schedule:
7
+ interval: weekly
8
+ - package-ecosystem: github-actions
9
+ open-pull-requests-limit: 5
10
+ directory: /
11
+ schedule:
12
+ interval: weekly
13
+ groups:
14
+ github-actions:
15
+ patterns:
16
+ - '*'
@@ -0,0 +1,42 @@
1
+ name: Security Audit
2
+
3
+ on:
4
+ pull_request:
5
+ paths:
6
+ - 'Gemfile'
7
+ - 'Gemfile.lock'
8
+ - '*.gemspec'
9
+ workflow_dispatch:
10
+ schedule:
11
+ - cron: '0 9 * * *'
12
+
13
+ jobs:
14
+ security-audit:
15
+ name: Security Audit
16
+ runs-on: ubuntu-latest
17
+ permissions:
18
+ contents: read
19
+ issues: write
20
+ steps:
21
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
22
+ - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
23
+ with:
24
+ ruby-version: .ruby-version
25
+ bundler-cache: true
26
+ - name: Update advisory database
27
+ run: bundle exec bundler-audit update
28
+ - name: Run bundler-audit
29
+ run: bundle exec bundler-audit check
30
+ - name: Create issue on failure
31
+ if: failure() && github.event_name != 'pull_request'
32
+ env:
33
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34
+ run: |
35
+ EXISTING=$(gh issue list --label "security-audit" --state open --json number --jq 'length')
36
+ if [ "$EXISTING" -gt 0 ]; then exit 0; fi
37
+ TITLE_DATE=$(date +%Y-%m-%d)
38
+ gh issue create \
39
+ --title "Security: Ruby dependency vulnerabilities detected (${TITLE_DATE})" \
40
+ --label "security-audit" \
41
+ --label "priority:high" \
42
+ --body "The daily security audit has detected vulnerabilities. See [workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details."
@@ -10,11 +10,11 @@ jobs:
10
10
  needs: test
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
- - uses: actions/checkout@v6
13
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
14
14
  with:
15
15
  set-safe-directory: false
16
16
  - name: Release Gem
17
- uses: cadwallion/publish-rubygems-action@master
17
+ uses: cadwallion/publish-rubygems-action@94a6f4cd5350581749c569b5001eecc864e3ad0b # master
18
18
  env:
19
19
  RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
20
20
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -19,7 +19,7 @@ jobs:
19
19
  container:
20
20
  image: semgrep/semgrep:1.157.0
21
21
  steps:
22
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
22
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v4
23
23
 
24
24
  - name: Run Semgrep
25
25
  continue-on-error: true
@@ -28,10 +28,37 @@ jobs:
28
28
  - name: Upload SARIF to GitHub Security
29
29
  if: always()
30
30
  continue-on-error: true
31
- uses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v4
31
+ uses: github/codeql-action/upload-sarif@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4
32
32
  with:
33
33
  sarif_file: semgrep.sarif
34
34
 
35
+ - name: Import results into DefectDojo
36
+ if: always()
37
+ continue-on-error: true
38
+ env:
39
+ DEFECTDOJO_URL: ${{ secrets.DEFECTDOJO_URL }}
40
+ DEFECTDOJO_API_TOKEN: ${{ secrets.DEFECTDOJO_API_TOKEN }}
41
+ REPO_NAME: ${{ github.event.repository.name }}
42
+ BRANCH_TAG: ${{ github.head_ref || github.ref_name }}
43
+ run: |
44
+ if [ ! -s semgrep.sarif ]; then
45
+ echo "No semgrep.sarif file found, skipping DefectDojo import"
46
+ exit 0
47
+ fi
48
+ curl -sS -f \
49
+ -H "Authorization: Token ${DEFECTDOJO_API_TOKEN}" \
50
+ -F "scan_type=SARIF" \
51
+ -F "file=@semgrep.sarif" \
52
+ -F "product_type_name=GitHub" \
53
+ -F "product_name=${REPO_NAME}" \
54
+ -F "engagement_name=CI" \
55
+ -F "auto_create_context=true" \
56
+ -F "close_old_findings=true" \
57
+ -F "deduplication_on_engagement=true" \
58
+ -F "commit_hash=${{ github.sha }}" \
59
+ -F "branch_tag=${BRANCH_TAG}" \
60
+ "${DEFECTDOJO_URL}/api/v2/reimport-scan/"
61
+
35
62
  - name: Comment findings on PR
36
63
  if: github.event_name == 'pull_request' && always()
37
64
  env:
@@ -6,6 +6,10 @@ on:
6
6
  pull_request:
7
7
  workflow_dispatch:
8
8
  workflow_call:
9
+
10
+ env:
11
+ BUNDLE_FROZEN: "true"
12
+
9
13
  jobs:
10
14
  test:
11
15
  runs-on: ubuntu-latest
@@ -14,10 +18,10 @@ jobs:
14
18
  matrix:
15
19
  # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
16
20
  # See https://www.ruby-lang.org/en/downloads/ for latest stable releases.
17
- ruby: ['2.6', '2.7', '3.0', '3.1', '3.2']
21
+ ruby: ['3.0', '3.1', '3.2', '3.3', '3.4']
18
22
  steps:
19
- - uses: actions/checkout@v6
20
- - uses: ruby/setup-ruby@v1
23
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
24
+ - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
21
25
  with:
22
26
  ruby-version: ${{ matrix.ruby }}
23
27
  bundler-cache: true
@@ -25,8 +29,8 @@ jobs:
25
29
  lint:
26
30
  runs-on: ubuntu-latest
27
31
  steps:
28
- - uses: actions/checkout@v6
29
- - uses: ruby/setup-ruby@v1
32
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
33
+ - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
30
34
  with:
31
35
  ruby-version: 3.2
32
36
  bundler-cache: true
data/.rubocop.yml CHANGED
@@ -5,7 +5,7 @@ require:
5
5
  - rubocop-rspec
6
6
 
7
7
  AllCops:
8
- TargetRubyVersion: 2.6
8
+ TargetRubyVersion: 3.0
9
9
  NewCops: enable
10
10
 
11
11
  Bundler/DuplicatedGem:
data/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
+
9
+ ## [3.0.0] - 2026-09-07
10
+ ### Changed
11
+ - Require Ruby 3.0 or later, matching rubyzip 3.x. This drops support for Ruby 2.6 and 2.7.
12
+
13
+ ### Fixed
14
+ - Declare the `base64` dependency so the SDK loads on Ruby 3.4.
15
+
16
+ ### Security
17
+ - Require rubyzip 3.4.0 or later (below 4.0) to address [CVE-2026-85396](https://rubysec.com/advisories/CVE-2026-85396/). The SDK creates ZIP archives and does not call the affected `Zip::Entry#extract` method.
18
+
8
19
  ## [2.3.1] - 2026-04-24
9
20
  ### Added
10
21
  - Support for optional `aliases` parameter in AML Check (`AmlCheck#submit_job`) to allow secondary names in screening requests
data/Gemfile CHANGED
@@ -4,3 +4,7 @@ source 'https://rubygems.org'
4
4
 
5
5
  # Specify your gem's dependencies in smile-identity-core.gemspec
6
6
  gemspec
7
+
8
+ group :development do
9
+ gem 'bundler-audit', require: false
10
+ end
data/Gemfile.lock CHANGED
@@ -1,19 +1,25 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- smile-identity-core (2.3.1)
5
- rubyzip (~> 1.2, >= 1.2.3)
4
+ smile-identity-core (3.0.0)
5
+ base64 (~> 0.3)
6
+ rubyzip (>= 3.4.0, < 4.0)
6
7
  typhoeus (~> 1.0, >= 1.0.1)
7
8
 
8
9
  GEM
9
10
  remote: https://rubygems.org/
10
11
  specs:
11
12
  ast (2.4.2)
13
+ base64 (0.3.0)
14
+ bundler-audit (0.9.3)
15
+ bundler (>= 1.2.0)
16
+ thor (~> 1.0)
12
17
  diff-lcs (1.3)
13
18
  docile (1.4.0)
14
19
  ethon (0.16.0)
15
20
  ffi (>= 1.15.0)
16
21
  ffi (1.16.3)
22
+ ffi (1.16.3-x64-mingw-ucrt)
17
23
  json (2.5.1)
18
24
  parallel (1.22.1)
19
25
  parser (3.1.2.1)
@@ -52,13 +58,14 @@ GEM
52
58
  rubocop-rspec (2.14.1)
53
59
  rubocop (~> 1.33)
54
60
  ruby-progressbar (1.11.0)
55
- rubyzip (1.3.0)
61
+ rubyzip (3.4.0)
56
62
  simplecov (0.22.0)
57
63
  docile (~> 1.1)
58
64
  simplecov-html (~> 0.11)
59
65
  simplecov_json_formatter (~> 0.1)
60
66
  simplecov-html (0.12.3)
61
67
  simplecov_json_formatter (0.1.4)
68
+ thor (1.5.0)
62
69
  typhoeus (1.4.0)
63
70
  ethon (>= 0.9.0)
64
71
  unicode-display_width (2.3.0)
@@ -68,6 +75,7 @@ PLATFORMS
68
75
 
69
76
  DEPENDENCIES
70
77
  bundler (~> 2.0)
78
+ bundler-audit
71
79
  rake (~> 12.3)
72
80
  rspec (~> 3.0)
73
81
  rubocop (~> 1.37.1)
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Smile Identity Ruby Server Side SDK
2
2
 
3
+ Requires Ruby 3.0 or later.
4
+
3
5
  Smile Identity provides the best solutions for real time Digital KYC, identity verification, user onboarding, and user authentication across Africa. Our server side libraries make it easy to integrate us on the server-side. Since the library is server-side, you will be required to pass the images (if required) to the library.
4
6
 
5
7
  If you haven’t already, [sign up for a free Smile Identity account](https://usesmileid.com/talk-to-an-expert/), which comes with Sandbox access.
@@ -25,7 +25,12 @@ module SmileIdentityCore
25
25
  # @param [String] msg_signature a previously generated signature, to be confirmed
26
26
  # @return [Boolean] TRUE or FALSE
27
27
  def confirm_signature(timestamp, msg_signature)
28
- get_signature(timestamp)[:signature] == msg_signature
28
+ return false unless msg_signature.is_a?(String)
29
+
30
+ expected = get_signature(timestamp)[:signature]
31
+ return false unless expected.bytesize == msg_signature.bytesize
32
+
33
+ secure_compare(expected, msg_signature)
29
34
  end
30
35
 
31
36
  private
@@ -41,5 +46,16 @@ module SmileIdentityCore
41
46
  timestamp: timestamp.to_s,
42
47
  }
43
48
  end
49
+
50
+ # Compares equal-length strings without short-circuiting on the first
51
+ # differing byte. This keeps compatibility with Ruby versions that do not
52
+ # provide OpenSSL.fixed_length_secure_compare.
53
+ def secure_compare(first, second)
54
+ result = 0
55
+ first.each_byte.with_index do |byte, index|
56
+ result |= byte ^ second.getbyte(index)
57
+ end
58
+ result.zero?
59
+ end
44
60
  end
45
61
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SmileIdentityCore
4
- VERSION = '2.3.1'
4
+ VERSION = '3.0.0'
5
5
  SOURCE_SDK = 'Ruby'
6
6
  end
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  most of the features of the Smile Identity system through direct server to server queries.'
15
15
  spec.description = 'The Official Smile Identity gem'
16
16
  spec.homepage = 'https://www.usesmileid.com/'
17
- spec.required_ruby_version = '>= 2.6'
17
+ spec.required_ruby_version = '>= 3.0'
18
18
  spec.license = 'MIT'
19
19
 
20
20
  spec.metadata['homepage_uri'] = spec.homepage
@@ -39,7 +39,8 @@ Gem::Specification.new do |spec|
39
39
  spec.add_development_dependency 'rubocop-rspec', '~> 2.14.1'
40
40
  spec.add_development_dependency 'simplecov', '~> 0.18'
41
41
 
42
- spec.add_dependency 'rubyzip', '~> 1.2', '>= 1.2.3'
42
+ spec.add_dependency 'base64', '~> 0.3'
43
+ spec.add_dependency 'rubyzip', '>= 3.4.0', '< 4.0'
43
44
  spec.add_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
44
45
  spec.metadata['rubygems_mfa_required'] = 'true'
45
46
  end
data/socket.yml ADDED
@@ -0,0 +1,43 @@
1
+ version: 2
2
+ triggerPaths:
3
+ - 'Gemfile'
4
+ - 'Gemfile.lock'
5
+ - '*.gemspec'
6
+ issueRules:
7
+ malware: true
8
+ didYouMean: true
9
+ installScripts: true
10
+ obfuscatedFile: true
11
+ troll: true
12
+ shellScriptOverride: true
13
+ gptMalware: true
14
+ manifestConfusion: true
15
+ gitDependency: true
16
+ httpDependency: true
17
+ gitHubDependency: true
18
+ networkAccess: true
19
+ shellAccess: true
20
+ envVars: true
21
+ highEntropyStrings: true
22
+ unstableOwnership: true
23
+ gptSecurity: true
24
+ hasNativeCode: true
25
+ telemetry: true
26
+ invalidPackageJSON: true
27
+ unresolvedRequire: true
28
+ deprecated: true
29
+ unmaintained: true
30
+ trivialPackage: false
31
+ minifiedFile: false
32
+ dynamicRequire: false
33
+ debugAccess: false
34
+ filesystemAccess: false
35
+ usesEval: false
36
+ floatingDependency: false
37
+ unpopularPackage: false
38
+ gptAnomaly: false
39
+ githubApp:
40
+ enabled: true
41
+ pullRequestAlertsEnabled: true
42
+ dependencyOverviewEnabled: true
43
+ projectReportsEnabled: true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smile-identity-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Smile Identity
@@ -108,25 +108,39 @@ dependencies:
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0.18'
110
110
  - !ruby/object:Gem::Dependency
111
- name: rubyzip
111
+ name: base64
112
112
  requirement: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: '1.2'
117
- - - ">="
118
- - !ruby/object:Gem::Version
119
- version: 1.2.3
116
+ version: '0.3'
120
117
  type: :runtime
121
118
  prerelease: false
122
119
  version_requirements: !ruby/object:Gem::Requirement
123
120
  requirements:
124
121
  - - "~>"
125
122
  - !ruby/object:Gem::Version
126
- version: '1.2'
123
+ version: '0.3'
124
+ - !ruby/object:Gem::Dependency
125
+ name: rubyzip
126
+ requirement: !ruby/object:Gem::Requirement
127
+ requirements:
127
128
  - - ">="
128
129
  - !ruby/object:Gem::Version
129
- version: 1.2.3
130
+ version: 3.4.0
131
+ - - "<"
132
+ - !ruby/object:Gem::Version
133
+ version: '4.0'
134
+ type: :runtime
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - ">="
139
+ - !ruby/object:Gem::Version
140
+ version: 3.4.0
141
+ - - "<"
142
+ - !ruby/object:Gem::Version
143
+ version: '4.0'
130
144
  - !ruby/object:Gem::Dependency
131
145
  name: typhoeus
132
146
  requirement: !ruby/object:Gem::Requirement
@@ -155,6 +169,7 @@ extensions: []
155
169
  extra_rdoc_files: []
156
170
  files:
157
171
  - ".github/dependabot.yml"
172
+ - ".github/workflows/audit.yml"
158
173
  - ".github/workflows/release.yml"
159
174
  - ".github/workflows/semgrep.yml"
160
175
  - ".github/workflows/test.yml"
@@ -197,6 +212,7 @@ files:
197
212
  - lib/smile-identity-core/version.rb
198
213
  - lib/smile-identity-core/web_api.rb
199
214
  - smile-identity-core.gemspec
215
+ - socket.yml
200
216
  homepage: https://www.usesmileid.com/
201
217
  licenses:
202
218
  - MIT
@@ -213,7 +229,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
213
229
  requirements:
214
230
  - - ">="
215
231
  - !ruby/object:Gem::Version
216
- version: '2.6'
232
+ version: '3.0'
217
233
  required_rubygems_version: !ruby/object:Gem::Requirement
218
234
  requirements:
219
235
  - - ">="