Skip to content

Preserve full URLs in Squad research output - #1998

Open
bradygaster wants to merge 1 commit into
devfrom
bradygaster-procedures-preserve-urls
Open

Preserve full URLs in Squad research output#1998
bradygaster wants to merge 1 commit into
devfrom
bradygaster-procedures-preserve-urls

Conversation

@bradygaster

Copy link
Copy Markdown
Owner

What

Preserves full Microsoft Learn and Aspire documentation URLs in /squad research comments instead of rendering their paths as /redacted.

Why

gh-aw safe-output ingestion sanitized URLs whose domains were absent from safe-outputs.allowed-domains, so users could not open or verify the sources cited by research results.

How

Adds only learn.microsoft.com and aspire.dev to the safe-output domain allowlist while leaving network.allowed and general URL sanitization unchanged. The research prompt now requires full public documentation URLs but continues to omit URL userinfo, credentials, tokens, and secret-bearing query parameters. Targeted regression coverage guards both the allowlist and the sensitive-data constraints. Strict gh-aw compilation succeeded and emitted both domains in GH_AW_ALLOWED_DOMAINS; focused assertions passed. Full npm validation was blocked by registry ENOTCONN errors during dependency restoration.


⚠️ Quick Check

  • If SDK/CLI source files changed: completed the applicable Changeset step below (npx changeset add / .changeset/*.md, direct CHANGELOG.md entry for maintainers, or skip-changelog label for no user-facing changes)

PR Readiness Checklist

The PR readiness bot will validate these automatically after push.
Check each item before requesting review. See CONTRIBUTING.md for full details.

Branch & Commit

  • Branch created from dev (not main)
  • Branch is up to date with dev (git fetch upstream && git rebase upstream/dev)
  • Verified diff contains only intended changes (git diff --cached --stat)
  • PR is not in draft mode (mark ready when checks pass)
  • Commit history is clean (squash fixups before review)

Build & Test

  • npm run build passes
  • npm test passes (all tests green)
  • npm run lint passes (type check clean)
  • npm run lint:eslint passes
  • For migration PRs (>20 files): include test output summary in PR description

Changeset

  • Changeset added via npx changeset add (if packages/squad-sdk/src/ or packages/squad-cli/src/ changed)
  • Or direct CHANGELOG.md entry (maintainers only — write-protected for external contributors)
  • Or skip-changelog label applied (if no user-facing changes)

No SDK or CLI source files changed; no changeset is required.

Docs

  • README section updated (if new feature/module)
  • Docs feature page (if new user-facing capability)

N/A - this corrects existing workflow output behavior.

Exports

  • package.json subpath exports updated (if new module)

N/A - no SDK modules changed.


Breaking Changes

None.

Waivers

N/A.

Allow the public Microsoft Learn and Aspire documentation domains through safe-output URL sanitization while retaining credential and sensitive-query safeguards.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f3bb47aa-1b45-4302-8ec2-5e3dc868de42
Copilot AI lite review requested due to automatic review settings September 3, 2026 22:08
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🟡 Impact Analysis — PR #1998

Risk tier: 🟡 MEDIUM

📊 Summary

Metric Count
Files changed 2
Files added 0
Files modified 2
Files deleted 0
Modules touched 2

🎯 Risk Factors

  • 2 files changed (≤5 → LOW)
  • 2 modules touched (2-4 → MEDIUM)

📦 Modules Affected

root (1 file)
  • workflows/squad.md
tests (1 file)
  • test/gh-aw-research-online.test.ts

This report is generated automatically for every PR. See #733 for details.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit 19b7343

PR Scope: 🔧 Infrastructure

⚠️ 3 item(s) to address before review

Status Check Details
Single commit 1 commit — clean history
Not in draft Ready for review
Branch up to date Up to date with dev
Copilot review No Copilot review yet — it may still be processing
Changeset present No source files changed — changeset not required
Scope clean No .squad/ or docs/proposals/ files
No merge conflicts No merge conflicts
Copilot threads resolved 1 unresolved Copilot thread(s) — fix and resolve before merging
CI passing 1 check(s) failing: test

Files Changed (2 files, +22 −1)

File +/−
test/gh-aw-research-online.test.ts +15 −0
workflows/squad.md +7 −1

Total: +22 −1


This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The new test doesn’t currently assert that safe-outputs.allowed-domains is restricted to only the approved domains, so it won’t catch future unintended allowlist widening.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Lite
Findings: 1 Medium severity

New issues introduced by this change (1)
Severity Finding
Medium severity test/​gh-aw-research-online.test.ts — The new regression test only checks that the two approved domains appear consecutively in the…
What changed in this PR

This PR updates the Squad gh-aw workflow configuration and research prompt contract so /squad research can cite full, verifiable public documentation URLs (Microsoft Learn and Aspire) instead of having their paths sanitized to /redacted.

Changes:

  • Allowlist learn.microsoft.com and aspire.dev under safe-outputs.allowed-domains in workflows/squad.md.
  • Tighten the squad-research prompt contract to preserve full public doc URL paths while still forbidding userinfo/credentials/tokens/secret-bearing query parameters.
  • Add regression coverage ensuring the workflow frontmatter and research-skill text include these constraints.
File Description
workflows/​squad.md Adds the safe-output domain allowlist entries and updates the research prompt’s “Online sources” disclosure requirements.
test/​gh-aw-research-online.test.ts Adds a regression test validating the frontmatter allowlist and the new URL-preservation + sensitive-data constraints text.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +121 to +127
const safeOutputsMatch = frontmatter.match(
/^safe-outputs:\n((?:[ \t].*\n?)*)/m
);
expect(safeOutputsMatch, 'safe-outputs: block should exist in frontmatter').not.toBeNull();
expect(safeOutputsMatch![1]).toMatch(
/allowed-domains:\n\s+- learn\.microsoft\.com\n\s+- aspire\.dev/
);
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