Add CodeQL code scanning workflow (Python, JavaScript/TypeScript, C#, Go)#15
Add CodeQL code scanning workflow (Python, JavaScript/TypeScript, C#, Go)#15seesharprun merged 10 commits intomainfrom
Conversation
Co-authored-by: seesharprun <5067401+seesharprun@users.noreply.github.com>
seesharprun
left a comment
There was a problem hiding this comment.
I only want to perform CodeQL analysis, I don't want to build since that's also handled in the validation workflow.
Co-authored-by: seesharprun <5067401+seesharprun@users.noreply.github.com>
Done in ab8f6a2. Removed the |
seesharprun
left a comment
There was a problem hiding this comment.
Update the name of each CodeQL workflow to be similar in structure to the name of the Validation Workflows.
Also, Add a CodeQL workflow for TypeScript.
…ypeScript job Co-authored-by: seesharprun <5067401+seesharprun@users.noreply.github.com>
Done in 3cf2239. Updated all job names to match the validation workflow pattern ( |
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
There was a problem hiding this comment.
Pull request overview
Adds a new GitHub Actions workflow to run CodeQL code scanning across the monorepo’s primary languages, intended to provide PR gating and scheduled security-and-quality analysis.
Changes:
- Introduces
.github/workflows/codeql.ymlwith separate CodeQL jobs for Python, JavaScript/TypeScript, C#, and Go. - Configures PR + push-to-main + scheduled + manual (
workflow_dispatch) triggers. - Uses
security-and-qualityquery suite and per-language build modes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Sidney Andrews <sidandrews@microsoft.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Sidney Andrews <sidandrews@microsoft.com>
|
@copilot, please recommend to me in a comment if it's better to have a single CodeQL job or a separate job per language |
…tatus checks Co-authored-by: seesharprun <5067401+seesharprun@users.noreply.github.com>
Recommendation: separate jobs per language — this is the better fit for this monorepo, and here's the reasoning: Separate jobs (current approach) ✅
Single matrix job
Given that the PR description already calls out adding these as individual required status checks and that the validation workflow uses this same per-job pattern, I'd keep the current separate-jobs design. |
Adds CodeQL analysis to gate PRs and run on schedule across the languages present in the monorepo, using the
Analyze Samplesworkflow (named to mirror the existingValidate Samplesworkflow).Workflow design
analyze-python,analyze-javascript,analyze-dotnet,analyze-go) so each produces an independent status check that can be individually required in branch protection rulesAnalyze Python Samples,Analyze JavaScript/TypeScript Samples,Analyze .NET Samples,Analyze Go Samplesif: github.repository == 'AzureCosmosDB/samples'guard on thePerform CodeQL Analysisstep (SARIF upload) ensures fork PRs complete the jobs successfully — satisfying required status checks — while the upload is skipped wheresecurity-events: writeis unavailableworkflow_dispatchadded for on-demand scansqueries: security-and-qualityon all jobs — reference examples only use default security queries, missing code quality coverageconcurrencywithcancel-in-progress: trueprevents redundant queued runs on rapid pushesPer-language build modes
nonenonenoneautobuildRepository setup required
main): addAnalyze Samples / Analyze Python Samples,Analyze Samples / Analyze JavaScript/TypeScript Samples,Analyze Samples / Analyze .NET Samples,Analyze Samples / Analyze Go Samplesas required status checks after the first workflow runExtending for future languages
Add a new job when
java/directories land —java-kotlinwithbuild-mode: none.💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.