Skip to content

Session cookie security regression tests #75

Description

@karagozemin

Summary

Fortexa's wallet login issues the fortexa_session cookie. Add regression tests for cookie flags and expiry behavior so production session hardening does not drift.

High security value, easy because this is mostly tests around existing auth routes/session helpers.

Scope

  • Test cookie flags for login/session issue path: HttpOnly, SameSite, Path, Max-Age/Expires, Secure behavior when environment indicates production.
  • Test logout clears the cookie if logout route exists.
  • Test expired or tampered session tokens are rejected.
  • Document any environment-dependent cookie behavior in README or auth comments.

Guardrails

  • Do not change login flow semantics unless tests reveal a real hardening bug.
  • Do not weaken local development behavior.
  • Do not include real signatures or private material.

Acceptance criteria

  • Cookie security attributes are covered by tests.
  • Expired/tampered tokens fail safely.
  • Existing auth tests still pass.

Wave complexity (maintainer)

High - 200 points

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions