
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
github.com/tsurai/jantar
Jantar is a lightweight mvc web framework with emphasis on security written in golang. It has initially been largely inspired by Martini but prefers performance over syntactic sugar and aims to provide crucial security settings and features right out of the box.
WARNING: This project is deprecated and is not maintained anymore. The default security settings and feature are out of date and not secure anymore! Use this as reference only!
First you have to download and install the package into the import path. This can easily be done with go get:
go get github.com/tsurai/jantar
Now you can import jantar and create a simple website
package main
import (
"net/http"
"github.com/tsurai/jantar"
)
func main() {
j := jantar.New(&jantar.Config {
Hostname: "localhost",
Port: 3000,
})
j.AddRoute("GET", "/", func(respw http.ResponseWriter, req *http.Request) {
respw.Write([]byte("Hello World"))
})
j.Run()
}
Using Controller and rendering Templates is very easy with Jantar. For this simple example I'm going to assume the following directory structure. A detailed description will follow soon.
|- controllers/
|-- app.go
|- views/
|-- app/
|--- index.html
| main.go
-- controllers/app.go
package controller
import (
"github.com/tsurai/jantar"
)
type App struct {
jantar.Controller
}
func (c *App) Index() {
c.Render()
}
-- views/app/index.html
<h1>Hello Controller</h1>
-- main.go
package main
import (
"github.com/tsurai/jantar"
c "controllers"
)
func main() {
j := jantar.New(&jantar.Config {
Hostname: "localhost",
Port: 3000,
})
j.AddRoute("GET", "/", (*c.App).Index)
j.Run()
}
Jantar is by no means secure in the literal sense of the word. What it does is providing easy and fast ways to protect against the most common vulnerabilities. Security should never be left out because it is too troublesome to implement.
Some might wonder why Jantar is using /dev/urandom instead of the seemingly more secure /dev/random. Please take some minutes and read this interesting article about /dev/urandom/
These frameworks have been a source of inspiration and ideas during Jantars development.
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
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.