This is an automated email from the ASF dual-hosted git repository.
rabbah pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/incubator-openwhisk-release.git
The following commit(s) were added to refs/heads/master by this push:
new f0ba05c Improve executable file check (#270)
f0ba05c is described below
commit f0ba05cd3321ab1ac6b199939e58e9f4bd98783c
Author: David Grove <[email protected]>
AuthorDate: Tue Apr 23 14:52:21 2019 -0400
Improve executable file check (#270)
* Allow files with execute bits set if they have */bin/* in their path
* use `file` to identify non-text files
---
tools/rcverify.sh | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/rcverify.sh b/tools/rcverify.sh
index 1467654..a644f60 100755
--- a/tools/rcverify.sh
+++ b/tools/rcverify.sh
@@ -149,8 +149,12 @@
CMD="'$DIR/incubator-openwhisk-utilities/scancode/scanCode.py' --config '$DIR/in
SC=$(eval $CMD >& /dev/null)
validate $? 0 "$CMD"
-printf "scanning for binaries..."
-EXE=$(find "$DIR/$BASE" -type f ! -name "*.sh" ! -name "*.sh" ! -name "*.py" !
-name "*.php" ! -name "gradlew" ! -name "gradlew.bat" -perm -001)
+printf "scanning for executable files..."
+EXE=$(find "$DIR/$BASE" -type f ! -name "*.sh" ! -name "*.sh" ! -name "*.py" !
-name "*.php" ! -name "gradlew" ! -name "gradlew.bat" ! -path "*/bin/*" -perm
-001)
+validate "$EXE" "" "$EXE"
+
+printf "scanning for non-text files..."
+EXE=$(find "$DIR/$BASE" -type f -exec file --mime {} \; | grep -v ": text/")
validate "$EXE" "" "$EXE"
printf "scanning for archives..."