Skip to content

Harden validate workflow checkout to resolve CodeQL cache-poisoning alert - #15

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

Nitya Narasimhan (nitya) merged 2 commits into
mainfrom
copilot/fix-code-scanning-alerts-again

Conversation

Copilot AI commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR addresses code scanning alert #2 by removing an untrusted workflow_dispatch ref input from the validate workflow. Checkout now uses a trusted GitHub context ref, eliminating the poisonable-step path without broad workflow changes.

  • Scope
    • .github/workflows/validate.yml only.
  • Change
    • Deleted workflow_dispatch.inputs.ref.
    • Switched checkout ref to github.ref.
  • Before/after
# before
with:
  ref: ${{ inputs.ref || '' }}

# after
with:
  ref: ${{ github.ref }}

Type of change

  • New capsule (models/<publisher>/<model>/<YYYY-MM-DD>/)
  • New publisher (models/<publisher>/)
  • New capability primer (docs/primers/<slug>.md)
  • New glossary term (docs/GLOSSARY.md)
  • CHANGELOG-only entry (announcement without capsule yet)
  • Infrastructure / scripts / workflows
  • Docs / README tidy-up

Capsule checklist (fill in for new capsules)

  • Folder is models/<publisher>/<model>/<YYYY-MM-DD>/
  • python scripts/validate.py passes
  • references array in frontmatter has at least one model card
    and one docs link, all pointing at learn.microsoft.com when a
    canonical Learn page exists
  • 1–3 concepts per notebook; extra concepts → extra notebooks
  • Notebook sections numbered and alternate markdown ↔ code
  • Every notebook ends with Your Turn to Explore, Summary,
    and References cells
  • Notebook starts by verifying .env (points learner back to
    models/quickstart/ if unset)
  • CHANGELOG.md has a row with matching Date + Model, exactly four
    cells wide, with the Date cell linked to the announcement
  • Publisher README lists this model in its members table
  • README.md Recently added block (Model / Release date /
    Capabilities) reflects the top 3
  • No hype language ("revolutionary", "game-changing", "cutting-edge",
    "state-of-the-art" as a standalone claim, …)

Publisher / primer / glossary checklist

  • Frontmatter validates
  • Cross-links back to repo README and quickstart
  • Grounded on learn.microsoft.com where a Learn page exists;
    provider docs only when necessary
  • For a new capability primer: any existing capsule that already
    uses this tag now passes the crosslink check

Pedagogy self-review

  • Voice is action-focused ("You'll deploy…", "Run this to see…")
  • No marketing / brand adjectives (e.g. "powerful", "seamless",
    "world-class")
  • Every learner-facing link resolves and points to a canonical
    source
  • Uses "Microsoft Foundry" (never "Azure AI Foundry"); services
    like Azure OpenAI keep their real names

Reviewer notes

Code scanning alert #2 (actions/cache-poisoning/poisonable-step) was treated as a true positive and addressed by removing attacker-controlled ref selection in manual dispatch.

Co-authored-by: nitya <279083+nitya@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix code scanning alert #2 Harden validate workflow checkout to resolve CodeQL cache-poisoning alert Aug 20, 2026
@nitya
Nitya Narasimhan (nitya) marked this pull request as ready for review August 20, 2026 01:33
@nitya
Nitya Narasimhan (nitya) merged commit a7bf1a4 into main Aug 20, 2026
4 checks passed
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