Skip to content

Guard StormDNS upstream boundary#21

Closed
AmirrezaFarnamTaheri wants to merge 2 commits into
WhiteDNS:mainfrom
AmirrezaFarnamTaheri:stormdns-boundary-guard
Closed

Guard StormDNS upstream boundary#21
AmirrezaFarnamTaheri wants to merge 2 commits into
WhiteDNS:mainfrom
AmirrezaFarnamTaheri:stormdns-boundary-guard

Conversation

@AmirrezaFarnamTaheri

Copy link
Copy Markdown
Contributor

Summary

  • Document the allowed StormDNS integration boundary in docs/STORMDNS_UPSTREAM_POLICY.md.
  • Add a reusable guard script that detects changes under third_party/StormDNS.
  • Add a PR workflow that fails accidental upstream edits unless the PR has the allow-stormdns-upstream label.
  • Keep shell scripts LF-normalized for CI.

Verification

  • Ran git diff --cached --check.
  • Verified the same changed-file comparison locally with PowerShell; no third_party/StormDNS changes are detected for this branch.

Copilot AI 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.

Pull request overview

This PR establishes and enforces a “black-box upstream” boundary for the StormDNS engine, preventing accidental edits to the StormDNS submodule contents unless explicitly allowed via a PR label.

Changes:

  • Added a guard script to detect changes under third_party/StormDNS.
  • Added a GitHub Actions workflow that blocks PRs modifying StormDNS unless labeled allow-stormdns-upstream.
  • Documented the allowed integration surface and enforced LF normalization for shell scripts.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
scripts/check-stormdns-boundary.sh New reusable detector for changes under third_party/StormDNS.
docs/STORMDNS_UPSTREAM_POLICY.md Defines allowed/disallowed coupling and the label-based exception process.
.github/workflows/stormdns-boundary.yml CI gate for PRs that touch StormDNS without the allow label.
.gitattributes Forces LF line endings for *.sh to keep CI consistent.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/stormdns-boundary.yml Outdated
Comment on lines +36 to +45
if scripts/check-stormdns-boundary.sh "${base_ref}" "${head_ref}"; then
exit 0
fi

if [[ "${HAS_UPSTREAM_LABEL}" == "true" ]]; then
echo "StormDNS upstream changes are intentionally labeled."
exit 0
fi

exit 1
Comment thread scripts/check-stormdns-boundary.sh Outdated
Comment on lines +12 to +13
changed_files="$(
git diff --name-only "${base_ref}...${head_ref}" -- 'third_party/StormDNS' || true
@AmirrezaFarnamTaheri

Copy link
Copy Markdown
Contributor Author

Closing this older branch to keep the active upstream queue limited to PR #35 and PR #36. Useful remaining work is recorded in the local hardening roadmap and should return only as a clean non-overlapping batch.

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.

2 participants