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.
An interactive demo can be viewed at: http://nathanstitt.github.io/dayz/
The demo source for the demo is demo.jsx
npm install dayz --save
-- or --
yarn add dayz
import React from 'react';
import Dayz from 'dayz';
// could also import the sass if you have a loader at dayz/dayz.scss
import "dayz/dist/dayz.css";
import moment from 'moment';
// would come from a network request in a "real" app
const EVENTS = new Dayz.EventsCollection([
{ content: 'A short event',
range: moment.range( date.clone(),
date.clone().add(1, 'day') ) },
{ content: 'Two Hours ~ 8-10',
range: moment.range( date.clone().hour(8),
date.clone().hour(10) ) },
{ content: "A Longer Event",
range: moment.range( date.clone().subtract(2,'days'),
date.clone().add(8,'days') ) }
]);
class MyComponent extends React.Component {
render() {
return <Dayz
display='week'
date={this.props.date}
events={EVENTS}
/>
}
}
The Dayz component accepts these properties:
momentjs
instance that controls what range is displayed. The calendar will automatically calculate the month or week that contains this date and display the appropriate range.Dayz.EventsCollection
instance that contains events that should be displayed on the calendar.
Dayz.EventsCollection
accepts two arguments:
false
, for events that are shown on multiple days only the first event will have the content
attribute shown. In any other case content
will be shown on every days. This prop works only if displayAllDay
is false
.momentjs
date. Hours/Minutes are added to the date to reflect how far down the Y axis was clicked.event
subkey that includes the event itself.ha
configures y labels time formaten
. A string to determine the localization.undefined
. Determines whether the week should start on Monday or Sunday. By default it uses what the localization offers (see locale
prop). It can accept either 0
to start the week on Sunday or 1
to start the week on Monday.Dayz applies these css classes:
npm start
starts up a local development web-server which rebuilds files when changednpm test
runs unit testsnpm run build
compiles files in preparation for publishingFAQs
A Day/Week/Month display React component
The npm package dayz receives a total of 55 weekly downloads. As such, dayz popularity was classified as not popular.
We found that dayz 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
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.