Repository navigation
Run CodeQL analysis (javascript) on a particular sub-directory in a repo #14320
Replies: 4 comments
|
You need to create a code scanning configuration file and specify a And then you also need to change the |
This comment was marked as low quality.
This comment was marked as low quality.
|
I think the missing piece is that the To restrict the actual CodeQL analysis to one microservice, add a CodeQL config file and use For example: # .github/codeql/codeql-microservice1.yml
name: "CodeQL config - microservice1"
paths:
- app1/services/microservice1 |
|
The key distinction is analysis scope vs. workflow scheduling: For a per-service scan, put the allowlist in a CodeQL config and pass it to # .github/codeql/microservice1.yml
paths:
- app1/services/microservice1/**- uses: github/codeql-action/init@v3
with:
languages: javascript
config-file: ./.github/codeql/microservice1.yml
- uses: github/codeql-action/analyze@v3
with:
category: /language:javascript/microservice1Use a distinct Docs: CodeQL paths, analysis categories, |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I have a repo with many microservices each will have separate CI pipeline in the same repo. I need to scan each microservices separately, which are in separate directory.
I tried following code
But this is scanning the entire repo and services not only limited to microservice1
All reactions