[Safe Outputs Conformance] SEC-005: Cross-repo target-repo field flagged without allowlist check
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 67/100
Hướng nghiên cứu
Đọc scripts/check-safe-outputs-conformance.sh, đặc biệt là check_cross_repo, và kiểm tra các ánh xạ targetRepo trong actions/setup/js/unified_session_payload.cjs và actions/setup/js/unified_session_render.cjs. Xác nhận các tệp này chỉ chuyển tiếp hoặc hiển thị siêu dữ liệu, sau đó thêm các ngoại lệ SEC-005 đã được ghi lại gần các ánh xạ. Chạy bash scripts/check-safe-outputs-conformance.sh và xác nhận cả hai tệp đều đạt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Conformance Check Failure
Check ID: SEC-005
Severity: HIGH
Category: Security
Problem Description
The conformance checker flags two files for supporting a target-repo-shaped field without a visible allowlist validation call:
actions/setup/js/unified_session_payload.cjs(line ~453): mapstargetRepo/target_repointo the unified session payload field extraction table.actions/setup/js/unified_session_render.cjs(line ~276): includestargetRepoin a list of fields rendered into a human-readable session log line.
Both usages are read-only: they copy an already-resolved targetRepo value from session metadata into an observability payload or log line for display. Neither file makes a GitHub API call against a different repository, so SEC-005s allowlist requirement (allowed.*[Rr]epos, validateTargetRepo, checkAllowedRepo) does not apply to them the way it does to a true cross-repo write handler.
Affected Components
- Files:
actions/setup/js/unified_session_payload.cjs,actions/setup/js/unified_session_render.cjs - Check:
scripts/check-safe-outputs-conformance.shfunctioncheck_cross_repo(SEC-005)
<b>Current vs Expected Behavior</b>
Current Behavior
The SEC-005 regex (\btarget-repo\b|\btargetRepo\b|\btarget_repo\b) matches any file that merely references a targetRepo identifier, including pure display/metadata-mapping code, and then requires an allowlist-check pattern in that same file or logs a HIGH failure.
Expected Behavior
SEC-005 is intended to catch handlers that use target-repo to perform a cross-repository GitHub API write without validating against allowed-repos. Pure metadata pass-through/rendering code that never calls the GitHub API should not trip this check. The script already supports a documented exemption via an @safe-outputs-exempt SEC-005 annotation for exactly this situation.
Remediation Steps
- Confirm
unified_session_payload.cjsandunified_session_render.cjsnever passtargetRepoto an octokit call or any cross-repo write path (only read/display it). - If confirmed, add a documented exemption comment (
// @safe-outputs-exempt SEC-005: <reason>) near the targetRepo field mapping in both files, explaining that the field is display/telemetry-only metadata, not a cross-repo write target. - If either file is later changed to perform an actual cross-repo API call using this field, remove the exemption and add a real allowlist check at that call site instead.
Verification
After remediation, verify the fix by running:
bash scripts/check-safe-outputs-conformance.sh
SEC-005 should report PASS for both files.
References
- Safe Outputs Specification: docs/src/content/docs/specs/safe-outputs-specification.md
- Conformance Checker: scripts/check-safe-outputs-conformance.sh
- Run: §39729823556
- Date: 2026-10-22
Generated by ✅ Daily Safe Outputs Conformance Checker · claude · agent · 132.9 AIC · ⌖ 0.552 AIC · ⊞ 5.4K · ◷
- expires on Oct 22, 2026, 9:54 PM UTC-08:00
- Ngôn ngữ chính
- Go
- Star
- 5.4k
- Fork
- 596
- Merge trung bình
- 3 giờ 41 phút
- Pull request đã merge (30 ngày)
- 829
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc 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/gh-aw
-
automation models
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-research
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
automated conformance good-first-issue safe-outputs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
automated conformance safe-outputs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: APIGW request ID headers are inconsistent between server and clientCó thể đã có người làm @zouxingyuks đã nhận hôm nay. Đang mởproduct/backlog
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
TencentBlueKing/bk-nodemgr#3782 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
praetorianer777/Dynamo#53 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
internal test setup
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
SAP/terraform-provider-scc#430 ·