
Research
/Security News
npm Author Qix Compromised via Phishing Email in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
github.com/TylerBrock/colorjson
What is this?This package is based heavily on hokaccha/go-prettyjson but has some noticible differences:
BenchmarkColorJSONMarshall-4 500000 2498 ns/op
BenchmarkPrettyJSON-4 200000 6145 ns/op
ColorJSON was built in order to produce fast beautiful colorized JSON output for Saw.
go get -u github.com/TylerBrock/colorjson
Setup
import "github.com/TylerBrock/colorjson"
str := `{
"str": "foo",
"num": 100,
"bool": false,
"null": null,
"array": ["foo", "bar", "baz"],
"obj": { "a": 1, "b": 2 }
}`
// Create an intersting JSON object to marshal in a pretty format
var obj map[string]interface{}
json.Unmarshal([]byte(str), &obj)
Vanilla Usage
s, _ := colorjson.Marshal(obj)
fmt.Println(string(s))
Customization (Custom Indent)
f := colorjson.NewFormatter()
f.Indent = 2
s, _ := f.Marshal(v)
fmt.Println(string(s))
FAQs
Unknown package
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
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.

Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.

Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.