Repository navigation
docs(readme): redact signed query strings inside the logger example - #32
Merged
Merged
Conversation
The "Watch what your logger forwards" example called event.redactingQueryStrings(), which NimbusLogEvent does not have, so the snippet did not compile when copied (#31). The example now redacts in the logger itself, as llms.txt already tells callers to: it takes the event's text and replaces every URL's query with "?redacted" before handing it to Timber. Redacting the whole text rather than fileUrl alone also covers a URL quoted inside an error or throwable message. The match runs to the next space because a signed query can hold "," and ")" (an Azure SAS "spr=https,http" comes before "sig="), and it is anchored on "://" so a "?" in plain text is left alone. No library API is added. Closes #31 Co-Authored-By: Claude Opus 5.5 <[email protected]>
giovanniandreuzza
added a commit
that referenced
this pull request
Oct 1, 2026
## Summary `android-actions/setup-android@v3` installs `tools platform-tools` by default. Google stopped serving the obsolete `tools` package around 2026-09-15 ([setup-android#537](android-actions/setup-android#537)), so `sdkmanager tools` exits 1 and fails the job. Both workflows now pass the packages explicitly, dropping only the one that no longer exists: ```diff - uses: android-actions/setup-android@v3 + with: + packages: platform-tools ``` Applied to `ci.yml` (job `build`) and `release.yml` (job `publish`). Upstream made the same change to the default in v4.0.2 ([setup-android#538](android-actions/setup-android#538)). Moving to v4 is left out on purpose: v4.0.4 also changes the Node runtime and downloads cmdline-tools 22.0 instead of using the runner's preinstalled 16.0. That would add two more variables to a one-variable fix. Root cause is the SDK repository, not the runner. Run [34745748831](https://github.com/giovanniandreuzza/Nimbus/actions/runs/34745748831) passed on 2026-09-13 and run [36868952768](https://github.com/giovanniandreuzza/Nimbus/actions/runs/36868952768) failed on 2026-10-01. Both used image `macos-26-arm64` 20260907.0351.1, preinstalled cmdline-tools 16.0 and action v3 with the same inputs. ## Evidence - **Before:** CI [36868952768](https://github.com/giovanniandreuzza/Nimbus/actions/runs/36868952768) (PR #32, README-only) and Release [36211377237](https://github.com/giovanniandreuzza/Nimbus/actions/runs/36211377237) (`publish` for v2.5.1) both stop at setup-android: ``` [command]…/cmdline-tools/latest/bin/sdkmanager tools Warning: Failed to find package 'tools' Error: The process '…/sdkmanager' failed with exit code 1 ``` **After:** CI on this branch: _pending, updated below once the run finishes._ - `actionlint` is clean on both workflows. The branch name and commit subject pass `.github/scripts/check-conventions.sh`. - **Not exercised:** the `publish` job in `release.yml` only runs when release-please creates a release, and running it publishes. Its setup-android step is now identical to the one CI runs on the same `macos-latest` runner, but the publish job itself has not been run. ## v2.5.1 is not on Maven Central `repo1.maven.org` returns 404 for `nimbus-2.5.1.pom` and `nimbus-ktor-2.5.1.pom`, and `maven-metadata.xml` lists 2.5.0 as the latest version. The tag and the GitHub release `v2.5.1` exist. 2.5.1 has the same library code as 2.5.0; it only added docs. Even so, the README on `main` points consumers to `2.5.1`, and that version does not resolve. Re-running the failed job will not help, because a re-run uses the workflow from `d9cfd02`, which still has the broken step. Publishing is left for the owner to decide and is not part of this PR. ## Merge Danger **Door:** two-way. This changes only workflow configuration; reverting the commit restores the previous behaviour. **Blast Radius:** CI and the publish job. The `ci:` type is hidden in release-please and does not cut a release, so merging this publishes nothing. Gradle never used `tools`, so the build sees the same SDK it saw before the break. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
giovanniandreuzza
marked this pull request as ready for review
October 1, 2026 14:15
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The documentation-only change compiles as described and safely addresses the credential exposure warning without altering the API.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes the README logger example so copied code compiles and redacts signed URL query strings before forwarding events.
Changes:
- Replaces the nonexistent
redactingQueryStrings()call with explicit regex redaction. - Redacts URLs anywhere in the event’s rendered text.
| File | Description |
|---|---|
README.md |
Corrects and strengthens the secure logging example. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
giovanniandreuzza
added a commit
that referenced
this pull request
Oct 1, 2026
🤖 I have created a release *beep* *boop* --- ## [2.5.2](v2.5.1...v2.5.2) (2026-10-01) ### Documentation * **readme:** redact signed query strings inside the logger example ([#32](#32)) ([5e729c4](5e729c4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
Closes #31
Summary
The "Watch what your logger forwards" example called a member
NimbusLogEventdoes not have, so it did not compile when copied. It now redacts inside the logger, which is whatllms.txtalready tells callers to do. The library API is unchanged. This fixesmainonly; thev2.5.0andv2.5.1tags are left as they are.fileUrl. A URL quoted inside aNimbusErrororUnexpectedthrowable message is caught too.,and): an Azure SAS hasspr=https,httpbeforesig=. A pattern that stopped at,would leak the signature.://. A?in plain text is left alone. An unanchored first draft rewroteStoreReset(reason=unreadable store?)into…store?redacted, and the check below caught it."%s"is kept. A percent-encoded URL is then never read as a format string.Evidence
The repo has nothing that tests README or
llms.txtsnippets: no docs test, no snippet-compiling task, no README-to-llms.txtcomparison. The snippets also depend on Android types such as Timber andContext. A committed snippet test would therefore need a new harness, so this change was checked by hand instead. Nothing was left in the tree.nimbus/src/jvmTest/kotlin/scratch/ReadmeLoggerSnippetScratchTest.ktheld the old README line verbatim, with a stand-inobject Timberso it compiles on the JVM../gradlew :nimbus:jvmTest --tests 'scratch.*'failed at:nimbus:compileTestKotlinJvmwith:Unresolved reference 'redactingQueryStrings'.val logger =in front ofNimbusLogger. It ran five cases, and./gradlew :nimbus:jvmTest --tests 'scratch.*'passed withBUILD SUCCESSFULand 5 of 5 tests, 0 failures:X-Amz-Signatureis removed, and the output isDownloadFinished(fileUrl=https://bucket.s3.amazonaws.com/a.bin?redacted.spr=https,httpbeforesig=: the signature is removed, andfilePathandexpectedSizeBytessurvive.Unexpectedwith the signed URL inside the throwable message: the signature is removed, and the rest of the message survives.StoreReset("unreadable store?"): forwarded unchanged.%20in the URL: forwarded unchanged.diffconfirmed that the README block and the compiled block differ only byval logger =. The scratch directory was then deleted.bash .github/scripts/check-conventions.shpassed locally for the branch name, the title and the commit subject.The full
./gradlew buildwas not run locally, because this change touches onlyREADME.md. CI runs it on this PR.Merge Danger
Door: Two-way. This is one fenced code block in
README.md, and a revert restores it exactly. No code, API, version or tag changes.Blast Radius: Readers of the README on
main. Nothing is compiled or published from it. Thev2.5.0andv2.5.1tags keep the old example.🤖 Generated with Claude Code
BEGIN_COMMIT_OVERRIDE
docs(readme): redact signed query strings inside the logger example (#32)
END_COMMIT_OVERRIDE