-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/nginx-module-more-headers
- Loading branch information
Showing
13 changed files
with
252 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
# The purpose of this script is to test that `configure-rules.sh` will run | ||
# successfully for all variables that we configure. | ||
|
||
set -e | ||
|
||
conf_file="${1}" | ||
env_file="${2}" | ||
|
||
if [ -f "${env_file}" ]; then | ||
rm "${env_file}" | ||
fi | ||
|
||
while read -r line; do | ||
if [ -z "${line}" ] || echo "${line}" | grep -Eq "^#"; then | ||
continue | ||
fi | ||
|
||
var_name="$(cut -d'|' -f2 <<< "${line}")" | ||
test_value="$(cut -d'|' -f5 <<< "${line}")" | ||
echo "Setting ${var_name}=${test_value}" | ||
echo "${var_name}=${test_value}" >> "${env_file}" | ||
done < "${conf_file}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Format: <legacy (0|1)>|<env var>|<rule ID>|<tx var name>|<test value> | ||
# The octothorpe (#) designates a comment, comments are ignored | ||
# See `.github/workflows/configure-rules-for-test.sh` for how the test value is used. | ||
|
||
# Superceded by BLOCKING_PARANOIA | ||
true|PARANOIA|900000|blocking_paranoia_level|4 | ||
true|PARANOIA|900001|detection_paranoia_level|4 | ||
false|BLOCKING_PARANOIA|900000|blocking_paranoia_level|4 | ||
# Superceded by DETECTION_PARANOIA | ||
true|EXECUTING_PARANOIA|900001|executing_paranoia_level|4 | ||
false|DETECTION_PARANOIA|900001|detection_paranoia_level|4 | ||
false|ENFORCE_BODYPROC_URLENCODED|900010|enforce_bodyproc_urlencoded|0 | ||
false|INBOUND_ANOMALY|900110|inbound_anomaly_score_threshold|6 | ||
false|OUTBOUND_ANOMALY|900110|outbound_anomaly_score_threshold|6 | ||
false|ALLOWED_METHODS|900200|allowed_methods|GET OPTIONS | ||
false|ALLOWED_REQUEST_CONTENT_TYPE|900220|allowed_request_content_type|application/json | ||
false|ALLOWED_REQUEST_CONTENT_TYPE_CHARSET|900280|allowed_request_content_type_charset|utf-8 | ||
false|ALLOWED_HTTP_VERSIONS|900230|allowed_http_versions|1.1 | ||
false|RESTRICTED_EXTENSIONS|900240|restricted_extensions|.exe/ | ||
false|RESTRICTED_HEADERS_BASIC|900250|restricted_headers_basic|/if/ | ||
false|RESTRICTED_HEADERS_EXTENDED|900255|restricted_headers_extended|/x-some-header/ | ||
false|MAX_NUM_ARGS|900300|max_num_args|100 | ||
false|ARG_NAME_LENGTH|900310|arg_name_length|200 | ||
false|ARG_LENGTH|900230|arg_length|300 | ||
false|TOTAL_ARG_LENGTH|900330|total_arg_length|400 | ||
false|MAX_FILE_SIZE|900340|max_file_size|500 | ||
false|COMBINED_FILE_SIZES|900350|combined_file_sizes|600 | ||
false|VALIDATE_UTF8_ENCODING|900950|crs_validate_utf8_encoding|0 | ||
false|REPORTING_LEVEL|900115|reporting_level|5 |
Oops, something went wrong.