{"id":13832166,"url":"https://github.com/globalsign/certlint","last_synced_at":"2025-07-09T16:34:14.429Z","repository":{"id":57504867,"uuid":"70924765","full_name":"globalsign/certlint","owner":"globalsign","description":"X.509 certificate linter, written in Go","archived":true,"fork":false,"pushed_at":"2019-01-05T14:36:36.000Z","size":182,"stargazers_count":59,"open_issues_count":2,"forks_count":15,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-11-20T14:47:46.398Z","etag":null,"topics":["asn1","certificate","go","golang","linter","pki","x509"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/globalsign.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-14T15:48:37.000Z","updated_at":"2024-06-03T01:57:55.000Z","dependencies_parsed_at":"2022-09-13T03:11:34.281Z","dependency_job_id":null,"html_url":"https://github.com/globalsign/certlint","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/globalsign/certlint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globalsign%2Fcertlint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globalsign%2Fcertlint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globalsign%2Fcertlint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globalsign%2Fcertlint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/globalsign","download_url":"https://codeload.github.com/globalsign/certlint/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globalsign%2Fcertlint/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264495035,"owners_count":23617486,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asn1","certificate","go","golang","linter","pki","x509"],"created_at":"2024-08-04T10:01:53.399Z","updated_at":"2025-07-09T16:34:14.093Z","avatar_url":"https://github.com/globalsign.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# certlint\r\n\r\n[![Build Status](https://travis-ci.org/globalsign/certlint.svg?branch=master)](https://travis-ci.org/globalsign/certlint)\r\n[![Go Report Card](https://goreportcard.com/badge/github.com/globalsign/certlint)](https://goreportcard.com/report/github.com/globalsign/certlint)\r\n[![Coverage Status](http://codecov.io/github/globalsign/certlint/coverage.svg?branch=master)](http://codecov.io/github.com/globalsign/certlint?branch=master)\r\n[![GoDoc](https://godoc.org/github.com/globalsign/certlint?status.svg)](https://godoc.org/github.com/globalsign/certlint)\r\n\r\nX.509 certificate linter written in Go\r\n\r\n#### General\r\nThis package is a work in progress.\r\n\r\nPlease keep in mind that:\r\n- This is an early release and may contain bugs or false reports\r\n- Not all checks have been fully implemented or verified against the standard\r\n- CLI flag, APIs and CSV export are subject to change\r\n\r\nCode contributions and tests are highly welcome!\r\n\r\n#### Installation\r\n\r\nTo install from source, just run:\r\n```bash\r\ngo get -u github.com/globalsign/certlint\r\ngo install github.com/globalsign/certlint\r\n```\r\n\r\n#### CLI: Usage\r\nThe 'certlint' command line utility included with this package can be used to test a single certificate or a large pem container to bulk test millions of certificates. The command is used to test the linter on a large number of certificates but could use fresh up to reduce code complexity.\r\n\r\n```\r\nUsage of ./certlint:\r\n  -bulk string\r\n        Bulk certificates file\r\n  -cert string\r\n        Certificate file\r\n  -errlevel string\r\n        Exit non-zero for Errors at this level (default \"error\")\r\n  -expired\r\n        Test expired certificates\r\n  -help\r\n        Show this help\r\n  -include\r\n        Include certificates in report\r\n  -issuer string\r\n        Certificate file\r\n  -pprof\r\n        Generate pprof profile\r\n  -report string\r\n        Report filename (default \"report.csv\")\r\n  -revoked\r\n        Check if certificates are revoked\r\n```\r\n\r\n##### CLI: One certificate\r\n```bash\r\n$ certlint -cert certificate.pem\r\n```\r\n\r\n##### CLI: One certificate, exiting non-zero for Warning and above\r\n```bash\r\n$ certlint -errlevel warning -cert certificate.pem\r\n```\r\n\r\n##### CLI: A series of PEM encoded certificates\r\n```bash\r\n$ certlint -bulk largestore.pem\r\n```\r\n\r\n##### CLI: Testing expired certificates\r\n```bash\r\n$ certlint -expired -bulk largestore.pem\r\n```\r\n\r\n##### API: Usage\r\nImport one or all of these packages:\r\n\r\n```go\r\nimport \"github.com/globalsign/certlint/asn1\"\r\nimport \"github.com/globalsign/certlint/certdata\"\r\nimport \"github.com/globalsign/certlint/checks\"\r\n```\r\n\r\nYou can import all available checks:\r\n```go\r\n_ \"github.com/globalsign/certlint/checks/extensions/all\"\r\n_ \"github.com/globalsign/certlint/checks/certificate/all\"\r\n```\r\n\r\nOr you can just import a restricted set:\r\n```go\r\n// Check for certificate (ext) KeyUsage extension\r\n_ \"github.com/globalsign/certlint/checks/extensions/extkeyusage\"\r\n_ \"github.com/globalsign/certlint/checks/extensions/keyusage\"\r\n\r\n// Also check the parsed certificate (ext) keyusage content\r\n_ \"github.com/globalsign/certlint/checks/certificate/extkeyusage\"\r\n_ \"github.com/globalsign/certlint/checks/certificate/keyusage\"\r\n```\r\n\r\n##### API: Check ASN.1 value formatting\r\n```go\r\nal := new(asn1.Linter)\r\ne := al.CheckStruct(der)\r\nif e != nil {\r\n  for _, err := range e.List() {\r\n    fmt.Println(err)\r\n  }\r\n}\r\n```\r\n\r\n##### API: Check certificate details\r\n```go\r\nd, err := certdata.Load(der)\r\nif err == nil {\r\n  e := checks.Certificate.Check(d)\r\n  if e != nil {\r\n    for _, err := range e.List() {\r\n      fmt.Println(err)\r\n    }\r\n  }\r\n}\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobalsign%2Fcertlint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglobalsign%2Fcertlint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobalsign%2Fcertlint/lists"}