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

feat(reporter)!: Support secrets in reporter options #7837

Conversation

oheger-bosch
Copy link
Member

Some reporter implementations need access to secrets. Therefore, align the ReporterConfiguration class with the configuration classes for Advisor and Scanner which use PluginConfiguration to distinguish between plain options and secrets.

@oheger-bosch oheger-bosch force-pushed the oheger-bosch/reporter/secrets_for_reporter_plugins branch from b56897b to a8727df Compare November 9, 2023 15:05
Copy link

codecov bot commented Nov 9, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (dcd3b19) 67.24% compared to head (84990c7) 67.05%.
Report is 18 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7837      +/-   ##
============================================
- Coverage     67.24%   67.05%   -0.19%     
+ Complexity     2044     2042       -2     
============================================
  Files           356      356              
  Lines         17050    17043       -7     
  Branches       2439     2444       +5     
============================================
- Hits          11465    11429      -36     
- Misses         4567     4594      +27     
- Partials       1018     1020       +2     
Flag Coverage Δ
funTest-docker 63.05% <ø> (ø)
funTest-non-docker 34.95% <0.00%> (-2.45%) ⬇️
test 36.11% <100.00%> (+1.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...odel/src/main/kotlin/config/PluginConfiguration.kt 85.71% <100.00%> (+2.38%) ⬆️
...el/src/main/kotlin/config/ReporterConfiguration.kt 100.00% <100.00%> (ø)

... and 9 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@sschuberth sschuberth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically LGTM, but I'd also like @mnonnenmacher's opinion.

Some reporter implementations need access to secrets. Therefore, align
the `ReporterConfiguration` class with the configuration classes for
Advisor and Scanner which use `PluginConfiguration` to distinguish
between plain options and secrets.

Signed-off-by: Oliver Heger <[email protected]>
@oheger-bosch oheger-bosch force-pushed the oheger-bosch/reporter/secrets_for_reporter_plugins branch from a8727df to d87ac7e Compare November 10, 2023 08:05
@@ -50,6 +50,7 @@ import org.ossreviewtoolkit.model.PackageCuration
import org.ossreviewtoolkit.model.Severity
import org.ossreviewtoolkit.model.config.CopyrightGarbage
import org.ossreviewtoolkit.model.config.NotifierConfiguration
import org.ossreviewtoolkit.model.config.PluginConfiguration
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit should refer to / auto-close #7833?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this for the 2nd commit.

@oheger-bosch oheger-bosch marked this pull request as ready for review November 10, 2023 08:47
@oheger-bosch oheger-bosch requested a review from a team as a code owner November 10, 2023 08:47
In FossIdReporter, read the FossID user and API key from the secrets
of the `PluginConfiguration` rather than from the plain options.

Fixes oss-review-toolkit#7833.

Signed-off-by: Oliver Heger <[email protected]>
@oheger-bosch oheger-bosch force-pushed the oheger-bosch/reporter/secrets_for_reporter_plugins branch from d87ac7e to 84990c7 Compare November 10, 2023 08:50
@oheger-bosch oheger-bosch merged commit 4d5b611 into oss-review-toolkit:main Nov 10, 2023
@oheger-bosch oheger-bosch deleted the oheger-bosch/reporter/secrets_for_reporter_plugins branch November 10, 2023 10:08
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 this pull request may close these issues.

2 participants