Skip to content

Add Azure Pipelines CodeQL scanning - #1838

Merged
David Pine (IEvangelist) merged 2 commits into
mainfrom
ievangelist-codeql-pipeline
Oct 7, 2026
Merged

David Pine (IEvangelist) merged 2 commits into
mainfrom
ievangelist-codeql-pipeline

Conversation

@IEvangelist

@IEvangelist David Pine (IEvangelist) commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Summary

Add eng/pipelines/azure-pipelines-codeql.yml for aspire.dev's actual source tree: its Astro site's JavaScript/TypeScript, PowerShell scripts, and C# StaticHost, AppHost, and API generators.

The native CodeQL 3000 scheduling/task pattern follows microsoft/aspire's example; the setup and build commands are specific to this repository.

  • Install Node.js 24, derive the exact pnpm version from src/frontend/package.json, and install frontend dependencies from src/frontend with pnpm install --frozen-lockfile --prefer-offline, matching the site's CI.
  • Explicitly scan javascript,powershell,csharp from the repository root. javascript includes TypeScript; the root scope also includes configuration, scripts, tooling, and tests outside the frontend directory.
  • Compile Aspire.Dev.slnx for the site's C# host, AppHost, and generators, using the same command as its existing GitHub CodeQL workflow. This is C# extraction, not the site's production build: frontend.esproj explicitly disables the frontend build script. JS/TS source analysis does not require a production Astro build.
  • Use a clean checkout without persisted credentials, one explicit CodeQL Initialize/Finalize pair, and always() finalization. Automatic task injection is disabled to avoid duplicates.
  • Run weekly on Monday at 12:00 UTC on main, with manual runs supported, cadence 0, and CI/PR triggers disabled.

The existing GitHub CodeQL workflow is unchanged. No internal deployment configuration or commits are included.

After merge, register an Azure DevOps pipeline against the public microsoft/aspire.dev repository, using this YAML path and main as its default branch. This PR adds the definition; it does not create or activate the Azure pipeline.

Third-party links and affiliations

None.

Validation

  • git diff --cached --check — passed.
  • python - — passed source and Azure-expanded YAML assertions: selected languages match the tracked source inventory; pnpm is derived from the frontend manifest; dependency installation uses the frontend directory and frozen lockfile; checkout is clean; source root is repository-wide; and Initialize/build/Finalize ordering is correct. Azure preview expanded the job without queuing a build.
  • [System.Management.Automation.Language.Parser]::ParseInput($script, [ref]$tokens, [ref]$errors) — passed for the pnpm bootstrap script.
  • npm view pnpm@11.9.0 version --json — passed, confirming availability of the manifest-pinned version.
  • dotnet build Aspire.Dev.slnx --configuration Release -p:AspireUseCliBundle=false --nologo --verbosity quiet — passed with two expected ASPIRE010 warnings about the deliberately disabled CLI bundle.

No local frontend dependency installation or production build was run. An actual CodeQL scan and database upload require registering and running the Azure pipeline after merge.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d767f83b-1315-440e-8bf7-124ba82fd1ec
Copilot AI balanced review requested due to automatic review settings October 7, 2026 18:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The pipeline configuration matches the stated schedule, build scope, and explicit CodeQL task lifecycle.

0 open findings

What changed in this PR

Adds a scheduled Azure Pipelines CodeQL scan while retaining the existing GitHub workflow.

Changes:

  • Adds weekly and manually triggered CodeQL scanning.
  • Configures .NET 10, Node.js 24, and explicit CodeQL initialization/finalization.
  • Builds the C# solution for compiler extraction without the Aspire CLI bundle.
File Description
eng/​pipelines/​azure-pipelines-codeql.yml Defines the Azure CodeQL pipeline.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d767f83b-1315-440e-8bf7-124ba82fd1ec
@IEvangelist
David Pine (IEvangelist) merged commit 747709b into main Oct 7, 2026
10 checks passed
@IEvangelist
David Pine (IEvangelist) deleted the ievangelist-codeql-pipeline branch October 7, 2026 19:15
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.

3 participants