coverity

TravisCI / Coverity: Warning - No files were emitted

半城伤御伤魂 提交于 2019-12-03 17:12:46
I have a medium size github repository for which I configured Travis-CI/Coverity tools. About a month ago my setup had worked just fine: Travis compiled and built my application, and then performed the Coverity scan and I could see the results on my Coverity page. However, lately, the Coverity analysis stopped working. I looked through the Travis log files and compared to the old logs when the builds were successful and that's what I found: At the end of the log, the failed version contains the next warning: [WARNING] No files were emitted. This may be due to a problem with your configuration

Run Coverity scan for every Travis pull request build

早过忘川 提交于 2019-12-01 18:15:39
I want to automate student assignment grading system as much as possible. Ideally these steps will be taken when submitting the assignment. Student forks my Github repository and modifies files Student pushes the local code to his repository and creates pull request Travis CI detects pull request and run Pull Request build If code builds successfully, Coverity runs static code analysis for the pull request Student gets build status from the Github pull request page I've successfully set Travis builds for every pull request in my repo. I have successfully run Coverity scan via Travis for every

Tainted string in C

ぃ、小莉子 提交于 2019-12-01 17:57:45
I'm running Coverity tool in my file operation function and getting the following error. As you can see below, I'm using an snprintf() before passing this variable in question to the line number shown in the error message. I guess that some sanitization of the string has to be done as a part of that snprintf(). But still the warning is shown. Error:TAINTED_STRING (TAINTED string "fn" was passed to a tainted string sink content.) [coverity] char fn[100]; int id = 0; char* id_str = getenv("ID"); if (id_str) { id = atoi(id_str); } memset(fn, '\0', sizeof(fn)); snprintf(fn, 100, LOG_FILE, id); if