From a208d0353e085cf9cfabd55fe469b1598c06274a Mon Sep 17 00:00:00 2001 From: csg01123119 Date: Tue, 5 Sep 2023 15:59:20 +0800 Subject: [PATCH] chore: add snyk_token to yml --- .github/workflows/codeCov.yml | 1 + .github/workflows/dev_node_test.yml | 14 ++++---------- .github/workflows/master_node_test.yml | 8 ++++---- .github/workflows/release.yml | 1 + .github/workflows/schedule.yml | 2 +- .github/workflows/snyk.yml | 5 ++--- 6 files changed, 13 insertions(+), 18 deletions(-) diff --git a/.github/workflows/codeCov.yml b/.github/workflows/codeCov.yml index 6a3114e15..d6ad7de40 100644 --- a/.github/workflows/codeCov.yml +++ b/.github/workflows/codeCov.yml @@ -23,6 +23,7 @@ jobs: ALI_SDK_STS_REGION: ${{secrets.ALI_SDK_STS_REGION}} ALI_SDK_STS_ROLE: ${{secrets.ALI_SDK_STS_ROLE}} ALI_SDK_STS_SECRET: ${{secrets.ALI_SDK_STS_SECRET}} + SNYK_TOKEN: ${{ secrets.SNYK_KEY }} steps: - uses: actions/checkout@v2 - name: test and report upload diff --git a/.github/workflows/dev_node_test.yml b/.github/workflows/dev_node_test.yml index 4d4cac411..a3d493aff 100644 --- a/.github/workflows/dev_node_test.yml +++ b/.github/workflows/dev_node_test.yml @@ -25,15 +25,13 @@ jobs: ALI_SDK_STS_REGION: ${{secrets.ALI_SDK_STS_REGION}} ALI_SDK_STS_ROLE: ${{secrets.ALI_SDK_STS_ROLE}} ALI_SDK_STS_SECRET: ${{secrets.ALI_SDK_STS_SECRET}} - + SNYK_TOKEN: ${{ secrets.SNYK_KEY }} strategy: matrix: node-version: [14.x] steps: - uses: actions/checkout@v2 - with: - ref: develop - name: browser build and test run: | curl cip.cc @@ -56,7 +54,7 @@ jobs: ALI_SDK_STS_REGION: ${{secrets.ALI_SDK_STS_REGION}} ALI_SDK_STS_ROLE: ${{secrets.ALI_SDK_STS_ROLE}} ALI_SDK_STS_SECRET: ${{secrets.ALI_SDK_STS_SECRET}} - + SNYK_TOKEN: ${{ secrets.SNYK_KEY }} strategy: matrix: node-version: [10.x] @@ -64,8 +62,6 @@ jobs: steps: - uses: actions/checkout@v2 - with: - ref: develop - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: @@ -89,7 +85,7 @@ jobs: ALI_SDK_STS_REGION: ${{secrets.ALI_SDK_STS_REGION}} ALI_SDK_STS_ROLE: ${{secrets.ALI_SDK_STS_ROLE}} ALI_SDK_STS_SECRET: ${{secrets.ALI_SDK_STS_SECRET}} - + SNYK_TOKEN: ${{ secrets.SNYK_KEY }} strategy: matrix: node-version: [12.x] @@ -97,8 +93,6 @@ jobs: steps: - uses: actions/checkout@v2 - with: - ref: develop - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: @@ -122,7 +116,7 @@ jobs: ALI_SDK_STS_REGION: ${{secrets.ALI_SDK_STS_REGION}} ALI_SDK_STS_ROLE: ${{secrets.ALI_SDK_STS_ROLE}} ALI_SDK_STS_SECRET: ${{secrets.ALI_SDK_STS_SECRET}} - + SNYK_TOKEN: ${{ secrets.SNYK_KEY }} strategy: matrix: node-version: [14.x] diff --git a/.github/workflows/master_node_test.yml b/.github/workflows/master_node_test.yml index dffa43b75..68a08cdc9 100644 --- a/.github/workflows/master_node_test.yml +++ b/.github/workflows/master_node_test.yml @@ -25,7 +25,7 @@ jobs: ALI_SDK_STS_REGION: ${{secrets.ALI_SDK_STS_REGION}} ALI_SDK_STS_ROLE: ${{secrets.ALI_SDK_STS_ROLE}} ALI_SDK_STS_SECRET: ${{secrets.ALI_SDK_STS_SECRET}} - + SNYK_TOKEN: ${{ secrets.SNYK_KEY }} strategy: matrix: node-version: [14.x] @@ -54,7 +54,7 @@ jobs: ALI_SDK_STS_REGION: ${{secrets.ALI_SDK_STS_REGION}} ALI_SDK_STS_ROLE: ${{secrets.ALI_SDK_STS_ROLE}} ALI_SDK_STS_SECRET: ${{secrets.ALI_SDK_STS_SECRET}} - + SNYK_TOKEN: ${{ secrets.SNYK_KEY }} strategy: matrix: node-version: [10.x] @@ -85,7 +85,7 @@ jobs: ALI_SDK_STS_REGION: ${{secrets.ALI_SDK_STS_REGION}} ALI_SDK_STS_ROLE: ${{secrets.ALI_SDK_STS_ROLE}} ALI_SDK_STS_SECRET: ${{secrets.ALI_SDK_STS_SECRET}} - + SNYK_TOKEN: ${{ secrets.SNYK_KEY }} strategy: matrix: node-version: [12.x] @@ -116,7 +116,7 @@ jobs: ALI_SDK_STS_REGION: ${{secrets.ALI_SDK_STS_REGION}} ALI_SDK_STS_ROLE: ${{secrets.ALI_SDK_STS_ROLE}} ALI_SDK_STS_SECRET: ${{secrets.ALI_SDK_STS_SECRET}} - + SNYK_TOKEN: ${{ secrets.SNYK_KEY }} strategy: matrix: node-version: [14.x] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cccda7cff..788e5b20c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,6 +14,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} # semantic-release和create-pull-request.js需要 NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # 只有semantic-release需要 + SNYK_TOKEN: ${{ secrets.SNYK_KEY }} steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/schedule.yml b/.github/workflows/schedule.yml index 44c43be41..e9a621e98 100644 --- a/.github/workflows/schedule.yml +++ b/.github/workflows/schedule.yml @@ -20,7 +20,7 @@ jobs: ALI_SDK_STS_REGION: ${{secrets.ALI_SDK_STS_REGION}} ALI_SDK_STS_ROLE: ${{secrets.ALI_SDK_STS_ROLE}} ALI_SDK_STS_SECRET: ${{secrets.ALI_SDK_STS_SECRET}} - + SNYK_TOKEN: ${{ secrets.SNYK_KEY }} strategy: matrix: node-version: [14.x] diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index f8bbf74be..bd8adbb48 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -10,11 +10,10 @@ jobs: security: environment: ali_oss_AK runs-on: ubuntu-latest + env: + SNYK_TOKEN: ${{ secrets.SNYK_KEY }} steps: - uses: actions/checkout@v2 - - run: npm install - name: Run Snyk to check for vulnerabilities uses: snyk/actions/node@master - env: - SNYK_TOKEN: ${{ secrets.SNYK_KEY }}