OIDC token mask uses the variable name instead of its value
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github-actions
- Lĩnh vực
- security
Hướng nghiên cứu
The affected source is action.yml, lines 45–64. Read the token fetch and masking step, then inspect the proposed fix in linked issue #85. Done means the mask command registers the fetched token value and the existing GITHUB_OUTPUT value remains unchanged; the payload reports a local stubbed curl check.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Proposed fix: #85.
Problem
When using OIDC authentication (oauth-client-id and audience), the action registers the literal string ID_TOKEN for log masking instead of the fetched token's value:
echo "::add-mask::ID_TOKEN"
The missing $ matters: GitHub's add-mask command receives text to hide, not the name of a variable to look up. Authentication can still succeed while token redaction is incorrect.
Affected source: action.yml at 5a4a17f, lines 45–64.
Where the token could appear
The next step, Gitops pusher, passes the fetched token through the TS_ID_TOKEN environment variable. The GitHub Actions runner prints step environment names and values in the log header.
The relevant location is the workflow job log, inside the expanded Run go run tailscale.com/cmd/gitops-pusher… group, under env:. This output path does not require an extra debugging command or explicit token print in the action.
Unless another masking mechanism protects the value, the incorrect mask can hide the ID_TOKEN portion of the variable name while leaving the token value visible. A schematic example using a fictional value is:
env:
TS_***: example-token-123
The impact depends on who can read the workflow logs, whether the token is still valid, and the permissions granted by the Tailscale federated identity. In particular, policy-write permissions make a usable leaked token more consequential.
Expected behavior and fix
Register the actual token value before passing it to the next step:
echo "::add-mask::$ID_TOKEN"
Subsequent occurrences of that value should then be redacted as ***. This one-line fix is proposed in #85.
Validation and limits
The actual fetch script was executed locally with a stubbed curl response and a synthetic token. The original code emitted ::add-mask::ID_TOKEN; the fix emitted the mask command containing the synthetic token value. The GITHUB_OUTPUT value was unchanged.
This confirms the incorrect masking command. The environment-log path above is based on action and runner source inspection, not an end-to-end reproduction on a hosted runner. No real token exposure or exploitation has been observed, and no real credentials were used in the local check.
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 153
- Fork
- 44
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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
- Đọ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 tailscale/gitops-acl-action
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
tailscale/gitops-acl-action#81 · 1 bình luận ·
-
Add Workload Identity Federation ExampleCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
tailscale/gitops-acl-action#62 · 4 bình luận · 5 reaction ·
-
README.md recommends an insecure default configurationCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
tailscale/gitops-acl-action#32 · 4 bình luận · 6 reaction ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 74/100
Tất cả issue của tailscale/gitops-acl-action
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
natemoo-re/ultrahtml#102 ·
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ 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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
microsoft/terraform-provider-power-platform#1328 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
laaielichter/AgentHaven#76 ·
Maintainer thường phản hồi trong vòng 1 ngày