Skip to content

[codex] Allow soak runner control egress - #51

Merged
scttbnsn merged 1 commit into
mainfrom
codex/soak-runner-egress
Jul 10, 2026
Merged

scttbnsn merged 1 commit into
mainfrom
codex/soak-runner-egress

Conversation

@scttbnsn

@scttbnsn scttbnsn commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • keeps the weekly soak job in Harden Runner block mode
  • adds the GitHub Actions control, log, artifact, and cache endpoints needed by the multi-hour soak
  • adds StepSecurity API/telemetry endpoints observed in the last successful audit-mode run

Root cause

The soak workflow moved from Harden Runner audit mode to block mode with an allowlist that covered checkout/setup traffic but not the long-lived GitHub Actions runner communication paths. The failed runs ended with runner communication loss before the soak script could finish or upload artifacts.

Validation

  • actionlint .github/workflows/quality-soak-weekly.yml
  • zizmor .github/workflows/quality-soak-weekly.yml
  • git diff --check HEAD~1..HEAD
  • pre-push hook: GoReleaser snapshot, golangci-lint run, go test ./..., govulncheck, fuzz smoke, actionlint, zizmor, clean-tree

Follow-up

The real verification is rerunning Quality: Soak; the failure only shows up during the long GitHub-hosted run.

✨ Added:

  • Expanded the Harden Runner endpoint allowlist for the weekly quality soak.
  • Added StepSecurity API and telemetry endpoints.

🔧 Changed:

  • Allowed required GitHub Actions control, log, artifact, and cache endpoints while retaining block mode.

🐛 Fixed:

  • Prevented runner communication loss before soak completion or artifact upload.

🔒 Security:

  • Preserved Harden Runner block-mode enforcement with an explicit endpoint allowlist.

  • Rerun Quality: Soak for final verification.

  • Confirm the expanded allowlist contains only required endpoints.

@scttbnsn
scttbnsn force-pushed the codex/soak-runner-egress branch from 814b5e1 to 4cfac97 Compare July 10, 2026 17:11
@coderabbitai

coderabbitai Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Expanded the weekly quality soak workflow’s Harden Runner allowed-endpoints list to include additional Step Security, raw GitHub/CDN, Go proxy, and results-receiver hosts.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/soak-runner-egress

Comment @coderabbitai help to get the list of available commands.

@scttbnsn
scttbnsn marked this pull request as ready for review July 10, 2026 17:12

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/quality-soak-weekly.yml (1)

73-73: 🔒 Security & Privacy | 🔵 Trivial | 💤 Low value

Drop results-receiver.actions.githubusercontent.com:443
*.actions.githubusercontent.com:443 already covers this host, so the explicit entry is redundant.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/quality-soak-weekly.yml at line 73, Remove the redundant
results-receiver.actions.githubusercontent.com:443 entry from the workflow’s
network host configuration, since the existing
*.actions.githubusercontent.com:443 wildcard already covers it.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/quality-soak-weekly.yml:
- Line 68: Replace the broad *.blob.core.windows.net:443 allowlist entry in the
workflow’s network configuration with the specific Azure Blob hostname(s) used
by the artifact upload, preserving the required port and removing unrestricted
tenant access.

---

Nitpick comments:
In @.github/workflows/quality-soak-weekly.yml:
- Line 73: Remove the redundant
results-receiver.actions.githubusercontent.com:443 entry from the workflow’s
network host configuration, since the existing
*.actions.githubusercontent.com:443 wildcard already covers it.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9af22e82-ad0b-4a0a-af1d-6ccdab0d2ba5

📥 Commits

Reviewing files that changed from the base of the PR and between 78e6873 and 4cfac97.

📒 Files selected for processing (1)
  • .github/workflows/quality-soak-weekly.yml

codeload.github.com:443
github.com:443
*.actions.githubusercontent.com:443
*.blob.core.windows.net:443

@coderabbitai coderabbitai Bot Jul 10, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# See how sibling workflows scope blob egress and whether any narrower host is used.
rg -n 'blob\.core\.windows\.net|upload-artifact|allowed-endpoints' .github/workflows

Repository: CodesWhat/portwing

Length of output: 2911


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- quality-soak-weekly excerpt ---'
sed -n '55,75p' .github/workflows/quality-soak-weekly.yml

echo
echo '--- upload-artifact versions and blob endpoints in sibling workflows ---'
for f in .github/workflows/*.yml; do
  if rg -n 'upload-artifact@|blob\.core\.windows\.net|allowed-endpoints' "$f" >/dev/null; then
    echo "### $f"
    rg -n 'upload-artifact@|blob\.core\.windows\.net|allowed-endpoints' "$f"
    echo
  fi
done

Repository: CodesWhat/portwing

Length of output: 3180


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- quality-soak-weekly full allowlist block ---'
awk 'NR>=58 && NR<=74 {print NR ":" $0}' .github/workflows/quality-soak-weekly.yml

echo
echo '--- any explicit rationale for blob hosts / artifact uploads ---'
rg -n 'blob\.core\.windows\.net|artifact|results-receiver|actions/upload-artifact' .github/workflows README.md CHANGELOG.md docs 2>/dev/null || true

Repository: CodesWhat/portwing

Length of output: 4395


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- ci.yml around blob allowlist ---'
awk 'NR>=34 && NR<=52 {print NR ":" $0}' .github/workflows/ci.yml
echo
awk 'NR>=468 && NR<=520 {print NR ":" $0}' .github/workflows/ci.yml

echo
echo '--- release.yml around blob allowlist ---'
awk 'NR>=150 && NR<=170 {print NR ":" $0}' .github/workflows/release.yml

Repository: CodesWhat/portwing

Length of output: 3929


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
for path in [Path('.github/workflows/ci.yml'), Path('.github/workflows/release.yml')]:
    text = path.read_text()
    for needle in ['tmaproduction.blob.core.windows.net:443', 'actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a']:
        if needle in text:
            print(f'FOUND in {path}: {needle}')
PY

Repository: CodesWhat/portwing

Length of output: 411


🌐 Web query:

step-security harden-runner allowed-endpoints wildcard matching subdomain semantics docs

💡 Result:

StepSecurity Harden-Runner supports wildcard domain matching in its allowed-endpoints configuration when using block mode [1][2]. ### Wildcard Semantics The wildcard matching allows you to specify a pattern to permit traffic to a domain and all of its subdomains [3]. When you include a wildcard domain in your allowed-endpoints list, the Harden-Runner permits outbound egress traffic to any subdomain that matches that pattern [1][2]. For example, if you add *.data.mcr.microsoft.com:443 to your allowed-endpoints list, the runner will successfully allow traffic to [1][2]: * eastus.data.mcr.microsoft.com:443 * westus.data.mcr.microsoft.com:443 ### Implementation To use this feature, add the wildcard pattern (prefixed with *.) followed by the port to your allowed-endpoints list in your workflow YAML file [1][2]: yaml - uses: step-security/harden-runner@v2 with: egress-policy: block allowed-endpoints: > *.example.com:443 api.github.com:443 This functionality helps manage environments where subdomains may be dynamic or numerous, such as when using CDNs or cloud-based services, by allowing you to define a single policy rule rather than listing every individual endpoint [3]. If you are uncertain about the specific endpoints required by your workflow, it is recommended to first run your job in audit mode to observe traffic and view recommendations on the StepSecurity Insights page before switching to block mode [1][4].

Citations:


🌐 Web query:

GitHub actions/upload-artifact v7 Azure blob core windows dynamic storage host docs

💡 Result:

The GitHub actions/upload-artifact action, including version v7, is internally powered by the @actions/artifact package [1]. Since version v4, this package has directly utilized Azure Blob Storage for artifact uploads from runners to improve speed and reliability [2]. The implementation uses the @azure/storage-blob library [3]. There is no specific technical concept or documented feature named "windows dynamic storage host" within the official actions/upload-artifact documentation [4][5][1]. The action operates by streaming data directly to Azure Blob Storage, which avoids the need for local temporary storage of zipped files and eliminates earlier proxy-based upload methods [2]. For users who specifically need to upload artifacts to their own private or external Azure Blob Storage containers rather than the default GitHub-managed storage, third-party community actions (such as fixpoint/azblob-upload-artifact) are commonly used to provide that functionality [6]. Official documentation for v7 can be found in the GitHub repository README and release notes [5][7][1]. Key features in v7 include the ability to perform direct, unzipped uploads by setting the archive parameter to false [7].

Citations:


*.blob.core.windows.net:443 is too broad. It opens every Azure Blob tenant; replace it with the exact blob host(s) the artifact upload uses.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/quality-soak-weekly.yml at line 68, Replace the broad
*.blob.core.windows.net:443 allowlist entry in the workflow’s network
configuration with the specific Azure Blob hostname(s) used by the artifact
upload, preserving the required port and removing unrestricted tenant access.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub still documents *.blob.core.windows.net for artifact, log and cache transfers. The current allowlist follows that vendor boundary. This still permits other Blob tenants, so the narrowing request remains open; the wildcard is not being claimed as tenant isolation.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scttbnsn The wildcard follows GitHub’s documented boundary but permits access to other Blob tenants. I’m not marking the finding as addressed.

Final verification still requires rerunning Quality: Soak and checking the artifact upload.


Learnings added

Learnt from: scttbnsn
Repo: CodesWhat/portwing PR: 51
File: .github/workflows/quality-soak-weekly.yml:68-68
Timestamp: 2026-11-13T00:05:39.982Z
Learning: Within repository "CodesWhat/portwing", only for files matching one of [".github/workflows/quality-soak-weekly.yml"]: In `.github/workflows/quality-soak-weekly.yml`, the `*.blob.core.windows.net:443` allowlist entry follows GitHub's documented boundary for artifact, log, and cache transfers, but permits access to other Azure Blob tenants. When reviewing a narrower allowlist, verify that required GitHub Actions transfers still work; do not treat the wildcard as tenant isolation.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

You are interacting with an AI system.

@biggest-littlest biggest-littlest left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Soak-runner egress fix: adds the GitHub Actions control/log/artifact + StepSecurity telemetry endpoints to quality-soak-weekly.yml's harden-runner allowlist so the 4h weekly soak survives block mode. CI-only, rebased on main, checks green. Lands before the next scheduled soak (Sun 06:15 UTC).

@ALARGECOMPANY ALARGECOMPANY left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Soak-runner egress fix: adds the GitHub Actions control/log/artifact + StepSecurity telemetry endpoints to quality-soak-weekly.yml's harden-runner allowlist so the 4h weekly soak survives block mode. CI-only, rebased on main, checks green. Lands before the next scheduled soak (Sun 06:15 UTC).

@scttbnsn
scttbnsn merged commit d394e21 into main Jul 10, 2026
18 checks passed
@scttbnsn
scttbnsn deleted the codex/soak-runner-egress branch July 10, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants