Repository navigation
fix: address open code scanning alerts - #2684
Merged
Merged
Conversation
Bound allocation sizes, validate redirect and request targets, extract archives through os.Root, avoid fixed OAuth state values, and tighten web avatar and test sanitization. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PxAB5heFXcxfMzwYXYTzer
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PxAB5heFXcxfMzwYXYTzer
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PxAB5heFXcxfMzwYXYTzer
The stored avatar text shares the preference store with display names, so render it from a blob: URL built from the decoded image bytes instead of placing the stored string in the img src. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PxAB5heFXcxfMzwYXYTzer
4 of 14 tasks
This was referenced Nov 11, 2026
Merged
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
Fixes the open CodeQL code scanning alerts by addressing root causes (no suppression comments added, no alerts dismissed). Alert status will only update once CodeQL re-scans this branch.
redirectalso refuses non-http(s) or userinfo URLs (CodeQL re-flagged the validation-only fix as #20)2*lenmap size hintos.Rootos.Root, later entries cannot traverse them out of the treecallbackToken; clearing uses its zero value, not""Bloband render it from a revocableblob:object URL, so stored preference text never reachesimg src(a prefix check was re-flagged as #18) (+ unit tests)Not addressed
WriteoftokenDroppingWriter, which forwards bytes handlers already produced. Every handler behind it sets a non-HTML Content-Type (application/json,application/problem+json,text/event-stream,text/plainviahttp.Error), but CodeQL cannot see the handler's Content-Type at the wrapper's forwarding call. The only ways to silence it would restructure the wrapper to dodge the analyzer, so it is left for a triage decision. It is an alert onmain, not one this PR introduces.Notes
identityharness.redirectnow returns 400 for non-http(s) registered redirect URIs;AttemptRepository.ListreturnsErrInvalidAttemptfor limits outside int32; credential plain-record sealing returnsErrTooLargeaboveMaxValueBytes.Verification
go build ./...: passgo teston touched root packages (environment/microvm/{control,worktree,...}, adapters/grpcdriver, adapters/jsonlstore, internal/adapter/{credentialstore,mcpbroker}, internal/testutil/..., perf/...): pass, exceptenvironment/microvm/guestexec, which fails identically without this change (tests refuse to run as root in this sandbox)cd engine && go test ./governance/... ./adapter/memattempt/...: passgo test ./internal/testutil/identityharness/: pass (after the Model switch: optional context carryover into the new session #20 change)cd apps && pnpm install --frozen-lockfile, thencd web && npx vitest run src/features/settings src/components/shell/top-nav.test.tsx: 17 files, 89 tests passnpx biome check web/src/features/settings web/src/components/shell: cleanpnpm typecheck(apps/web): no errors in touched files; it fails on pre-existingapps/servererrors (the@stacklok-oss/mecatl-sdkpackage is not built in this sandbox)task lint,task test:raceand the offline demo were not run: the sandbox has notask, and golangci-lint is built with Go 1.25 (< 1.27.3). CI covers these.https://claude.ai/code/session_01PxAB5heFXcxfMzwYXYTzer
Generated by Claude Code