Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Security: enforce ownership and auth on user profile and saved policy routes

Đang mở
#3,395 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python

Hướng nghiên cứu

Đọc policyengine_api/routes/user_profile_routes.py, policyengine_api/endpoints/policy.py và các route mount trong policyengine_api/api.py. Xác định cơ chế xác thực hiện có và cách principal đã được xác thực được cung cấp trước khi thêm các bài kiểm tra phân quyền cho quyền truy cập giữa những người dùng. Hoàn thành nghĩa là các route user-profile và saved-policy yêu cầu xác thực và từ chối các giá trị auth0_id hoặc user_id của người dùng khác do bên gọi cung cấp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Summary

policyengine-api exposes unauthenticated user-profile and user-policy routes with caller-controlled identifiers.

Severity

High

Impact

Any client can create, read, or mutate another user’s profile and saved policies by supplying arbitrary auth0_id or user_id values.

Affected code

  • policyengine_api/routes/user_profile_routes.py:12-135
  • policyengine_api/endpoints/policy.py:81-359
  • policyengine_api/api.py:100-101,148-154

Details

The affected routes have no auth or ownership checks and are mounted with app-wide CORS enabled.

Expected behavior

User-scoped routes should require authenticated callers and enforce ownership based on the authenticated principal, not caller-supplied IDs.

Suggested remediation

  • Add auth middleware/decorators to user-scoped routes
  • Derive subject/ownership from the validated token
  • Reject caller-supplied foreign auth0_id/user_id combinations
  • Add authorization tests for cross-user access attempts
Ngôn ngữ chính
Python
Star
18
Fork
33
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
18

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PolicyEngine/policyengine-api

Tất cả issue của PolicyEngine/policyengine-api

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.