
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@chanoch/clearsite-engine
Advanced tools
Implementation of a simple react router, with templating
This was inspired by Konstantin Tarkus's alternative to react router from You might not need React Router
In Konstantin's system, an array of routes together with the root level 'page' component that will render the root to the router. This array is used with the history component to integrate with the browser's navigation and redux to support navigation through the application.
The general workflow is that each user interaction results in a page being loaded into history followed by any mutations to state as redux middleware. This results in the page being updated
To create an application using clearsite:
The Single Page Application's (SPA's) HTML page is a standard react page which contains the following div to mount the application to:
<div id="root"></div>
The HTML page must also include an import for javascript for your application. I use webpack to bundle my JS and dependencies but in general vendor js and css is imported statically into the page to benefit from CDN content delivery offloading and performance optimisation.
The webpack js files are imported statically rather than letting webpack inject them into the HTML as the index.html file is dynamicaly generated to inject configuration.
The reducers, redux middlware, and action creators are all standard redux mechanisms so you will need to define those according to the redux standards.
// Each page component is imported
import MyComponent from './MyComponentPage'
import React from 'react'
// The link between routes or paths in the application are provided in the path property for
// each object in the routes array.
const routes = [
{ path: '/menuplanner/', action: (store) => <MenuPlanner store={store} /> },
{ path: '/menuplanner/selectmenu.html', action: (store) => <ChooseRecipes store={store}/> },
]
export default routes
A redux reducer modifies the state according to the state change which just occurred. It shouldn't have side-effects.
export function createMealPlanReducer(state, action) {
return {
...state,
mealPlan: action.mealPlan,
action: CREATE_MEAL_PLAN
}
}
The middlware will be injected with the state and the history object. This means that middlware can both mutate the state and navigate.
FAQs
A react website library
We found that @chanoch/clearsite-engine 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.