Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@anakz/backstage-plugin-library-check-backend
Advanced tools
Backstage.io Library Check plugin backend
Welcome to the library-check-backend backend plugin!
This plugin was created through the Backstage CLI
Add the plugin to your backend app:
cd packages/backend && yarn add @anakz/backstage-plugin-library-check-backend
Create new file at packages/backend/src/plugins/libraryCheck.ts:
// packages/backend/src/plugins/libraryCheck.ts
import { PluginEnvironment } from '../types';
import { Router } from 'express';
import {
DatabaseLibraryCheckStore,
createRouter,
} from '@anakz/backstage-plugin-library-check-backend';
export default async function createPlugin({
logger,
database,
config,
}: PluginEnvironment): Promise<Router> {
const db = await DatabaseLibraryCheckStore.create({
database: database,
});
return await createRouter({
logger,
database: db,
config,
});
}
Define the schedules for the plugin processor and provider on packages/backend/src/plugins/catalog.ts
// packages/backend/src/plugins/catalog.ts
// ...
builder.addEntityProvider(
// add a new provider entry, configure the schedule frequency as you wish
// initialDelay must be up to 15s to avoid conflicts
LibraryCheckProvider.fromConfig({
config: env.config,
envId: 'production',
logger: env.logger,
discovery: env.discovery,
schedule: env.scheduler.createScheduledTaskRunner({
initialDelay: {
seconds: 15,
},
frequency: {
minutes: 60,
},
timeout: {
minutes: 1,
},
}),
}),
// ...
)
// Add the new processor entries, and try to declare the LibraryCheckUpdater as the last in order.
builder.addProcessor(
// ...
LibraryCheckProcessor.fromConfig(env.config, {
discoveryService: env.discovery,
reader: env.reader,
logger: env.logger,
}),
// Other processors...
LibraryCheckUpdaterProcessor.fromConfig(env.config, {
discoveryService: env.discovery,
reader: env.reader,
logger: env.logger,
}),
// ...
);
Now add the plugin to your packages/backend/src/index.ts:
import libraryCheck from './plugins/libraryCheck';
// ...
const libraryCheckEnv = useHotMemoize(module, () => createEnv('libraryCheck'));
// ...
apiRouter.use('/library-check', await libraryCheck(libraryCheckEnv));
FAQs
Backstage.io Library Check plugin backend
The npm package @anakz/backstage-plugin-library-check-backend receives a total of 22 weekly downloads. As such, @anakz/backstage-plugin-library-check-backend popularity was classified as not popular.
We found that @anakz/backstage-plugin-library-check-backend demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.