
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
$ npm install -g centric
centric scaffold will create a basic centric project with examples that you can modify to suit your needs.
$ centric scaffold
$ centric start
And your done!
Folder Structure for a centric project.
.
├── services # Service Files
├── tasks # Task Files
├── config.js # Configuration file
The services folder contains all your projects service files. A service file has the following signature.
module.exports = async function ({ config }) {
// Service Logic goes here...
const testLogging = function () {
console.log('this is a test')
}
return { testLogging }
}
Services are useful for any logic you wish to share between tasks (like a database connection).
Create a new file in the tasks folder that matches the following signature.
The name of the task in the centric web interface is equivalent to the name of the task file name.
module.exports = {
description: 'task description', // Viewable in the web UI
locks: null,
defaultData: function () {
// Return the default data for the task.
// This will be the default "taskData" in the run method.
return {}
},
run: async function ({ config, services, opData, saveOpData, taskData, saveTaskData, logInfo, logWarning, logError, isCancelled }) {
// Run method is called when the task is executed.
// Logic for the task goes here.
}
}
The run method provides following listed parameters:
Argument | Description |
---|---|
config | configuration exported from config.js |
services | object containing all exported values from all service files |
opData | Current running task's operation-data. |
saveOpData | Method to be called to save the curremt operation data. |
taskData | Task data of the current running task. |
saveTaskData | Method to be called to save the current running task data. |
logInfo | logInfo is method to log the info entry showing information log of the operation. |
logWarning | logWarning is method to log the warnings entry showing warnings of the operation. |
logError | logError is method to log the errors entry showing errors of the operation. |
isCancelled | Method to check whether the task is active for running or has been cancelled. |
The screen-shot below shows the list of tasks under the tasks folder.
Go to the tasks list page and click over the task item for which need to schedule a task and follow the following steps:
Enable the task
Click the Create Schedule button
Field | Description |
---|---|
Name | Name of the schedule |
cronTime | Time interval to determine how often to run the task |
enabled? | Enable or disable this schedule |
data | Set the tasks operation data when started with this schedule |
Select Users menu from home page, users list page looks like
To create new user click over "CREATE USER" button and add the detail of the user to be created.
The task processed are listed in the history menu under sidemenu list.
The dashboard page provides the list of currently running task detail.
FAQs
A programmable automation server
The npm package centric receives a total of 0 weekly downloads. As such, centric popularity was classified as not popular.
We found that centric demonstrated a not healthy version release cadence and project activity because the last version was released 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.