Skip to content

Commit 4cb69f1

Browse files
TEMP add PAT_ACTIONS read-only probe workflow (SK-2986, to be deleted)
1 parent 9846916 commit 4cb69f1

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/_pat_probe.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: TEMP PAT_ACTIONS probe (delete me)
2+
on:
3+
push:
4+
branches: [ "ci-test/pat-probe" ]
5+
workflow_dispatch:
6+
7+
jobs:
8+
probe:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Inspect PAT_ACTIONS identity, scopes, and repo permissions
12+
env:
13+
PAT: ${{ secrets.PAT_ACTIONS }}
14+
run: |
15+
echo "== token scopes (classic PAT only; blank for fine-grained) =="
16+
curl -sI -H "Authorization: token $PAT" https://api.github.com/user \
17+
| grep -iE "x-oauth-scopes:" || echo "(no X-OAuth-Scopes header -> likely fine-grained PAT)"
18+
19+
echo
20+
echo "== authenticated identity =="
21+
curl -s -H "Authorization: token $PAT" https://api.github.com/user \
22+
| python3 -c "import sys,json;d=json.load(sys.stdin);print('login:',d.get('login'),'| type:',d.get('type'))"
23+
24+
echo
25+
echo "== this token's permissions on skyflow-java =="
26+
curl -s -H "Authorization: token $PAT" https://api.github.com/repos/skyflowapi/skyflow-java \
27+
| python3 -c "import sys,json;d=json.load(sys.stdin);p=d.get('permissions',{});print('permissions:',p);print('=> can write (push):',p.get('push'));print('=> is bypass actor (admin):',p.get('admin'))"

0 commit comments

Comments
 (0)