Skip to content

Commit 50b4a15

Browse files
committed
Improve a bit the default rules
1 parent 5a6bdf6 commit 50b4a15

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Diff for: config/default.rules

+26
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,36 @@
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+
16
# Harden the PRNG
27
sp.harden_random.enable();
38

49
# Disabled XXE
510
sp.disable_xxe.enable();
611

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+
732
# use SameSite on session cookie
33+
# https://snuffleupagus.readthedocs.io/features.html#protection-against-cross-site-request-forgery
834
sp.cookie.name("PHPSESSID").samesite("lax");
935

1036
# Harden the `chmod` function

0 commit comments

Comments
 (0)