Skip to content

armgit / rea

Public Imported from GitHub
0

Reverse engineer anything with agents, from app behavior down to native binaries.

fix(website): identify publication verifier requests

morlutoe6905c18e09c
diff --git a/.github/workflows/website-pages.yml b/.github/workflows/website-pages.yml
index 980b065f1..ec2b7153e 100644
--- a/.github/workflows/website-pages.yml
+++ b/.github/workflows/website-pages.yml
@@ -120,7 +120,7 @@ jobs:
PAGES_URL: ${{ steps.deployment.outputs.page_url }}
PUBLISH_TARGET: ${{ inputs.target }}
run: |
- python3 - <<'PY'
+ python3 -u - <<'PY'
import json
import os
import sys
@@ -144,7 +144,10 @@ jobs:
for name, base in list(pending.items()):
url = urljoin(base, "deployment.json") + "?commit=" + expected
try:
- request = Request(url, headers={"Cache-Control": "no-cache"})
+ request = Request(url, headers={
+ "Cache-Control": "no-cache",
+ "User-Agent": "REA-Website-Verifier/1.0 (+https://github.com/morluto/rea)",
+ })
with urlopen(request, timeout=10) as response:
actual = json.load(response).get("commit")
if actual == expected:
@@ -159,7 +162,7 @@ jobs:
if attempt < 23:
time.sleep(5)
if pending:
- sys.exit("Published revision did not match on: " + ", ".join(pending))
+ sys.exit("Could not verify published revision on: " + ", ".join(pending))
with open(os.environ["GITHUB_STEP_SUMMARY"], "a", encoding="utf-8") as summary:
links = " and ".join(f"[{name}]({url})" for name, url in hosts.items())
summary.write(f"Published commit `{expected}` to {links}.\n")