Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c422054
M0: package skeleton + vendored CSQLite scaffold
claude Jun 2, 2026
61751cb
M1–M3: SwiftSQLiteKit engine (connection, authorizer, two-tier audit)
claude Jun 2, 2026
cdf6ccd
M0.5/M4/M5/M6: SwiftSQLiteBash command, registration, contract guard,…
claude Jun 2, 2026
d8a5811
M6: cross-platform CI; fix audit JSON encoding
claude Jun 3, 2026
b1884c0
Merge branch 'main' into claude/fervent-johnson-2TV5K
ronaldmannak Jun 3, 2026
946988c
Pin SQLite amalgamation SHA3-256
ronaldmannak Jun 3, 2026
42b1cb1
CI: drop SQLITE_ALLOW_UNPINNED bootstrap now that the hash is pinned
claude Jun 3, 2026
0b08b6b
Fix dependency resolution; align CI with SwiftGog (macOS-only)
claude Jun 3, 2026
1034124
Address PR review feedback (Gemini + Codex)
claude Jun 3, 2026
db56c4e
Fix Swift 6.2 strict-concurrency errors in SQLiteConnection
claude Jun 3, 2026
090603c
Fix authorizer DDL denial and file-open failure surfaced by tests
claude Jun 3, 2026
f6e9731
Authorizer: allow REINDEX/ANALYZE (fixes CREATE INDEX denial)
claude Jun 3, 2026
bd5818b
Address Codex review (post-green polish)
claude Jun 3, 2026
b07abb5
Address Codex review: lenient multi-statement + filtered-dump schema
claude Jun 3, 2026
780d2ff
Address Codex review: .schema indexes/triggers, dump REAL literals
claude Jun 3, 2026
29b0661
Vendor the SQLite amalgamation (commit sqlite3.c instead of gitignoring)
claude Jun 3, 2026
c2fdefc
VERSION: refresh stale comment (triggers re-vendor workflow)
claude Jun 3, 2026
0e2ccaa
Vendor sqlite3 amalgamation (SHA3-256 verified)
github-actions[bot] Jun 3, 2026
2017ac4
CI: build straight from the committed amalgamation (drop fetch step)
claude Jun 3, 2026
b8971bb
sqlite: address Codex review — NOFOLLOW backstop, dump cap, dot-parsing
claude Jun 3, 2026
6118ec3
sqlite: Codex round 2 — fix DB-open TOCTOU; dump/audit/schema correct…
claude Jun 3, 2026
18c8dff
sqlite: Codex round 3 — audit completeness, temp tables, intent, cancel
claude Jun 3, 2026
d8d6eaa
sqlite: Codex round 4 — reserved-name + write-intent fixes; .schema temp
claude Jun 3, 2026
a0f1e06
sqlite: fix .schema UNION ordering (CI regression); document round-5 …
claude Jun 3, 2026
0f42881
sqlite: round 5 fixes — generated-column dump, .indexes temp, deadline
claude Jun 3, 2026
669d8e7
sqlite: audit savepoint boundaries — no over-report on ROLLBACK TO
claude Jun 3, 2026
8e91c34
sqlite: revert generated-column dump (pragma_table_xinfo is authorize…
claude Jun 3, 2026
86c15eb
sqlite: self-review batch 1 — DoS bounds + audit-path corruption guard
claude Jun 3, 2026
3216918
sqlite: self-review batch 2 — JSON preserves column order + duplicates
claude Jun 3, 2026
f39a437
sqlite: self-review batch 3 — lock in untested security properties
claude Jun 3, 2026
16dd35b
sqlite: self-review batch 4 — document won't-fix / follow-up findings
claude Jun 3, 2026
4c7df01
sqlite: fix expectAuthDenied for denied-READ message form
claude Jun 3, 2026
f7ebe43
sqlite: round 7 — cap committed audit promotion, .dump schema truncation
claude Jun 3, 2026
64a8385
sqlite: round 7 batch B — comment-only boundary, audit preflight
claude Jun 3, 2026
1356cba
sqlite: fix 3 genuine defects from re-review (2 self-introduced)
claude Jun 3, 2026
eafe03a
sqlite: fix 2 P2 audit/DML findings; document the P1 mount limit
claude Jun 4, 2026
3554117
Add MIT license
claude Jun 4, 2026
03d7025
sqlite: pre-merge cleanup + 2 real findings from the latest round
claude Jun 4, 2026
97454f9
sqlite: document defer-finalize scope and DDL-bulk audit family
claude Jun 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Swift

on:
push:
branches:
- main
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# macOS-only, mirroring the sibling SwiftGog repo's proven CI. A full
# SwiftBash consumer builds cleanly on macOS (Xcode 26 / Swift 6.2); the Linux
# build of BashCommandKit's SwiftPorts closure (libgit2 + the compression
# family + ripgrep) needs heavier system-lib setup. SwiftSQLiteKit itself is
# SwiftBash-agnostic and Linux-clean, so a Linux engine-only job can be added
# later without that closure.
#
# The SQLite amalgamation (sqlite3.c/.h) is vendored (committed), so the build
# needs no network. Package.resolved pins marcprux/swift-archive by revision —
# its `master` branch was renamed, so a fresh resolve would otherwise fail
# chasing the dead ref.

jobs:
build-macos:
runs-on: macos-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
# SwiftBash's manifest declares swift-tools-version 6.2, so the
# toolchain must be >= 6.2. Xcode 26.0 ships Swift 6.2.
- name: Select Xcode 26.0
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "26.0"
# bzip2 / zstd back SwiftPorts' compression kits; macOS runners usually
# already have them, so this is a defensive idempotent install.
- name: Install C dependencies (Homebrew)
run: |
for pkg in bzip2 zstd; do
brew list --versions "$pkg" >/dev/null 2>&1 || brew install "$pkg"
done
- name: Verify Swift version
run: swift --version
- name: Build (including tests)
run: swift build --build-tests -v
- name: Test
run: swift test --skip-build
45 changes: 45 additions & 0 deletions .github/workflows/vendor-sqlite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Vendor SQLite amalgamation

# Fetches, SHA3-256-verifies, and commits sqlite3.c / sqlite3.h into the repo.
# Run manually (Actions ▸ "Vendor SQLite amalgamation" ▸ Run workflow) or it
# fires automatically when Sources/CSQLite/VERSION changes (a version bump).
# The committed amalgamation is what makes the package build from a fresh clone
# / as a plain SwiftPM dependency — this workflow just keeps it in sync with
# the pin in VERSION.

on:
workflow_dispatch:
push:
paths:
- "Sources/CSQLite/VERSION"

permissions:
contents: write

concurrency:
group: vendor-sqlite-${{ github.ref }}
cancel-in-progress: true

jobs:
vendor:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Ensure fetch tools
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends curl unzip openssl ca-certificates
- name: Fetch + verify amalgamation
run: ./scripts/fetch-sqlite.sh --force
- name: Commit if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add Sources/CSQLite/sqlite3.c Sources/CSQLite/include/sqlite3.h
if git diff --cached --quiet; then
echo "Amalgamation already matches the pin — nothing to commit."
else
git commit -m "Vendor sqlite3 amalgamation (SHA3-256 verified)"
git push
fi
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@ DerivedData/
.swiftpm/configuration/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc

# The SQLite amalgamation (sqlite3.c / sqlite3.h) IS committed (vendored) so a
# fresh clone builds with no prerequisite step and the package is usable as a
# plain SwiftPM dependency. scripts/fetch-sqlite.sh refreshes it on a version
# bump (it's SHA3-256-verified). shell.c / sqlite3ext.h aren't used — ignored.
/Sources/CSQLite/shell.c
/Sources/CSQLite/include/sqlite3ext.h
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 PicoMLX

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading