BETA Shoulder is in beta — Findings may sometimes be wrong. Your feedback shapes what we fix next. Share feedback
Rules / Go

Fiber Permissive CORS

Description

Wildcard CORS allows any origin to access resources.

How to fix

Specify allowed origins instead of wildcard.

```go
app.Use(cors.New(cors.Config{
    AllowOrigins: "https://example.com,https://app.example.com",
}))
```

Learn more: https://shoulder.dev/learn/go/cwe-942/cors

Applies to

Languages

Frameworks

fiber

Scan for this issue

Detect with Shoulder CLI
npx @shoulderdev/cli trust --rule=go-fiber-permissive-cors .

Related rules