Skip to content

[Go] Feature request: detect unchecked CertPool.AppendCertsFromPEM output #1853

@samber

Description

@samber

We should trigger an error if the value returned from AppendCertsFromPEM is not checked:

roots := x509.NewCertPool()
roots.AppendCertsFromPEM(caPEM)

See https://cs.opensource.google/go/go/+/refs/tags/go1.25.4:src/crypto/x509/cert_pool.go;l=219

The issue was found by Claude Code in my project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions