beads/internal
matt wilkie 813fdfabf8
fix(ci): unblock main — gosec G122 + credentials_test signatures (#3389)
* fix(lint): silence G122 on dolt cache cleanup remove

golangci-lint v2.11.4 (released recently) enabled a new gosec check:

    G122: Filesystem operation in filepath.Walk/WalkDir callback uses
    race-prone path; consider root-scoped APIs (e.g. os.Root) to prevent
    symlink TOCTOU traversal (gosec)

This flags the `os.Remove(path)` inside cleanGitRemoteCacheGarbage.
Main went red on the Lint job with no code change to blame — it broke
on every PR that rebased past the golangci-lint bump.

The warning is not applicable here: the walk root is
`<beadsDir>/<database>/.dolt/git-remote-cache/`, owned by the user
running bd. An attacker who can symlink-swap a tmp_pack_*/tmp_idx_*
file mid-walk already has write access to the Dolt data directory,
which is a much bigger compromise than cache_cleanup.go doing anything
unsafe.

Add a targeted `#nosec G122` with justification rather than refactor
to `os.Root`-scoped APIs, which would be a larger change against a
file that exists to clean up a 102 GB leak (GH#3354) and shouldn't
take on additional complexity for a hypothetical threat. Matches the
project's existing pattern of per-site gosec exceptions with rationale.

Verification:
    golangci-lint run --timeout=5m --build-tags=gms_pure_go ./...
    # 0 issues.

* fix(dolt): update shared-server credential tests for new per-remote signatures

Two tests added by #3223 (f9ec9859, 2026-04-13) were not updated when
#3211 (73d72ec0, 2026-04-20) widened the credential-routing guards to
take per-remote parameters. The resulting signature drift landed on
main and broke the build on ubuntu-latest and macos-latest:

    internal/storage/dolt/credentials_test.go:445:39: not enough
      arguments in call to store.shouldUseCLIForCredentials
    internal/storage/dolt/credentials_test.go:486:6: not enough
      arguments in call to store.shouldUseCLIForCloudAuth

Fix:
- TestCredentialCLIRoutingSharedServerUsesSharedDoltRoot:
  pass store.remote and store.mainRemoteCredentials() to match the
  new shouldUseCLIForCredentials(ctx, remote, creds) signature,
  matching the pattern already used by the sibling
  TestCredentialCLIRoutingExternalServer/NoRemote tests.

- TestCloudAuthCLIRoutingSharedServerUsesSharedDoltRoot:
  pass store.remote to the new shouldUseCLIForCloudAuth(remote)
  signature, and change the dolt remote URL from https:// to az://.
  The old global "any cloud env var triggers CLI routing" heuristic
  was replaced by per-scheme matching (AZURE_STORAGE_* only triggers
  for az:// remotes, etc. — see the positive/negative cases in
  TestCloudAuthCLIRouting). The test sets AZURE_STORAGE_ACCOUNT, so
  the remote must be az:// for the assertion to hold.

Verification: both tests pass locally (`go test -tags gms_pure_go
-run 'SharedServerUsesSharedDoltRoot' ./internal/storage/dolt/`).
2026-04-20 19:02:11 -07:00
..
ado fix(ado): use date-only format for WIQL ChangedDate queries (#3345) 2026-04-20 13:05:34 -07:00
audit fix(audit): use atomic write to prevent torn lines under concurrent O_APPEND (#3301) 2026-04-17 15:10:26 -07:00
beads fix(ci): drop ICU linkage from test jobs, use -tags gms_pure_go everywhere (#3240) 2026-04-14 10:01:46 -07:00
compact fix(ci): get nightly full tests passing (#2835) 2026-03-26 09:52:03 -07:00
config fix: rebind selected workspace before db command startup (#3230) 2026-04-16 16:24:49 -07:00
configfile feat: add global beads_global database for shared-server mode 2026-04-14 09:18:43 -07:00
debug chore: unexport 14 dead symbols across 8 packages 2026-02-07 09:24:22 -08:00
doltserver fix(dolt): auto-recover from corrupt manifest on startup (GH#3290) (#3327) 2026-04-17 21:02:04 -07:00
formula fix(formula): carry step metadata through cook and pour (GH#3341) (#3359) 2026-04-20 18:05:19 -07:00
git feat: add --list and --doc flags to bd help for CLI doc generation (GH#2527) 2026-03-11 18:25:40 -07:00
github fix: recognize ado:NNNNN shorthand in IsExternalRef and ExtractIdentifier (#2966) 2026-04-02 19:20:30 -07:00
gitlab fix(gitlab): wire issue link dependencies into sync pull (GH#2645) (#3202) 2026-04-11 21:21:49 -07:00
hooks fix: increase TestRun_Async polling timeout to 10s (bd-ldi) 2026-02-28 23:11:46 -08:00
idgen fix(idgen): correct test vectors in hash_test.go 2025-12-19 18:13:56 -08:00
jira /{cmd,internal}: move local only state to dolt ignored tables 2026-04-14 14:47:30 -07:00
linear fix(linear): harden push against data clobbering (#3328) 2026-04-18 08:36:13 -07:00
lockfile chore: remove daemon infrastructure (lockfile, activity signal) (bd-9u8zd) 2026-02-18 19:05:31 -08:00
molecules /{cmd,internal}: update global store to be interface 2026-03-17 13:26:17 -07:00
notion feat: reimplement Notion sync on REST data sources (fix-merge PR #2759) 2026-03-27 19:20:40 -07:00
query feat(issues): add started_at timestamp (GH#2796) (#3206) 2026-04-14 09:24:08 -07:00
recipes Enforce .beads/ directory permissions at runtime 2026-03-30 09:15:49 -07:00
remotecache security: harden remote URL validation at config parse time (#3210) 2026-04-13 09:58:50 -07:00
routing Fix init leaving beads.role unset in edge cases (GH#2950) (#2964) 2026-04-01 17:00:41 -07:00
storage fix(ci): unblock main — gosec G122 + credentials_test signatures (#3389) 2026-04-20 19:02:11 -07:00
telemetry /{cmd,internal}: move local only state to dolt ignored tables 2026-04-14 14:47:30 -07:00
templates/agents fix(init): replace 'bd onboard' references with 'bd prime' in AGENTS.md (#2902) 2026-03-30 10:42:50 -07:00
testutil /internal/testutil/testdoltcommon.go: use latest dolt 2026-04-08 15:09:56 -07:00
timeparsing chore: unexport 14 dead symbols across 8 packages 2026-02-07 09:24:22 -08:00
tracker fix(linear): harden push against data clobbering (#3328) 2026-04-18 08:36:13 -07:00
types feat(issues): add started_at timestamp (GH#2796) (#3206) 2026-04-14 09:24:08 -07:00
ui Merge pull request #2814 from harry-miller-trimble/feat/tracker-hardening-and-core 2026-03-30 20:41:05 -07:00
utils cleanup: remove daemon infrastructure remnants (GH#2431) 2026-03-10 15:24:27 -07:00
validation refactor: remove gastown/Gas Town string references from beads code and docs (bd-1ue8) 2026-03-20 18:39:50 -07:00