-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CodeQL: Setting paths in Github Advanced Security for Azure Devops #18372
Comments
Hi @woeterman94, I've asked people knowledgeable about the Azure Devops setup to take a look at your question. Note that their response might be somewhat delayed, because many people have holidays around this time of year. |
I would suggest a similar approach:
|
I thought the paths include filter only works for typescript code and not C#? codeqlpathstoinclude setting applies only when you run the CodeQL tasks on an interpreted language (Python, Ruby, and JavaScript/TypeScript). How can I include only the C# code for the project I'm building? |
Ah great catch, need a docs update to support the scanning without a build feature: MicrosoftDocs/azure-devops-yaml-schema#360
The docs for setting the build type
|
I'm using Github Advanced Security in Azure devops in a monorepo. With the given folder structure:
By default the codeql task will scan the ENTIRE code base. Which is not what I want.
How can I configure Github advanced security to only scan one project? For example the front-end and backend folder for the green-app.
I tried setting the sources folder to the back-end folder. But then I'm not able to "reach" the front-end folder when I set the codeqlpathstoinclude parameter. When I try this:
(Following the docs: "The paths must be relative to the sourcesfolder where CodeQL is running, which defaults to the Build.SourcesDirectory pipeline environment variable. For example, to include the $(Build.SourcesDirectory)/app directory, set codeqlpathstoinclude: app rather than codeqlpathstoinclude: $(Build.SourcesDirectory)/app.")
I get:
Wildcards are also giving issues:
apps/*/green-app/**/*
What am I doing wrong here? Any other way i can accomplish this?
The text was updated successfully, but these errors were encountered: