Skip to content

Dashboard: GET /api/audit/{name} does not reject .. and can scan outside the skills source #402

Closed

Description

@runkids

Summary

GET /api/audit/{name} resolves the skill as filepath.Join(source, name) without rejecting .. segments (internal/server/handler_audit.go, around the skillPath resolution in handleAuditSkill). A URL such as /api/audit/..%2F..%2Fsomething therefore scans a directory outside the skills source.

This predates PR #390 (it exists at e4a3d8a8 and on main); the internal review of #390 found it while checking the followed-skill scan path. The dashboard binds to localhost, so the exposure is a local-user one, but the route should still stay inside the source.

Expected

Reject any name whose cleaned path escapes the source (the same check the other skill routes use for relPath), with a 400 or 404, before scanning.

Notes

  • Found during the .skillfollow review (ai_docs/reports/274-review-fixes.md, "Not changed").
  • Check the other {name}-taking audit/skill routes for the same pattern while fixing.

Activity

  1. added
    bug
    on Oct 4, 2026
  2. added a commit that references this issue on Oct 6, 2026
    c61f488
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions