|
| 1 | +# This is the default configuration file for Snuffleupagus (https://snuffleupagus.rtfd.io). |
| 2 | +# It contains "reasonable" defaults that won't break your websites, |
| 3 | +# and a lot of commented directives that you can enable if you want to |
| 4 | +# have a better protection. |
| 5 | + |
1 | 6 | # Harden the PRNG
|
2 | 7 | sp.harden_random.enable();
|
3 | 8 |
|
4 | 9 | # Disabled XXE
|
5 | 10 | sp.disable_xxe.enable();
|
6 | 11 |
|
| 12 | +# Global configuration variables |
| 13 | +# sp.global.secret_key("YOU _DO_ NEED TO CHANGE THIS WITH SOME RANDOM CHARACTERS."); |
| 14 | + |
| 15 | +# Globally activate strict mode |
| 16 | +# https://secure.php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration.strict |
| 17 | +# sp.global_strict.enable(); |
| 18 | + |
| 19 | +# Prevent unserialize-related exploits |
| 20 | +# sp.unserialize_hmac.enable(); |
| 21 | + |
| 22 | +# Only allow execution of read-only files. This is a low-hanging fruit that you should enable. |
| 23 | +# sp.readonly_exec.enable(); |
| 24 | + |
| 25 | +# Php has a lot of wrappers, most of them aren't usually useful, you should |
| 26 | +# only enable the ones you're using. |
| 27 | +# sp.wrappers_whitelist.list("file,php,phar"); |
| 28 | + |
| 29 | +# Prevent sloppy comparisons. |
| 30 | +# sp.sloppy_comparison.enable(); |
| 31 | + |
7 | 32 | # use SameSite on session cookie
|
| 33 | +# https://snuffleupagus.readthedocs.io/features.html#protection-against-cross-site-request-forgery |
8 | 34 | sp.cookie.name("PHPSESSID").samesite("lax");
|
9 | 35 |
|
10 | 36 | # Harden the `chmod` function
|
|
0 commit comments