diff --git a/inspection.sh b/inspection.sh index 17301ae..d295954 100644 --- a/inspection.sh +++ b/inspection.sh @@ -72,3 +72,6 @@ done # Find empty attributes grep -rln "=\"\"" --include \*.tpl.php ${ROOT_PATH} > ${ROOT_PATH}/${BUILD_PATH}/logs/unusedattributes.log + +# Html tag inspection +. ${ROOT_PATH}/${BUILD_PATH}/security.sh diff --git a/security.sh b/security.sh new file mode 100644 index 0000000..429d7a8 --- /dev/null +++ b/security.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +. var.sh + +# PHP code inspection +CODE[0]="file_get_content" +CODE[1]="fopen" +CODE[2]="include" +CODE[3]="require" +CODE[4]="file_put_content" +CODE[5]="fread" +CODE[6]="fwrite" +CODE[7]="fget" +CODE[8]="fput" +CODE[9]="chmod" +CODE[10]="eval" +CODE[11]="delete" +CODE[12]="mkdir" +CODE[13]="move_uploaded_file" +CODE[14]="mkdir" +CODE[15]="copy" +CODE[16]="chown" +CODE[17]="touch" +CODE[18]="exec" +CODE[19]="_GET" +CODE[20]="_POST" +CODE[21]="_SESSION" +CODE[22]="_REQUEST" +CODE[23]="_SERVER" +CODE[24]="_COOKIE" +CODE[25]="_FILES" +CODE[26]="unlink" +CODE[27]="action=\"" + +for i in "${CODE[@]}" +do + grep -rln "$i" --include \*.php ${ROOT_PATH}/phpOMS >> ${ROOT_PATH}/${BUILD_PATH}/logs/criticalcodeFramwork.log + grep -rln "$i" --include \*.php ${ROOT_PATH}/Modules >> ${ROOT_PATH}/${BUILD_PATH}/logs/criticalcodeModules.log +done