<commit_before># Content Security Policy (CSP) Violation Report Handler

Tiny Sinatra application to parse CSP violation reports,
format them nicely, and forward them on to an email address.
Easy to deploy with Passenger, or any other app container.

## Setup

Set the following environment variables, or place them in your
__.env__ file in development mode:

    CSP_REPORT_SENDER="CSP Reports <<EMAIL>>"
    CSP_REPORT_RECIPIENTS="<EMAIL>"

Apache example:
```apache
SetEnv CSP_REPORT_SENDER "CSP Reports <<EMAIL>>"<commit_msg>mention sendmail in description<commit_after># Content Security Policy (CSP) Violation Report Handler

Tiny Sinatra application to parse CSP violation reports,
format them nicely, and forward them on to an email address
using sendmail (via Pony gem). Easy to deploy with Passenger,
or any other app container.

## Setup

Set the following environment variables, or place them in your
__.env__ file in development mode:

    CSP_REPORT_SENDER="CSP Reports <<EMAIL>>"
    CSP_REPORT_RECIPIENTS="<EMAIL>"

Apache example:
```apache
SetEnv CSP_REPORT_SENDER "CSP Reports <<EMAIL>>"
{'fraction_non_alphanumeric': 0.0705244122965642, 'fraction_numerical': 0.0, 'mean_word_length': 5.473684210526316, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1930538', 'n_tokens_mistral': 336, 'n_tokens_neox': 324, 'n_words': 137}