smile-identity-core 2.3.0 β 2.3.1
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 +4 -4
- data/.github/workflows/release.yml +1 -1
- data/.github/workflows/semgrep.yml +119 -0
- data/.github/workflows/test.yml +2 -2
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +2 -2
- data/examples/aml_check.rb +1 -0
- data/lib/smile-identity-core/aml_check.rb +2 -0
- data/lib/smile-identity-core/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 39966ea73f1a7ad317cf4bb110622c9b5c67efcf5246487b2a7a4124d418a8f6
|
|
4
|
+
data.tar.gz: cc969bff36cdb9a725e4776d0879b8159cb88b22f2e7d316a9b43848c7ddc388
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: db43ee16f48ec3f8c87069f21aac2b5ba1cc509abfa54531efd4695a9d56c98beeb3d78b45ec1841e386d48c4847d116d6464545fca5bf4fbd33fafc5e508242
|
|
7
|
+
data.tar.gz: 8827bbbf277fbb9687aae8cdbf567de94e1f3deeeea9d9913a8088c4a0d47a0399d5c02a80d2acc9a218f0a577122a22e397457dbebb9075f55ebc593d07b8cc
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
name: Semgrep SAST
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
actions: read
|
|
11
|
+
security-events: write
|
|
12
|
+
pull-requests: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
semgrep:
|
|
16
|
+
name: Semgrep Security Scan
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
timeout-minutes: 15
|
|
19
|
+
container:
|
|
20
|
+
image: semgrep/semgrep:1.157.0
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
|
|
23
|
+
|
|
24
|
+
- name: Run Semgrep
|
|
25
|
+
continue-on-error: true
|
|
26
|
+
run: semgrep scan --config p/security-audit --sarif -o semgrep.sarif
|
|
27
|
+
|
|
28
|
+
- name: Upload SARIF to GitHub Security
|
|
29
|
+
if: always()
|
|
30
|
+
continue-on-error: true
|
|
31
|
+
uses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v4
|
|
32
|
+
with:
|
|
33
|
+
sarif_file: semgrep.sarif
|
|
34
|
+
|
|
35
|
+
- name: Comment findings on PR
|
|
36
|
+
if: github.event_name == 'pull_request' && always()
|
|
37
|
+
env:
|
|
38
|
+
GH_TOKEN: ${{ github.token }}
|
|
39
|
+
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
40
|
+
run: |
|
|
41
|
+
python3 << 'PYEOF'
|
|
42
|
+
import json, os, urllib.request
|
|
43
|
+
|
|
44
|
+
marker = "<!-- semgrep-results -->"
|
|
45
|
+
repo = os.environ.get("GITHUB_REPOSITORY", "")
|
|
46
|
+
pr = os.environ.get("PR_NUMBER", "")
|
|
47
|
+
token = os.environ.get("GH_TOKEN", "")
|
|
48
|
+
api = f"https://api.github.com/repos/{repo}/issues/{pr}/comments"
|
|
49
|
+
headers = {
|
|
50
|
+
"Authorization": f"Bearer {token}",
|
|
51
|
+
"Accept": "application/vnd.github+json",
|
|
52
|
+
"X-GitHub-Api-Version": "2022-11-28",
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
findings = []
|
|
56
|
+
try:
|
|
57
|
+
with open("semgrep.sarif") as f:
|
|
58
|
+
sarif = json.load(f)
|
|
59
|
+
for run in sarif.get("runs", []):
|
|
60
|
+
for result in run.get("results", []):
|
|
61
|
+
rule_id = result.get("ruleId", "unknown")
|
|
62
|
+
message = result.get("message", {}).get("text", "")
|
|
63
|
+
level = result.get("level", "warning")
|
|
64
|
+
for loc in result.get("locations", []):
|
|
65
|
+
phys = loc.get("physicalLocation", {})
|
|
66
|
+
path = phys.get("artifactLocation", {}).get("uri", "?")
|
|
67
|
+
line = phys.get("region", {}).get("startLine", "?")
|
|
68
|
+
findings.append({"rule": rule_id, "message": message,
|
|
69
|
+
"level": level, "file": path, "line": line})
|
|
70
|
+
except (FileNotFoundError, json.JSONDecodeError):
|
|
71
|
+
pass
|
|
72
|
+
|
|
73
|
+
if findings:
|
|
74
|
+
body = f"{marker}\n## π Semgrep Security Scan Results\n\n"
|
|
75
|
+
body += f"**{len(findings)} finding(s)** detected by "
|
|
76
|
+
body += "[`p/security-audit`](https://semgrep.dev/p/security-audit) ruleset.\n\n"
|
|
77
|
+
body += "| # | Severity | Rule | File | Line | Message |\n"
|
|
78
|
+
body += "|---|----------|------|------|------|---------|\n"
|
|
79
|
+
for i, f in enumerate(findings[:25], 1):
|
|
80
|
+
rule = f["rule"].split(".")[-1] if "." in f["rule"] else f["rule"]
|
|
81
|
+
msg = f["message"].replace("|", "\\|").replace("\n", " ")
|
|
82
|
+
msg = (msg[:80] + "...") if len(msg) > 80 else msg
|
|
83
|
+
body += f'| {i} | {f["level"].upper()} | `{rule}` '
|
|
84
|
+
body += f'| `{f["file"]}` | {f["line"]} | {msg} |\n'
|
|
85
|
+
if len(findings) > 25:
|
|
86
|
+
body += f"\n*... and {len(findings) - 25} more. "
|
|
87
|
+
body += "See full results in workflow logs.*\n"
|
|
88
|
+
body += "\n> β οΈ These findings are **non-blocking**. "
|
|
89
|
+
body += "Please review and address as appropriate.\n"
|
|
90
|
+
else:
|
|
91
|
+
body = f"{marker}\n## π Semgrep Security Scan Results\n\n"
|
|
92
|
+
body += "β
No security findings detected by "
|
|
93
|
+
body += "[`p/security-audit`](https://semgrep.dev/p/security-audit) ruleset.\n"
|
|
94
|
+
|
|
95
|
+
existing_id = None
|
|
96
|
+
try:
|
|
97
|
+
req = urllib.request.Request(api, headers=headers)
|
|
98
|
+
resp = urllib.request.urlopen(req)
|
|
99
|
+
for c in json.loads(resp.read()):
|
|
100
|
+
if marker in c.get("body", ""):
|
|
101
|
+
existing_id = c["id"]
|
|
102
|
+
break
|
|
103
|
+
except Exception:
|
|
104
|
+
pass
|
|
105
|
+
|
|
106
|
+
data = json.dumps({"body": body}).encode()
|
|
107
|
+
if existing_id:
|
|
108
|
+
url = f"https://api.github.com/repos/{repo}/issues/comments/{existing_id}"
|
|
109
|
+
req = urllib.request.Request(url, data=data, headers=headers, method="PATCH")
|
|
110
|
+
else:
|
|
111
|
+
req = urllib.request.Request(api, data=data, headers=headers, method="POST")
|
|
112
|
+
|
|
113
|
+
try:
|
|
114
|
+
urllib.request.urlopen(req)
|
|
115
|
+
action = "Updated" if existing_id else "Posted"
|
|
116
|
+
print(f"{action} comment with {len(findings)} finding(s)")
|
|
117
|
+
except Exception as e:
|
|
118
|
+
print(f"Warning: Could not comment on PR: {e}")
|
|
119
|
+
PYEOF
|
data/.github/workflows/test.yml
CHANGED
|
@@ -16,7 +16,7 @@ jobs:
|
|
|
16
16
|
# See https://www.ruby-lang.org/en/downloads/ for latest stable releases.
|
|
17
17
|
ruby: ['2.6', '2.7', '3.0', '3.1', '3.2']
|
|
18
18
|
steps:
|
|
19
|
-
- uses: actions/checkout@
|
|
19
|
+
- uses: actions/checkout@v6
|
|
20
20
|
- uses: ruby/setup-ruby@v1
|
|
21
21
|
with:
|
|
22
22
|
ruby-version: ${{ matrix.ruby }}
|
|
@@ -25,7 +25,7 @@ jobs:
|
|
|
25
25
|
lint:
|
|
26
26
|
runs-on: ubuntu-latest
|
|
27
27
|
steps:
|
|
28
|
-
- uses: actions/checkout@
|
|
28
|
+
- uses: actions/checkout@v6
|
|
29
29
|
- uses: ruby/setup-ruby@v1
|
|
30
30
|
with:
|
|
31
31
|
ruby-version: 3.2
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ 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
|
+
## [2.3.1] - 2026-04-24
|
|
9
|
+
### Added
|
|
10
|
+
- Support for optional `aliases` parameter in AML Check (`AmlCheck#submit_job`) to allow secondary names in screening requests
|
|
11
|
+
|
|
8
12
|
## [2.3.0] - 2024-12-10
|
|
9
13
|
### Added
|
|
10
14
|
- Support for Address verification
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
smile-identity-core (2.3.
|
|
4
|
+
smile-identity-core (2.3.1)
|
|
5
5
|
rubyzip (~> 1.2, >= 1.2.3)
|
|
6
6
|
typhoeus (~> 1.0, >= 1.0.1)
|
|
7
7
|
|
|
@@ -21,7 +21,7 @@ GEM
|
|
|
21
21
|
rainbow (3.1.1)
|
|
22
22
|
rake (12.3.3)
|
|
23
23
|
regexp_parser (2.6.0)
|
|
24
|
-
rexml (3.
|
|
24
|
+
rexml (3.4.2)
|
|
25
25
|
rspec (3.8.0)
|
|
26
26
|
rspec-core (~> 3.8.0)
|
|
27
27
|
rspec-expectations (~> 3.8.0)
|
data/examples/aml_check.rb
CHANGED
|
@@ -35,6 +35,8 @@ module SmileIdentityCore
|
|
|
35
35
|
# @option opts [boolean] :search_existing_user If you intend to re-use the name and year of birth
|
|
36
36
|
# @option opts [boolean] :strict_match If you want to perform a strict match on the serach criteria.
|
|
37
37
|
# of a userβs previous KYC job
|
|
38
|
+
# @option opts [Array<String>] :aliases An optional list of secondary or alternative names
|
|
39
|
+
# (e.g. maiden names, transliterations, nicknames) to include in the screening search.
|
|
38
40
|
# @option opts [Hash] :optional_info Any optional data, this will be returned
|
|
39
41
|
# in partner_params.
|
|
40
42
|
def submit_job(params)
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smile-identity-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.3.
|
|
4
|
+
version: 2.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Smile Identity
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: bundler
|
|
@@ -156,6 +156,7 @@ extra_rdoc_files: []
|
|
|
156
156
|
files:
|
|
157
157
|
- ".github/dependabot.yml"
|
|
158
158
|
- ".github/workflows/release.yml"
|
|
159
|
+
- ".github/workflows/semgrep.yml"
|
|
159
160
|
- ".github/workflows/test.yml"
|
|
160
161
|
- ".gitignore"
|
|
161
162
|
- ".rspec"
|
|
@@ -219,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
219
220
|
- !ruby/object:Gem::Version
|
|
220
221
|
version: '0'
|
|
221
222
|
requirements: []
|
|
222
|
-
rubygems_version: 3.6.
|
|
223
|
+
rubygems_version: 3.6.9
|
|
223
224
|
specification_version: 4
|
|
224
225
|
summary: The Smile Identity Web API allows the user to access\ most of the features
|
|
225
226
|
of the Smile Identity system through direct server to server queries.
|