Skip to content

Restrict verify workflow token permissions - #6

Merged
Nitya Narasimhan (nitya) merged 2 commits into
mainfrom
copilot/fix-code-scanning-alerts
Aug 21, 2026
Merged

Restrict verify workflow token permissions#6
Nitya Narasimhan (nitya) merged 2 commits into
mainfrom
copilot/fix-code-scanning-alerts

Conversation

Copilot AI commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

CodeQL flagged the verify workflow for relying on default GITHUB_TOKEN permissions. This change scopes the workflow token explicitly to read-only repository contents access.

  • Workflow permissions
    • Added workflow-level permissions to .github/workflows/verify-course.yml
    • Limits the token to the access required by checkout and test execution
permissions:
  contents: read

Co-authored-by: nitya <279083+nitya@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix code scanning alert(s) flagged in repository Restrict verify workflow token permissions Aug 21, 2026
@nitya
Nitya Narasimhan (nitya) merged commit 9a04930 into main Aug 21, 2026
4 checks passed
Ananya Ghosh Chowdhury (ananyagc5) added a commit to ananyagc5/code-club-agent-optimization-workshop that referenced this pull request Aug 24, 2026
## Summary

Fix the portal-first Lab 05 handoff so `scripts/link-portal-rg.sh` writes the Foundry project metadata expected by Bicep and the `azure.ai.agents` azd extension.

- Normalize Azure CLI's `account/project` response to the child project name before setting `AZURE_AI_PROJECT_NAME`.
- Persist `AZURE_AI_PROJECT_ID`, `AZURE_AI_FOUNDRY_PROJECT_ID`, `AZURE_AI_PROJECT_ENDPOINT`, and `FOUNDRY_PROJECT_ENDPOINT`.
- Prefer the project's location over resource-group metadata when setting `AZURE_LOCATION`.
- Add a mocked regression test for the qualified-name response and metadata aliases.
- Update Lab 05 instructions, the course spec, and the canonical plan with a pre-provision verification checkpoint.

Fixes microsoft-foundry#6

## Validation

- `pytest -q` -> 16 passed
- `bash -n scripts/link-portal-rg.sh` -> passed
- Patched linker run against `rg-contoso-travel` discovered `contoso-travel-foundry1/contoso-travel-project` and stored `AZURE_AI_PROJECT_NAME="contoso-travel-project"` with matching ID and endpoint aliases.
- `azd ai project show` resolved the current project endpoint immediately after linking.
- `azd provision --preview --no-prompt` succeeded and skipped the existing resource group, Foundry account/project, and container registry.
- Prior end-to-end validation completed `azd provision`, deployed `contoso-travel-concierge` version 1, reported status `active`, and returned the expected `CT-FL-014` response from remote invocation.
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