Skip to content
Report library
Purpose / Development

Golang Samber Oops Skill Security Audit

What the author says it does (original text)

Structured error handling in Golang with samber/oops — error builders, stack traces, error codes, error context, error wrapping, error attributes, user-facing vs developer messages, panic recovery, and logger integration. Apply when using or adopting samber/oops, or when the codebase already imports github.com/samber/oops.

Independent security check

Security risks found

Files checked
3
Risks found
2
Could it run dangerous commands?Looks for programs run straight after downloading, remote control of your computer, and hidden commands.No risks found
Could it expose your files or keys?Looks for uploads of files containing passwords or keys, and keys written directly in the code.Risks found: 1
Medium risk

Logging complete structured errors may expose personal data, queries, and source code

Source references: 6
What we found

Examples place a user email and database query in the error object, while a configuration example enables source fragments; the Skill then recommends JSON serialization or passing the whole error to a logger. Because attributes travel with the error, these values may arrive together in centralized logs or error tracking.

Why this matters

Log readers or third-party monitoring services could receive user identifiers, email addresses, internal SQL, business data, or application source code. Selecting request or response body inclusion would further expose tokens or submitted content.

These are examples, not evidence of execution. If adopted, however, error objects can contain email addresses and SQL queries and may then be serialized wholesale into logs. The advanced configuration also explicitly makes source fragments visible. Sending such errors to centralized logging or a third-party tracker could disclose personal data, query structure, and internal source. Users can ask for source fragments to be hidden by default and for request, query, and user fields to be filtered or redacted before logging.

SKILL.md:100In the instructionsOpen original file
        return nil, oops.            In("user-repository").            Tags("database", "postgres").            With("query", query).            With("user_id", id).            Wrapf(err, "failed to fetch user from database")    }
Show 5 other places
SKILL.md:139In the instructionsOpen original file
        Tags("orders", "checkout").        Tenant(req.TenantID, "plan", req.Plan).        User(req.UserID, "email", req.UserEmail)
references/advanced.md:24In the instructionsOpen original file
```gooops.StackTraceMaxDepth = 20          // adjust stack trace depthoops.SourceFragmentsHidden = false    // enable source code fragmentsloc, _ := time.LoadLocation("America/New_York")
SKILL.md:245In the instructionsOpen original file
```gofmt.Printf("%+v\n", err)       // verbose with stack tracebytes, _ := json.Marshal(err)  // JSON for loggingslog.Error(err.Error(), slog.Any("error", err))  // slog integration```
SKILL.md:54In the instructionsOpen original file
    Code("network_failure").       // machine-readable identifier    User("user-123", "email", "foo@bar.com").  // user context    With("query", query).          // custom attributes    Errorf("failed to fetch user: %s", "timeout")```
