Repository navigation
fix(cli): a connection label printed by the CLI removes a password or a credential query pair wherever the URL rules read one - #30171
Conversation
… URL grammar reads one Claude-Session: https://claude.ai/code/session_01QSeKYn5CmmdShCJifm6WYj Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYn5CmmdShCJifm6WYj Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 35 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 8b8deb3f3f3d0a7c3a688c2c91660cb44cbaff43 && git checkout 8b8deb3f3f3d0a7c3a688c2c91660cb44cbaff43
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 9a53fc9feac04d44f40fffc62f93d04433de1227 1e012660900c3768b722dde27d5343c959bb498f && git checkout -B drift-repro 9a53fc9feac04d44f40fffc62f93d04433de1227 && git merge --no-ff 1e012660900c3768b722dde27d5343c959bb498f
node scripts/docs-audit/affected-docs.mjs --json 9a53fc9feac04d44f40fffc62f93d04433de1227 |
…h the shared query-pair judge Claude-Session: https://claude.ai/code/session_01QSeKYn5CmmdShCJifm6WYj Co-authored-by: Claude <noreply@anthropic.com>
…ery-pair judge Claude-Session: https://claude.ai/code/session_01QSeKYn5CmmdShCJifm6WYj Co-authored-by: Claude <noreply@anthropic.com>
|
security#1 · os-justin · session_01QSeKYn5CmmdShCJifm6WYj 席位核对ACCEPT · head
|
Clause-②: no
Metadata-protocol: none
维护者速读
os dev/os start/os serve启动横幅与迁移确认)改为通过 spec 的共享 URL 凭据函数redactUrlCredentials去掉密码与凭据查询参数,不再自带一套规则或参数名单。packages/cli/src/utils/connection-display.ts的redactConnectionUrl前两行;connection-display.test.ts新增的两个 describe 块。pnpm --filter @objectstack/cli exec vitest run --maxWorkers=2 src/utils/connection-display.test.ts,预期 33 个用例全绿。What changes
redactConnectionUrl(the database label the CLI prints) first removes credentials throughredactUrlCredentialsfrom@objectstack/spec/data, the composite the datasource read path applies. That covers the userinfo password and every credential query pair judged by the shared query-pair judge and its one list of names. Rule: a connection label printed by the CLI removes a password or a credential query pair wherever the URL rules read one, on every path the label takes.@objectstack/clialready depends on@objectstack/spec(dependencies,workspace:*), so no dependency is added.@objectstack/clipatch.Tests
Two new top-level describes in the existing harness file
packages/cli/src/utils/connection-display.test.ts, named for the rule.Password rule:
urlUserinfoPasswordreads, and every shape in the corpus is judged;Query rule:
://, the URL parser path, and the hand fallback;urlCredentialQueryParamsjudges a credential;://, and an empty-valued pair.Expected outputs for the controls were computed from the pre-change function before they were written into the pins.
Acceptance notes
git diff HEADempty:://and hand-fallback pins and the query property pin go red. The URL-parser path pin stays green as expected, because that path already drops the whole query string.Verification
connection-display.test.ts: 33/33 passed.://path, the hand-fallback path and the URL-parser path.pnpm --filter @objectstack/cli typecheck: exit 0.@objectstack/clisuite, both tiers, under the verify lock at 1e01266: Test Files 577 passed, 1 skipped (578); Tests 7074 passed, 9 skipped (7083); VERDICT command-exit 0.dispatch-gates.mjs --commands): 59 commands run locally, 56 exited 0. Three answeredPREREQUISITE NOT MET(exit 3) because they need a whole-repo build:check:dual-build-cjs-loads,check:i18n-coverage,check:type-check-debt. Those three are NOT MEASURED locally and are left toLint & Repo Gatesin CI.Generated by Claude Code