The cache test's account key is made as the app makes it
Hub CI's gitleaks took the test's 32-character hex account key for an API key (generic-api-key). The test now derives it with AccountKey.make, which also ties it to P5's rule. No secret was ever involved. Gate: swift test -j 4 --filter BaseKitTests.AttachmentCacheTests: 13 passed; gitleaks on the file: no leaks found. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Fix gitleaks false positive in AttachmentCacheTests
1 file changed,
+2
−1
native/apple/Tests/BaseKitTests/AttachmentCacheTests.swift+2 −1
CI passed — run details
CI log
=== build === CGO_ENABLED=0 go build ./... === vet === go vet ./... === fmt-check === === staticcheck === go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 ./... === govulncheck === go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./... No vulnerabilities found. === gitleaks === [90m10:52PM[0m [32mINF[0m [1mUnknown SCM platform. Use --platform to include links in findings.[0m [36mhost=[0mamadan.net [90m10:52PM[0m [32mINF[0m [1m1 commits scanned.[0m [90m10:52PM[0m [32mINF[0m [1mscanned ~3145456 bytes (3.15 MB) in 378ms[0m [90m10:52PM[0m [32mINF[0m [1mno leaks found[0m === budget === go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget size budget size: 22 directories within budget === script-test === scripts/prepare-apps_test.sh ok releases lookup failure stops before ship ok app owned elsewhere stops the script ok apps listing failure stops before create ok ambiguous release dir is refused ok explicit version resolves the ambiguity ok releases match is exact, not substring ok shipped version is only promoted, existing app not created ok fresh account creates, ships, promotes to edge, enables ok failing promote stops the script ok ship is retried while uploads are rate limited all passed hack/fonts_test.sh fonts_test: ok === test === go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -count=1 ./... receipt: test step 10.07s against a 60s target (the gate's other steps are not in this figure) receipt: 16 packages ran, 0 cached, 6 without tests, 0 failed receipt: slow package 9.078s amadan.net/oficina/base/internal/webtest receipt: slow package 1.064s amadan.net/oficina/base/internal/issuer receipt: slow package 665ms amadan.net/oficina/base/internal/equipo receipt: slow package 661ms amadan.net/oficina/base/internal/operations receipt: slow package 371ms amadan.net/oficina/base/internal/consumer receipt: slow test 1.51s amadan.net/oficina/base/internal/webtest TestHomeDoesNotWaitOnAStalledSnapshot receipt: slow test 1.09s amadan.net/oficina/base/internal/webtest TestAskZoneIsToldOnce receipt: slow test 690ms amadan.net/oficina/base/internal/issuer TestAuthorizeSignsForInstalledApp receipt: slow test 620ms amadan.net/oficina/base/internal/webtest TestAskUploadStalledBodyFreesItsSlot receipt: slow test 530ms amadan.net/oficina/base/internal/equipo TestUploadRefusals === native === strings: copy review's strings.json is not here (git-ignored); its comparison skipped strings: 176 in the catalog, 173 used worktree-lib_test: ok
diff --git a/native/apple/Tests/BaseKitTests/AttachmentCacheTests.swift b/native/apple/Tests/BaseKitTests/AttachmentCacheTests.swift| index 09f1354..47fee97 100644 |
| --- a/native/apple/Tests/BaseKitTests/AttachmentCacheTests.swift |
| +++ b/native/apple/Tests/BaseKitTests/AttachmentCacheTests.swift |
| @@ -5,7 +5,8 @@ import XCTest |
| /// Task 19 (plan P9): the cache of files opened from the thread. |
| final class AttachmentCacheTests: XCTestCase { |
| var root: URL! |
| - let key = "a1b2c3d4e5f60718293a4b5c6d7e8f90" |
| + /// An account's key, made as the app makes it (P5). |
| + let key = AccountKey.make(origin: URL(string: "https://fennel.base.example")!, identity: "id-paul") |
| override func setUpWithError() throws { |
| root = FileManager.default.temporaryDirectory.appendingPathComponent("AttachmentCacheTests-" + UUID().uuidString) |