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

Support for Badges #252

Closed
msymons opened this issue Dec 7, 2018 · 5 comments
Closed

Support for Badges #252

msymons opened this issue Dec 7, 2018 · 5 comments
Assignees
Labels
enhancement New feature or request p3 Nice-to-have features pending release
Milestone

Comments

@msymons
Copy link
Member

msymons commented Dec 7, 2018

It would be useful if Dependency-Track Server implemented support for "badges". ie, as available in more recent versions of SonarQube Server, from Jenkins Embeddable Build Status Plugin, and seen all over GitHub with repos displaying badge for Travis, etc.

This would provide current info to the viewer of the badge and a link to the project within DT.

I think that this does not go against the DT philosophy of "no reporting tools" because what is displayed would be current (dynamic). DT is still the source of truth.

The current API has:

/v1/metrics/project/{uuid}/current

...although this does not cater for license metrics.

For implementation, the icon for vulnerabilities might display something similar to what is already displayed in DT:

image

(although perhaps something not quite so wide might be preferable).

The badge would be useful in GitHub, Confluence, etc. Additionally, could it be used by dependency-track plugin to display status within Jenkins? Especially if synchronous mode is not being used.

@stevespringett
Copy link
Member

I like this idea and likely wouldn't be hard to implement.

Basically, we'd have a new API that would dynamically generate svg's from the existing metrics.

@stevespringett stevespringett added the enhancement New feature or request label Dec 7, 2018
@stevespringett stevespringett added the p3 Nice-to-have features label Dec 15, 2018
@stevespringett
Copy link
Member

Here are actual SVGs to serve as the basis for this feature going forward.

No Vuln Example
https://gist.github.com/stevespringett/72795f003307596e344584bd0ac0c18e

With Vulns Example
https://gist.github.com/stevespringett/41944c29349ff18a81e4e57f2e509eb1

@stevespringett stevespringett added this to the 3.6 milestone Jul 29, 2019
@stevespringett stevespringett self-assigned this Jul 29, 2019
@stevespringett
Copy link
Member

Badges need to be displayed on external sites without requiring authentication. This is an information disclosure vulnerability and could be leveraged by adversaries during recon. Therefore a new permission: PORTFOLIO_METRICS or BADGES or similar, should be created.

The permission should be assigned to a dedicated user or team and the API key supplied on the URL to the badge. Possibly even create a “badge” user by default on new systems and upgrades.

So although the API key will be in a GET, it should be the only key associated to a user/team as to prevent unauthorized access. However, by doing this, it would then be possible to restrict what projects have badge data available and which ones do not / or use different keys for access once #140 is implemented. The key could always be revoked thus preventing all existing access from working.

@stevespringett
Copy link
Member

I think the permissions would be a good future enhancement, however, for MVP, there will be a checkbox (disabled by default) that provides the capability to generate badges.

@lock
Copy link

lock bot commented Oct 16, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request p3 Nice-to-have features pending release
Projects
None yet
Development

No branches or pull requests

2 participants