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: Use Devs Deps analyzer as base class for supported analyzers #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

san-zrl
Copy link

@san-zrl san-zrl commented Sep 25, 2024

Description

DepsDevMetaAnalyzer is now a base class of all analyzers whose purl type is supported by Deps Dev (e.g. MavenMetaAnalyzer). These 6 analyzers call super.analyze() in their analyze implementation and fetch the source repo from Dev Deps (if provided). All other meta attributes come via maven, npm, etc. This keeps the analyzer registration as is:

  • As before: Only concrete analyzer registered for one purl type. supportedType() returns this purl type.
  • Deps Dev should not be registered. supportedType() returns null to indicate this.
  • ANALYZER_SUPPLIERS remains unchanged.

Addressed Issue

Augments PR DependencyTrack#1457

Checklist

  • I have read and understand the contributing guidelines
  • This PR fixes a defect, and I have provided tests to verify that the fix is effective
  • This PR implements an enhancement, and I have provided tests to verify that it works as intended
  • This PR introduces changes to the database model, and I have updated the migration changelog accordingly
  • This PR introduces new or alters existing behavior, and I have updated the documentation accordingly

Comment on lines +50 to +53
private String depsDevBaseUrl = DEFAULT_BASE_URL;

public void setDepsDevBaseUrl(String depsDevBaseUrl) {
this.depsDevBaseUrl = depsDevBaseUrl;
Copy link
Owner

@n1ckl0sk0rtge n1ckl0sk0rtge Sep 26, 2024

Choose a reason for hiding this comment

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

@san-zrl Is there a reason for this change? Seems different to the other analysers.

Signed-off-by: san-zrl <san@zurich.ibm.com>
@san-zrl
Copy link
Author

san-zrl commented Sep 26, 2024

Changed MavenMetaAnalyzerTest to use Assertions.xxx in all test methods

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