@codyswann/lisa 6.0.8 → 6.0.10
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.
- package/all/copy-overwrite/scripts/lisa-audit.mjs +1 -1
- package/all/copy-overwrite/scripts/lisa-hooks/sonar-secrets.sh +130 -47
- package/dist/configs/eslint/expo.d.ts.map +1 -1
- package/dist/configs/eslint/expo.js +11 -3
- package/dist/configs/eslint/expo.js.map +1 -1
- package/dist/configs/eslint/slow-expo.d.ts +15 -6
- package/dist/configs/eslint/slow-expo.d.ts.map +1 -1
- package/dist/configs/eslint/slow-expo.js +48 -19
- package/dist/configs/eslint/slow-expo.js.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +6 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/nightly-e2e-guard-behavior-certificate.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +11 -12
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/migrations/index.d.ts +0 -1
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +0 -3
- package/dist/migrations/index.js.map +1 -1
- package/expo/copy-overwrite/eslint.expo.ts +11 -3
- package/expo/package-lisa/package.lisa.json +2 -1
- package/package.json +8 -7
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-security-audit-handling/SKILL.md +25 -25
- package/plugins/lisa/hooks/sonar-secrets.sh +130 -47
- package/plugins/lisa/rules/reference/security-audit-handling.md +9 -1
- package/plugins/lisa/skills/lisa-security-audit-handling/SKILL.md +25 -25
- package/plugins/lisa/skills/lisa-security-audit-handling/agents/openai.yaml +2 -2
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-security-audit-handling/SKILL.md +25 -25
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/hooks/sonar-secrets.sh +130 -47
- package/plugins/lisa-copilot/rules/reference/security-audit-handling.md +9 -1
- package/plugins/lisa-copilot/skills/lisa-security-audit-handling/SKILL.md +25 -25
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/sonar-secrets.sh +130 -47
- package/plugins/lisa-cursor/rules/security-audit-handling-reference.mdc +9 -1
- package/plugins/lisa-cursor/skills/lisa-security-audit-handling/SKILL.md +25 -25
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/hooks/sonar-secrets.sh +130 -47
- package/plugins/lisa-devin/rules/reference/security-audit-handling.md +9 -1
- package/plugins/lisa-devin/skills/lisa-security-audit-handling/SKILL.md +25 -25
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/base/hooks/sonar-secrets.sh +130 -47
- package/plugins/src/base/rules/reference/security-audit-handling.md +9 -1
- package/plugins/src/base/skills/lisa-security-audit-handling/SKILL.md +25 -25
- package/scripts/lisa-audit.mjs +1 -1
- package/typescript/copy-overwrite/audit.ignore.config.json +1 -140
- package/dist/migrations/ensure-audit-ignore-local-exclusions.d.ts +0 -51
- package/dist/migrations/ensure-audit-ignore-local-exclusions.d.ts.map +0 -1
- package/dist/migrations/ensure-audit-ignore-local-exclusions.js +0 -245
- package/dist/migrations/ensure-audit-ignore-local-exclusions.js.map +0 -1
|
@@ -39,7 +39,7 @@ try {
|
|
|
39
39
|
);
|
|
40
40
|
if (!verdict.passed)
|
|
41
41
|
console.log(
|
|
42
|
-
" Next step: follow the lisa-security-audit-handling skill
|
|
42
|
+
" Next step: follow the lisa-security-audit-handling skill, in order: 1) refresh the lockfile within its current range; 2) upgrade the direct dependency that pulls it; 3) add a targeted override to the fixed version; 4) before any code change, evaluate reachability, and if the advisory cannot affect this project add a scoped exclusion with the reason to audit.ignore.local.json (for a dev-only copy, add its lockfile path to `paths`), no human needed; 5) replace or remove the dependency. Never bypass this hook. See https://github.com/CodySwannGT/lisa/blob/main/docs/dependency-audit-exclusions.md"
|
|
43
43
|
);
|
|
44
44
|
process.exitCode = verdict.passed ? 0 : 1;
|
|
45
45
|
} catch (error) {
|
|
@@ -62,8 +62,38 @@ set -uo pipefail
|
|
|
62
62
|
# the drain at exactly the moment this wrapper is proving `sonar` is absent
|
|
63
63
|
# (CodySwannGT/lisa#3308). An empty delimiter means "read through NUL or EOF";
|
|
64
64
|
# hook envelopes contain no NUL, so the non-zero EOF result is expected.
|
|
65
|
+
#
|
|
66
|
+
# Every wait in this file has a ceiling (CodySwannGT/lisa#5038). This one waited
|
|
67
|
+
# for EOF with none, so a caller that gave up on the hook without closing its end
|
|
68
|
+
# of the pipe left the hook blocked in `read` forever: four were found on one
|
|
69
|
+
# workstation, orphaned to PID 1 with no children, 2h, 2h, 5h and 146h old. A
|
|
70
|
+
# real caller writes the whole envelope at once (a 1MB payload drains in ~0.6s
|
|
71
|
+
# at a load average of 20), so the ceiling only ever ends a wait nobody is going
|
|
72
|
+
# to finish. When EOF arrives in time nothing changes: every exit below still
|
|
73
|
+
# follows it. When it does not, the hook stops waiting and steps aside — Bash
|
|
74
|
+
# discards a partial read on timeout, so there is no complete payload to scan.
|
|
75
|
+
#
|
|
76
|
+
# `read -t` cannot tell its caller which happened (Bash 3.2 returns 1 for both
|
|
77
|
+
# EOF and a timeout), so the clock decides: a read that lasted the whole ceiling
|
|
78
|
+
# timed out. A value that is not a positive whole number falls back to the
|
|
79
|
+
# shipped ten seconds rather than to `read -t 0`, which would skip the drain.
|
|
80
|
+
bound_s() {
|
|
81
|
+
case "$1" in
|
|
82
|
+
'' | *[!0-9]* | 0*) printf '10' ;;
|
|
83
|
+
*) printf '%s' "$1" ;;
|
|
84
|
+
esac
|
|
85
|
+
}
|
|
86
|
+
|
|
65
87
|
payload=""
|
|
66
|
-
|
|
88
|
+
stdin_bound="$(bound_s "${LISA_SONAR_STDIN_TIMEOUT_S:-}")"
|
|
89
|
+
stdin_started=$SECONDS
|
|
90
|
+
IFS= read -r -d '' -t "$stdin_bound" payload || true
|
|
91
|
+
if (( SECONDS - stdin_started >= stdin_bound )); then
|
|
92
|
+
echo "sonar: the hook's input did not finish arriving within ${stdin_bound}s;" >&2
|
|
93
|
+
echo " skipping the local secret scan. Commit-time and CI secret scanning" >&2
|
|
94
|
+
echo " still gate this repository." >&2
|
|
95
|
+
exit 0
|
|
96
|
+
fi
|
|
67
97
|
|
|
68
98
|
event="${1:-}"
|
|
69
99
|
[[ -n "$event" ]] || exit 0
|
|
@@ -81,8 +111,94 @@ command -v sonar >/dev/null 2>&1 || exit 0
|
|
|
81
111
|
# exit code carries no information and the reason text is the only channel.
|
|
82
112
|
inactive_marker='secret scanning is inactive'
|
|
83
113
|
|
|
114
|
+
# Run one command with a ceiling and capture its stdout into `captured`.
|
|
115
|
+
#
|
|
116
|
+
# Usage: capture_bounded <seconds> <delimiter> <label> <stdin> <command...>
|
|
117
|
+
# Returns 0 when the command answered in time, 1 when the ceiling expired (and
|
|
118
|
+
# `captured` is then empty), and 2 when the private FIFO could not be made.
|
|
119
|
+
#
|
|
120
|
+
# `read -t` supplies the ceiling. `timeout` is absent on a stock macOS and
|
|
121
|
+
# `coproc` needs Bash 4 (the hooks run under /bin/bash 3.2 there), so this is the
|
|
122
|
+
# portable form. Stopping the wait is not stopping the work, so when the read
|
|
123
|
+
# returns the command is killed and reaped; that requires its PID, which is why
|
|
124
|
+
# the command is backgrounded explicitly and its output goes through a FIFO.
|
|
125
|
+
# On /bin/bash 3.2, `$!` after `< <(cmd)` is the SHELL'S OWN PID, not the
|
|
126
|
+
# substitution's child (verified: the child's PPID is the shell, and `$!` equals
|
|
127
|
+
# the shell), so `kill -9 "$!"` there would tell the hook to kill itself. For a
|
|
128
|
+
# background pipeline `$!` is its last command, so the kill lands on the command
|
|
129
|
+
# itself; its stdin writer then dies on the closed pipe.
|
|
130
|
+
#
|
|
131
|
+
# The FIFO's OPEN is bounded too, not only the read (CodySwannGT/lisa#5038). A
|
|
132
|
+
# read-only open of a FIFO blocks until a writer opens the other end, and a
|
|
133
|
+
# writer that dies first would leave it blocked for good with `read -t` never
|
|
134
|
+
# reached. So the hook opens the FIFO read-write first, which never blocks, and
|
|
135
|
+
# the command inherits that end at fork instead of opening the path later. The
|
|
136
|
+
# read-only end is then opened while a writer is guaranteed to exist, and the
|
|
137
|
+
# hook's own write end is closed, so EOF arrives exactly when the command (and
|
|
138
|
+
# anything it handed its stdout to) is done.
|
|
139
|
+
#
|
|
140
|
+
# The FIFO is a rendezvous, not storage: a named pipe holds no data at rest, so a
|
|
141
|
+
# value carried through it never lands on disk (CWE-922) and a kill at any point
|
|
142
|
+
# leaves an empty pipe behind rather than a readable token. The directory is
|
|
143
|
+
# `mktemp -d`, which is 0700. Its explicit Lisa prefix makes an interrupted run
|
|
144
|
+
# attributable to the owning scratch lifecycle instead of anonymous `tmp.*`.
|
|
145
|
+
# Descriptors 3 and 4 are used for nothing else in this file.
|
|
146
|
+
captured=""
|
|
147
|
+
capture_bounded() {
|
|
148
|
+
local seconds="$1" delim="$2" label="$3" feed="$4" dir="" fifo="" child=""
|
|
149
|
+
local started=0 status=0
|
|
150
|
+
shift 4
|
|
151
|
+
captured=""
|
|
152
|
+
dir="$(mktemp -d "${TMPDIR:-/tmp}/lisa-sonar-${label}.XXXXXXXX")" || return 2
|
|
153
|
+
fifo="$dir/$label"
|
|
154
|
+
if ! mkfifo -m 600 "$fifo" 2>/dev/null; then
|
|
155
|
+
rm -rf "$dir"
|
|
156
|
+
return 2
|
|
157
|
+
fi
|
|
158
|
+
exec 3<>"$fifo"
|
|
159
|
+
{ printf '%s' "$feed"; } 3>&- | "$@" >&3 3>&- 2>/dev/null &
|
|
160
|
+
child=$!
|
|
161
|
+
exec 4<"$fifo"
|
|
162
|
+
exec 3>&-
|
|
163
|
+
started=$SECONDS
|
|
164
|
+
IFS= read -r -d "$delim" -t "$seconds" captured <&4
|
|
165
|
+
exec 4<&-
|
|
166
|
+
# The clock decides, as for stdin above: Bash 3.2 returns 1 for EOF and for a
|
|
167
|
+
# timeout alike, and Bash 4+ keeps a timed-out partial read, which must never
|
|
168
|
+
# pass for a verdict or a token.
|
|
169
|
+
if (( SECONDS - started >= seconds )); then
|
|
170
|
+
captured=""
|
|
171
|
+
status=1
|
|
172
|
+
fi
|
|
173
|
+
kill -9 "$child" 2>/dev/null
|
|
174
|
+
wait "$child" 2>/dev/null
|
|
175
|
+
rm -rf "$dir"
|
|
176
|
+
return "$status"
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
# `sonar hook` is a call with no ceiling of its own, in front of every prompt and
|
|
180
|
+
# every file read (CodySwannGT/lisa#5038). Ten seconds by default, like the
|
|
181
|
+
# resolver below; `LISA_SONAR_SCAN_TIMEOUT_S` lets a caller that is not a session
|
|
182
|
+
# say otherwise. A scanner that does not answer is a degraded layer, not a
|
|
183
|
+
# finding, so the hook warns and steps aside.
|
|
184
|
+
scan_bound="$(bound_s "${LISA_SONAR_SCAN_TIMEOUT_S:-}")"
|
|
84
185
|
run_scanner() {
|
|
85
|
-
|
|
186
|
+
capture_bounded "$scan_bound" '' scan "$payload" sonar hook "$event"
|
|
187
|
+
case $? in
|
|
188
|
+
0) out="$captured" ;;
|
|
189
|
+
1)
|
|
190
|
+
echo "sonar: the secret scanner did not answer within ${scan_bound}s;" >&2
|
|
191
|
+
echo " skipping the local secret scan. Commit-time and CI secret scanning" >&2
|
|
192
|
+
echo " still gate this repository." >&2
|
|
193
|
+
exit 0
|
|
194
|
+
;;
|
|
195
|
+
*)
|
|
196
|
+
echo "sonar: could not make a private pipe for the secret scanner;" >&2
|
|
197
|
+
echo " skipping the local secret scan. Commit-time and CI secret scanning" >&2
|
|
198
|
+
echo " still gate this repository." >&2
|
|
199
|
+
exit 0
|
|
200
|
+
;;
|
|
201
|
+
esac
|
|
86
202
|
}
|
|
87
203
|
|
|
88
204
|
is_inactive() {
|
|
@@ -92,21 +208,15 @@ is_inactive() {
|
|
|
92
208
|
esac
|
|
93
209
|
}
|
|
94
210
|
|
|
95
|
-
#
|
|
211
|
+
# Resolve a secret with a ceiling, because the provider call crosses the network
|
|
96
212
|
# and this sits in front of every prompt and every file read.
|
|
97
213
|
#
|
|
98
214
|
# The value never touches the filesystem. An earlier version captured it through
|
|
99
215
|
# `mktemp` and deleted the file afterwards, which is a race, not a cleanup: a
|
|
100
216
|
# kill between the write and the `rm` leaves the token readable on disk (CWE-922)
|
|
101
217
|
# — the precise failure the one-store rule in lisa-secrets-access exists to
|
|
102
|
-
# prevent, reintroduced by the code enforcing it.
|
|
103
|
-
#
|
|
104
|
-
# clean up on any exit path, signalled or not.
|
|
105
|
-
#
|
|
106
|
-
# `read -t` supplies the ceiling. `timeout` is absent on a stock macOS and
|
|
107
|
-
# `coproc` needs Bash 4 (the hooks run under /bin/bash 3.2 there), so this is the
|
|
108
|
-
# portable form. A timeout leaves `value` empty, which the caller treats as "the
|
|
109
|
-
# provider had nothing" — the warn path, never a block.
|
|
218
|
+
# prevent, reintroduced by the code enforcing it. `capture_bounded` carries it
|
|
219
|
+
# over a FIFO instead, which holds nothing at rest.
|
|
110
220
|
#
|
|
111
221
|
# Ten seconds is the ceiling a consumer gets, and that is a product decision, not
|
|
112
222
|
# a tuning constant: this runs in front of every prompt and every file read, so
|
|
@@ -119,44 +229,17 @@ is_inactive() {
|
|
|
119
229
|
# (CodySwannGT/lisa#2905). The suite scales this the same way it scales its own
|
|
120
230
|
# budgets, and stages a hang by shrinking it.
|
|
121
231
|
#
|
|
122
|
-
#
|
|
123
|
-
#
|
|
124
|
-
# is no value of this variable that
|
|
125
|
-
#
|
|
126
|
-
# Giving up on the read is not the same as stopping the work: a resolver blocked
|
|
127
|
-
# on the network otherwise outlives the hook that started it, and this runs in
|
|
128
|
-
# front of every prompt and every file read. So the child is killed and reaped,
|
|
129
|
-
# which requires knowing its PID — and that is why the transport is a FIFO and
|
|
130
|
-
# not the process substitution this function used to read from.
|
|
131
|
-
#
|
|
132
|
-
# On /bin/bash 3.2, `$!` after `< <(cmd)` is the SHELL'S OWN PID, not the
|
|
133
|
-
# substitution's child (verified: the child's PPID is the shell, and `$!` equals
|
|
134
|
-
# the shell). A `kill -9 "$!"` there tells the hook to kill itself. Backgrounding
|
|
135
|
-
# the resolver explicitly is what makes `$!` mean the resolver.
|
|
136
|
-
#
|
|
137
|
-
# The FIFO is a rendezvous, not storage: a named pipe holds no data at rest, so
|
|
138
|
-
# the value still never lands on disk (CWE-922) and a kill at any point leaves an
|
|
139
|
-
# empty pipe behind rather than a readable token. The directory is `mktemp -d`,
|
|
140
|
-
# which is 0700. Its explicit Lisa prefix makes an interrupted resolver
|
|
141
|
-
# attributable to the owning scratch lifecycle instead of anonymous `tmp.*`.
|
|
232
|
+
# A timeout leaves the value empty, which the caller treats as "the provider had
|
|
233
|
+
# nothing" — the warn path, never a block. Unset, empty, or unparseable all fall
|
|
234
|
+
# back to the shipped ten seconds, so there is no value of this variable that
|
|
235
|
+
# turns a warn into a block.
|
|
142
236
|
resolve_secret() {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
if ! mkfifo -m 600 "$fifo" 2>/dev/null; then
|
|
147
|
-
rm -rf "$dir"
|
|
148
|
-
return 0
|
|
149
|
-
fi
|
|
150
|
-
node "$resolver" get "$name" >"$fifo" 2>/dev/null &
|
|
151
|
-
child=$!
|
|
152
|
-
IFS= read -r -t "${LISA_SONAR_RESOLVER_TIMEOUT_S:-10}" value < "$fifo" || true
|
|
153
|
-
kill -9 "$child" 2>/dev/null
|
|
154
|
-
wait "$child" 2>/dev/null
|
|
155
|
-
rm -rf "$dir"
|
|
156
|
-
printf '%s' "$value"
|
|
237
|
+
capture_bounded "$(bound_s "${LISA_SONAR_RESOLVER_TIMEOUT_S:-10}")" $'\n' resolver "" \
|
|
238
|
+
node "$1" get "$2"
|
|
239
|
+
printf '%s' "$captured"
|
|
157
240
|
}
|
|
158
241
|
|
|
159
|
-
|
|
242
|
+
run_scanner
|
|
160
243
|
|
|
161
244
|
if is_inactive "$out"; then
|
|
162
245
|
# Where lisa-secrets-access lives depends on how the project receives Lisa.
|
|
@@ -187,7 +270,7 @@ if is_inactive "$out"; then
|
|
|
187
270
|
export SONARQUBE_CLI_TOKEN="$token"
|
|
188
271
|
org="$(resolve_secret "$resolver" SONARQUBE_CLI_ORG)"
|
|
189
272
|
[[ -n "$org" ]] && export SONARQUBE_CLI_ORG="$org"
|
|
190
|
-
|
|
273
|
+
run_scanner
|
|
191
274
|
fi
|
|
192
275
|
unset token org
|
|
193
276
|
fi
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expo.d.ts","sourceRoot":"","sources":["../../../src/configs/eslint/expo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"expo.d.ts","sourceRoot":"","sources":["../../../src/configs/eslint/expo.ts"],"names":[],"mappings":"AAuBA,OAAO,EAEL,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EAItB,cAAc,EAIf,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EACtB,cAAc,GACf,CAAC;AAwBF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,yNAK/B,CAAC;AAkBX;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAe3D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,SAAS,MAAM,EAAE,GAC3B,OAAO,QAAQ,EAAE,MAAM,CAAC,SAAS,CAInC;AAuBD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,EAC5B,eAAe,EACf,cAA+B,EAC/B,UAA8B,EAC9B,UAAe,EACf,SAAc,GACf,EAAE;IACD,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,iBAAiB,CAAC;IACtC;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B,GAAG,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CAoSnC"}
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import oxlint from "eslint-plugin-oxlint";
|
|
17
17
|
import react from "eslint-plugin-react";
|
|
18
|
-
import reactCompiler from "eslint-plugin-react-compiler";
|
|
19
18
|
import { readFileSync } from "fs";
|
|
20
19
|
import { createRequire } from "module";
|
|
21
20
|
import path from "path";
|
|
@@ -183,7 +182,6 @@ export function getExpoConfig({ tsconfigRootDir, ignorePatterns = defaultIgnores
|
|
|
183
182
|
plugins: {
|
|
184
183
|
"component-structure": componentStructure,
|
|
185
184
|
"code-organization": codeOrganization,
|
|
186
|
-
"react-compiler": reactCompiler,
|
|
187
185
|
"ui-standards": uiStandards,
|
|
188
186
|
},
|
|
189
187
|
rules: {
|
|
@@ -231,10 +229,20 @@ export function getExpoConfig({ tsconfigRootDir, ignorePatterns = defaultIgnores
|
|
|
231
229
|
"react-hooks/preserve-manual-memoization": "error",
|
|
232
230
|
"react-hooks/refs": "error",
|
|
233
231
|
"react-hooks/immutability": "error",
|
|
232
|
+
// React Compiler diagnostics, replacing react-compiler/react-compiler
|
|
233
|
+
// (its plugin pins zod 3, unfixed for GHSA-mrhx-c7xc-m3w5).
|
|
234
|
+
"react-hooks/use-memo": "error",
|
|
235
|
+
"react-hooks/globals": "error",
|
|
236
|
+
"react-hooks/error-boundaries": "error",
|
|
237
|
+
"react-hooks/purity": "error",
|
|
238
|
+
"react-hooks/set-state-in-render": "error",
|
|
239
|
+
"react-hooks/config": "error",
|
|
240
|
+
"react-hooks/gating": "error",
|
|
234
241
|
// Slow rules - disabled by default, run via `lint:slow` script
|
|
235
242
|
// @see eslint.slow.config.ts
|
|
236
|
-
"react-compiler/react-compiler": "off",
|
|
237
243
|
"react-hooks/static-components": "off",
|
|
244
|
+
// react-hooks/rule-suppression and react-hooks/void-use-memo stay unset
|
|
245
|
+
// here; they run in lint:slow (getExpoSlowConfig).
|
|
238
246
|
// End Slow rules - disabled by default, run via `lint:slow` script
|
|
239
247
|
// Environment variables - enforce validated env module usage
|
|
240
248
|
// @see .claude/skills/expo-env-config/SKILL.md
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expo.js","sourceRoot":"","sources":["../../../src/configs/eslint/expo.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E;;;;;;;;;;;;;GAaG;AACH,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,
|
|
1
|
+
{"version":3,"file":"expo.js","sourceRoot":"","sources":["../../../src/configs/eslint/expo.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E;;;;;;;;;;;;;GAaG;AACH,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,yCAAyC;AACzC,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,EACtB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,mCAAmC;AACnC,OAAO,EACL,c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AO,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;aACvC,CAAC,CACH;SACF;QAED,sEAAsE;QACtE,uEAAuE;QACvE,mEAAmE;QACnE,2BAA2B,EAAE;KACiB,CAAC;AACnD,CAAC;AAED,8EAA8E"}
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The React Compiler checks lint:slow adds, where the old
|
|
3
|
+
* `react-compiler/react-compiler` rule ran. `rule-suppression` and
|
|
4
|
+
* `void-use-memo` restore what that rule reported and #4931 had dropped: an
|
|
5
|
+
* `eslint-disable` of `react-hooks/exhaustive-deps` or
|
|
6
|
+
* `react-hooks/rules-of-hooks` (the compiler's InvalidReact suppression
|
|
7
|
+
* diagnostic), and a `useMemo` whose callback returns nothing.
|
|
8
|
+
*/
|
|
9
|
+
export declare const EXPO_SLOW_REACT_RULES: readonly ["react-hooks/static-components", "react-hooks/rule-suppression", "react-hooks/void-use-memo"];
|
|
1
10
|
/**
|
|
2
11
|
* Creates the slow ESLint configuration for Expo projects: the shared slow
|
|
3
|
-
* rules plus the
|
|
12
|
+
* rules plus the React rules the main Expo config turns off for speed.
|
|
4
13
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
14
|
+
* The React rules moved here from the main Expo lint when lint:slow was
|
|
15
|
+
* introduced (0b58fe96a4). A later rewrite of this module kept only the
|
|
16
|
+
* import rules, so none ran anywhere until they were restored
|
|
17
|
+
* (CodySwannGT/lisa#4507). The plugin is resolved from Lisa's own
|
|
18
|
+
* dependencies, so a project needs no extra install.
|
|
10
19
|
* @param options - Configuration options for the slow rules config
|
|
11
20
|
* @param options.ignorePatterns - Patterns to ignore in addition to built-in ignores
|
|
12
21
|
* @returns ESLint flat config array containing only slow rules
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slow-expo.d.ts","sourceRoot":"","sources":["../../../src/configs/eslint/slow-expo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slow-expo.d.ts","sourceRoot":"","sources":["../../../src/configs/eslint/slow-expo.ts"],"names":[],"mappings":"AA6BA;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,yGAIxB,CAAC;AAeX;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,cAAmB,GACpB,GAAE;IACD,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B,GAAG,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CAkBxC"}
|
|
@@ -1,32 +1,64 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ESLint 9 Flat Config - Slow Rules Only (Expo)
|
|
3
3
|
*
|
|
4
|
-
* The shared slow rules plus the
|
|
5
|
-
* off for speed:
|
|
6
|
-
* - react-
|
|
7
|
-
* - react-hooks/
|
|
4
|
+
* The shared slow rules plus the React Compiler checks the main Expo config
|
|
5
|
+
* leaves off for speed (EXPO_SLOW_REACT_RULES):
|
|
6
|
+
* - react-hooks/static-components - Static component optimization checks
|
|
7
|
+
* - react-hooks/rule-suppression - eslint-disable of a React hooks rule
|
|
8
|
+
* - react-hooks/void-use-memo - useMemo callbacks that return nothing
|
|
8
9
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
10
|
+
* The other React Compiler checks ship in eslint-plugin-react-hooks 7 as one
|
|
11
|
+
* rule per compiler diagnostic and run at "error" in the main Expo lint
|
|
12
|
+
* (src/configs/eslint/expo.ts). They replace the single
|
|
13
|
+
* `react-compiler/react-compiler` rule this config used to run from
|
|
14
|
+
* eslint-plugin-react-compiler, whose last release pins zod 3, which gets no
|
|
15
|
+
* fix for GHSA-mrhx-c7xc-m3w5 (CodySwannGT/lisa#4931).
|
|
16
|
+
*
|
|
17
|
+
* A module of its own, so only Expo's lint:slow loads the React plugin.
|
|
18
|
+
* When this lived in ./slow.ts, every stack loaded it, and in an isolated
|
|
11
19
|
* install react-hooks 7 could be given zod-validation-error 3, which lacks
|
|
12
20
|
* the `/v4` entry it imports: every stack's lint:slow crashed on load
|
|
13
21
|
* (CodySwannGT/lisa#4507). The Expo package template forces
|
|
14
|
-
* zod-validation-error 4 for the one stack that does load
|
|
22
|
+
* zod-validation-error 4 for the one stack that does load it.
|
|
15
23
|
* @see https://react.dev/learn/react-compiler
|
|
16
24
|
* @module configs/eslint/slow-expo
|
|
17
25
|
*/
|
|
18
|
-
import reactCompilerPlugin from "eslint-plugin-react-compiler";
|
|
19
26
|
import reactHooksPlugin from "eslint-plugin-react-hooks";
|
|
20
27
|
import { getSlowConfig } from "./slow.js";
|
|
28
|
+
/**
|
|
29
|
+
* The React Compiler checks lint:slow adds, where the old
|
|
30
|
+
* `react-compiler/react-compiler` rule ran. `rule-suppression` and
|
|
31
|
+
* `void-use-memo` restore what that rule reported and #4931 had dropped: an
|
|
32
|
+
* `eslint-disable` of `react-hooks/exhaustive-deps` or
|
|
33
|
+
* `react-hooks/rules-of-hooks` (the compiler's InvalidReact suppression
|
|
34
|
+
* diagnostic), and a `useMemo` whose callback returns nothing.
|
|
35
|
+
*/
|
|
36
|
+
export const EXPO_SLOW_REACT_RULES = [
|
|
37
|
+
"react-hooks/static-components",
|
|
38
|
+
"react-hooks/rule-suppression",
|
|
39
|
+
"react-hooks/void-use-memo",
|
|
40
|
+
];
|
|
41
|
+
/**
|
|
42
|
+
* Compiler options that make `react-hooks/rule-suppression` see eslint-disable
|
|
43
|
+
* comments. react-hooks 7 looks for them only when one of its own
|
|
44
|
+
* exhaustive-memo-dependency or hooks-usage validations is off, because with
|
|
45
|
+
* both on it re-checks what the suppressed rule checked. The old
|
|
46
|
+
* `react-compiler/react-compiler` rule always reported the suppression, so
|
|
47
|
+
* this rule compiles with memo-dependency validation off. The compiler caches
|
|
48
|
+
* per option set, so the other rules keep their full validation.
|
|
49
|
+
*/
|
|
50
|
+
const RULE_SUPPRESSION_OPTIONS = {
|
|
51
|
+
environment: { validateExhaustiveMemoizationDependencies: false },
|
|
52
|
+
};
|
|
21
53
|
/**
|
|
22
54
|
* Creates the slow ESLint configuration for Expo projects: the shared slow
|
|
23
|
-
* rules plus the
|
|
55
|
+
* rules plus the React rules the main Expo config turns off for speed.
|
|
24
56
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
57
|
+
* The React rules moved here from the main Expo lint when lint:slow was
|
|
58
|
+
* introduced (0b58fe96a4). A later rewrite of this module kept only the
|
|
59
|
+
* import rules, so none ran anywhere until they were restored
|
|
60
|
+
* (CodySwannGT/lisa#4507). The plugin is resolved from Lisa's own
|
|
61
|
+
* dependencies, so a project needs no extra install.
|
|
30
62
|
* @param options - Configuration options for the slow rules config
|
|
31
63
|
* @param options.ignorePatterns - Patterns to ignore in addition to built-in ignores
|
|
32
64
|
* @returns ESLint flat config array containing only slow rules
|
|
@@ -37,16 +69,13 @@ export function getExpoSlowConfig({ ignorePatterns = [], } = {}) {
|
|
|
37
69
|
{
|
|
38
70
|
files: ["**/*.tsx", "**/*.ts"],
|
|
39
71
|
plugins: {
|
|
40
|
-
"react-compiler": reactCompilerPlugin,
|
|
41
72
|
// Rules only: the package's `configs` shape does not fit ESLint's
|
|
42
73
|
// Plugin type, and this config needs none of its presets.
|
|
43
74
|
"react-hooks": { rules: reactHooksPlugin.rules },
|
|
44
75
|
},
|
|
45
76
|
rules: {
|
|
46
|
-
|
|
47
|
-
"react-
|
|
48
|
-
// Static component optimization (slow)
|
|
49
|
-
"react-hooks/static-components": "error",
|
|
77
|
+
...Object.fromEntries(EXPO_SLOW_REACT_RULES.map(rule => [rule, "error"])),
|
|
78
|
+
"react-hooks/rule-suppression": ["error", RULE_SUPPRESSION_OPTIONS],
|
|
50
79
|
},
|
|
51
80
|
},
|
|
52
81
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slow-expo.js","sourceRoot":"","sources":["../../../src/configs/eslint/slow-expo.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"slow-expo.js","sourceRoot":"","sources":["../../../src/configs/eslint/slow-expo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,+BAA+B;IAC/B,8BAA8B;IAC9B,2BAA2B;CACnB,CAAC;AAEX;;;;;;;;GAQG;AACH,MAAM,wBAAwB,GAAG;IAC/B,WAAW,EAAE,EAAE,yCAAyC,EAAE,KAAK,EAAE;CACzD,CAAC;AAEX;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAChC,cAAc,GAAG,EAAE,MAGjB,EAAE;IACJ,OAAO;QACL,GAAG,aAAa,CAAC,EAAE,cAAc,EAAE,CAAC;QACpC;YACE,KAAK,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;YAC9B,OAAO,EAAE;gBACP,kEAAkE;gBAClE,0DAA0D;gBAC1D,aAAa,EAAE,EAAE,KAAK,EAAE,gBAAgB,CAAC,KAAK,EAAE;aACjD;YACD,KAAK,EAAE;gBACL,GAAG,MAAM,CAAC,WAAW,CACnB,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,CAAU,CAAC,CAC5D;gBACD,8BAA8B,EAAE,CAAC,OAAO,EAAE,wBAAwB,CAAC;aACpE;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lisa-owned-hash-ledger.d.ts","sourceRoot":"","sources":["../../src/core/lisa-owned-hash-ledger.ts"],"names":[],"mappings":"AACA,6EAA6E;AAE7E;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAC3C,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"lisa-owned-hash-ledger.d.ts","sourceRoot":"","sources":["../../src/core/lisa-owned-hash-ledger.ts"],"names":[],"mappings":"AACA,6EAA6E;AAE7E;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAC3C,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAm6FjC,CAAC;AAEH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CACpD,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAs0FjC,CAAC"}
|
|
@@ -1553,8 +1553,10 @@ export const LISA_OWNED_HASH_LEDGER = Object.freeze({
|
|
|
1553
1553
|
"scripts/lisa-audit.mjs": Object.freeze([
|
|
1554
1554
|
"0c386b25ec8f91de3a0182014b65703a5041e59400360ece40f376937ba53d80",
|
|
1555
1555
|
"2c014491c6a0c3f6e681885c9360c523ec0ff11330518fe6f86bc84c151ff09a",
|
|
1556
|
+
"350075ce70c63bb3e71fba6b22550b25b4672f70d69d39cb1a73db7533247c8e",
|
|
1556
1557
|
"68bc4a842c6f8138d0d8a923809032eba5ef7e39b22949580d1bfdfa74aded8a",
|
|
1557
1558
|
"8ca83977e7df232bf22912df6c6044c9162363a02ef77d5d518e03d73c280543",
|
|
1559
|
+
"9978d1b7f59338f5a53f20900b5370723176731513089d0ee3b8c57931ef6e93",
|
|
1558
1560
|
"e8eb9c90ed906fb9b95bf788dc06fe3fa7ee339c526c62f54fd3556de67e8442",
|
|
1559
1561
|
]),
|
|
1560
1562
|
"scripts/lisa-automation-provenance.mjs": Object.freeze([
|
|
@@ -2119,6 +2121,7 @@ export const LISA_OWNED_HASH_LEDGER = Object.freeze({
|
|
|
2119
2121
|
"ff15992834e3bb911a560a6f65be76a791a8cd262f36b18972f25a8dc36d7c00",
|
|
2120
2122
|
]),
|
|
2121
2123
|
"scripts/lisa-hooks/sonar-secrets.sh": Object.freeze([
|
|
2124
|
+
"18e1d963d4416ccd247158e6a4bfcf43234f47faeb3a4654b5a6c78001ab8ef5",
|
|
2122
2125
|
"18e63683064305dab1200456896cbb9384ab35ee6bc51d3789ffbba46d1b1081",
|
|
2123
2126
|
"7a408788975a6351d53e14aa32bb9a5d161f33df9dfea59ba32784ae33a62e67",
|
|
2124
2127
|
"853bcf0bc455e78326186463287e32cc5906a40323c630a8e63935315197fd2f",
|
|
@@ -4523,8 +4526,10 @@ export const LISA_OWNED_HASH_HISTORY_DERIVED = Object.freeze({
|
|
|
4523
4526
|
"scripts/lisa-audit.mjs": Object.freeze([
|
|
4524
4527
|
"0c386b25ec8f91de3a0182014b65703a5041e59400360ece40f376937ba53d80",
|
|
4525
4528
|
"2c014491c6a0c3f6e681885c9360c523ec0ff11330518fe6f86bc84c151ff09a",
|
|
4529
|
+
"350075ce70c63bb3e71fba6b22550b25b4672f70d69d39cb1a73db7533247c8e",
|
|
4526
4530
|
"68bc4a842c6f8138d0d8a923809032eba5ef7e39b22949580d1bfdfa74aded8a",
|
|
4527
4531
|
"8ca83977e7df232bf22912df6c6044c9162363a02ef77d5d518e03d73c280543",
|
|
4532
|
+
"9978d1b7f59338f5a53f20900b5370723176731513089d0ee3b8c57931ef6e93",
|
|
4528
4533
|
"e8eb9c90ed906fb9b95bf788dc06fe3fa7ee339c526c62f54fd3556de67e8442",
|
|
4529
4534
|
]),
|
|
4530
4535
|
"scripts/lisa-automation-provenance.mjs": Object.freeze([
|
|
@@ -5042,6 +5047,7 @@ export const LISA_OWNED_HASH_HISTORY_DERIVED = Object.freeze({
|
|
|
5042
5047
|
"ff15992834e3bb911a560a6f65be76a791a8cd262f36b18972f25a8dc36d7c00",
|
|
5043
5048
|
]),
|
|
5044
5049
|
"scripts/lisa-hooks/sonar-secrets.sh": Object.freeze([
|
|
5050
|
+
"18e1d963d4416ccd247158e6a4bfcf43234f47faeb3a4654b5a6c78001ab8ef5",
|
|
5045
5051
|
"18e63683064305dab1200456896cbb9384ab35ee6bc51d3789ffbba46d1b1081",
|
|
5046
5052
|
"7a408788975a6351d53e14aa32bb9a5d161f33df9dfea59ba32784ae33a62e67",
|
|
5047
5053
|
"853bcf0bc455e78326186463287e32cc5906a40323c630a8e63935315197fd2f",
|