github / github/codeql

Excluding filepaths from CodeQL CLI at analysis

オープン
#12,811 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る
question
主要言語
CodeQL
スター
10.1k
フォーク
2.1k
平均マージ
2日 15時間
マージ済み PR(30日)
141

説明

**Excluding filepaths from CodeQL CLI at analysis**

Hi,

I want to know if there is a way to exclude certain files and directories from CodeQL analysis (_**after the database has been built**_). Our last resort would be filtering results out of the SARIF **after** analysis, but we want to know if there is a way to do it **at** analysis time.

Someone on my team noticed a query that appears to have some file exclusion happening:

https://github.com/github/codeql/blob/main/javascript/ql/experimental/adaptivethreatmodeling/modelbuilding/extraction/Exclusions.qll

Although I don't know if this would really be relevant to what we're trying to do. We are running queries from query packs specified in the CLI, something like this:

`codeql database analyze ${DATABASE_NAME} ${QUERYPACKS}`

Is there any way to apply a file exclusion query (similar to the JavaScript one linked above) on top of the query pack, or is this infeasible?

Thanks!

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。