Skip to content

[CT-86] error.rs has no test that internal error variants never leak stack traces or file paths #1210

Description

@mftee

Overview

contract/src/error.rs (80 lines) defines the crate's error types and their API-facing representation, but there's no evident test asserting an internal/unexpected error variant's HTTP response body excludes things like file paths, dependency error debug output, or stack traces — details useful to an attacker probing the service.

Tasks

  • Add a test for each error variant asserting the serialized API response contains only the intended user-facing message
  • Specifically test that a wrapped internal/std error's Debug output never leaks into the response body

Acceptance Criteria

  • Every error variant's API response is asserted to exclude internal debug detail, file paths, and stack traces

Notes for Contributors

Comment below to be assigned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcontract

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions