Skip to content
This repository was archived by the owner on Jan 25, 2026. It is now read-only.
/ oshp-validator Public archive

Venom tests suite to validate an HTTP security response headers configuration against OSHP recommendation.

License

Notifications You must be signed in to change notification settings

oshp/oshp-validator

Caution

The project was transferred to the main repository of the OSHP project. Precisely into this location.

OWASP Secure Headers Project validator

Validate test suites

βœ… Venom test suites to validate an HTTP security response headers configuration against OSHP recommendation.

🎯 The objective is to provide a way to validate the configuration of non-Internet exposed applications in a flexible/portable way.

πŸ’‘ You can use the provided test suites, as a foundation, to tailor it to your context.

πŸ“‘ Syntax for the test suitesfile is validated using this yamllint configuration file.

Why venom?

πŸ€” We chose to leverage this tool for the following reasons:

  • It is free and open source.
  • It does not need any installation: Standalone binary file provided but you can easily compile it if you want a full control over the binary executed.
  • It is cross-platform.
  • It uses a descriptive approach for a tests suite and, then, do not need any code (or coding skills) to add/update a test.

Tests suite

Note

βœ… This tests suite is always synchronized with the latest OSHP recommendation.

πŸ“‹ It is provided via this single file.

πŸ’» Visual Studio Code is used for the tests suite development. A Visual Studio Code workspace file is provided for the project with recommended extensions.

πŸ“ The following parameters are supported:

Parameter name Description Default value Mandatory
target_site URL of the site for which the headers configuration must be tested. "" Yes
logout_url Relative path to the logout endpoint of the app. Use to test the configuration of the header "Clear-Site-Data". "" No
request_timeout_in_seconds Maximum waiting time in seconds for response from the target app. 20 No

How to use it?

You can use local installed venom or venom in a container image.

Local Venom

πŸ’» Follow the steps below.

  1. Get a release of venom for your platform.
  2. Run one the following commands corresponding to your context:
# Using default values
$ venom run --var="target_site=https://mysite.com" tests_suite.yml
# Using parameter to specify the logout page for the test of the header "Clear-Site-Data"
$ venom run --var="target_site=https://mysite.com" --var="logout_url=/logout" tests_suite.yml 

πŸ“½οΈ Live usage example (the parameter internet_facing does not exists anymore, see here for explanation):

Watch the video

πŸ’‘ Hints: Venom returns a code different from zero when a test fail or when you try an update and your version is the latest one. Therefore, to prevent your script to fail then add || true at the end of your command.

Container Image

πŸ’» Follow the steps below.

docker run --mount type=bind,source=$(pwd)/tests_suite.yml,target=/workdir/tests_suite.yml  ovhcom/venom:latest run --var="target_site=https://mysite.com" tests_suite.yml

Reporting

πŸ“– This section of the venom documentation describes the different formats supported for the integration in a CI/CD platform.

Tests suite mock service

🌍 The python script test_suite_mock.py provides a mock endpoint returning an HTTP response, for which, all HTTP response headers recommended by the OSHP will be set.

πŸ“¦ It is automatically deployed on https://oshp-validator-mock.onrender.com and it is used, by this CI workflow, to test the venom tests suite.

Case sensitivity for header names in Venom

πŸ“– See here from the version 1.2.0.

About

Venom tests suite to validate an HTTP security response headers configuration against OSHP recommendation.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors 6

Languages