bump @adobe/aio-lib-state to 5.3.1#86
Conversation
Removes transitive dependency on @azure/[email protected]
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Tested this PR end-to-end against the Adobe State Service v5 in Adobe I/O Runtime. tl;dr — it works, and the production dep tree is CVE-clean. Why
|
| step | result |
|---|---|
stateLib.init() (v5) |
12–41 ms |
direct state.put(PEM) / state.get |
round-trip OK, returned { value, expiration } with the expected 24h TTL |
1st fetchPubKeyFromCacheOrApi (miss → fetch → put) |
256 ms |
2nd fetchPubKeyFromCacheOrApi (hit) |
19 ms — 13.5× speedup |
| cache surviving across container invocations | yes (same expiration timestamp observed from a fresh container) |
B. Full E2E with a real Adobe-signed event — created a custom event provider + event metadata + webhook registration pointing at a Runtime action; the registration challenge handshake succeeded (status=verified), then published CloudEvents and watched Adobe sign + deliver them. The action called eventsClient.verifyDigitalSignatureForEvent(rawBody, recipientClientId, { digiSignature1, digiSignature2, publicKeyPath1, publicKeyPath2 }):
| event | cacheBefore | cacheAfter | verifyMs | totalMs | verified |
|---|---|---|---|---|---|
| 1st delivery | MISS, 0 B | POPULATED, 451 B | 135 | 365 | true |
| 2nd delivery | HIT, 451 B | HIT, 451 B | 80 | 140 | true |
The 2nd delivery proves the v5 cache path is doing real work — state.get returns the 451-byte PEM the 1st delivery stored, no CloudFront round-trip happens, and the signature still verifies against the cached key. ~2.6× faster end-to-end.
Other observations
npm audit --omit=devon this PR's tree → 0 vulnerabilities. The 7 vulnsnpm auditstill reports come fromcodecovandjest-junitdevDeps ([email protected]reachable throughteeny-request), not anything a consumer ofaio-lib-eventswould pull in.- Behavioral compatibility is fully preserved: v5
init()works without arguments in Runtime (picks upOW_NAMESPACE/OW_AUTHfrom env),state.getreturns the same{ value, expiration }shape, default TTL behavior matches what the comment insignatureUtils.jsadvertises. - Performance is good —
state.getround-trips are well under 100 ms inus-eastruntime.
LGTM.
Description
Bumps
@adobe/aio-lib-statefrom^3to^5.3.1. The v3 release line carried@azure/cosmosas adirect dependency, which pulled in the vulnerable
[email protected]. The v5 release line removed@azure/cosmosentirely, breaking the vulnerability chain.
The public API shape used by this library (
init(),state.get(),state.put()with no TTL) is unchangedbetween v3 and v5 — both return
{ value, expiration }fromget(). However, the backend changed fromCosmosDB in v3 to an HTTP-based Adobe I/O service in v5, meaning real validation requires a functional
environment, not unit tests.
Related Issue
MWPW-195032 — CVE-2026-41907 / SNYK-JS-UUID-16133035:
High severity — Improper Validation of Specified Index, Position, or Offset in Input in
uuidMotivation and Context
[email protected](CVE-2026-41907) is introduced transitively via:@adobe/aio-lib-statev5 removed@azure/cosmosentirely. Upgrading eliminates the vulnerable packagefrom the dependency tree.
How Has This Been Tested?
Unit tests pass, but are not sufficient to validate this change.
@adobe/aio-lib-stateis fully mocked in the unittest suite — the mock does not move when the library moves, so unit tests will pass regardless of whether
the v5 library works correctly at runtime.
Real validation requires running the e2e suite (
npm run e2e) against a live Adobe I/O environment withvalid credentials. This has not been run as part of this PR.
Screenshots (if appropriate):
N/A
Types of changes
Checklist: