Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@rsc-labs/backstage-highlights-plugin-backend
Advanced tools
Backstage Highlights Plugin is configurable and customizable plugin for viewing the most important information about your entity.
We have a lot information from different plugins and also in Overview tab, but sometimes:
The "Highlights" shall provide you possibility to create such small, useful view.
If you haven't already, check out the Backstage docs and create a Backstage application with
npx @backstage/create-app
Then, you will need to install and configure the highlights plugins for the frontend and the backend. Frontend plugin installation can be found here: Frontend plugin
Install:
cd packages/backend
yarn add @rsc-labs/backstage-highlights-plugin-backend
Create a file packages/backend/src/plugins/highlights.ts
:
import {
createRouter,
} from '@rsc-labs/backstage-highlights-plugin-backend';
import { Router } from 'express';
import { PluginEnvironment } from '../types';
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
return await createRouter({
discovery: env.discovery,
tokenManager: env.tokenManager,
logger: env.logger,
config: env.config
});
}
Add the plugin to packages/backend/src/index.ts
:
// import:
import highlights from './plugins/highlights';
...
async function main() {
...
// add env
const highlightsEnv = useHotMemoize(module, () => createEnv('highlights'));
...
// add to router
apiRouter.use('/highlights', await highlights(highlightsEnv));
...
}
Backend plugin supports two providers - Github and Gitlab. They are providing information for built-in fields mentioned in Frontend plugin. Plugin uses following annotations from catalog-info.yaml:
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: example-website
annotations:
github.com/project-slug: rsc-labs/backstage-changelog-plugin
gitlab.com/project-slug: owner/project
Both annotations are supported (so your component can be in github or gitlab). In theory case if you have both annotations, github takes precedence.
To have properly working Github or Gitlab, you need also provide information about token and potentially about base url. You have two options how to provide it
Below you can find implemented both options:
highlights:
gitlab:
token: ${GITLAB_TOKEN}
apiBaseUrl: https://gitlab.com/api/v4
github:
token: ${GITHUB_TOKEN}
integrations:
gitlab:
- token: ${GITLAB_TOKEN}
github:
- token: ${GITHUB_TOKEN}
If provided, "highlights" configuration takes precendece over "integrations". Note: "highlights" configuration requires providing "apiBaseUrl", while it is not needed in "integrations" (if you are using default one)
We start supporting also multiple Gitlab instances for both highlights and integrations in app-config. Below you can find instruction and example of configuration.
Example of both options in one configuration:
highlights:
gitlab:
- host: gitlab.com
token: ${GITLAB_TOKEN}
apiBaseUrl: https://gitlab.com/api/v4
- host: gitlab1.com
token: ${GITLAB2_TOKEN}
apiBaseUrl: https://gitlab1.com/api/v4
github:
token: ${GITHUB_TOKEN}
integrations:
gitlab:
- host: gitlab.com
token: ${GITLAB_TOKEN}
- host: gitlab1.com
token: ${GITLAB2_TOKEN}
apiBaseUrl: https://gitlab1.com/api/v4
github:
- host: github.com
token: ${GITHUB_TOKEN}
At the same time, your entity shall have proper annotations, for example:
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: example-website
annotations:
github.com/project-slug: rsc-labs/backstage-changelog-plugin
gitlab.com/project-slug: owner/project
gitlab.com/instance: gitlab1.com
Taking above example - component example-website will use gitlab1.com, which maps to values:
Please remember that "highlights" configuration (if present) takes precendence over "integrations".
[ ] Unit tests
[ ] More fields to support
Contributions are welcome and they are greatly appreciated!
Licensed under the Mozilla Public License, Version 2.0: https://www.mozilla.org/en-US/MPL/2.0/
© 2023 RSC https://rsoftcon.com/
FAQs
Unknown package
The npm package @rsc-labs/backstage-highlights-plugin-backend receives a total of 23 weekly downloads. As such, @rsc-labs/backstage-highlights-plugin-backend popularity was classified as not popular.
We found that @rsc-labs/backstage-highlights-plugin-backend demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.