Skip to content

Commit

Permalink
update code scan (opea-project#17)
Browse files Browse the repository at this point in the history
Signed-off-by: chensuyue <[email protected]>
  • Loading branch information
chensuyue authored Apr 30, 2024
1 parent 80176c3 commit 3a9a3de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/scripts/codeScan/bandit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
source /GenAIComps/.github/workflows/scripts/change_color
pip install bandit==1.7.8
log_dir=/GenAIComps/.github/workflows/scripts/codeScan
python -m bandit -r -lll -iii /GenAIComps >${log_dir}/bandit.log
python -m bandit -r -lll -iii /GenAIComps 2>&1 | tee ${log_dir}/bandit.log
exit_code=$?

$BOLD_YELLOW && echo " ----------------- Current log file output start --------------------------"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scripts/codeScan/trellix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ echo "Downloading latest defs from $DEFS_URL/$filename2..." \
&& echo "SUCCESS" || fail

echo "Extracting latest defs..." \
&& unzip $filename2 -d /usr/local/uvscan \
&& unzip -o $filename2 -d /usr/local/uvscan \
&& echo "SUCCESS" || fail

echo "--- Scanning ---"
ENV_SCAN_OPTS="--analyze --mime --program --recursive --unzip --threads 4 --summary --verbose --html=${workspace}/.github/workflows/scripts/codeScan/report.html"
echo "Scan Options: $ENV_SCAN_OPTS"
uvscan $ENV_SCAN_OPTS /GenAIComps > ${log_dir}/trellix.log
uvscan $ENV_SCAN_OPTS ${workspace} 2>&1 | tee ${log_dir}/trellix.log


if [[ $(grep "Possibly Infected" ${log_dir}/trellix.log | sed 's/[^0-9]//g') != 0 ]]; then
Expand Down

0 comments on commit 3a9a3de

Please sign in to comment.