
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
github.com/zxylon/olaf-layout-basic
Olaf is an application scaffold based on Golang. It is a composition of various popular libraries from the Golang ecosystem, which can help you quickly build efficient and reliable applications.
.
├── cmd
│ └── server
│ ├── main.go
│ ├── wire.go
│ └── wire_gen.go
├── config
│ ├── local.yml
│ └── prod.yml
├── internal
│ ├── handler
│ │ ├── handler.go
│ │ └── user.go
│ ├── middleware
│ │ └── cors.go
│ ├── model
│ │ └── user.go
│ ├── repository
│ │ ├── repository.go
│ │ └── user.go
│ ├── server
│ │ └── http.go
│ └── service
│ ├── service.go
│ └── user.go
├── pkg
├── LICENSE
├── README.md
├── README_zh.md
├── go.mod
└── go.sum
This is a classic directory structure for a Golang project, which includes the following directories:
cmd: Contains the entry points of the application, including the main function and dependency injection code.
config: Contains the configuration files of the application.
internal: Contains the internal code of the application.
pkg: Contains the public packages of the application.
storage: Contains the storage files of the application.
go.mod: The Go module file.
go.sum: The dependency versions file for the Go module.
To use Olaf, you need to have the following software installed on your system:
You can install Olaf using the following command:
go install github.com/zxylon/olaf@latest
You can create a new Golang project using the following command:
olaf new projectName
By default, it will pull from the GitHub repository, but you can also use a mirror repository for faster access:
// Use the basic template
olaf new projectName -r https://gitee.com/zxylon/olaf-layout-basic.git
// Use the advanced template
olaf new projectName -r https://gitee.com/zxylon/olaf-layout-advanced.git
This command will create a directory named projectName
and generate an elegant Golang project structure within it.
You can create handlers, services, repositories, and models for your project using the following commands:
olaf create handler user
olaf create service user
olaf create repository user
olaf create model user
or
olaf create all user
These commands will create components named UserHandler
, UserService
, UserDao
, and UserModel
respectively and place them in the correct directories.
You can quickly start your project using the following command:
olaf run
This command will start your Golang project and support hot-reloading of files.
You can quickly compile wire.go
using the following command:
olaf wire
This command will compile your wire.go
file and generate the required dependencies.
If you find any issues or have any improvement suggestions, please feel free to raise an issue or submit a pull request. Your contributions are highly appreciated!
Olaf is released under the MIT License. See the LICENSE file for more information.
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
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.