diff --git a/.github/workflows/issue-investigation.lock.yml b/.github/workflows/issue-investigation.lock.yml index 796170e4d..306fe125d 100644 --- a/.github/workflows/issue-investigation.lock.yml +++ b/.github/workflows/issue-investigation.lock.yml @@ -1,5 +1,5 @@ -# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"13f5d392ea4be6596bbf9576789c07d3d415abf886aafb505d1a54a574f239c2","body_hash":"388f3b57a277eb0d87e6a0be9f0fa4c3bc6424089229454cb028ee00e61f16e1","compiler_version":"v0.81.6","strict":true,"agent_id":"copilot","engine_versions":{"copilot":"1.0.65"}} -# gh-aw-manifest: {"version":1,"secrets":["GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"27d5ce7f107fe9357f9df03efb73ab90386fccae","version":"v5.0.5"},{"repo":"actions/cache/save","sha":"27d5ce7f107fe9357f9df03efb73ab90386fccae","version":"v5.0.5"},{"repo":"actions/checkout","sha":"9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0","version":"v7.0.0"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"ba6380cc6e5be5d21677bebe04d52fb48e3abec7","version":"v0.81.6"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.27.11","digest":"sha256:979723c628182da7729333f2208bb249fd25ddee579645cf9a3892d681a929c7","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.27.11@sha256:979723c628182da7729333f2208bb249fd25ddee579645cf9a3892d681a929c7"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.11","digest":"sha256:807e4831999b44513b0a66e5859d478dc4da7ae74ab1918cec967d513f95bf9d","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.11@sha256:807e4831999b44513b0a66e5859d478dc4da7ae74ab1918cec967d513f95bf9d"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.27.11","digest":"sha256:ff27ea0525ad953a6adee28a5fbe9d2e22be47dbec755c15767af4ea3f91df7d","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.27.11@sha256:ff27ea0525ad953a6adee28a5fbe9d2e22be47dbec755c15767af4ea3f91df7d"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.30","digest":"sha256:35625d1a2269b1238606078c879f59a91cffc4ac33eb54bf39c6418822c1a8be","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.30@sha256:35625d1a2269b1238606078c879f59a91cffc4ac33eb54bf39c6418822c1a8be"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b","pinned_image":"ghcr.io/github/gh-aw-node@sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b"},{"image":"ghcr.io/github/github-mcp-server:v1.4.0","digest":"sha256:2afb26356481d1a350e14544a6e160f7f7ec1561a1ea309b823665abf0309036","pinned_image":"ghcr.io/github/github-mcp-server:v1.4.0@sha256:2afb26356481d1a350e14544a6e160f7f7ec1561a1ea309b823665abf0309036"}]} +# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"a7ad23497f4850c7033edce67669ff112bd79897fd277898ac2e2792f1318069","body_hash":"2cdfb2434a64cdd6bcf0503bade46785dc8900e635afb4428500f6e9159d0a84","compiler_version":"v0.81.6","strict":true,"agent_id":"copilot","engine_versions":{"copilot":"1.0.65"}} +# gh-aw-manifest: {"version":1,"secrets":["GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"27d5ce7f107fe9357f9df03efb73ab90386fccae","version":"v5.0.5"},{"repo":"actions/cache/save","sha":"27d5ce7f107fe9357f9df03efb73ab90386fccae","version":"v5.0.5"},{"repo":"actions/checkout","sha":"9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0","version":"v7.0.0"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"ba6380cc6e5be5d21677bebe04d52fb48e3abec7","version":"v0.81.6"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.27.11","digest":"sha256:979723c628182da7729333f2208bb249fd25ddee579645cf9a3892d681a929c7","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.27.11@sha256:979723c628182da7729333f2208bb249fd25ddee579645cf9a3892d681a929c7"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.11","digest":"sha256:807e4831999b44513b0a66e5859d478dc4da7ae74ab1918cec967d513f95bf9d","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.11@sha256:807e4831999b44513b0a66e5859d478dc4da7ae74ab1918cec967d513f95bf9d"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.27.11","digest":"sha256:ff27ea0525ad953a6adee28a5fbe9d2e22be47dbec755c15767af4ea3f91df7d","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.27.11@sha256:ff27ea0525ad953a6adee28a5fbe9d2e22be47dbec755c15767af4ea3f91df7d"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.30","digest":"sha256:35625d1a2269b1238606078c879f59a91cffc4ac33eb54bf39c6418822c1a8be","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.30@sha256:35625d1a2269b1238606078c879f59a91cffc4ac33eb54bf39c6418822c1a8be"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b","pinned_image":"ghcr.io/github/gh-aw-node@sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b"},{"image":"ghcr.io/github/github-mcp-server:v1.4.0","digest":"sha256:2afb26356481d1a350e14544a6e160f7f7ec1561a1ea309b823665abf0309036","pinned_image":"ghcr.io/github/github-mcp-server:v1.4.0@sha256:2afb26356481d1a350e14544a6e160f7f7ec1561a1ea309b823665abf0309036"}]} # This file was automatically generated by gh-aw (v0.81.6). DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md # # ___ _ _ @@ -26,7 +26,6 @@ # Investigate a maintainer-selected issue and optionally propose one narrow draft documentation or test PR # # Secrets used: -# - GH_AW_CI_TRIGGER_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN # - GITHUB_TOKEN @@ -546,13 +545,15 @@ jobs: - name: Download container images run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.27.11@sha256:979723c628182da7729333f2208bb249fd25ddee579645cf9a3892d681a929c7 ghcr.io/github/gh-aw-firewall/api-proxy:0.27.11@sha256:807e4831999b44513b0a66e5859d478dc4da7ae74ab1918cec967d513f95bf9d ghcr.io/github/gh-aw-firewall/squid:0.27.11@sha256:ff27ea0525ad953a6adee28a5fbe9d2e22be47dbec755c15767af4ea3f91df7d ghcr.io/github/gh-aw-mcpg:v0.3.30@sha256:35625d1a2269b1238606078c879f59a91cffc4ac33eb54bf39c6418822c1a8be ghcr.io/github/gh-aw-node@sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b ghcr.io/github/github-mcp-server:v1.4.0@sha256:2afb26356481d1a350e14544a6e160f7f7ec1561a1ea309b823665abf0309036 - name: Generate Safe Outputs Config + env: + GH_AW_SECRET_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs - cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_cef1b6c7bf52724c_EOF' - {"add_comment":{"max":1,"target":"triggering"},"create_pull_request":{"allowed_branches":["investigate/**"],"allowed_files":["docs/**","tests/**","sdk/node/tests/**","sdk/dotnet/Microsoft.Mxc.Sdk.Tests/**"],"auto_close_issue":false,"draft":true,"fallback_as_issue":false,"max":1,"max_patch_files":100,"max_patch_size":4096,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"blocked","title_prefix":"[investigate] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"report_incomplete":{}} - GH_AW_SAFE_OUTPUTS_CONFIG_cef1b6c7bf52724c_EOF + cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_f324cc4d9b3d8064_EOF' + {"add_comment":{"max":1,"target":"triggering"},"create_pull_request":{"allowed_branches":["investigate/**"],"allowed_files":["docs/*.md","docs/**/*.md","tests/*.md","tests/**/*.md","tests/policy/*.json","tests/policy/**/*.json","tests/fixtures/*.json","tests/fixtures/**/*.json","sdk/node/tests/*.ts","sdk/node/tests/**/*.ts","sdk/dotnet/Microsoft.Mxc.Sdk.Tests/*.cs","sdk/dotnet/Microsoft.Mxc.Sdk.Tests/**/*.cs"],"auto_close_issue":false,"draft":true,"fallback_as_issue":false,"github-token":"${GH_AW_SECRET_GITHUB_TOKEN}","max":1,"max_patch_files":100,"max_patch_size":4096,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"blocked","title_prefix":"[investigate] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"report_incomplete":{}} + GH_AW_SAFE_OUTPUTS_CONFIG_f324cc4d9b3d8064_EOF - name: Generate Safe Outputs Tools env: GH_AW_TOOLS_META_JSON: | @@ -1683,13 +1684,13 @@ jobs: with: persist-credentials: true fetch-depth: 1 - token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} - name: Configure Git credentials if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') env: GITHUB_REPOSITORY: ${{ github.repository }} GITHUB_SERVER_URL: ${{ github.server_url }} - GIT_TOKEN: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: bash "${RUNNER_TEMP}/gh-aw/actions/configure_git_credentials.sh" - name: Configure GH_HOST for enterprise compatibility id: ghes-host-config @@ -1709,8 +1710,9 @@ jobs: GH_AW_ALLOWED_DOMAINS: "api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} - GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"max\":1,\"target\":\"triggering\"},\"create_pull_request\":{\"allowed_branches\":[\"investigate/**\"],\"allowed_files\":[\"docs/**\",\"tests/**\",\"sdk/node/tests/**\",\"sdk/dotnet/Microsoft.Mxc.Sdk.Tests/**\"],\"auto_close_issue\":false,\"draft\":true,\"fallback_as_issue\":false,\"max\":1,\"max_patch_files\":100,\"max_patch_size\":4096,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"blocked\",\"title_prefix\":\"[investigate] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"true\"},\"report_incomplete\":{}}" - GH_AW_CI_TRIGGER_TOKEN: ${{ secrets.GH_AW_CI_TRIGGER_TOKEN }} + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"max\":1,\"target\":\"triggering\"},\"create_pull_request\":{\"allowed_branches\":[\"investigate/**\"],\"allowed_files\":[\"docs/*.md\",\"docs/**/*.md\",\"tests/*.md\",\"tests/**/*.md\",\"tests/policy/*.json\",\"tests/policy/**/*.json\",\"tests/fixtures/*.json\",\"tests/fixtures/**/*.json\",\"sdk/node/tests/*.ts\",\"sdk/node/tests/**/*.ts\",\"sdk/dotnet/Microsoft.Mxc.Sdk.Tests/*.cs\",\"sdk/dotnet/Microsoft.Mxc.Sdk.Tests/**/*.cs\"],\"auto_close_issue\":false,\"draft\":true,\"fallback_as_issue\":false,\"github-token\":\"${{ secrets.GITHUB_TOKEN }}\",\"max\":1,\"max_patch_files\":100,\"max_patch_size\":4096,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"blocked\",\"title_prefix\":\"[investigate] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"true\"},\"report_incomplete\":{}}" + GH_AW_CI_TRIGGER_TOKEN: ${{ '' }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/issue-investigation.md b/.github/workflows/issue-investigation.md index c01244b6b..f4b9958fd 100644 --- a/.github/workflows/issue-investigation.md +++ b/.github/workflows/issue-investigation.md @@ -34,11 +34,23 @@ safe-outputs: auto-close-issue: false fallback-as-issue: false allowed-branches: ["investigate/**"] + # Pushes with GITHUB_TOKEN do not start CI; a maintainer reviews the draft before running it. + github-token: ${{ secrets.GITHUB_TOKEN }} + github-token-for-extra-empty-commit: ${{ '' }} + # Source and data files only: no CI scripts, e2e configs, or build/package files. allowed-files: - - "docs/**" - - "tests/**" - - "sdk/node/tests/**" - - "sdk/dotnet/Microsoft.Mxc.Sdk.Tests/**" + - "docs/*.md" + - "docs/**/*.md" + - "tests/*.md" + - "tests/**/*.md" + - "tests/policy/*.json" + - "tests/policy/**/*.json" + - "tests/fixtures/*.json" + - "tests/fixtures/**/*.json" + - "sdk/node/tests/*.ts" + - "sdk/node/tests/**/*.ts" + - "sdk/dotnet/Microsoft.Mxc.Sdk.Tests/*.cs" + - "sdk/dotnet/Microsoft.Mxc.Sdk.Tests/**/*.cs" protected-files: blocked timeout-minutes: 20 max-ai-credits: 1000 @@ -69,8 +81,8 @@ assess, classify, request diagnostics, create a PR, or repeat sensitive details. For a non-security issue touching credentials, permissions, host isolation, containment behavior, schemas, generated SDK artifacts, production code, CI, -dependencies, build scripts, versioning, releases, or publishing, investigate -and report normally but do not create a pull request. +test scripts, dependencies, build scripts, versioning, releases, or publishing, +investigate and report normally but do not create a pull request. ## Investigation @@ -104,7 +116,12 @@ and report normally but do not create a pull request. ## Draft PR rule Create one draft pull request only when the fix is documentation- or test-only, -small, unambiguous, and every changed path matches the safe-output allowlist. +small, unambiguous, and every changed path matches the safe-output allowlist: +Markdown under `docs/` or `tests/`, JSON under `tests/policy/` or +`tests/fixtures/`, Node SDK test `.ts` files, or .NET SDK test `.cs` files. +Files named `README.md`, `CHANGELOG.md`, `CONTRIBUTING.md`, `SECURITY.md`, +`CODE_OF_CONDUCT.md`, `DESIGN.md`, `AGENTS.md`, `CLAUDE.md`, or `GEMINI.md` are +protected in every directory and cannot be changed. Run relevant formatting, linting, and targeted tests first, and record the exact commands and outcomes in the PR body. Otherwise do not create a PR: state the reason in the investigation comment. If a tool or inspection fails, name the diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1467580c5..5f0d515e1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -58,8 +58,12 @@ that outcome. For a small, unambiguous documentation or test-only change, it may also create one draft PR. It never merges, releases, assigns owners, changes labels, or updates an existing PR. It does not create PRs for production code, schemas, -generated SDK files, containment behavior, CI, dependencies, versioning, or -security-sensitive work. +generated SDK files, containment behavior, CI, test scripts or end-to-end +configs, build or project files, dependencies, versioning, security-sensitive +work, or files with protected names such as `README.md` in any folder. CI does +not start automatically on its draft PR. +After reviewing the changes, close and reopen the PR or push a commit to it to +run CI. Do not use `/investigate` for a security report. Follow [SECURITY.md](./SECURITY.md) instead. diff --git a/scripts/tests/w365-fixtures.test.js b/scripts/tests/w365-fixtures.test.js index ca861f86d..fa037e8ad 100644 --- a/scripts/tests/w365-fixtures.test.js +++ b/scripts/tests/w365-fixtures.test.js @@ -302,14 +302,10 @@ test("the validation runbook dispatches the canonical workflow with a supported assert.ok(section); const example = section[1].match(/```powershell\r?\n([\s\S]*?)```/); assert.ok(example, "dispatch the existing workflow rather than copying its job graph"); - const result = spawnSync("pwsh", ["-NoLogo", "-NoProfile", "-Command", ` -$ErrorActionPreference = 'Stop' -function gh { ConvertTo-Json -Compress -InputObject @($args) } -${example[1]} -`], { encoding: "utf8", timeout: 30_000 }); - assert.ifError(result.error); - assert.equal(result.status, 0, result.stdout + result.stderr); - const args = JSON.parse(result.stdout); + const command = example[1].replace(/`\r?\n/g, " ").trim(); + assert.ok(!/[\r\n;|&$`(){}<>]/.test(command), `expected one literal command: ${command}`); + const [program, ...args] = command.split(/\s+/); + assert.equal(program, "gh"); assert.deepEqual(args.slice(0, 3), ["workflow", "run", "Validation.Tests.Scheduled.yml"]); const value = flag => { const index = args.indexOf(flag);