feat(sql): add --sudo, fix sqlite 3.22 reads, and release v0.8.0 - #59
Merged
Conversation
SQLite reads no longer pass sqlite3 -readonly, which older distro clients reject. JSON failures now include remote stdout/stderr. sshx sql --sudo runs the remote client via sudo -S so service-owned database files are reachable when the SSH user cannot open them. Co-authored-by: Copilot App <[email protected]>
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
SQLite SQL mode was unusable on older distro
sqlite3clients and on service-owned database files. This release:sqlite3 -readonly(missing on sqlite 3.22). Reads still openfile:<path>?mode=ro.sshx sql --jsonfailures so agents can see the real client error.sshx sql --sudo(sudo -S, password on stdin, never argv) for files the SSH user cannot open.Verified on
appserversqlite 3.22 against/var/toughradius/data/toughradius.dbwith--sudo.Release
CHANGELOG and SECURITY supported-versions table are updated for v0.8.0. After merge, tag
v0.8.0to trigger the GitHub Actions release.Test plan
go test ./internal/sqlsafe ./internal/app ./internal/sshclient--sudoSELECT against a permission-denied production SQLite file