SKILL.md:96In the instructionsOpen original file
func (r *UserRepository) FetchUser(id string) (*User, error) {    query := "SELECT * FROM users WHERE id = $1"    row, err := r.db.Query(query, id)    if err != nil {        return nil, oops.            In("user-repository").            Tags("database", "postgres").            With("query", query).            With("user_id", id).            Wrapf(err, "failed to fetch user from database")    }
Could it delete files or keep running?Looks for broad file deletion, disk overwrites, and programs set to start automatically.No risks found
Could it bypass safety checks?Looks for skipped website security checks, excessive file access, or actions that skip your approval.Risks found: 1
Low risk

Declared tool access exceeds the core needs of structured-error guidance

Source references: 3
What we found

The Skill requests file writes, unrestricted `git` subcommands, web documentation access, and Agent invocation. Go edits and checks fit the purpose, but broad Git, network, and agent capabilities expand what can affect repositories, remote accounts, or disclosed data. The supplied content does not show that these capabilities will necessarily be used.

Why this matters

If the host grants permissions solely from this declaration, Skill-driven activity could modify additional files, run commit or push-related commands, or send query material to external services.

What this evidence establishes

The metadata lists file writes, all git subcommands, documentation network access, and Agent capability, while the stated purpose is primarily Go error handling. However, the source does not show whether the host actually grants these permissions, nor does it instruct use of git, Agent, or remote-account writes; network access also has a legitimate documentation purpose. Thus the broad declaration is visible, but repository/account impact or data disclosure is not established. Users can restrict execution to read-only and necessary Go checks, approving network or git operations separately.

This assessment concerns the code and conditions shown, not proof that harm has occurred.
SKILL.md:18In the instructionsOpen original file
    skill-library-version: "1.21.0"allowed-tools: Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent WebFetch mcp__context7__resolve-library-id mcp__context7__query-docs Bash(godig:*) Bash(gopls:*) LSP mcp__gopls__*paths:
Show 2 other places
SKILL.md:3In the instructionsOpen original file
name: golang-samber-oopsdescription: "Structured error handling in Golang with samber/oops — error builders, stack traces, error codes, error context, error wrapping, error attributes, user-facing vs developer messages, panic recovery, and logger integration. Apply when using or adopting samber/oops, or when the codebase already imports github.com/samber/oops."user-invocable: true
SKILL.md:39In the instructionsOpen original file
This skill is not exhaustive — refer to library documentation and code examples for more information:- For Go package docs, symbols, versions, importers, and known vulnerabilities, → See `samber/cc-skills-golang@golang-pkg-go-dev` skill (`godig`), preferred over Context7 for Go package facts.- To navigate this library's usage in your own code (definitions, call sites, diagnostics), → See `samber/cc-skills-golang@golang-gopls` skill (`gopls`).- Context7 remains a fallback for docs not indexed on pkg.go.dev.
Could it mislead the AI or hide text?Checks the skill instructions for requests to ignore you, influence the report, or hide text in invisible characters.No risks found
Could it change links or payment recipients without asking?Looks for forced referral or payment changes combined with instructions to hide the change.No risks found

Inside this skill

8 instruction sections

The Skill teaches Go errors that carry domains, tags, error codes, user/tenant information, and custom attributes through the call stack.

View source
SKILL.md:27In the instructionsOpen original file
**samber/oops** is a drop-in replacement for Go's standard error handling that adds structured context, stack traces, error codes, public messages, and panic recovery. Variable data goes in `.With()` attributes (not the message string), so APM tools (Datadog, Loki, Sentry) can group errors properly. Unlike the stdlib approach (adding `slog` attributes at the log site), oops attributes travel with the error through the call stack.
SKILL.md:71In the instructionsOpen original file
| --- | --- || `.With("key", value)` | Add custom key-value attribute (lazy `func() any` values supported) || `.WithContext(ctx, "key1", "key2")` | Extract values from Go context into attributes (lazy values supported) || `.In("domain")` | Set the feature/service/domain || `.Tags("auth", "sql")` | Add categorization tags (query with `err.HasTag("tag")`) || `.Code("iam_authz_missing_permission")` | Set machine-readable error identifier/slug || `.Public("Could not fetch user.")` | Set user-safe message (separate from technical details) || `.Hint("Runbook: https://doc.acme.org/doc/abcd.md")` | Add debugging hint for developers || `.Owner("team/slack")` | Identify responsible team/owner || `.User(id, "k", "v")` | Add user identifier and attributes || `.Tenant(id, "k", "v")` | Add tenant/organization context and attributes || `.Trace(id)` | Add trace / correlation ID (default: ULID) || `.Span(id)` | Add span ID representing a unit of work/operation (default: ULID) || `.Time(t)` | Override error timestamp (default: `time.Now()`) || `.Since(t)` | Set duration based on time since `t` (exposed via `err.Duration()`) || `.Duration(d)` | Set explicit error duration || `.Request(req, includeBody)` | Attach `*http.Request` (optionally including body) || `.Response(res, includeBody)` | Attach `*http.Response` (optionally including body) || `oops.FromContext(ctx)` | Start from an `OopsErrorBuilder` stored in a Go context |

The HTTP example separates technical errors from public messages and explicitly excludes the request body when attaching the request.

View source
SKILL.md:118In the instructionsOpen original file
    if err != nil {        err = oops.            In("http-handler").            Tags("endpoint", "/users").            Request(r, false).            User(userID).            Wrapf(err, "create user failed")        http.Error(w, oops.GetPublic(err, "Internal server error"), http.StatusInternalServerError)        return
Start here · InstructionsSKILL.md
golang-samber-oops
Lines connect the instruction file to its sections, not an observed execution order. Select a section to read the source. 1 more sections are available in the original file.

File reference map

References: 1
Files making referencesReferenced content
Lines show actual file references, not execution order. Select a node to highlight its connections and inspect the files and source locations. Dashed lines include files that still need locating.
Files and check records3 files

Coverage and gaps

Content covered in each file

These are the source ranges included in this check, not a guarantee that every issue has been resolved.

  • SKILL.mdFull text included
  • references/advanced.mdFull text included
  • evals/evals.jsonFull text included

This report is for the version above. We read the available code and instructions without running the skill or checking extra packages it installs. This is not a promise of safety: a different version or setup may behave differently.

  • SKILL.mdInstructions
  • evals/evals.jsonSupporting file
  • references/advanced.mdSupporting file

Operations mentioned in code and instructions

Connect to websites
SKILL.md:12In the instructionsOpen original file
    emoji: "💥"    homepage: https://github.com/samber/cc-skills-golang    requires:
SKILL.md:77In the instructionsOpen original file
| `.Public("Could not fetch user.")` | Set user-safe message (separate from technical details) || `.Hint("Runbook: https://doc.acme.org/doc/abcd.md")` | Add debugging hint for developers || `.Owner("team/slack")` | Identify responsible team/owner |
SKILL.md:276In the instructionsOpen original file
- [github.com/samber/oops](https://github.com/samber/oops)- [pkg.go.dev/github.com/samber/oops](https://pkg.go.dev/github.com/samber/oops)
Run commands
SKILL.md:18In the instructionsOpen original file
    skill-library-version: "1.21.0"allowed-tools: Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent WebFetch mcp__context7__resolve-library-id mcp__context7__query-docs Bash(godig:*) Bash(gopls:*) LSP mcp__gopls__*paths:
Lines read
490
File checksum (to compare versions)
cfadf9fc8700a7d2d144c9fc53c3cce3ea0fade70a64b610cbbac9f3c54d1f83