·
Last changedVersion:
This version passed the hardening gate. Hardening applied 4 targeted changes and preserved all other text. Classified findings before hardening: 0. Classified findings closed: 0. Classified findings remaining: 0. Unclassified scanner findings remaining: 0. Review findings closed: 7. Review findings remaining: 1.
None
None
Expand | File | Group | Subtype | Severity | Status |
|---|
No findings available
0 findings
In Encore.go, each package with an API endpoint is automatically a service. No special configuration needed.
Simply create a package with at least one //encore:api endpoint:
Choose the access level of each endpoint on purpose. Use auth for endpoints that return personal data such as email, and confirm the signed-in caller may view the requested user before returning it. Keep public for data that is meant to be anonymous and is not sensitive. The examples here are short excerpts: parameter types, response types and helper functions are left out, so complete them and review the result before use.
An application can define its APIs in one root service package:
Each service lives in its own package:
Group related services into systems:
Just import and call the function directly - Encore handles the RPC:
This example leaves out an ownership check. Before returning the order, confirm the signed-in caller owns it, and return a permission or not found error otherwise. The called service endpoint also checks authorization and validates its input itself, because each cross-service call is a network RPC call.
Create packages without //encore:api endpoints for shared code:
//encore:api endpointsencore-architecture when the service boundaries have not been decidedGet started with chainctlchainctl skill install public/encoredev/go-service:latest
Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.
skills.cgr.dev/public/github.com/encoredev/encore/go-service:latest
Apache-2.0
HARDENING.md
LICENSE
SKILL.md