Code Monkey home page Code Monkey logo

backstage-plugin-blackduck's Introduction

backstage-plugin-blackduck

Welcome to the backstage-plugin-blackduck plugin!

Getting started

Overview Page - BlackDuck Vulnerability Chart

BlackDuck Chart Example

Overview Page - BlackDuck Risk Profile Chart

BlackDuck Chart Example

Service Entiry Page - BlackDuck Vulnerability Table List

BlackDuck Table Example

The following sections will help you get the BlackDuck plugin setup and running

BlackDuck Backend

You need to setup the BlackDuck backend plugin before you move forward with any of these steps if you haven't already

Installation

This plugin needs to be added to an existing backstage instance.

# From your Backstage root directory
yarn add --cwd packages/app backstage-plugin-blackduck

Note: You have 3 Options, you can setup all together too

Option 1

Add BlackDuck Vulnerability chart in to Overview page

Import the plugin to packages/app/src/components/catalog/EntityPage.tsx.

EntityPage.tsx

// ...
import { BlackduckCard } from 'backstage-plugin-blackduck';
// ...
const overviewContent = (
    <Grid container spacing={3} alignItems="stretch">
    {entityWarningContent}
    <Grid item md={6}>
      <EntityAboutCard variant="gridItem" />
    </Grid>
    //...
    <Grid item md={4} xs={12}>
      <BlackduckCard />
    </Grid>
    <Grid item md={8} xs={12}>
      <EntityHasSubcomponentsCard variant="gridItem" />
    </Grid>    
  </Grid>
);

Option 2

Add BlackDuck Risk Profile chart in to Overview page

Import the plugin to packages/app/src/components/catalog/EntityPage.tsx.

EntityPage.tsx

// ...
import { RiskCard } from 'backstage-plugin-blackduck';
// ...
const overviewContent = (
    <Grid container spacing={3} alignItems="stretch">
    {entityWarningContent}
    <Grid item md={6}>
      <EntityAboutCard variant="gridItem" />
    </Grid>
    //...
    <Grid item md={4} xs={12}>
      <RiskCard />
    </Grid>
    <Grid item md={8} xs={12}>
      <EntityHasSubcomponentsCard variant="gridItem" />
    </Grid>    
  </Grid>
);

Option 3

Add BlackDuck Vulnerability Table List in to Service Entity

Import the plugin to packages/app/src/components/catalog/EntityPage.tsx and add the following.

EntityPage.tsx

// ...
import { BlackDuckPage } from 'backstage-plugin-blackduck';
// ...
const serviceEntityPage = (
    <EntityLayout>
    <EntityLayout.Route path="/" title="Overview">
      {overviewContent}
    </EntityLayout.Route>

    <EntityLayout.Route path="/ci-cd" title="CI/CD">
      {cicdContent}
    </EntityLayout.Route>
    //...
    <EntityLayout.Route path="/blackduck" title="Security">      
        <BlackDuckPage />    
    </EntityLayout.Route>
    // ...    
  </EntityLayout>
);

Note: If you dont want to display the Service page if no annotation specified in catalog.

//...
import { BlackDuckPage, isBlackDuckAvailable } from 'backstage-plugin-blackduck';
//...
<EntityLayout.Route if={isBlackDuckAvailable} path="/blackduck" title="Security">      
    <BlackDuckPage />    
</EntityLayout.Route>
// ...    

Configuration

Add the following into your app-config.yaml

Config

blackduck:
  host: https://blackduck.yourcompany.com/api
  token: YOUR_API_TOKEN

Add the following into your catalog

Catalog

apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: backstage
  annotations:
    blackduck/project: YOUR_PROJECT_NAME/YOUR_PROJECT_VERSION

backstage-plugin-blackduck's People

Contributors

deepan10 avatar abhay-soni-developer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.