Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
v1ll4n committed Jul 2, 2024
1 parent fbfa8bb commit ecdc5af
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/essential-for-syntaxflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
wget -O yak https://aliyun-oss.yaklang.com/yak/1.3.4-alpha9/yak_linux_amd64
chmod +x yak
- name: Setup PATH
run: echo "${GITHUB_WORKSPACE}" >> $GITHUB_PATH

- name: Execute test script
run: |
chmod +x scripts/test.sh
Expand Down
21 changes: 13 additions & 8 deletions scripts/test.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
#!/bin/bash

# 定义目录和项目名称数组
PROJECTS=("java-jdbc" "java-springboot-misc" "java-filesystem-operator")

# 遍历数组
for PROJECT in "${PROJECTS[@]}"; do
# 执行 YAK 静态安全分析和安全固定
echo "Running YAK for project $PROJECT"
yak ssa -t ./$PROJECT -p $PROJECT && yak sf -p $PROJECT $PROJECT
echo "Running YAK SSA for project $PROJECT"
yak ssa -t ./$PROJECT -p $PROJECT
if [ $? -ne 0 ]; then
echo "Error processing $PROJECT"
else
echo "Completed processing $PROJECT"
echo "Error running YAK SSA for $PROJECT"
exit 1 # 退出状态1表示错误
fi

echo "Running YAK SF for project $PROJECT"
yak sf -p $PROJECT $PROJECT
if [ $? -ne 0 ]; then
echo "Error running YAK SF for $PROJECT"
exit 1 # 退出状态1表示错误
fi

echo "Completed processing $PROJECT"
done

0 comments on commit ecdc5af

Please sign in to comment.