github / github/codeql

Not able to use config file for database creation command

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

説明

** Our build process comprises of 4-5 commands so trying to use config file and use it in command but getting error as "Invalid property specified in the configuration file. Ignoring it and proceeding" **

as per [using-a-codeql-configuration-file](https://docs.github.com/en/code-security/codeql-cli/using-the-codeql-cli/specifying-command-options-in-a-codeql-configuration-file#using-a-codeql-configuration-file), does config file gets used internally by `codeql database create` without specifying `--codescanning-config` option ? Some internet sources talks about yaml-based config file as well and using it with `--codescanning-config` option, can you please clarify what's correct way to use config file?

I am trying this way :

`codeql database create --language=cpp --github-url=https://github.com/ --codescanning-config=../codeql-config.yml --source-root . db`

where codeql-config.yml file contents are like below :
```
name: My CodeQL Configuration
language: cpp
build:
- "./setup.sh "
- "bash -c "command""
- "./setup2.sh""
- "bash -c "command""
```

getting below error :
```
Invalid property specified in the configuration file. Ignoring it and proceeding.
A fatal error occurred: Query pack codeql/cpp-queries cannot be found. Check the spelling of the pack.

```

Specifying multiple commands works but that becomes not maintainable as commands are lengthy :
`codeql database create --command "cmd1" --command "cmd2" --command "cmd3" --command "cmd4" --language=cpp --github-url=https://github.com/ --source-root . db`

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

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

調査の方向性

リンクされている CodeQL 構成ファイルのドキュメントと報告された codeql-config.yml から始め、次にそのプロパティを `codeql database create` が受け付けるオプションと比較します。示されている構成を使って、コマンドと無効なプロパティに関する警告を再現します。サポートされている構成形式と、複数のビルドコマンドを指定する正しい方法が明確に文書化されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
yaml
領域
security
issue の種類
ドキュメント
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

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

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