[Schema Inaccuracy] secret scanning alerts have no required fields
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
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- openapi, typescript
- Lĩnh vực
- api
Hướng nghiên cứu
Bắt đầu bằng cách xác định component schema secret-scanning-alert và so sánh các field của nó với các component code-scanning-alert và dependabot_alert. Sử dụng bản tái hiện bằng TypeScript với secretScanning.getAlert để xác định field nào luôn được trả về và field nào nên tiếp tục nullable; hoàn thành có nghĩa là schema khai báo các field bắt buộc phù hợp để những giá trị đó không còn được type là có thể undefined.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Schema Inaccuracy
The secret-scanning-alert schema component does not define any required fields, even though some fields are always present (e.g. primary keys). I can't tell on my end what the full list of fields that should be required are, but some obvious ones include:
number- unique ID for the alertcreated_atupdated_aturlhtml_urlstatesecret_typesecret_type_display_namesecretvalidity
Some fields are also marked nullable: true, so it's possible all fields are actually required (e.g. returned in a "GetAlert" response) with some being nullable instead.
For comparison, the code-scanning-alert and dependabot_alert (similar APIs also part of GitHub Advanced Security) have required fields.
Expected
The secret-scanning-alert schema component should define required fields.
Reproduction Steps
import { Octokit } from 'octokit';
const octokit = new Octokit({ auth: 'personal-access-token-here' });
const { data: alert } = await octokit.rest.secretScanning.getAlert({
owner: 'sample-owner',
repo: 'sample-repo',
alert_number: 1234
});
Using TypeScript, review type of fields in alert - they will all include | undefined.
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 1.6k
- Fork
- 342
- Merge trung bình
- 3 giờ 33 phút
- Pull request đã merge (30 ngày)
- 51
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/rest-api-description
-
feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
github/rest-api-description#7201 ·
-
feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/rest-api-description#7163 ·
-
Runner deprecations: registration_deprecates_at is declared on the response but never returned Đang mởfeature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
github/rest-api-description#7162 ·
-
feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
github/rest-api-description#7135 ·
-
feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
github/rest-api-description#7111 · 1 bình luận ·
Tất cả issue của github/rest-api-description
Issue tương tự
-
area/sessions comp/cron comp/gateway P2 sweeper:risk-message-delivery sweeper:risk-session-state type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
NousResearch/hermes-agent#118863 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
use-agent-os/agent-os#3312 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
needs-acceptance wg/data-plane-networking
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
vllm-project/semantic-router#4024 · 1 bình luận ·