Repository navigation
feat(licensing): canonical license path fallback + uv-minor-patch bump, SQLAlchemy 2.1 (#1940) - #2072
Merged
Merged
Conversation
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
LicenseGuardresolves the license path throughcore/licensing/paths.py. Precedence:DATA_BOAR_LICENSE_PATH, thenlicensing.license_path, then the org-wide canonical<user_config_dir>/databoar/license.jwtonly when both are unset or blank and the file exists. An explicit value is never replaced, even when its file is missing (fail closed). The file found at the canonical path goes through the same signature and claim validation as any other. No new dependency (XDG, Darwin and Windows rules are hand-rolled).uv-minor-patch, 42 updates): the sameuv.lockcontent, re-signed here withrequirements.txtandpylock.tomlregenerated from it in the same commit (thedependency-artifacts-synchook rejects a lock commit without them). SQLAlchemy 2.0.54 to 2.1.3 is accepted (operator decision, recorded in deps: triar a #2062 (grupo uv-minor-patch, 42 pacotes): sqlalchemy 2.1 decodifica o nome do banco e pylock.toml fora de sincronia #2069).core/findings_sink.py::_sqlalchemy_urlnow hands the raw name to the driver.core/findings_sink.pyis unchanged. The existing assertion follows the new contract, and a new driver-level test pins the security invariant (see Verification).Gate files
No file under
.github/workflows/and none of the tripwire gate files is touched, so noGate-Change-Approved-Byis needed.Verification
./scripts/check-all.shexited 0 on this branch: pre-commit, pytest 3229 passed, 82 skipped, shellcheck, bats 11/11, Rust guard (20 tests), Bandit, Zizmor, Gitleaks strict.Fail then pass ([P3][feat][licensing] DATA_BOAR_LICENSE_PATH: fallback ao path canônico org-wide quando não configurado #1940): with
core/licensing/guard.pyreverted toorigin/mainin a scratch copy,tests/test_license_canonical_path_fallback.pyhas 2 failures for the right reason (UNLICENSED,detail=missing_license_fileinstead ofVALID: the canonical fallback and the whitespace-env case) and 5 passes (explicit env/config wins, no canonical file stays unlicensed, XDG). With the fix: 7 passed.Driver check (deps: triar a #2062 (grupo uv-minor-patch, 42 pacotes): sqlalchemy 2.1 decodifica o nome do banco e pylock.toml fora de sincronia #2069), psycopg2 2.9.13 with SQLAlchemy 2.1.3, no network: for
audit?hostaddr=10.0.0.9,audit hostaddr=10.0.0.9,audit host=10.0.0.9andaudit=foo,create_connect_argskeepshost=db.example.comwith nohostaddr, andmake_dsnthenparse_dsnkeepsdbnameliteral.test_sqlalchemy_connect_args_dbname_cannot_override_peer_psycopg2asserts that, so the security test is stronger than before, not weaker.Windows test fix:
d57c6440 test(licensing): make canonical path tests platform-aware (Windows APPDATA)isolates HOME, USERPROFILE and APPDATA and covers the linux, darwin and win32 branches ofuser_config_dir()on any OS.Not verified
_sqlalchemy_url(it builds the defaultpostgresql://URL, psycopg2). Not exercised; nothing was installed outside the lock to check them.mergeStateStatus: CLEAN. The first run failedTest Windows (Python 3.12)with 4 tests: 3 were this PR's new tests (they assumed HOME/XDG, Windows resolves through APPDATA), fixed ind57c6440with no change tocore/licensing/. The 4th,tests/test_scan_abort_integrity.py::test_sqlite_localdbmanager_reopens_cleanly_after_abort("subprocess not ready", fixed 10 s wait, subprocess stderr discarded), did not recur on the next run and its cause was not established; it was left untouched.QA_LOCAL_LICENSEon a real host: exercised by tests with an isolatedHOME, not on a machine with a real~/.config/databoar/license.jwt.Notes
Closes #1940
Refs #2069
Refs #2062
🤖 Generated with Claude Code
https://claude.ai/code/session_0142QEjA7eEFcdXTpcTmcAZk