Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbus-broker should probably be sent to Coverity Scan automatically #316

Open
evverx opened this issue Jun 5, 2023 · 2 comments · May be fixed by #363
Open

dbus-broker should probably be sent to Coverity Scan automatically #316

evverx opened this issue Jun 5, 2023 · 2 comments · May be fixed by #363

Comments

@evverx
Copy link
Contributor

evverx commented Jun 5, 2023

It's mostly prompted by https://bugs.launchpad.net/ubuntu/+source/dbus-broker/+bug/2015538/comments/5.

and I agree with @eslerm here.

It should be possible to borrow the action from systemd or dfuzzer to run that cron job daily on GitHub but to get it to work a secret named COVERITY_SCAN_TOKEN should be added to the repository: https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository. The token can be found at https://scan.coverity.com/projects/dbus-broker?tab=project_settings.

Since Ubuntu is used on GHActions the AppArmor stuff should start being analyzed automagically too. Currently it's missing there.

In theory dbus-broker can be integrated as is and false positives can be suppressed manually there but it would be better to help coverity a bit with, say, c_assert and add #ifdef __COVERITY__.

cc @mrc0mmand.

@mrc0mmand
Copy link
Contributor

Just linking the respective coverity.yml and coverity.sh. IIRC I synced them between the dfuzzer and systemd repos so it should be more or less the same stuff, sans the build dependencies, project name, and the actual build command.

The systemd version also sets the email address for the scan notification to a pre-defined one (which is currently my email) contrary to the dfuzzer version which uses email address from the latest commit. I did that in systemd to make sure I'll get notified on any possible fails (and because I think the scan notification is usually useless for people not involved in whole Coverity stuff).

@evverx
Copy link
Contributor Author

evverx commented Jun 12, 2023

contrary to the dfuzzer version which uses email address from the latest commit

That would be yours too I believe :-)

I've just sent dbus-broker with af6bf48 included and Coverity confirmed that it's gone :-)

Anyway the scripts are ready. I can keep running it manually from time to time until the secret is added to the repository.

mrc0mmand added a commit to mrc0mmand/dbus-broker that referenced this issue May 7, 2024
Let's make a full use of Coverity and submit the builds for analysis
automatically every midnight. We can't do that for every PR, since there
are quite strict rate limits that limit how many builds we can submit
per day and per week (see [0]).

The action (and the script) requires two environment variables to be
set - $COVERITY_SCAN_TOKEN for authentication (can be found here [1]),
and $COVERITY_SCAN_NOTIFICATION_EMAIL for sending the email notification
when the build analysis is done. Originally this email used to be set to
the email from the latest commit, but since the author of that commit
might not even have permissions to see the Coverity report it's best to
set it to one of the dbus-broker maintainers.

Resolves: bus1#316

[0] https://scan.coverity.com/faq#frequency
[1] https://scan.coverity.com/projects/dbus-broker?tab=project_settings
mrc0mmand added a commit to mrc0mmand/dbus-broker that referenced this issue May 7, 2024
Let's make a full use of Coverity and submit the builds for analysis
automatically every midnight. We can't do that for every PR, since there
are quite strict rate limits that limit how many builds we can submit
per day and per week (see [0]).

The action (and the script) requires two environment variables to be
set - $COVERITY_SCAN_TOKEN for authentication (can be found here [1]),
and $COVERITY_SCAN_NOTIFICATION_EMAIL for sending the email notification
when the build analysis is done. Originally this email used to be set to
the email from the latest commit, but since the author of that commit
might not even have permissions to see the Coverity report it's best to
set it to one of the dbus-broker maintainers.

Resolves: bus1#316

[0] https://scan.coverity.com/faq#frequency
[1] https://scan.coverity.com/projects/dbus-broker?tab=project_settings
mrc0mmand added a commit to mrc0mmand/dbus-broker that referenced this issue May 7, 2024
Let's make a full use of Coverity and submit the builds for analysis
automatically every midnight. We can't do that for every PR, since there
are quite strict rate limits that limit how many builds we can submit
per day and per week (see [0]).

The action (and the script) requires two environment variables to be
set - $COVERITY_SCAN_TOKEN for authentication (can be found here [1]),
and $COVERITY_SCAN_NOTIFICATION_EMAIL for sending the email notification
when the build analysis is done. Originally this email used to be set to
the email from the latest commit, but since the author of that commit
might not even have permissions to see the Coverity report it's best to
set it to one of the dbus-broker maintainers.

Resolves: bus1#316

[0] https://scan.coverity.com/faq#frequency
[1] https://scan.coverity.com/projects/dbus-broker?tab=project_settings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants