Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@blacklane/kiev-js
Advanced tools
A simple logging library to generate JSON formatted logging messages.
Kiev-js is a wrapper logging library around LogLevel implementing Blacklane logging standards.
npm install @blacklane/kiev-js
import {Logger, LoggerConfig, LogLevel} from '@blacklane/kiev-js'
const environment = process.env.NODE_ENV || 'development'
let loggerConfiguration: LoggerConfig = {
application: 'application-name',
environment: environment,
initializedFields: { foo: 'foo', bar: 'bar' }, // it is optional and will be added to all log entries
filterFields: ["password", "accessToken"] // it is optional and will filter the content of the field
}
// Default level is 'warn'
logger = new Logger(loggerConfiguration)
// This won't be logged due to the default level
logger.debug('Something happening here', { foo: 'bar' })
// Next line will be logged
// The payload will override any field defined in the constructor
logger.warn('WARN! Look at this', { foo: 'bar', password: "Hard_One" })
// => {"application":"application-name","environment":"development","level":"WARN", message: "WARN! Look at this", "timestamp":"2020-10-15T10:51:32.621Z", "foo": "bar", "bar": "bar", "password": "[FILTERED]}
// Setting logger to 'debug' level
logger.setLevel(LogLevel.DEBUG)
logger.debug('FooBar', { fizz: 'buzz' }) // Now it will be logged
// => {"application":"application-name","environment":"development","level":"DEBUG", message: "FooBar", "timestamp":"2020-10-15T10:51:32.621Z", "fizz": "buzz", "foo": "foo", "bar": "bar"}
// Create a new logger based on the current one
const newLogger = logger.extend({ tracking_id: "an tracking ID" })
// tracking_id will be present on all logs produced by this logger
newLogger.info('GET / - 200 OK')
// => {"application":"application-name","environment":"development","level":"INFO", message: "GET / - 200 OK", "timestamp":"2020-10-15T10:51:32.621Z", "foo": "foo", "bar": "bar", "tracking_id": "an tracking ID"}
git clone git@github.com:blacklane/kiev-js.git
npm install
npm test
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)npm run test
npm run test:cov
npm run lint
FAQs
A simple logging library to generate JSON formatted logging messages.
We found that @blacklane/kiev-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.