GH-500 · Question #71
You are configuring code scanning with CodeQL. What is one impact of using a language matrix in your workflow?
The correct answer is B. CodeQL will only analyze the languages in the matrix. When you define a language matrix in your GitHub Actions workflow for CodeQL, you specify exactly which programming languages CodeQL should analyze. CodeQL then runs a separate analysis job for each language listed in that matrix - and critically, it will only analyze those…
Question
You are configuring code scanning with CodeQL. What is one impact of using a language matrix in your workflow?
Options
- ACodeQL is configured to run analysis sequentially.
- BCodeQL will only analyze the languages in the matrix.
- CCodeQL excludes alerts for those dependencies specified in the language matrix.
- DYou can use the parameter under the init action.
How the community answered
(24 responses)- A8% (2)
- B88% (21)
- C4% (1)
Explanation
When you define a language matrix in your GitHub Actions workflow for CodeQL, you specify exactly which programming languages CodeQL should analyze. CodeQL then runs a separate analysis job for each language listed in that matrix - and critically, it will only analyze those languages. If a language present in your repository is not included in the matrix, CodeQL will not scan it. This makes the matrix both a targeting mechanism and a scope limiter. Options A (sequential analysis) is incorrect because a matrix actually enables parallel jobs. Option C is wrong because the matrix has nothing to do with dependency alert filtering. Option D is a distractor - while 'languages' is a parameter under the 'init' action, specifying the matrix itself is what drives which languages get analyzed.
Topics
Community Discussion
No community discussion yet for this question.