{"id":28629772,"url":"https://github.com/codebox/https-certificate-expiry-checker","last_synced_at":"2025-09-02T15:38:27.869Z","repository":{"id":140514631,"uuid":"313053813","full_name":"codebox/https-certificate-expiry-checker","owner":"codebox","description":"A Python script for checking when HTTPS certificates will expire","archived":false,"fork":false,"pushed_at":"2024-11-03T17:47:24.000Z","size":8,"stargazers_count":11,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-03T18:28:52.460Z","etag":null,"topics":["https","tls-certificate","web-security"],"latest_commit_sha":null,"homepage":"https://codebox.net/pages/https-certificate-expiry-checker","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codebox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-15T14:51:26.000Z","updated_at":"2024-11-03T17:47:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"c2c3a3b8-c5c1-483e-9fb0-7ba1a6831a02","html_url":"https://github.com/codebox/https-certificate-expiry-checker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codebox/https-certificate-expiry-checker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebox%2Fhttps-certificate-expiry-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebox%2Fhttps-certificate-expiry-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebox%2Fhttps-certificate-expiry-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebox%2Fhttps-certificate-expiry-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codebox","download_url":"https://codeload.github.com/codebox/https-certificate-expiry-checker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebox%2Fhttps-certificate-expiry-checker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259462578,"owners_count":22861514,"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":["https","tls-certificate","web-security"],"created_at":"2025-06-12T12:13:33.227Z","updated_at":"2025-06-12T12:13:33.981Z","avatar_url":"https://github.com/codebox.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# https-certificate-expiry-checker\n\nThis is a Python script for checking the expiry dates of website TLS/SSL certificates, used for creating secure HTTPS connections.\n\nTo use the script simply run it from the command line, along with a list of the domain names you wish to check. For example:\n\n    \u003e python check-certificates.py codebox.net www.codebox.net api.codebox.net oldtime.radio c0debox.net\n    \n    Checking 5 endpoints...\n    codebox.net     OK    expires in 48 days\n    www.codebox.net OK    expires in 48 days\n    api.codebox.net OK    expires in 48 days\n    oldtime.radio   WARN  expires in 6 days 21 hours 13 minutes\n    c0debox.net     ERROR [Errno 8] nodename nor servname provided, or not known\n \nThe script will list the status of each domain's certificate, displaying '`OK`' if the certificate was retrieved and is not expiring soon, '`WARN`' if the certificate's expiry date is getting close, or '`ERROR`' if the certificate has already expired, or if there is some other problem such as the host could not be found, or no certificate could be retrieved.\n\nBy default '`WARN`' will be displayed if there are less than 7 days until a certificate expires, but this interval can be changed by altering the value of the [WARN_IF_DAYS_LESS_THAN](https://github.com/codebox/https-certificate-expiry-checker/blob/main/check-certificates.py#L13) variable.\n \nIf any of the domains are using a non-standard port for HTTPS then this should be specified using the usual notation of `host:port`, for example:\n\n    \u003e python check-certificates.py test.codebox.net:8443\n\nThe script returns an exit code indicating whether the checks passed or not, making it easier to take appropriate action in a shell script (for example, send a email if the checks fail):\n\n| Condition | Exit Code |\n|-----------|-----------|\n| Everything is fine, none of the certificates are expiring soon | 0 |\n| At least one certificate is expiring soon | 1 |\n| At least one certificate has expired, is invalid, or could not be retrieved | 2 |\n| Both of the previous conditions occurred | 3 |\n| No domain list was provided when running the script | 9 |\n \nCertificate checks are performed in parallel, making the process of checking multiple domains much quicker. The number of concurrent checks that will be performed is determined by the value of the [WORKER_THREAD_COUNT](https://github.com/codebox/https-certificate-expiry-checker/blob/main/check-certificates.py#L11) variable.\n  ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebox%2Fhttps-certificate-expiry-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodebox%2Fhttps-certificate-expiry-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebox%2Fhttps-certificate-expiry-checker/lists"}