-
Why is the BOM missing expected components?
Analyze each section of the tool separately. There may be errors in the log that could lead to the cause of the missing components. For example, if the BOM is missing binary information, check the results of the binary scan in the
blackduck_c_cpp.logfile.If the scans look succesful, make sure the Coverity build was run correctly. Run all clean commands and configure commands before running the Black Duck C/CPP tool with build command.
If everything above was succesful, verify that the component is published and findable in the KnowledgeBase.
Also, if you are using custom compilers, you have to configure it as follows:
--cov_configure_args: {"gcc.cx.a.b-ac.mips64-linux":"gcc"}wheregcc.cx.a.b-ac.mips64-linuxis compiler and "gcc" is compiler type. you can also setmatchConfidenceThresholdto 0 inadditional_sig_scan_args. -
Where is the blackduck-c-cpp.log found on the system?
All output files will be in
user_home/.blackduck/blackduck-c-cpp/output/project_nameby default if--output_diris not given. Else, All output files will be inoutput_dir. -
How do I run a snippet scan?
Pass the following command in your yaml file:
additional_sig_scan_args:'--snippet-matching'.To run it from command line, example:
blackduck-c-cpp -bc "make" -d "/apps/cpuminer-2.5.1/" -s False -v True -proj "cpuminer-cmd" -vers 1.0 -bd "https:<bd_url>" -a "<api_token" -as ="--snippet-matching --copyright-search" -i False -
How do I run Black Duck C/CPP?
Run with config file where are arguments are set or through command line. Example:
blackduck-c-cpp -c /apps/../../cpuminer-config.yaml.To run it from command line:
blackduck-c-cpp -bc "make" -d "/apps/cpuminer-2.5.1/" -s False -proj "cpuminer-cmd" -vers 1.0 -bd "https:<bd_url>" -a "<api_token" -i False -
Do I need to be licensed for BDBA? What happens if I don't have a BDBA license?
If you don't have a BDBA license, running the command will output the following error:
BDBA is not licensed for use with the current Black Duck instance -- will not be usedThe tool will then continue to next matching type.
-
Why is Black Duck C/CPP throwing import errors?
Check if you installed Black Duck C/CPP from testpypi. If so, please uninstall and install from pypi for dependencies to be automatically installed. If you still see import errors, There may be some issues with multiple installations. Try to create a virtual environment with Python versions 3.7 through 3.12. Uninstall Black Duck C/CPP outside virtual environment and install Black Duck C/CPP inside virtual env. Otherwise, it may be looking at wrong installation path (can be seen in stacktrace).
In linux environment:
python3 -m venv venv source venv/bin/activate pip3 install blackduck-c-cpp -
Where do I download the Coverity mini package?
If
coverity_rootis not specified, Black Duck C/CPP automatically downloads latest mini-coverity package from GCP for authorized Black Duck SCA users for Black Duck SCA versions >= 2021.10. For downloading Coverity package using GCP, you need to open connection toward*.googleapis.com:443. If you don't have Coverity package and your Black Duck SCA version is < 2021.10, please contact Black Duck Support to get latest version of Coverity package. -
What do I do if BDBA upload throws a Remote end closed connection without response error?
raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response ....... requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))Check your requests-toolbelt library version
-pip show requests-toolbelt. If you have older version than 0.9.1, install 0.9.1 version and try again. -
What do I do if the Black Duck C/CPP process is stuck during a phase on Windows?
Try giving a keyboard input by pressing enter/any other key if you still have the command prompt open where stuck. We noticed in Windows that programs sometimes get stuck when we click into the console and enter the "selection" mode to highlight/copy text from it.
-
What do I do if I get a KeyError error message?
headers.pop('Accept') KeyError: 'Accept'Run
pip show blackduck. If you have version < 1.0.4, install 1.0.4 version and try again. -
What do I do if I get a memory error on Windows?
Make sure you have the correct installation of Python (64 bit vs 32 bit) for your operating system.
-
Can I have spaces in the paths to Coverity Analysis?
/apps/.../cov\ 2021\ <vers>/bin/cov-buildCoverity needs to be located in a directory that doesn't have a space in it. -
Signature scan is performed on ZIP. Adding other signature scan arguments are not working. What to do?
Set
expand_sig_files: True. -
How to uninstall Black Duck C/CPP?
Run the following command:
pip uninstall blackduck-c-cpp -
I already have a Coverity build for my project. Can I use the tool?
Yes, you can set
--cov_output_dirto the path where your Coverity output files reside. (build-log.txt and emit directory), then setskip_build: True. -
How to see more logging information for troubleshooting?
You can see the
blackduck-c-cpp.logfile inoutput_dir(OR) setverbose: Trueto see if it reveals any issues instdout. -
What do I do if I have custom compilers?
If you are using custom compilers, you have to configure it as follows:
cov_configure_args: {"gcc.cx.a.b-ac.mips64-linux":"gcc"}where "gcc.cx.a.b-ac.mips64-linux" is compiler and "gcc" is compiler type. -
What is debug mode?
Setting
debug: Truesends all the files we found to all matching types. By default, it will only send files not detected by package manager to BDBA and Signature matching. -
How to run a specific matching type?
You can select modes:
sig,bdba,pkg_mgrin the configuration file to run specific ones. -
I already have run Black Duck C/CPP once. I ran in offline mode. I want to run in online mode. Do I need to do the full build again?
No, you can set
use_offline_files: Trueandskip_build: Trueto use already stored files and just upload it to Black Duck SCA. -
I already have run Black Duck C/CPP once. I got a few errors after build is finished which are fixed now. I want to run again. Do I need to do the full build again?
No, you can set
skip_build: Trueto skip build process. -
How do I exclude a full directory with the signature scan method?
Create a
excludes.txtfile and add the directories to be excluded. Then, in your configuration yaml file, add the following command:additional_sig_scan_args: '--snippet-matching --exclude-from <location of your excludes.txt file>' -
Is
--individualFileMatching=BINARYneeded to use "Binary" value for individualFileMatching?The individualFileMatching parameter is already enabled by default in blackduck-c-cpp tool and cannot be disabled.
-
The BDIO splitter fails to split one part when uploading to hub. How to fix it?
The BDIO splitter operates on the node numbers, not size, so when a dataset contains large archives, it performs suboptimally. The following parameter modify this behavior:
-
bdio_split_max_file_entriesThe
bdio_split_max_file_entriesparameter has a default value of100000. -
bdio_split_max_chunk_nodesthe
bdio_split_max_chunk_nodeshas a defaut value of3000.
If the default values don't work, try reducing
bdio_split_max_file_entriesto about 80000 and see if the file size drops closer to 5GB. -