github / github/codeql

Better explain how to exclude paths for compiled languages

未關閉
#8,689 9 則留言 10 個 reaction 已指派 0 人 在 GitHub 檢視
question
主要語言
CodeQL
星號
10.1k
分支
2.1k
平均合併
2 天 15 小時
30 天內合併 PR
141

描述

the current explanation in github's FAQ says:

> For compiled languages, if you want to limit code scanning to specific directories in your project, you must specify appropriate build steps in the workflow. The commands you need to use to exclude a directory from the build will depend on your build system. For more information, see "[Configuring the CodeQL workflow for compiled languages](https://docs.github.com/en/code-security/secure-coding/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language)."

however, there's no example or explanation how to actually do it.
inside codeql's runner there is an exclude configuration for java code:
```
$ ./codeql resolve extractor --language=java --format=betterjson
{
"extractor_root" : "/Users/me/codeql/codeql/java",
"extractor_options" : {
"exclude" : {
"title" : "A glob excluding files from analysis.",
"description" : "A glob indicating what files to exclude from the analysis.\n",
"type" : "string"
}
}
}
```
however, i couldn't find a way to send this configuration to codeql workflow.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。