HUB
Sign inSign up
garie-securityheaders logo

eeacms/garie-securityheaders

By eeacms

•Updated 5 months ago

Garie securityheaders plugin docker image

Image
0

8.4K

eeacms/garie-securityheaders repository overview

⁠Garie securityheaders plugin

Tool to gather securityheaders metrics and supports CRON jobs.

MIT

Highlights

The garie-securityheaders plugin utilizes both SecurityHeaders.com and Mozilla’s HTTP Observatory to provide website security analysis.

Security Headers Score

  • Poll for http://securityheaders.com/⁠ score on any website and stores the data into InfluxDB
    • A+ - 100
    • A - 90
    • B - 80
    • C - 60
    • D - 40
    • E - 20
    • F - 10
    • R - 0
  • Saves security reports as HTML for reference.
  • Setup within minutes

Mozilla HTTP Observatory Score

  • Uses Mozilla’s HTTP Observatory⁠ to perform a security analysis of website headers
  • Runs mdn-http-observatory-scan to scan a website
  • Extracts the security score and grade, storing them in the database

⁠Overview of garie-securityheaders

Garie-securityheaders was developed as a plugin for the Garie⁠ architecture.

Garie⁠ is an out the box web performance toolkit, and garie-securityheaders is a plugin that generates and stores securityheaders data into InfluxDB.

Garie-securityheaders can also run independently outside the Garie environment as a standalone tool.

If your interested in an out the box solution that supports multiple performance tools like securityheaders, google-speed-insight and lighthouse then checkout Garie⁠.

If you want to run garie-securityheaders as a standalone tool, follow the instructions below.

⁠Getting Started

⁠Prerequisites
  • Docker installed
⁠Running garie-securityheaders

You can get setup with the basics in a few minutes.

First clone the repo.

git clone [email protected]:eea/garie-securityheaders.git

Next setup you're config. Edit the config.json and add websites to the list.

{
  "plugins":{
        "securityheaders":{
            "cron": "0 */4 * * *",
            "maxCpus": 1,
            "requestDelay": 1000
        }
    },
  "urls": [
    {
      "url": "https://www.eea.europa.eu/"
    },
    {
      "url": "https://biodiversity.europa.eu/"
    },
    {
      "url": "https://www.eionet.europa.eu/gemet/en/themes/"
    },
    {
      "url": "https://webq2test.eionet.europa.eu/"
    }
  ]
}

Once you finished edited your config, lets setup our environment.

docker-compose up

This will build your copy of garie-securityheaders and run the application.

On start garie-securityheaders will start to gather performance metrics for the websites added to the config.json.

⁠config.json

PropertyTypeDescription
plugins.securityheaders.cronstring (optional)Cron timer. Supports syntax can be found [here].(https://www.npmjs.com/package/cron⁠)
plugins.securityheaders.maxCpusnumber (optional)Limits CPU usage for security scans
plugins.securityheaders.requestDelaynumber (optional)Delay (ms) between requests
plugins.securityheaders.retryobject (optional)Configuration how to retry the failed tasks
plugins.securityheaders.retry.afternumber (optional, default 30)Minutes before we retry to execute the tasks
plugins.securityheaders.retry.timesnumber (optional, default 3)How many time to retry to execute the failed tasks
plugins.securityheaders.retry.timeRangenumber (optional, default 360)Period in minutes to be checked in influx, to know if a task failed
plugins.securityheaders.max_age_of_report_filesnumber (optional, default 365)Maximum age (in days) for all the files. Any older file will be deleted.
plugins.securityheaders.delete_files_by_typeobject (optional, no default)Configuration for deletion of custom files. (e.g. mp4 files)
plugins.securityheaders.delete_files_by_type.typestring (required for 'delete_files_by_type')The type / extension of the files we want to delete. (e.g. "mp4").
plugins.securityheaders.delete_files_by_type.agenumber (required for 'delete_files_by_type')Maximum age (in days) of the custom files. Any older file will be deleted.
urlsobject (required)Config for lighthouse. More detail below

urls object

PropertyTypeDescription
urlstring (required)Url to get securityheaders metrics for.

For more information please go to the garie-plugin⁠ repo.

Tag summary
Recent tags
Content type
Image
Digest
sha256:677f58cfe…
Size
426.2 MB
Last updated
5 months ago
docker pull eeacms/garie-securityheaders:latest