Preserve full URLs in Squad research output - #1998
Conversation
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
🟡 Impact Analysis — PR #1998Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedroot (1 file)
tests (1 file)
This report is generated automatically for every PR. See #733 for details. |
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| 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.
There was a problem hiding this comment.
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
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
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.comandaspire.devundersafe-outputs.allowed-domainsinworkflows/squad.md. - Tighten the
squad-researchprompt 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.
| 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/ | ||
| ); |

What
Preserves full Microsoft Learn and Aspire documentation URLs in
/squad researchcomments 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.comandaspire.devto the safe-output domain allowlist while leavingnetwork.allowedand 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 inGH_AW_ALLOWED_DOMAINS; focused assertions passed. Full npm validation was blocked by registryENOTCONNerrors during dependency restoration.npx changeset add/.changeset/*.md, directCHANGELOG.mdentry for maintainers, orskip-changeloglabel for no user-facing changes)PR Readiness Checklist
Branch & Commit
dev(notmain)dev(git fetch upstream && git rebase upstream/dev)git diff --cached --stat)Build & Test
npm run buildpassesnpm testpasses (all tests green)npm run lintpasses (type check clean)npm run lint:eslintpassesChangeset
npx changeset add(ifpackages/squad-sdk/src/orpackages/squad-cli/src/changed)CHANGELOG.mdentry (maintainers only — write-protected for external contributors)skip-changeloglabel applied (if no user-facing changes)No SDK or CLI source files changed; no changeset is required.
Docs
N/A - this corrects existing workflow output behavior.
Exports
N/A - no SDK modules changed.
Breaking Changes
None.
Waivers
N/A.