Conversation
- Replace sqlite3 (devDependency) with better-sqlite3 in datastore-storage-adapter - Rewrite InnerSQLiteDatabase test helper to use better-sqlite3 synchronous API - Add param sanitization for better-sqlite3 strict type binding - Remove tar resolution from root package.json (no longer needed) - Resolves Dependabot alert #190 (high severity path traversal in tar)
|
soberm
approved these changes
Mar 6, 2026
sarayev
approved these changes
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves Dependabot alert #190 — high severity path traversal vulnerability in
tar(CVE-2026-29786).Root Cause
tarwas a transitive dependency pulled in bysqlite3, which was only used as a devDependency in@aws-amplify/datastore-storage-adapterfor running tests in Node.js. The latestsqlite3still pinstar@^6, and the CVE fix only exists intar@7.5.10with no backport to 6.x.Fix
Rather than keeping a
tarresolution override long-term, this PR replacessqlite3withbetter-sqlite3in the test helper:better-sqlite3does not depend ontarat allsqlite3was only used in__tests__/helpers.tsto provide an in-memory SQLite database for tests (the actual runtime adapter usesreact-native-sqlite-storage/expo-sqlite)InnerSQLiteDatabasetest helper has been rewritten to usebetter-sqlite3's synchronous API with param sanitization for strict type bindingChanges
packages/datastore-storage-adapter/package.json: Replacesqlite3withbetter-sqlite3+@types/better-sqlite3packages/datastore-storage-adapter/__tests__/helpers.ts: RewriteInnerSQLiteDatabaseclasspackage.json: Removetarresolution (no longer needed)yarn.lock: UpdatedTesting
All 110 tests pass across all 4 test suites in
datastore-storage-adapter.