Skip to content

Corpus: add path-traversal (CWE-22) cases for Go and Java #12

Closed

Description

@bkd-dotcom

Add path-traversal corpus cases so CWE-22 is covered beyond Python/PHP.

Where: umbra_eval/detection/corpus/multilang.py (or public.py).

  • Go: os.Open("/data/" + r.URL.Query().Get("f")) (and a taint-through-var form).
  • Java: new File(baseDir, req.getParameter("name")) / Files.readAllBytes(...).
  • SAFE decoys: input validated/canonicalized against a base dir.

Acceptance criteria

  • Vulnerable cases detected as path_traversal / CWE-22; SAFE cases 0 FP.
  • pytest -q + ruff green.

See CONTRIBUTING.md. If the engine misses a case, that's a valid finding — open a
companion umbra-core issue rather than hand-tuning to one case.

Activity

  1. ShubhaKC123 commented on Aug 11, 2026

    @ShubhaKC123

    Hi, I'd like to work on this issue.

  2. bkd-dotcom commented on Aug 11, 2026

    @bkd-dotcom
    MemberAuthor

    Sure, you can start working by forking the repo.

  3. bkd-dotcom commented on Aug 18, 2026

    @bkd-dotcom
    MemberAuthor

    Done in #31 (merged).

    LANG-56-go-path-traversal and LANG-57-java-path-traversal (CWE-22), plus a LANG-58-SAFE-go-constant-path decoy so a compiled-in path is not counted as traversal.

    These needed detection rules first: main had no Go or Java path-traversal rule, so a corpus case would have dropped recall below the 1.0 the eval suite asserts. Added as go.taint.path_traversal / java.taint.path_traversal in Signetry/core#95 (shipped in core v0.7.0).

    Corpus is now 60 cases at recall 1.0 with 0 false positives, verified against the published core v0.7.0 tag in a clean environment.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions