Repository navigation
[codex] Allow soak runner control egress - #51
Conversation
814b5e1 to
4cfac97
Compare
📝 WalkthroughWalkthroughExpanded the weekly quality soak workflow’s Harden Runner 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/quality-soak-weekly.yml (1)
73-73: 🔒 Security & Privacy | 🔵 Trivial | 💤 Low valueDrop
results-receiver.actions.githubusercontent.com:443
*.actions.githubusercontent.com:443already 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
📒 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 |
There was a problem hiding this comment.
🔒 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/workflowsRepository: 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
doneRepository: 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 || trueRepository: 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.ymlRepository: 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}')
PYRepository: 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:
- 1: https://docs.stepsecurity.io/github-actions/harden-runner/workflow-runs
- 2: https://github.com/step-security/harden-runner/tree/v2.9.0
- 3: https://www.stepsecurity.io/blog/stepsecurity-harden-runner-now-supports-wildcard-domains-in-block-mode
- 4: https://docs.stepsecurity.io/start-here/guides/how-to-fix-a-blocked-endpoint-in-your-workflow
🌐 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:
- 1: https://github.com/actions/upload-artifact?tab=readme-ov-file
- 2: [Artifacts] zip creation + blob storage upload functionality actions/toolkit#1488
- 3: https://github.com/actions/toolkit/blob/main/packages/artifact/src/internal/upload/blob-upload.ts
- 4: https://github.com/actions/upload-artifact
- 5: https://github.com/actions/upload-artifact/blob/main/README.md
- 6: https://github.com/fixpoint/azblob-upload-artifact
- 7: https://github.com/actions/upload-artifact/releases/tag/v7.0.0
*.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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@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
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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).
Summary
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.ymlzizmor .github/workflows/quality-soak-weekly.ymlgit diff --check HEAD~1..HEADgolangci-lint run,go test ./...,govulncheck, fuzz smoke, actionlint, zizmor, clean-treeFollow-up
The real verification is rerunning
Quality: Soak; the failure only shows up during the long GitHub-hosted run.✨ Added:
🔧 Changed:
🐛 Fixed:
🔒 Security:
Preserved Harden Runner block-mode enforcement with an explicit endpoint allowlist.
Rerun
Quality: Soakfor final verification.Confirm the expanded allowlist contains only required endpoints.