From 172e55d06916e5b3f19d8461dd741bab6989d6ca Mon Sep 17 00:00:00 2001 From: stevenHust Date: Fri, 17 Nov 2023 15:46:32 +0800 Subject: [PATCH] Create cloud_code_scan.yml --- .github/workflows/cloud_code_scan.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/cloud_code_scan.yml diff --git a/.github/workflows/cloud_code_scan.yml b/.github/workflows/cloud_code_scan.yml new file mode 100644 index 0000000..c870fb4 --- /dev/null +++ b/.github/workflows/cloud_code_scan.yml @@ -0,0 +1,25 @@ +# 此YAML文件定义了两个作业,分别用于进行安全扫描和开源合规的代码扫描,使用了相同的GitHub Action,并传入了不同的参数。 +name: Alipay Cloud Devops Codescan +on: + pull_request_target: +jobs: + # # stc作业使用了ubuntu-latest作为运行环境,包含了一个步骤(steps)codeScan,该步骤使用了layotto/alipay-cloud-devops-codescan@main作为GitHub Action,并传入了一些参数(parent_uid、private_key、code_type) + stc: # 安全扫描 + runs-on: ubuntu-latest + steps: + - name: codeScan + uses: layotto/alipay-cloud-devops-codescan@main + with: + parent_uid: ${{ secrets.ALI_PID }} + private_key: ${{ secrets.ALI_PK }} + scan_type: stc + # sca作业也使用了ubuntu-latest作为运行环境。sca作业也包含了一个步骤codeScan,使用了相同的GitHub Action,并传入了相同的参数。 + sca: # 开源合规 + runs-on: ubuntu-latest + steps: + - name: codeScan + uses: layotto/alipay-cloud-devops-codescan@main + with: + parent_uid: ${{ secrets.ALI_PID }} + private_key: ${{ secrets.ALI_PK }} + scan_type: sca