Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@jclem/logfmt2
Advanced tools
logfmt2 (which is based on the original logfmt and the original blog post) is a module for encoding objects into the logfmt format and decoding them again.
npm install @jclem/logfmt2
script/build
The script/publish
script cleans the build directory, builds the project, and then runs npm publish
.
script/publish
const {Logger, encode, decode} = require('@jclem/logfmt2')
console.log(encode({foo: 'bar'})) // foo=bar
console.log(decode('foo=bar')) // {foo: 'bar'}
// Use the static `Logger.log` to stdout
Logger.log({foo: 'bar'}) // logs "foo=bar"
// Create a logger to maintain a logging context
const logger = new Logger({ns: 'my-app'})
logger.log({foo: 'bar'}) // logs "ns=my-app foo=bar"
// Add timers
logger.time('elapsedMs')
// Wait 50ms
logger.log({foo: 'bar'}) // logs "ns=my-app elapsedMs=50 foo=bar"
// Wait 50ms
logger.log({foo: 'bar'}) // logs "ns=my-app elapsedMs=100 foo=bar"
// Add (mutate) the logger context
logger.appendContext({new_context: 'hello'})
logger.log({foo: 'bar'}) // logs "ns=my-app new_context=hello elapsedMs=100 foo=bar"
FAQs
Parses logs and stringifies logs into the logfmt format
We found that @jclem/logfmt2 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.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.