feat: validate executable shell scripts - #3022
Merged
Tom Meschter (tmeschter) merged 7 commits intoAug 18, 2026
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Tom Meschter (tmeschter)
requested review from
a team,
Rick Winter (RickWinter),
Xiaofu Huang (XiaofuHuang),
anchenyi,
Ankit Sinha (ankitbko),
Justin Gonzales (jugonzales),
Paul Yuknewicz (paulyuk),
rakal-dyh,
Sai Koumudi Kaluvakolanu (saikoumudi),
Christopher T Earley (tendau) and
vebudumu
as code owners
August 5, 2026 20:44
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses #2958 by ensuring tracked, shebang-bearing .sh scripts intended for direct invocation are executable in Git, and by adding a CI/local check to enforce that going forward.
Changes:
- Added a
git ls-files-based permission validator (npm run check:shell-scripts) and wired it into PR CI. - Updated contributor guidance to document the executable-bit workflow for shell scripts.
- Adjusted several skill/recipe scripts (including Foundry and validate flows) as part of making direct-execution scripts consistent.
Show a summary per file
| File | Description |
|---|---|
| scripts/src/check-shell-script-permissions.ts | New script that validates executable Git mode for tracked shebang .sh files. |
| scripts/package.json | Adds a runnable checkShellScriptPermissions script entry. |
| package.json | Adds root-level check:shell-scripts convenience command. |
| .github/workflows/pr.yml | Adds a PR CI job to enforce shell script executable modes. |
| .github/copilot-instructions.md | Documents executable-bit expectation and adds the check to the PR checklist table. |
| plugins/azure-skills/skills/microsoft-foundry/scripts/check-and-setup-dependencies.sh | Foundry helper script; part of the set of directly-invoked shell scripts. |
| plugins/azure-skills/skills/microsoft-foundry/models/deploy-model/scripts/generate_deployment_url.sh | Script to generate Foundry portal deployment URLs. |
| plugins/azure-skills/skills/microsoft-foundry/models/deploy-model/capacity/scripts/query_capacity.sh | Script to query model capacity for regions/SKUs. |
| plugins/azure-skills/skills/microsoft-foundry/models/deploy-model/capacity/scripts/discover_and_rank.sh | Script to discover/rank regions by capacity/quota/projects. |
| plugins/azure-skills/skills/microsoft-foundry/foundry-agent/toolbox/scripts/get-catalog-inputs.sh | Toolbox script to query MCP catalog inputs and auth signals. |
| plugins/azure-skills/skills/microsoft-foundry/foundry-agent/create/scripts/verify-environment.sh | Preflight environment verifier for hosted-agent creation. |
| plugins/azure-skills/skills/microsoft-foundry/foundry-agent/create/scripts/resolve-project-id.sh | Resolves Foundry project ARM IDs from project endpoints. |
| plugins/azure-skills/skills/microsoft-foundry/foundry-agent/create/scripts/check-copilot-app-entry.sh | Copilot app agent preflight for optional plugin installation. |
| plugins/azure-skills/skills/azure-validate/references/scripts/workflow.sh | Step-by-step helper for the azure-validate workflow. |
| plugins/azure-skills/skills/azure-validate/references/scripts/scan-aspire-functions-secrets.sh | Pre-provision scan for Aspire + Functions secret-storage configuration. |
| plugins/azure-skills/skills/azure-validate/references/recipes/azd/scripts/set-aspire-aca-env.sh | Recipe script to populate missing env vars after azd provision. |
| plugins/azure-skills/skills/azure-quotas/scripts/check-quota.sh | Quota inspection helper meant to be invoked directly. |
| plugins/azure-skills/skills/azure-prepare/references/services/sql-database/scripts/grant-sql-access.sh | Recipe hook script to grant SQL access via managed identity. |
| plugins/azure-skills/skills/azure-diagnostics/scripts/aks-baseline.sh | Read-only AKS diagnostic sweep script. |
| plugins/azure-skills/skills/azure-deploy/references/recipes/azd/scripts/grant-and-migrate.sh | Recipe script to grant SQL access and apply EF migrations. |
| plugins/azure-skills/skills/azure-deploy/references/recipes/azd/scripts/apply-migrations.sh | Recipe script to apply EF migrations via managed identity. |
| plugins/azure-skills/skills/azure-app-onboard/scaffold/scripts/scaffold-conformance.sh | Conformance gate script for scaffolded IaC validation. |
Review details
- Files reviewed: 5/22 changed files
- Comments generated: 2
- Review effort level: Lite
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
JasonYeMSFT (JasonYeMSFT)
previously approved these changes
Aug 5, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
msalaman
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
npm run check:shell-scriptscommand that verifies tracked shebang-bearing.shfiles have Git mode100755.Per-skill executable-bit changes are provided in separate PRs.
Related to #2958