A simple Ruby script that checks the end of security support dates for various software by fetching data from endoflife.date. It helps developers and sysadmins stay up to date on which software versions are still receiving security patches.
It sends notifications via email using a Gmail account configured with an app password, following the instructions: Setting up app passwords.
Clone the repository:
git clone https://github.com/your-username/end-of-sec.git
cd end-of-sec
Make sure the following files are present in the project folder:
end-of-sec.rb
— the script itselfgmail_email_settings.env
— Gmail credentials and configurationproducts.csv
— list of products to check, one per line
Run it with ruby end-of-sec.rb
from the command line.
You can also run it from a cron job (see the crontab.txt.example
)
- Ruby 3.x or newer (It may work with Ruby 2.x, but hasn’t been tested.)
- Ruby standard & external libraries:
- Internet connection.
These files must be present in the same folder as the script:
gmail_email_settings.env
– contains Gmail credentials and config for sending email notifications (see thegmail_email_settings.env.example
).products.csv
– list of products to check, one per line. The file is provided with the script. Uncomment the product lines which you want to get notified about.
This file stores Gmail account credentials and settings used by the script to send notification emails.
Variable | Description |
---|---|
EMAIL_SMTP_SERVER |
SMTP server address |
EMAIL_SMTP_SERVER_PORT |
SMTP server port |
EMAIL_SMTP_SERVER_DOMAIN |
SMTP domain |
EMAIL_AUTHENTICATION_TYPE |
Authentication method |
EMAIL_CONTENT_TYPE |
Email content type and encoding |
EMAIL_USERNAME |
Gmail account username (email address) |
EMAIL_PASSWORD |
Gmail app password (not your regular password) |
EMAIL_SUBJECT |
Subject line for the notification email |
EMAIL_RECIPIENTS |
Comma-separated list of recipient email addresses |
EMAIL_ALERT_DAYS_BEFORE |
Days before security support ends to trigger a notification |
EMAIL_ALERT_DAYS_AFTER |
Days after security support ends to trigger a notification |
EMAIL_USERNAME
— Gmail account username (email address)EMAIL_PASSWORD
— Gmail app password (not your regular password)EMAIL_RECIPIENTS
— Comma-separated list of recipient email addressesEMAIL_ALERT_DAYS_BEFORE
— Days before security support ends to trigger a notificationEMAIL_ALERT_DAYS_AFTER
— Days after security support ends to trigger a notification
⚠️ Keep this file secure and never commit it to public repositories. Especially keep your password secure and avoid committing it publicly.
To ensure you're checking the latest data, you can recreate the products.csv
file by running the create_products.csv.rb
script.
Probably you would want to run it periodically (e.g., once every 7–10 days) using a cron job or other task scheduler.
Make sure to uncomment the product lines you want notifications for.
ruby update_products_file.rb
This project is licensed under the MIT License.
Data provided by endoflife.date.
This script was created as part of a personal learning project to explore Ruby programming.
Feel free to open an Issue or start a Discussion if you have ideas for improvements or new features!