Skip to content

Fix code scanning alerts: auth cookie flags, now-running count overflow - #339

Open
dvayanu wants to merge 1 commit into
developfrom
fix/code-scanning-alerts
Open

dvayanu wants to merge 1 commit into
developfrom
fix/code-scanning-alerts

Conversation

@dvayanu

@dvayanu dvayanu commented Nov 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Support for xml accumulators/list thresholds/alerts #61–Feature/msk 310 #64 (insecure-cookie / sensitive-cookie-not-httponly): the mskAuthorization cookie carries encrypted user credentials. It is now HttpOnly, and Secure whenever the request came over HTTPS. Secure is not forced, because MoSKito Inspect is often served over plain HTTP internally. The flags are set everywhere the cookie is written: SignInAction, SignOutAction and the MoskitoUIFilter reset. No JS reads this cookie.
  • selections of accumulators #60 (implicit-cast-in-compound-assignment): EntryPointRepository.getNowRunningCount() added up long counts into an int. It now sums into a long and clamps the result to int. The NowRunningAPI signature (remote API) stays the same.

The remaining alerts (#17, #65–#67, stale vendored-JS alerts) are dismissed or cleaned up separately; they need no code change.

Test plan

  • moskito-core and moskito-webui compile
  • With auth enabled: sign in, sign out, and check the cookie flags in the browser

🤖 Generated with Claude Code

Set HttpOnly and (on HTTPS requests) Secure on the mskAuthorization cookie
in sign-in, sign-out and the filter's cookie reset. Sum per-entry-point
request counts as long and clamp to int, keeping the NowRunningAPI signature.

Resolves code scanning alerts #60-#64.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant