Plain Go errors can lose diagnostic context and produce inconsistent public messages. This skill guides structured error creation, wrapping, context propagation, and logging with samber/oops.
Review the Skillstore skill "golang-samber-oops" from https://skillstore.io/skills/samber-golang-samber-oops.md and its manifest at https://skillstore.io/api/skills/samber-golang-samber-oops/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.
All 66 static findings are false positives involving documentation formatting, Go identifiers, example SQL, tool declarations, or reference URLs. No evidence found of malicious commands, credential theft, unauthorized network transfers, or audit-directed prompt injection. One semantic risk remains: examples propagate email addresses and raw input into errors that can be logged without redaction guidance.
Sensitive Attributes Logged Without Redaction Guidance
Examples attach user email addresses and raw input to structured errors, then demonstrate printing context and logging entire errors. Copied patterns could expose personal data or secrets to log readers and configured telemetry services; no redaction guidance accompanies these examples.
The examples explicitly retain email addresses and unfiltered input, and separately demonstrate full-error logging. Actual exposure depends on application inputs and logger configuration.
samber. (2026). golang-samber-oops security audit report (audit version 1) [Author version 1.2.1]. Skillstore. https://skillstore.io/skills/samber-golang-samber-oops/audits/1
BibTeX 引用
@techreport{samber-samber-golang-samber-oops-2026,
author = {samber},
title = {golang-samber-oops security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/samber-golang-samber-oops/audits/1},
note = {Author version 1.2.1}
}
CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "golang-samber-oops security audit report (audit version 1)"
version: "1.2.1"
type: report
authors:
- name: "samber"
date-released: "2026-10-18"
url: "https://skillstore.io/skills/samber-golang-samber-oops/audits/1"
identifiers:
- type: other
value: "skillstore:samber-golang-samber-oops:audit:1"
description: "Skillstore immutable audit report identifier"
Skillstore 评分
评分依据证据置信度: 中
41
架构
100
可维护性
87
内容
65
社区
100
规范符合性
你能构建什么
Improve API Error Responses
Separate stable public messages from detailed repository and service errors while retaining request context for debugging.
Standardize Operational Diagnostics
Define domains, codes, tags, and stable messages so errors remain useful across layers and easier to group in monitoring.
Review Multi-Tenant Error Context
Review reusable user and tenant builders, context propagation, and safe attribute selection across shared services.
试试这些提示
Create a Structured Error
Show a basic samber/oops error for a failed order lookup. Add a domain, error code, and synthetic order identifier without interpolating identifiers into the message.
Simplify Error Wrapping
Review this Go function using samber/oops: [paste function]. Simplify nil-safe wrapping and preserve the original error. Keep messages stable and exclude sensitive attributes.
Propagate Context Across Layers
Design samber/oops middleware and handler, service, and repository error handling. Propagate a trace identifier with WithBuilder and FromContext. Separate public messages and allowlisted diagnostic attributes.
Review Recovery and Logging
Review these worker and logging paths: [paste code]. Recommend samber/oops recovery boundaries, reusable builders, and stack trace settings. Identify sensitive attributes and propose redaction before logging.
最佳实践
Use stable messages and structured attributes, and verify examples against your installed library version.
Add relevant context at package boundaries while keeping public messages separate from technical details.
Allowlist diagnostic attributes and redact personal data, secrets, and request metadata before logging errors.
避免
Interpolating user, tenant, or order identifiers into messages that monitoring should group.
Returning full technical errors or stack traces directly to API consumers.
Copying examples that attach email addresses or raw inputs without reviewing log access and redaction.
常见问题
What does this skill provide?
It provides samber/oops instructions and Go examples for structured errors, wrapping, recovery, context propagation, and logger integration.
Which tools and projects does it target?
It targets Codex and Claude Code workflows for Go projects using or adopting samber/oops.
Does it install samber/oops automatically?
No. The skill provides guidance, and its declared installation list is empty. Set up project dependencies separately.
Why keep identifiers outside error messages?
Stable messages support monitoring aggregation. Structured attributes retain approved diagnostic identifiers without producing a unique message for every failure.
How are public and technical messages separated?
Use Public for a user-safe message and GetPublic with a fallback when responding. Keep technical details in restricted diagnostic logs.
Are attached attributes automatically safe to log?
No. Review and redact email addresses, raw inputs, and request metadata before logging or forwarding errors to telemetry services.