Author: Seth Schoen <[email protected]> Date: Wed, 3 Nov 2010 17:53:19 -0700 Subject: line spacing Commit: e75e05a60dc9db73718555d55b29012f1713cd3c
--- pending-rules/trivial-validate | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/pending-rules/trivial-validate b/pending-rules/trivial-validate index e2e9ec5..7fa66b0 100755 --- a/pending-rules/trivial-validate +++ b/pending-rules/trivial-validate @@ -4,18 +4,23 @@ echo "-- Rules not anchored to beginning of a line:" grep from= *.xml | cut -d\" -f2 | grep '^[^^]' || echo "(None.)" + echo echo "-- Rules with unescaped dots:" grep from= *.xml | cut -d\" -f2 | grep '[^\]\.[^*]' || echo "(None.)" + echo echo "-- Rules not containing trailing slash in from pattern:" grep from= *.xml | cut -d\" -f2 | grep -v '//.*/' || echo "(None.)" + echo echo "-- Rules not containing trailing slash in to pattern:" grep 'to="' *xml | sed 's/^.*to="//' | sed 's/\".*$//' | grep -v '//.*/' || echo "(None.)" + echo echo "-- Rules with missing closing slash in rule XML tag:" grep to= *xml | grep '[^/]>' || echo "(None.)" + echo echo "-- Rules redirecting to http in to pattern:" grep 'to="' *xml | sed 's/^.*to="//' | sed 's/\".*$//' | grep '^http:' || echo "(None.)" @@ -32,6 +37,7 @@ then else echo "-- Could not check XML validity because xmllint not found." fi + echo echo "-- Rules containing non-ASCII characters (possible homoglyph attacks):" none=true @@ -45,6 +51,7 @@ do done $none && echo "(None.)" +echo echo "--- Rules that lack at least one valid <target> tag:" none=true for i in *.xml -- 1.7.1
