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

Removing an alternative from the top-level security is reported at info

Đang mở
#1,297 0 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

@reuvenharrison đang làm issue này rồi.

Từ ngày 9/10/2026.

  • #1298 của @reuvenharrison — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
62/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
api, tooling

Hướng nghiên cứu

Start from the check that assigns levels to top-level security findings, and compare it with the operation-level security check that already reports the same kinds of change as errors. The rule IDs to trace are api-global-security-removed, api-global-security-scope-added, api-security-removed and api-security-scope-added. Reproduce with the two YAML files in the issue and run oasdiff changelog. Done means removing a top-level scheme reports at error, while the info cases the issue describes stay at info.

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

Mô tả

oasdiff version: 1.33.0

Replacing the top-level security requirement is reported at info, so oasdiff breaking reports nothing. Every operation that inherits the top-level list now rejects the clients that authenticate the old way.

The rules declare api-global-security-removed and api-global-security-scope-added as errors, the same as their operation-level counterparts api-security-removed and api-security-scope-added, but the check sets the level of all four top-level findings to info.

Base (base.yaml)
openapi: 3.0.3
info: {title: t, version: '1'}
security:
  - apiKey: []
paths:
  /pets:
    get:
      responses:
        '200': {description: ok}
components:
  securitySchemes:
    apiKey: {type: apiKey, in: header, name: X-API-Key}
    bearer: {type: http, scheme: bearer}
Revision (revision.yaml)

Same, with the top-level security changed to - bearer: [].

Command
oasdiff changelog base.yaml revision.yaml
Actual
info	[api-global-security-added]
	in security
		the security scheme `bearer` was added to the API

info	[api-global-security-removed]
	in security
		the security scheme `apiKey` was removed from the API
Expected

api-global-security-removed at error, since GET /pets inherits the top-level list and a client sending only X-API-Key is now rejected.

A top-level change should stay at info when it cannot reject anyone: when every operation declares its own security, or when the new top-level list allows anonymous access (which #1283 handles).

Ngôn ngữ chính
Go
Star
1.4k
Fork
109
Merge trung bình
12 giờ 11 phút
Pull request đã merge (30 ngày)
35

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 oasdiff/oasdiff

Tất cả issue của oasdiff/oasdiff

Issue tương tự

Thêm issue về Go

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.