From 6423e324ef0a4944476c29994a8f12a613ba0be4 Mon Sep 17 00:00:00 2001 From: shubham-stepsecurity Date: Thu, 4 Jul 2024 14:39:25 +0530 Subject: [PATCH 1/2] update workflow templates to latest versions --- testfiles/addworkflow/expected-codeql.yml | 2 +- testfiles/addworkflow/expected-dependency-review.yml | 4 ++-- testfiles/addworkflow/expected-scorecards.yml | 6 +++--- workflow-templates/codeql.yml | 2 +- workflow-templates/dependency-review.yml | 4 ++-- workflow-templates/scorecards.yml | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/testfiles/addworkflow/expected-codeql.yml b/testfiles/addworkflow/expected-codeql.yml index ad8b02e8..77cf9857 100644 --- a/testfiles/addworkflow/expected-codeql.yml +++ b/testfiles/addworkflow/expected-codeql.yml @@ -41,7 +41,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/testfiles/addworkflow/expected-dependency-review.yml b/testfiles/addworkflow/expected-dependency-review.yml index bd4d7944..d119b46d 100644 --- a/testfiles/addworkflow/expected-dependency-review.yml +++ b/testfiles/addworkflow/expected-dependency-review.yml @@ -17,6 +17,6 @@ jobs: runs-on: ubuntu-latest steps: - name: 'Checkout Repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Dependency Review' - uses: actions/dependency-review-action@v2 + uses: actions/dependency-review-action@v4 diff --git a/testfiles/addworkflow/expected-scorecards.yml b/testfiles/addworkflow/expected-scorecards.yml index 5ce6cef6..9e71c101 100644 --- a/testfiles/addworkflow/expected-scorecards.yml +++ b/testfiles/addworkflow/expected-scorecards.yml @@ -31,12 +31,12 @@ jobs: steps: - name: "Checkout code" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: persist-credentials: false - name: "Run analysis" - uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # v2.0.6 + uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3 with: results_file: results.sarif results_format: sarif @@ -58,7 +58,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: "Upload artifact" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: SARIF file path: results.sarif diff --git a/workflow-templates/codeql.yml b/workflow-templates/codeql.yml index 9026e5f4..47fd2024 100644 --- a/workflow-templates/codeql.yml +++ b/workflow-templates/codeql.yml @@ -41,7 +41,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/workflow-templates/dependency-review.yml b/workflow-templates/dependency-review.yml index bd4d7944..d119b46d 100644 --- a/workflow-templates/dependency-review.yml +++ b/workflow-templates/dependency-review.yml @@ -17,6 +17,6 @@ jobs: runs-on: ubuntu-latest steps: - name: 'Checkout Repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Dependency Review' - uses: actions/dependency-review-action@v2 + uses: actions/dependency-review-action@v4 diff --git a/workflow-templates/scorecards.yml b/workflow-templates/scorecards.yml index 20164f96..8063fce1 100644 --- a/workflow-templates/scorecards.yml +++ b/workflow-templates/scorecards.yml @@ -31,12 +31,12 @@ jobs: steps: - name: "Checkout code" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: persist-credentials: false - name: "Run analysis" - uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # v2.0.6 + uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3 with: results_file: results.sarif results_format: sarif @@ -58,7 +58,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: "Upload artifact" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: SARIF file path: results.sarif From 7a92f676861a6ce3082d0ae4544cad3df4a08816 Mon Sep 17 00:00:00 2001 From: shubham-stepsecurity Date: Thu, 4 Jul 2024 22:34:36 +0530 Subject: [PATCH 2/2] bump codeql version --- testfiles/addworkflow/expected-codeql.yml | 6 +++--- testfiles/addworkflow/expected-scorecards.yml | 2 +- workflow-templates/codeql.yml | 6 +++--- workflow-templates/scorecards.yml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/testfiles/addworkflow/expected-codeql.yml b/testfiles/addworkflow/expected-codeql.yml index 77cf9857..3f2fea5c 100644 --- a/testfiles/addworkflow/expected-codeql.yml +++ b/testfiles/addworkflow/expected-codeql.yml @@ -45,7 +45,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -55,7 +55,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 # ℹī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun @@ -68,6 +68,6 @@ jobs: # ./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 with: category: "/language:${{matrix.language}}" diff --git a/testfiles/addworkflow/expected-scorecards.yml b/testfiles/addworkflow/expected-scorecards.yml index 9e71c101..8106bf19 100644 --- a/testfiles/addworkflow/expected-scorecards.yml +++ b/testfiles/addworkflow/expected-scorecards.yml @@ -66,6 +66,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 with: sarif_file: results.sarif diff --git a/workflow-templates/codeql.yml b/workflow-templates/codeql.yml index 47fd2024..933093ec 100644 --- a/workflow-templates/codeql.yml +++ b/workflow-templates/codeql.yml @@ -45,7 +45,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -55,7 +55,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 # ℹī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun @@ -68,6 +68,6 @@ jobs: # ./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 with: category: "/language:${{matrix.language}}" diff --git a/workflow-templates/scorecards.yml b/workflow-templates/scorecards.yml index 8063fce1..b4b777e6 100644 --- a/workflow-templates/scorecards.yml +++ b/workflow-templates/scorecards.yml @@ -66,6 +66,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 with: sarif_file: results.sarif