github / github/codeql

Not able to use config file for database creation command

未關閉
#13,524 26 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
question
主要語言
CodeQL
星號
10.1k
分支
2.1k
平均合併
2 天 15 小時
30 天內合併 PR
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`

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

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

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