
Security News
Opengrep Adds Apex Support and New Rule Controls in Latest Updates
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
github.com/sig-0/boring-avatars-go
Generate deterministic, SVG-only Boring Avatars (Beam, Bauhaus, Marble, Pixel, Ring and Sunset) in Go - ready for servers, CDNs, CLI tools or front-ends.
This Go library is a port of the original JS library for generating Boring Avatars. It would not exist, without the work and dedication of the Boring Designers team: https://github.com/boringdesigners/boring-avatars/tree/master
Please consider supporting their project with a star and a donation!
go get -u github.com/sig-0/boring-avatars-go
package main
import (
"fmt"
"github.com/sig-0/boring-avatars-go/avatars"
)
func main() {
svg := avatars.Generate(
avatars.Marble, // style
"Amelia Earhart", // name / seed
[]string{"#0a0310", "#49007e", "#ff005b", "#ff7d10", "#ffb238"}, // optional custom palette
80, // size in px
false, // square mask? (false = round)
)
fmt.Println(svg) // <svg …/>
}
package main
import (
"context"
"log"
"log/slog"
"github.com/sig-0/boring-avatars-go/server"
)
func main() {
srv, _ := server.New(
server.WithLogger(slog.Default()), // custom logger
// optional middlewares
)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
log.Fatal(srv.Serve(ctx)) // blocking
}
The root endpoint of the bundled HTTP server allows you to generate Boring Avatar SVGs.
You can configure the CORS policy in the server configuration, by running the generate
command and editing the file.
You can run the bundled server on your own, or you can use the paid service the good folks over at Boring Designers already provide: https://boringavatars.com/api-service
Their team handles all the setup and heavy lifting for your endpoint, so you can go back to doing the important stuff (building your app!).
GET /?name={NAME}&variant={VARIANT}&size={SIZE}&colors={COLORS}&square=true
All parameters are optional unless otherwise noted.
name
(optional)A string used to generate a unique avatar (e.g., username, email, or ID).
<img src="<YOUR-DOMAIN>?name=Maria%20Mitchell" crossorigin>
variant
(optional)Specifies the visual style of the avatar. Options include:
marble
beam
pixel
sunset
ring
bauhaus
<img src="<YOUR-DOMAIN>?variant=beam" crossorigin>
size
(optional)The width and height of the avatar in pixels (SVG format).
<img src="<YOUR-DOMAIN>?size=240" crossorigin>
colors
(optional)A comma-separated list of up to 6 hex color values used to style the avatar.
<img src="<YOUR-DOMAIN>?colors=264653,2a9d8f,e9c46a,f4a261,e76f51" crossorigin>
square
(optional)Forces the avatar to render in a square format. Accepts true
or false
.
<img src="<YOUR-DOMAIN>?square=true" crossorigin>
If you omit all query parameters, the endpoint returns a randomly generated avatar using the default size (80x80
) and
the marble
variant:
<img src="<YOUR-DOMAIN>" crossorigin>
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.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.