openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rab...@apache.org
Subject [incubator-openwhisk-release] branch master updated: Improve executable file check (#270)
Date Tue, 23 Apr 2019 18:52:25 GMT
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 <dgrove-oss@users.noreply.github.com>
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..."


Mime
View raw message