fixed #12517 - added initial safety guide [skip ci] - #7995
Conversation
|
31eec5f to
b8c2036
Compare
|
As a side note - I am considering making the tree read-only in the CI before invoking the selfchecks. Clearing There's possibly a few more tickets which can come out of this guide. |
ad65789 to
044fb3c
Compare
I filed https://trac.cppcheck.net/ticket/14382#ticket and https://trac.cppcheck.net/ticket/14383 about this. |
Co-authored-by: Daniel Marjamäki <daniel.marjamaki@gmail.com>
|
Please retry analysis of this Pull-Request directly on SonarQube Cloud |
|
I don't understand the exact purpose of this document. Is it for developers or for certain users or both? |
|
from the ticket:
these would be interesting to a security department when determining if Cppcheck is allowed.. is this a purpose? If we use processes or threads does not seem interesting to them right? but others could be interested in that. |
for the security department it would be interesting to know what network connections we use.. but that info might be out of scope for "safety" I guess. |
The purpose is to document how to harden the environment in which Cppcheck is run. It is unlikely that somebody will leverage a memory error in Cppcheck to execute an exploit. But the job could be compromised in another way and it makes sense to be able to minimize the attack vector. I plan to use this information (along with other best practices) to write a reference GitHub action (maintained externally so it doesn't fall under the GPL).
That is a technical detail. The important part is that the main process will be intact and you will get a result. And that is what the section should say. I will try to re-phrase that in a more common way
Good point. I only wrote it from the view of the CLI. The GUI has the update check if I recall correctly. |
ok I have the feeling that the GUI does not use any network connections but please feel free to check. I know cppcheclipse does have an update check. |
The GUI contains an online version check - you added it yourself in 94c3108. |
|
|
||
| ### Providing Process Stability | ||
|
|
||
| The leniency means that code which is invalid will not be rejected outright. So it is possible to trigger an assertion or crash within Cppcheck causing the process to exit prematurely. |
There was a problem hiding this comment.
It might be worth talking about what happens if the analysis of a file is aborted (when there is some kind of critical error). In CI I would say that --safety could be a good idea. In IDEs where analysis happens during editing I think that --safety is not a good idea.



No description provided.