Merge branch 'main' into soosdast
This commit is contained in:
@@ -5,12 +5,12 @@
|
|||||||
|
|
||||||
version: 2
|
version: 2
|
||||||
updates:
|
updates:
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
|
|
||||||
- package-ecosystem: "github-actions"
|
- package-ecosystem: "github-actions"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Set up GNAT toolchain
|
- name: Set up GNAT toolchain
|
||||||
run: >
|
run: >
|
||||||
sudo apt-get update &&
|
sudo apt-get update &&
|
||||||
sudo apt-get install gnat gprbuild
|
sudo apt-get install gnat gprbuild
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
|
|||||||
+2
-2
@@ -31,7 +31,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
working-directory: ${{github.workspace}}/build
|
working-directory: ${{github.workspace}}/build
|
||||||
# Execute tests defined by the CMake configuration.
|
# Execute tests defined by the CMake configuration.
|
||||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||||
run: ctest -C ${{env.BUILD_TYPE}}
|
run: ctest -C ${{env.BUILD_TYPE}}
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
# separate terms of service, privacy policy, and support
|
# separate terms of service, privacy policy, and support
|
||||||
# documentation.
|
# documentation.
|
||||||
|
|
||||||
# This workflow lets you compile your Go project using a SLSA3 compliant builder.
|
# This workflow lets you compile your Go project using a SLSA3 compliant builder.
|
||||||
# This workflow will generate a so-called "provenance" file describing the steps
|
# This workflow will generate a so-called "provenance" file describing the steps
|
||||||
# that were performed to generate the final binary.
|
# that were performed to generate the final binary.
|
||||||
# The project is an initiative of the OpenSSF (openssf.org) and is developed at
|
# The project is an initiative of the OpenSSF (openssf.org) and is developed at
|
||||||
# https://github.com/slsa-framework/slsa-github-generator.
|
# https://github.com/slsa-framework/slsa-github-generator.
|
||||||
# The provenance file can be verified using https://github.com/slsa-framework/slsa-verifier.
|
# The provenance file can be verified using https://github.com/slsa-framework/slsa-verifier.
|
||||||
# For more information about SLSA and how it improves the supply-chain, visit slsa.dev.
|
# For more information about SLSA and how it improves the supply-chain, visit slsa.dev.
|
||||||
@@ -21,7 +21,7 @@ permissions: read-all
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# ========================================================================================================================================
|
# ========================================================================================================================================
|
||||||
# Prerequesite: Create a .slsa-goreleaser.yml in the root directory of your project.
|
# Prerequesite: Create a .slsa-goreleaser.yml in the root directory of your project.
|
||||||
# See format in https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/go/README.md#configuration-file
|
# See format in https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/go/README.md#configuration-file
|
||||||
#=========================================================================================================================================
|
#=========================================================================================================================================
|
||||||
build:
|
build:
|
||||||
|
|||||||
+4
-4
@@ -13,15 +13,15 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: configure
|
- name: configure
|
||||||
run: ./configure
|
run: ./configure
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: make
|
run: make
|
||||||
|
|
||||||
- name: Run check
|
- name: Run check
|
||||||
run: make check
|
run: make check
|
||||||
|
|
||||||
- name: Run distcheck
|
- name: Run distcheck
|
||||||
run: make distcheck
|
run: make distcheck
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [14.x, 16.x, 18.x]
|
node-version: [14.x, 16.x, 18.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [14.x, 16.x, 18.x]
|
node-version: [14.x, 16.x, 18.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [14.x, 16.x, 18.x]
|
node-version: [14.x, 16.x, 18.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
# separate terms of service, privacy policy, and support
|
# separate terms of service, privacy policy, and support
|
||||||
# documentation.
|
# documentation.
|
||||||
|
|
||||||
# APIsec addresses the critical need to secure APIs before they reach production.
|
# APIsec addresses the critical need to secure APIs before they reach production.
|
||||||
# APIsec provides the industry’s only automated and continuous API testing platform that uncovers security vulnerabilities and logic flaws in APIs.
|
# APIsec provides the industry’s only automated and continuous API testing platform that uncovers security vulnerabilities and logic flaws in APIs.
|
||||||
# Clients rely on APIsec to evaluate every update and release, ensuring that no APIs go to production with vulnerabilities.
|
# Clients rely on APIsec to evaluate every update and release, ensuring that no APIs go to production with vulnerabilities.
|
||||||
|
|
||||||
# How to Get Started with APIsec.ai
|
# How to Get Started with APIsec.ai
|
||||||
@@ -50,7 +50,7 @@ jobs:
|
|||||||
Trigger_APIsec_scan:
|
Trigger_APIsec_scan:
|
||||||
permissions:
|
permissions:
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for actions/checkout to fetch code
|
contents: read # for actions/checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
name: Brakeman Scan
|
name: Brakeman Scan
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
issues: write # for checkmarx-ts/checkmarx-cxflow-github-action to write feedback to github issues
|
issues: write # for checkmarx-ts/checkmarx-cxflow-github-action to write feedback to github issues
|
||||||
pull-requests: write # for checkmarx-ts/checkmarx-cxflow-github-action to write feedback to PR
|
pull-requests: write # for checkmarx-ts/checkmarx-cxflow-github-action to write feedback to PR
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
# Steps require - checkout code, run CxFlow Action, Upload SARIF report (optional)
|
# Steps require - checkout code, run CxFlow Action, Upload SARIF report (optional)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ on:
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
clj-holmes:
|
clj-holmes:
|
||||||
name: Run clj-holmes scanning
|
name: Run clj-holmes scanning
|
||||||
@@ -24,7 +24,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: write
|
security-events: write
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
# seeking for vulnerable direct/transitive dependencies and
|
# seeking for vulnerable direct/transitive dependencies and
|
||||||
# build a report with all the information needed to help you
|
# build a report with all the information needed to help you
|
||||||
# understand how the vulnerability manifest in your software.
|
# understand how the vulnerability manifest in your software.
|
||||||
# More details at https://github.com/clj-holmes/clj-watson
|
# More details at https://github.com/clj-holmes/clj-watson
|
||||||
|
|
||||||
name: clj-watson
|
name: clj-watson
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: write
|
security-events: write
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
@@ -40,7 +40,7 @@ jobs:
|
|||||||
clj-watson-sha: "65d928c"
|
clj-watson-sha: "65d928c"
|
||||||
clj-watson-tag: "v4.0.1"
|
clj-watson-tag: "v4.0.1"
|
||||||
database-strategy: github-advisory
|
database-strategy: github-advisory
|
||||||
aliases: clojure-lsp,test
|
aliases: clojure-lsp,test
|
||||||
deps-edn-path: deps.edn
|
deps-edn-path: deps.edn
|
||||||
suggest-fix: true
|
suggest-fix: true
|
||||||
output-type: sarif
|
output-type: sarif
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [ $default-branch, $protected-branches ]
|
branches: [ $default-branch, $protected-branches ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ $default-branch ]
|
branches: [ $default-branch ]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: $cron-weekly
|
- cron: $cron-weekly
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
- name: Clone repo
|
- name: Clone repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
# For Terraform, Cloudrail requires the plan as input. So we generate it using
|
# For Terraform, Cloudrail requires the plan as input. So we generate it using
|
||||||
# the Terraform core binary.
|
# the Terraform core binary.
|
||||||
- uses: hashicorp/setup-terraform@v1
|
- uses: hashicorp/setup-terraform@v1
|
||||||
with:
|
with:
|
||||||
@@ -53,6 +53,6 @@ jobs:
|
|||||||
uses: github/codeql-action/upload-sarif@v2
|
uses: github/codeql-action/upload-sarif@v2
|
||||||
# Remember that if issues are found, Cloudrail return non-zero exit code, so the if: always()
|
# Remember that if issues are found, Cloudrail return non-zero exit code, so the if: always()
|
||||||
# is needed to ensure the SARIF file is uploaded
|
# is needed to ensure the SARIF file is uploaded
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
sarif_file: cloudrail_results.sarif
|
sarif_file: cloudrail_results.sarif
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for actions/checkout to fetch code
|
contents: read # for actions/checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
name: Codacy Security Scan
|
name: Codacy Security Scan
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -48,11 +48,11 @@ jobs:
|
|||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
# By default, queries listed here will override any specified in a config file.
|
# By default, queries listed here will override any specified in a config file.
|
||||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||||
|
|
||||||
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||||
# queries: security-extended,security-and-quality
|
# queries: security-extended,security-and-quality
|
||||||
|
|
||||||
|
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
@@ -61,7 +61,7 @@ jobs:
|
|||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ 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
|
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||||
|
|
||||||
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
||||||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
||||||
|
|
||||||
# - run: |
|
# - run: |
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for actions/checkout to fetch code
|
contents: read # for actions/checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
# Contrast Scan currently supports Java, JavaScript and .NET artifacts.
|
# Contrast Scan currently supports Java, JavaScript and .NET artifacts.
|
||||||
# For more information about the Contrast Scan GitHub Action see here: https://github.com/Contrast-Security-OSS/contrastscan-action
|
# For more information about the Contrast Scan GitHub Action see here: https://github.com/Contrast-Security-OSS/contrastscan-action
|
||||||
|
|
||||||
# Pre-requisites:
|
# Pre-requisites:
|
||||||
# All Contrast related account secrets should be configured as GitHub secrets to be passed as inputs to the Contrast Scan Action.
|
# All Contrast related account secrets should be configured as GitHub secrets to be passed as inputs to the Contrast Scan Action.
|
||||||
# The required secrets are CONTRAST_API_KEY, CONTRAST_ORGANIZATION_ID and CONTRAST_AUTH_HEADER.
|
# The required secrets are CONTRAST_API_KEY, CONTRAST_ORGANIZATION_ID and CONTRAST_AUTH_HEADER.
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for actions/checkout
|
contents: read # for actions/checkout
|
||||||
security-events: write # for github/codeql-action/upload-sarif
|
security-events: write # for github/codeql-action/upload-sarif
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# check out project
|
# check out project
|
||||||
steps:
|
steps:
|
||||||
@@ -38,7 +38,7 @@ jobs:
|
|||||||
# Since Contrast Scan is designed to run against your deployable artifact, the steps to build your artifact should go here.
|
# Since Contrast Scan is designed to run against your deployable artifact, the steps to build your artifact should go here.
|
||||||
# -name: Build Project
|
# -name: Build Project
|
||||||
# ...
|
# ...
|
||||||
# Scan Artifact
|
# Scan Artifact
|
||||||
- name: Contrast Scan Action
|
- name: Contrast Scan Action
|
||||||
uses: Contrast-Security-OSS/contrastscan-action@7352a45d9678ec8a434cf061b07ffb51c1e351a1
|
uses: Contrast-Security-OSS/contrastscan-action@7352a45d9678ec8a434cf061b07ffb51c1e351a1
|
||||||
with:
|
with:
|
||||||
@@ -46,7 +46,7 @@ jobs:
|
|||||||
apiKey: ${{ secrets.CONTRAST_API_KEY }}
|
apiKey: ${{ secrets.CONTRAST_API_KEY }}
|
||||||
orgId: ${{ secrets.CONTRAST_ORGANIZATION_ID }}
|
orgId: ${{ secrets.CONTRAST_ORGANIZATION_ID }}
|
||||||
authHeader: ${{ secrets.CONTRAST_AUTH_HEADER }}
|
authHeader: ${{ secrets.CONTRAST_AUTH_HEADER }}
|
||||||
#Upload the results to GitHub
|
#Upload the results to GitHub
|
||||||
- name: Upload SARIF file
|
- name: Upload SARIF file
|
||||||
uses: github/codeql-action/upload-sarif@v2
|
uses: github/codeql-action/upload-sarif@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -69,13 +69,13 @@ jobs:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
' 1> gh_response.json
|
' 1> gh_response.json
|
||||||
|
|
||||||
DETEKT_RELEASE_SHA=$(jq --raw-output '.data.repository.release.releaseAssets.tagCommit.oid' gh_response.json)
|
DETEKT_RELEASE_SHA=$(jq --raw-output '.data.repository.release.releaseAssets.tagCommit.oid' gh_response.json)
|
||||||
if [ $DETEKT_RELEASE_SHA != "37f0a1d006977512f1f216506cd695039607c3e5" ]; then
|
if [ $DETEKT_RELEASE_SHA != "37f0a1d006977512f1f216506cd695039607c3e5" ]; then
|
||||||
echo "Release tag doesn't match expected commit SHA"
|
echo "Release tag doesn't match expected commit SHA"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DETEKT_DOWNLOAD_URL=$(jq --raw-output '.data.repository.release.releaseAssets.nodes[0].downloadUrl' gh_response.json)
|
DETEKT_DOWNLOAD_URL=$(jq --raw-output '.data.repository.release.releaseAssets.nodes[0].downloadUrl' gh_response.json)
|
||||||
echo "::set-output name=download_url::$DETEKT_DOWNLOAD_URL"
|
echo "::set-output name=download_url::$DETEKT_DOWNLOAD_URL"
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Run DevSkim scanner
|
- name: Run DevSkim scanner
|
||||||
uses: microsoft/DevSkim-Action@v1
|
uses: microsoft/DevSkim-Action@v1
|
||||||
|
|
||||||
- name: Upload DevSkim scan results to GitHub Security tab
|
- name: Upload DevSkim scan results to GitHub Security tab
|
||||||
uses: github/codeql-action/upload-sarif@v2
|
uses: github/codeql-action/upload-sarif@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: write
|
security-events: write
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -39,7 +39,7 @@ jobs:
|
|||||||
run: npx eslint .
|
run: npx eslint .
|
||||||
--config .eslintrc.js
|
--config .eslintrc.js
|
||||||
--ext .js,.jsx,.ts,.tsx
|
--ext .js,.jsx,.ts,.tsx
|
||||||
--format @microsoft/eslint-formatter-sarif
|
--format @microsoft/eslint-formatter-sarif
|
||||||
--output-file eslint-results.sarif
|
--output-file eslint-results.sarif
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
|
|||||||
@@ -44,12 +44,12 @@ on:
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Trigger_EthicalCheck:
|
Trigger_EthicalCheck:
|
||||||
permissions:
|
permissions:
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -61,9 +61,9 @@ jobs:
|
|||||||
# The email address to which the penetration test report will be sent.
|
# The email address to which the penetration test report will be sent.
|
||||||
email: "[email protected]"
|
email: "[email protected]"
|
||||||
sarif-result-file: "ethicalcheck-results.sarif"
|
sarif-result-file: "ethicalcheck-results.sarif"
|
||||||
|
|
||||||
- name: Upload sarif file to repository
|
- name: Upload sarif file to repository
|
||||||
uses: github/codeql-action/upload-sarif@v2
|
uses: github/codeql-action/upload-sarif@v2
|
||||||
with:
|
with:
|
||||||
sarif_file: ./ethicalcheck-results.sarif
|
sarif_file: ./ethicalcheck-results.sarif
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ jobs:
|
|||||||
# node-version: "16.x"
|
# node-version: "16.x"
|
||||||
|
|
||||||
|
|
||||||
- uses: jfrog/frogbot@9304d3b1d8e05a1b5fc0ba9ebf9ffbd495386250
|
- uses: jfrog/frogbot@b92e53d9631139a697cb71d9e70229a70ca56694
|
||||||
env:
|
env:
|
||||||
# [Mandatory]
|
# [Mandatory]
|
||||||
# JFrog platform URL (This functionality requires version 3.29.0 or above of Xray)
|
# JFrog platform URL (This functionality requires version 3.29.0 or above of Xray)
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ jobs:
|
|||||||
|
|
||||||
# The full template list with the required GitHub Actions can be found at https://github.com/jfrog/frogbot/tree/master/templates/github-actions/scan-pull-request
|
# The full template list with the required GitHub Actions can be found at https://github.com/jfrog/frogbot/tree/master/templates/github-actions/scan-pull-request
|
||||||
|
|
||||||
- uses: jfrog/frogbot@9304d3b1d8e05a1b5fc0ba9ebf9ffbd495386250
|
- uses: jfrog/frogbot@b92e53d9631139a697cb71d9e70229a70ca56694
|
||||||
env:
|
env:
|
||||||
# [Mandatory]
|
# [Mandatory]
|
||||||
# JFrog platform URL (This functionality requires version 3.29.0 or above of Xray)
|
# JFrog platform URL (This functionality requires version 3.29.0 or above of Xray)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for actions/checkout to fetch code
|
contents: read # for actions/checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for checkout to fetch code
|
contents: read # for checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [ $default-branch, $protected-branches ]
|
branches: [ $default-branch, $protected-branches ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ $default-branch ]
|
branches: [ $default-branch ]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: $cron-weekly
|
- cron: $cron-weekly
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for actions/checkout to fetch code
|
contents: read # for actions/checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for actions/checkout to fetch code
|
contents: read # for actions/checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
name: Analyze
|
name: Analyze
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
#
|
#
|
||||||
# `restart_scan`
|
# `restart_scan`
|
||||||
#
|
#
|
||||||
# **Required** when restarting an existing scan by its ID. You can get the scan ID in the Scans section on [nexploit.app](https://nexploit.app/login).<br> Please make sure to only use the necessary parameters. Otherwise, you will get a response with the parameter usage requirements.
|
# **Required** when restarting an existing scan by its ID. You can get the scan ID in the Scans section on [nexploit.app](https://nexploit.app/login).<br> Please make sure to only use the necessary parameters. Otherwise, you will get a response with the parameter usage requirements.
|
||||||
#
|
#
|
||||||
# _Example:_ `restart_scan: ai3LG8DmVn9Rn1YeqCNRGQ)`
|
# _Example:_ `restart_scan: ai3LG8DmVn9Rn1YeqCNRGQ)`
|
||||||
#
|
#
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
#
|
#
|
||||||
# `hosts_filter`
|
# `hosts_filter`
|
||||||
#
|
#
|
||||||
# **Required** when the the discovery type is set to `archive`. Allows selecting specific hosts for a scan.
|
# **Required** when the the discovery type is set to `archive`. Allows selecting specific hosts for a scan.
|
||||||
#
|
#
|
||||||
# Outputs
|
# Outputs
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for actions/checkout to fetch code
|
contents: read # for actions/checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: njsscan code scanning
|
name: njsscan code scanning
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for actions/checkout to fetch code
|
contents: read # for actions/checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
# They are provided by a third-party and are governed by
|
# They are provided by a third-party and are governed by
|
||||||
# separate terms of service, privacy policy, and support
|
# separate terms of service, privacy policy, and support
|
||||||
# documentation.
|
# documentation.
|
||||||
# PHPMD is a spin-off project of PHP Depend and
|
# PHPMD is a spin-off project of PHP Depend and
|
||||||
# aims to be a PHP equivalent of the well known Java tool PMD.
|
# aims to be a PHP equivalent of the well known Java tool PMD.
|
||||||
# What PHPMD does is: It takes a given PHP source code base
|
# What PHPMD does is: It takes a given PHP source code base
|
||||||
# and look for several potential problems within that source.
|
# and look for several potential problems within that source.
|
||||||
# These problems can be things like:
|
# These problems can be things like:
|
||||||
# Possible bugs
|
# Possible bugs
|
||||||
@@ -34,7 +34,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for checkout to fetch code
|
contents: read # for checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for actions/checkout to fetch code
|
contents: read # for actions/checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ on:
|
|||||||
branches: [ $default-branch ]
|
branches: [ $default-branch ]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: $cron-weekly
|
- cron: $cron-weekly
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for actions/checkout to fetch code
|
contents: read # for actions/checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
name: PSScriptAnalyzer
|
name: PSScriptAnalyzer
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -37,11 +37,11 @@ jobs:
|
|||||||
# Check https://github.com/microsoft/action-psscriptanalyzer for more info about the options.
|
# Check https://github.com/microsoft/action-psscriptanalyzer for more info about the options.
|
||||||
# The below set up runs PSScriptAnalyzer to your entire repository and runs some basic security rules.
|
# The below set up runs PSScriptAnalyzer to your entire repository and runs some basic security rules.
|
||||||
path: .\
|
path: .\
|
||||||
recurse: true
|
recurse: true
|
||||||
# Include your own basic security rules. Removing this option will run all the rules
|
# Include your own basic security rules. Removing this option will run all the rules
|
||||||
includeRule: '"PSAvoidGlobalAliases", "PSAvoidUsingConvertToSecureStringWithPlainText"'
|
includeRule: '"PSAvoidGlobalAliases", "PSAvoidUsingConvertToSecureStringWithPlainText"'
|
||||||
output: results.sarif
|
output: results.sarif
|
||||||
|
|
||||||
# Upload the SARIF file generated in the previous step
|
# Upload the SARIF file generated in the previous step
|
||||||
- name: Upload SARIF results file
|
- name: Upload SARIF results file
|
||||||
uses: github/codeql-action/upload-sarif@v2
|
uses: github/codeql-action/upload-sarif@v2
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for actions/checkout to fetch code
|
contents: read # for actions/checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Run Prisma Cloud IaC Scan to check
|
name: Run Prisma Cloud IaC Scan to check
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for checkout to fetch code
|
contents: read # for checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
# documentation.
|
# documentation.
|
||||||
# rust-clippy is a tool that runs a bunch of lints to catch common
|
# rust-clippy is a tool that runs a bunch of lints to catch common
|
||||||
# mistakes in your Rust code and help improve your Rust code.
|
# mistakes in your Rust code and help improve your Rust code.
|
||||||
# More details at https://github.com/rust-lang/rust-clippy
|
# More details at https://github.com/rust-lang/rust-clippy
|
||||||
# and https://rust-lang.github.io/rust-clippy/
|
# and https://rust-lang.github.io/rust-clippy/
|
||||||
|
|
||||||
name: rust-clippy analyze
|
name: rust-clippy analyze
|
||||||
@@ -25,7 +25,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: write
|
security-events: write
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|||||||
@@ -24,11 +24,11 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: nuget/setup-nuget@04b0c2b8d1b97922f67eca497d7cf0bf17b8ffe1
|
- uses: nuget/setup-nuget@04b0c2b8d1b97922f67eca497d7cf0bf17b8ffe1
|
||||||
- uses: microsoft/[email protected]
|
- uses: microsoft/[email protected]
|
||||||
|
|
||||||
- name: Set up projects for analysis
|
- name: Set up projects for analysis
|
||||||
uses: security-code-scan/security-code-scan-add-action@f8ff4f2763ed6f229eded80b1f9af82ae7f32a0d
|
uses: security-code-scan/security-code-scan-add-action@f8ff4f2763ed6f229eded80b1f9af82ae7f32a0d
|
||||||
|
|
||||||
- name: Restore dependencies
|
- name: Restore dependencies
|
||||||
run: dotnet restore
|
run: dotnet restore
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for actions/checkout to fetch code
|
contents: read # for actions/checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
name: Scan
|
name: Scan
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for actions/checkout to fetch code
|
contents: read # for actions/checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for actions/checkout to fetch code
|
contents: read # for actions/checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [ $default-branch, $protected-branches ]
|
branches: [ $default-branch, $protected-branches ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ $default-branch ]
|
branches: [ $default-branch ]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: $cron-weekly
|
- cron: $cron-weekly
|
||||||
|
|
||||||
@@ -28,11 +28,11 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for actions/checkout to fetch code
|
contents: read # for actions/checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- id: run-action
|
- id: run-action
|
||||||
uses: sobelow/action@1afd6d2cae70ae8bd900b58506f54487ed863912
|
uses: sobelow/action@1afd6d2cae70ae8bd900b58506f54487ed863912
|
||||||
- name: Upload report
|
- name: Upload report
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# separate terms of service, privacy policy, and support
|
# separate terms of service, privacy policy, and support
|
||||||
# documentation.
|
# documentation.
|
||||||
|
|
||||||
# This workflow helps you trigger a SonarCloud analysis of your code and populates
|
# This workflow helps you trigger a SonarCloud analysis of your code and populates
|
||||||
# GitHub Code Scanning alerts with the vulnerabilities found.
|
# GitHub Code Scanning alerts with the vulnerabilities found.
|
||||||
# Free for open source project.
|
# Free for open source project.
|
||||||
|
|
||||||
@@ -11,16 +11,16 @@
|
|||||||
|
|
||||||
# 2. Import your project on SonarCloud
|
# 2. Import your project on SonarCloud
|
||||||
# * Add your GitHub organization first, then add your repository as a new project.
|
# * Add your GitHub organization first, then add your repository as a new project.
|
||||||
# * Please note that many languages are eligible for automatic analysis,
|
# * Please note that many languages are eligible for automatic analysis,
|
||||||
# which means that the analysis will start automatically without the need to set up GitHub Actions.
|
# which means that the analysis will start automatically without the need to set up GitHub Actions.
|
||||||
# * This behavior can be changed in Administration > Analysis Method.
|
# * This behavior can be changed in Administration > Analysis Method.
|
||||||
#
|
#
|
||||||
# 3. Follow the SonarCloud in-product tutorial
|
# 3. Follow the SonarCloud in-product tutorial
|
||||||
# * a. Copy/paste the Project Key and the Organization Key into the args parameter below
|
# * a. Copy/paste the Project Key and the Organization Key into the args parameter below
|
||||||
# (You'll find this information in SonarCloud. Click on "Information" at the bottom left)
|
# (You'll find this information in SonarCloud. Click on "Information" at the bottom left)
|
||||||
#
|
#
|
||||||
# * b. Generate a new token and add it to your Github repository's secrets using the name SONAR_TOKEN
|
# * b. Generate a new token and add it to your Github repository's secrets using the name SONAR_TOKEN
|
||||||
# (On SonarCloud, click on your avatar on top-right > My account > Security
|
# (On SonarCloud, click on your avatar on top-right > My account > Security
|
||||||
# or go directly to https://sonarcloud.io/account/security/)
|
# or go directly to https://sonarcloud.io/account/security/)
|
||||||
|
|
||||||
# Feel free to take a look at our documentation (https://docs.sonarcloud.io/getting-started/github/)
|
# Feel free to take a look at our documentation (https://docs.sonarcloud.io/getting-started/github/)
|
||||||
@@ -41,9 +41,9 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
Analysis:
|
Analysis:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Analyze with SonarCloud
|
- name: Analyze with SonarCloud
|
||||||
|
|
||||||
# You can pin the exact commit or the version.
|
# You can pin the exact commit or the version.
|
||||||
# uses: SonarSource/sonarcloud-github-action@de2e56b42aa84d0b1c5b622644ac17e505c9a049
|
# uses: SonarSource/sonarcloud-github-action@de2e56b42aa84d0b1c5b622644ac17e505c9a049
|
||||||
@@ -53,7 +53,7 @@ jobs:
|
|||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret)
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret)
|
||||||
with:
|
with:
|
||||||
# Additional arguments for the sonarcloud scanner
|
# Additional arguments for the sonarcloud scanner
|
||||||
args:
|
args:
|
||||||
# Unique keys of your project and organization. You can find them in SonarCloud > Information (bottom-left menu)
|
# Unique keys of your project and organization. You can find them in SonarCloud > Information (bottom-left menu)
|
||||||
# mandatory
|
# mandatory
|
||||||
-Dsonar.projectKey=
|
-Dsonar.projectKey=
|
||||||
@@ -65,4 +65,4 @@ jobs:
|
|||||||
# Comma-separated paths to directories containing test source files.
|
# Comma-separated paths to directories containing test source files.
|
||||||
#-Dsonar.tests= # optional. For more info about Code Coverage, please refer to https://docs.sonarcloud.io/enriching/test-coverage/overview/
|
#-Dsonar.tests= # optional. For more info about Code Coverage, please refer to https://docs.sonarcloud.io/enriching/test-coverage/overview/
|
||||||
# Adds more detail to both client and server-side analysis logs, activating DEBUG mode for the scanner, and adding client-side environment variables and system properties to the server-side log of analysis report processing.
|
# Adds more detail to both client and server-side analysis logs, activating DEBUG mode for the scanner, and adding client-side environment variables and system properties to the server-side log of analysis report processing.
|
||||||
#-Dsonar.verbose= # optional, default is false
|
#-Dsonar.verbose= # optional, default is false
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#
|
#
|
||||||
# 2. Navigate to the "Integrate" page in the SOOS app (https://app.soos.io/integrate). Note the "API Credentials" section of this page; the keys you will need for the next step are here.
|
# 2. Navigate to the "Integrate" page in the SOOS app (https://app.soos.io/integrate). Note the "API Credentials" section of this page; the keys you will need for the next step are here.
|
||||||
#
|
#
|
||||||
# 3. Set up your SOOS API Key and SOOS Client Id as Github Secrets named SOOS_API_KEY and SOOS_CLIENT_ID.
|
# 3. Set up your SOOS API Key and SOOS Client Id as Github Secrets named SOOS_API_KEY and SOOS_CLIENT_ID.
|
||||||
#
|
#
|
||||||
# 4. (Optional) If you'd like to upload SARIF results of DAST scans to GitHub, set SOOS_GITHUB_PAT with your Github Personal Access Token.
|
# 4. (Optional) If you'd like to upload SARIF results of DAST scans to GitHub, set SOOS_GITHUB_PAT with your Github Personal Access Token.
|
||||||
#
|
#
|
||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
soos:
|
soos:
|
||||||
permissions:
|
permissions:
|
||||||
security-events: write # for uploading code scanning alert info
|
security-events: write # for uploading code scanning alert info
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
name: SOOS DAST Scan
|
name: SOOS DAST Scan
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -22,11 +22,11 @@ jobs:
|
|||||||
actions: read
|
actions: read
|
||||||
contents: read
|
contents: read
|
||||||
security-events: write
|
security-events: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Synopsys Intelligent Security Scan
|
- name: Synopsys Intelligent Security Scan
|
||||||
id: prescription
|
id: prescription
|
||||||
uses: synopsys-sig/intelligent-security-scan@48eedfcd42bc342a294dc495ac452797b2d9ff08
|
uses: synopsys-sig/intelligent-security-scan@48eedfcd42bc342a294dc495ac452797b2d9ff08
|
||||||
@@ -36,7 +36,7 @@ jobs:
|
|||||||
workflowServerUrl: ${{secrets.WORKFLOW_SERVER_URL}}
|
workflowServerUrl: ${{secrets.WORKFLOW_SERVER_URL}}
|
||||||
additionalWorkflowArgs: --polaris.url=${{secrets.POLARIS_SERVER_URL}} --polaris.token=${{secrets.POLARIS_ACCESS_TOKEN}}
|
additionalWorkflowArgs: --polaris.url=${{secrets.POLARIS_SERVER_URL}} --polaris.token=${{secrets.POLARIS_ACCESS_TOKEN}}
|
||||||
stage: "IO"
|
stage: "IO"
|
||||||
|
|
||||||
# Please note that the ID in previous step was set to prescription
|
# Please note that the ID in previous step was set to prescription
|
||||||
# in order for this logic to work also make sure that POLARIS_ACCESS_TOKEN
|
# in order for this logic to work also make sure that POLARIS_ACCESS_TOKEN
|
||||||
# is defined in settings
|
# is defined in settings
|
||||||
@@ -48,7 +48,7 @@ jobs:
|
|||||||
wget -q ${{ secrets.POLARIS_SERVER_URL}}/api/tools/polaris_cli-linux64.zip
|
wget -q ${{ secrets.POLARIS_SERVER_URL}}/api/tools/polaris_cli-linux64.zip
|
||||||
unzip -j polaris_cli-linux64.zip -d /tmp
|
unzip -j polaris_cli-linux64.zip -d /tmp
|
||||||
/tmp/polaris analyze -w
|
/tmp/polaris analyze -w
|
||||||
|
|
||||||
# Please note that the ID in previous step was set to prescription
|
# Please note that the ID in previous step was set to prescription
|
||||||
# in order for this logic to work
|
# in order for this logic to work
|
||||||
- name: Software Composition Analysis with Black Duck
|
- name: Software Composition Analysis with Black Duck
|
||||||
@@ -56,7 +56,7 @@ jobs:
|
|||||||
uses: blackducksoftware/github-action@9ea442b34409737f64743781e9adc71fd8e17d38
|
uses: blackducksoftware/github-action@9ea442b34409737f64743781e9adc71fd8e17d38
|
||||||
with:
|
with:
|
||||||
args: '--blackduck.url="${{ secrets.BLACKDUCK_URL}}" --blackduck.api.token="${{ secrets.BLACKDUCK_TOKEN}}" --detect.tools="SIGNATURE_SCAN,DETECTOR"'
|
args: '--blackduck.url="${{ secrets.BLACKDUCK_URL}}" --blackduck.api.token="${{ secrets.BLACKDUCK_TOKEN}}" --detect.tools="SIGNATURE_SCAN,DETECTOR"'
|
||||||
|
|
||||||
- name: Synopsys Intelligent Security Scan
|
- name: Synopsys Intelligent Security Scan
|
||||||
if: ${{ steps.prescription.outputs.sastScan == 'true' || steps.prescription.outputs.scaScan == 'true' }}
|
if: ${{ steps.prescription.outputs.sastScan == 'true' || steps.prescription.outputs.scaScan == 'true' }}
|
||||||
uses: synopsys-sig/intelligent-security-scan@48eedfcd42bc342a294dc495ac452797b2d9ff08
|
uses: synopsys-sig/intelligent-security-scan@48eedfcd42bc342a294dc495ac452797b2d9ff08
|
||||||
@@ -64,11 +64,11 @@ jobs:
|
|||||||
ioServerUrl: ${{secrets.IO_SERVER_URL}}
|
ioServerUrl: ${{secrets.IO_SERVER_URL}}
|
||||||
ioServerToken: ${{secrets.IO_SERVER_TOKEN}}
|
ioServerToken: ${{secrets.IO_SERVER_TOKEN}}
|
||||||
workflowServerUrl: ${{secrets.WORKFLOW_SERVER_URL}}
|
workflowServerUrl: ${{secrets.WORKFLOW_SERVER_URL}}
|
||||||
additionalWorkflowArgs: --IS_SAST_ENABLED=${{steps.prescription.outputs.sastScan}} --IS_SCA_ENABLED=${{steps.prescription.outputs.scaScan}}
|
additionalWorkflowArgs: --IS_SAST_ENABLED=${{steps.prescription.outputs.sastScan}} --IS_SCA_ENABLED=${{steps.prescription.outputs.scaScan}}
|
||||||
--polaris.project.name={{PROJECT_NAME}} --polaris.url=${{secrets.POLARIS_SERVER_URL}} --polaris.token=${{secrets.POLARIS_ACCESS_TOKEN}}
|
--polaris.project.name={{PROJECT_NAME}} --polaris.url=${{secrets.POLARIS_SERVER_URL}} --polaris.token=${{secrets.POLARIS_ACCESS_TOKEN}}
|
||||||
--blackduck.project.name={{PROJECT_NAME}}:{{PROJECT_VERSION}} --blackduck.url=${{secrets.BLACKDUCK_URL}} --blackduck.api.token=${{secrets.BLACKDUCK_TOKEN}}
|
--blackduck.project.name={{PROJECT_NAME}}:{{PROJECT_VERSION}} --blackduck.url=${{secrets.BLACKDUCK_URL}} --blackduck.api.token=${{secrets.BLACKDUCK_TOKEN}}
|
||||||
stage: "WORKFLOW"
|
stage: "WORKFLOW"
|
||||||
|
|
||||||
- name: Upload SARIF file
|
- name: Upload SARIF file
|
||||||
if: ${{steps.prescription.outputs.sastScan == 'true' }}
|
if: ${{steps.prescription.outputs.sastScan == 'true' }}
|
||||||
uses: github/codeql-action/upload-sarif@v2
|
uses: github/codeql-action/upload-sarif@v2
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ jobs:
|
|||||||
checks: write # for sysdiglabs/scan-action to publish the checks
|
checks: write # for sysdiglabs/scan-action to publish the checks
|
||||||
contents: read # for actions/checkout to fetch code
|
contents: read # for actions/checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -39,7 +39,7 @@ jobs:
|
|||||||
id: scan
|
id: scan
|
||||||
uses: sysdiglabs/scan-action@768d7626a14897e0948ea89c8437dd46a814b163
|
uses: sysdiglabs/scan-action@768d7626a14897e0948ea89c8437dd46a814b163
|
||||||
with:
|
with:
|
||||||
# Tag of the image to analyse.
|
# Tag of the image to analyse.
|
||||||
# Change ${{ github.repository }} variable by another image name if you want but don't forget changing also image-tag above
|
# Change ${{ github.repository }} variable by another image name if you want but don't forget changing also image-tag above
|
||||||
image-tag: ${{ github.repository }}:latest
|
image-tag: ${{ github.repository }}:latest
|
||||||
# API token for Sysdig Scanning auth
|
# API token for Sysdig Scanning auth
|
||||||
@@ -47,7 +47,7 @@ jobs:
|
|||||||
# Sysdig secure endpoint. Please read: https://docs.sysdig.com/en/docs/administration/saas-regions-and-ip-ranges/
|
# Sysdig secure endpoint. Please read: https://docs.sysdig.com/en/docs/administration/saas-regions-and-ip-ranges/
|
||||||
# US-East https://secure.sysdig.com
|
# US-East https://secure.sysdig.com
|
||||||
# US-West https://us2.app.sysdig.com
|
# US-West https://us2.app.sysdig.com
|
||||||
# EU https://eu1.app.sysdig.com
|
# EU https://eu1.app.sysdig.com
|
||||||
sysdig-secure-url: https://us2.app.sysdig.com
|
sysdig-secure-url: https://us2.app.sysdig.com
|
||||||
dockerfile-path: ./Dockerfile
|
dockerfile-path: ./Dockerfile
|
||||||
input-type: docker-daemon
|
input-type: docker-daemon
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [ $default-branch, $protected-branches ]
|
branches: [ $default-branch, $protected-branches ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ $default-branch ]
|
branches: [ $default-branch ]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: $cron-weekly
|
- cron: $cron-weekly
|
||||||
|
|
||||||
@@ -29,10 +29,10 @@ jobs:
|
|||||||
- name: Run tfsec
|
- name: Run tfsec
|
||||||
uses: aquasecurity/tfsec-sarif-action@9a83b5c3524f825c020e356335855741fd02745f
|
uses: aquasecurity/tfsec-sarif-action@9a83b5c3524f825c020e356335855741fd02745f
|
||||||
with:
|
with:
|
||||||
sarif_file: tfsec.sarif
|
sarif_file: tfsec.sarif
|
||||||
|
|
||||||
- name: Upload SARIF file
|
- name: Upload SARIF file
|
||||||
uses: github/codeql-action/upload-sarif@v2
|
uses: github/codeql-action/upload-sarif@v2
|
||||||
with:
|
with:
|
||||||
# Path to SARIF file relative to the root of the repository
|
# Path to SARIF file relative to the root of the repository
|
||||||
sarif_file: tfsec.sarif
|
sarif_file: tfsec.sarif
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for actions/checkout to fetch code
|
contents: read # for actions/checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: "ubuntu-18.04"
|
runs-on: "ubuntu-18.04"
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for actions/checkout to fetch code
|
contents: read # for actions/checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for actions/checkout to fetch code
|
contents: read # for actions/checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -3,16 +3,16 @@
|
|||||||
# separate terms of service, privacy policy, and support
|
# separate terms of service, privacy policy, and support
|
||||||
# documentation.
|
# documentation.
|
||||||
#
|
#
|
||||||
# The zimperium-zscan GitHub action scans your mobile app binary (iOS or Android)
|
# The zimperium-zscan GitHub action scans your mobile app binary (iOS or Android)
|
||||||
# and identifies security, privacy, and compliance-related vulnerabilities.
|
# and identifies security, privacy, and compliance-related vulnerabilities.
|
||||||
#
|
#
|
||||||
# Prerequisites:
|
# Prerequisites:
|
||||||
# * An active Zimperium zScan account is required. If you are not an existing Zimperium
|
# * An active Zimperium zScan account is required. If you are not an existing Zimperium
|
||||||
# zScan customer, please request a zSCAN demo by visiting https://www.zimperium.com/contact-us.
|
# zScan customer, please request a zSCAN demo by visiting https://www.zimperium.com/contact-us.
|
||||||
# * Either GitHub Advanced Security (GHAS) or a public repository is required to display
|
# * Either GitHub Advanced Security (GHAS) or a public repository is required to display
|
||||||
# issues and view the remediation information inside of GitHub code scanning alerts.
|
# issues and view the remediation information inside of GitHub code scanning alerts.
|
||||||
#
|
#
|
||||||
# For additional information and setup instructions
|
# For additional information and setup instructions
|
||||||
# please visit: https://github.com/Zimperium/zScanMarketplace#readme
|
# please visit: https://github.com/Zimperium/zScanMarketplace#readme
|
||||||
|
|
||||||
name: "Zimperium zScan"
|
name: "Zimperium zScan"
|
||||||
@@ -33,7 +33,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # for actions/checkout to fetch code
|
contents: read # for actions/checkout to fetch code
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -58,4 +58,3 @@ jobs:
|
|||||||
uses: github/codeql-action/upload-sarif@v2
|
uses: github/codeql-action/upload-sarif@v2
|
||||||
with:
|
with:
|
||||||
sarif_file: Zimperium.sarif
|
sarif_file: Zimperium.sarif
|
||||||
|
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
# To use this workflow, you will need to complete the following set-up steps:
|
# To use this workflow, you will need to complete the following set-up steps:
|
||||||
#
|
#
|
||||||
# 1. Create an ACR repository to store your container images.
|
# 1. Create an ACR repository to store your container images.
|
||||||
# You can use ACR EE instance for more security and better performance.
|
# You can use ACR EE instance for more security and better performance.
|
||||||
# For instructions see https://www.alibabacloud.com/help/doc-detail/142168.htm
|
# For instructions see https://www.alibabacloud.com/help/doc-detail/142168.htm
|
||||||
#
|
#
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
# 3. Store your AccessKey pair in GitHub Actions secrets named `ACCESS_KEY_ID` and `ACCESS_KEY_SECRET`.
|
# 3. Store your AccessKey pair in GitHub Actions secrets named `ACCESS_KEY_ID` and `ACCESS_KEY_SECRET`.
|
||||||
# For instructions on setting up secrets see: https://developer.github.com/actions/managing-workflows/storing-secrets/
|
# For instructions on setting up secrets see: https://developer.github.com/actions/managing-workflows/storing-secrets/
|
||||||
#
|
#
|
||||||
# 4. Change the values for the REGION_ID, REGISTRY, NAMESPACE, IMAGE, ACK_CLUSTER_ID, and ACK_DEPLOYMENT_NAME.
|
# 4. Change the values for the REGION_ID, REGISTRY, NAMESPACE, IMAGE, ACK_CLUSTER_ID, and ACK_DEPLOYMENT_NAME.
|
||||||
#
|
#
|
||||||
|
|
||||||
name: Build and Deploy to ACK
|
name: Build and Deploy to ACK
|
||||||
@@ -46,12 +46,12 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
environment: production
|
environment: production
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
# 1.1 Login to ACR
|
# 1.1 Login to ACR
|
||||||
- name: Login to ACR with the AccessKey pair
|
- name: Login to ACR with the AccessKey pair
|
||||||
uses: aliyun/acr-login@v1
|
uses: aliyun/acr-login@v1
|
||||||
with:
|
with:
|
||||||
@@ -59,13 +59,13 @@ jobs:
|
|||||||
access-key-id: "${{ secrets.ACCESS_KEY_ID }}"
|
access-key-id: "${{ secrets.ACCESS_KEY_ID }}"
|
||||||
access-key-secret: "${{ secrets.ACCESS_KEY_SECRET }}"
|
access-key-secret: "${{ secrets.ACCESS_KEY_SECRET }}"
|
||||||
|
|
||||||
# 1.2 Buid and push image to ACR
|
# 1.2 Buid and push image to ACR
|
||||||
- name: Build and push image to ACR
|
- name: Build and push image to ACR
|
||||||
run: |
|
run: |
|
||||||
docker build --tag "$REGISTRY/$NAMESPACE/$IMAGE:$TAG" .
|
docker build --tag "$REGISTRY/$NAMESPACE/$IMAGE:$TAG" .
|
||||||
docker push "$REGISTRY/$NAMESPACE/$IMAGE:$TAG"
|
docker push "$REGISTRY/$NAMESPACE/$IMAGE:$TAG"
|
||||||
|
|
||||||
# 1.3 Scan image in ACR
|
# 1.3 Scan image in ACR
|
||||||
- name: Scan image in ACR
|
- name: Scan image in ACR
|
||||||
uses: aliyun/acr-scan@v1
|
uses: aliyun/acr-scan@v1
|
||||||
with:
|
with:
|
||||||
@@ -75,7 +75,7 @@ jobs:
|
|||||||
repository: "${{ env.NAMESPACE }}/${{ env.IMAGE }}"
|
repository: "${{ env.NAMESPACE }}/${{ env.IMAGE }}"
|
||||||
tag: "${{ env.TAG }}"
|
tag: "${{ env.TAG }}"
|
||||||
|
|
||||||
# 2.1 (Optional) Login to ACR EE
|
# 2.1 (Optional) Login to ACR EE
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Login to ACR EE with the AccessKey pair
|
- name: Login to ACR EE with the AccessKey pair
|
||||||
uses: aliyun/acr-login@v1
|
uses: aliyun/acr-login@v1
|
||||||
@@ -86,12 +86,12 @@ jobs:
|
|||||||
access-key-secret: "${{ secrets.ACCESS_KEY_SECRET }}"
|
access-key-secret: "${{ secrets.ACCESS_KEY_SECRET }}"
|
||||||
instance-id: "${{ env.ACR_EE_INSTANCE_ID }}"
|
instance-id: "${{ env.ACR_EE_INSTANCE_ID }}"
|
||||||
|
|
||||||
# 2.2 (Optional) Build and push image ACR EE
|
# 2.2 (Optional) Build and push image ACR EE
|
||||||
- name: Build and push image to ACR EE
|
- name: Build and push image to ACR EE
|
||||||
run: |
|
run: |
|
||||||
docker build -t "$ACR_EE_REGISTRY/$ACR_EE_NAMESPACE/$ACR_EE_IMAGE:$TAG" .
|
docker build -t "$ACR_EE_REGISTRY/$ACR_EE_NAMESPACE/$ACR_EE_IMAGE:$TAG" .
|
||||||
docker push "$ACR_EE_REGISTRY/$ACR_EE_NAMESPACE/$ACR_EE_IMAGE:$TAG"
|
docker push "$ACR_EE_REGISTRY/$ACR_EE_NAMESPACE/$ACR_EE_IMAGE:$TAG"
|
||||||
# 2.3 (Optional) Scan image in ACR EE
|
# 2.3 (Optional) Scan image in ACR EE
|
||||||
- name: Scan image in ACR EE
|
- name: Scan image in ACR EE
|
||||||
uses: aliyun/acr-scan@v1
|
uses: aliyun/acr-scan@v1
|
||||||
with:
|
with:
|
||||||
@@ -102,7 +102,7 @@ jobs:
|
|||||||
repository: "${{ env.ACR_EE_NAMESPACE}}/${{ env.ACR_EE_IMAGE }}"
|
repository: "${{ env.ACR_EE_NAMESPACE}}/${{ env.ACR_EE_IMAGE }}"
|
||||||
tag: "${{ env.ACR_EE_TAG }}"
|
tag: "${{ env.ACR_EE_TAG }}"
|
||||||
|
|
||||||
# 3.1 Set ACK context
|
# 3.1 Set ACK context
|
||||||
- name: Set K8s context
|
- name: Set K8s context
|
||||||
uses: aliyun/ack-set-context@v1
|
uses: aliyun/ack-set-context@v1
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
# 2. Create a secret in your repository named AZURE_WEBAPP_PUBLISH_PROFILE, paste the publish profile contents as the value of the secret.
|
# 2. Create a secret in your repository named AZURE_WEBAPP_PUBLISH_PROFILE, paste the publish profile contents as the value of the secret.
|
||||||
# For instructions on obtaining the publish profile see: https://docs.microsoft.com/azure/app-service/deploy-github-actions#configure-the-github-secret
|
# For instructions on obtaining the publish profile see: https://docs.microsoft.com/azure/app-service/deploy-github-actions#configure-the-github-secret
|
||||||
#
|
#
|
||||||
# 3. Create a GitHub Personal access token with "repo" and "read:packages" permissions.
|
# 3. Create a GitHub Personal access token with "repo" and "read:packages" permissions.
|
||||||
#
|
#
|
||||||
# 4. Create three app settings on your Azure Web app:
|
# 4. Create three app settings on your Azure Web app:
|
||||||
# DOCKER_REGISTRY_SERVER_URL: Set this to "https://ghcr.io"
|
# DOCKER_REGISTRY_SERVER_URL: Set this to "https://ghcr.io"
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ jobs:
|
|||||||
uses: actions/setup-dotnet@v2
|
uses: actions/setup-dotnet@v2
|
||||||
with:
|
with:
|
||||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||||
|
|
||||||
- name: Set up dependency caching for faster builds
|
- name: Set up dependency caching for faster builds
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ jobs:
|
|||||||
environment:
|
environment:
|
||||||
name: 'Development'
|
name: 'Development'
|
||||||
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
|
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifact from build job
|
- name: Download artifact from build job
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ jobs:
|
|||||||
name: node-app
|
name: node-app
|
||||||
|
|
||||||
- name: 'Deploy to Azure WebApp'
|
- name: 'Deploy to Azure WebApp'
|
||||||
id: deploy-to-webapp
|
id: deploy-to-webapp
|
||||||
uses: azure/webapps-deploy@v2
|
uses: azure/webapps-deploy@v2
|
||||||
with:
|
with:
|
||||||
app-name: ${{ env.AZURE_WEBAPP_NAME }}
|
app-name: ${{ env.AZURE_WEBAPP_NAME }}
|
||||||
|
|||||||
@@ -51,15 +51,15 @@ jobs:
|
|||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pip install -r requirements.txt
|
run: pip install -r requirements.txt
|
||||||
|
|
||||||
# Optional: Add step to run tests here (PyTest, Django test suites, etc.)
|
# Optional: Add step to run tests here (PyTest, Django test suites, etc.)
|
||||||
|
|
||||||
- name: Upload artifact for deployment jobs
|
- name: Upload artifact for deployment jobs
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: python-app
|
name: python-app
|
||||||
path: |
|
path: |
|
||||||
.
|
.
|
||||||
!venv/
|
!venv/
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
@@ -77,7 +77,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: python-app
|
name: python-app
|
||||||
path: .
|
path: .
|
||||||
|
|
||||||
- name: 'Deploy to Azure Web App'
|
- name: 'Deploy to Azure Web App'
|
||||||
id: deploy-to-webapp
|
id: deploy-to-webapp
|
||||||
uses: azure/webapps-deploy@v2
|
uses: azure/webapps-deploy@v2
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
#
|
#
|
||||||
# To configure this workflow:
|
# To configure this workflow:
|
||||||
#
|
#
|
||||||
# 1. Ensure that your repository contains the necessary configuration for your Tencent Kubernetes Engine cluster,
|
# 1. Ensure that your repository contains the necessary configuration for your Tencent Kubernetes Engine cluster,
|
||||||
# including deployment.yml, kustomization.yml, service.yml, etc.
|
# including deployment.yml, kustomization.yml, service.yml, etc.
|
||||||
#
|
#
|
||||||
# 2. Set up secrets in your workspace:
|
# 2. Set up secrets in your workspace:
|
||||||
# - TENCENT_CLOUD_SECRET_ID with Tencent Cloud secret id
|
# - TENCENT_CLOUD_SECRET_ID with Tencent Cloud secret id
|
||||||
# - TENCENT_CLOUD_SECRET_KEY with Tencent Cloud secret key
|
# - TENCENT_CLOUD_SECRET_KEY with Tencent Cloud secret key
|
||||||
# - TENCENT_CLOUD_ACCOUNT_ID with Tencent Cloud account id
|
# - TENCENT_CLOUD_ACCOUNT_ID with Tencent Cloud account id
|
||||||
# - TKE_REGISTRY_PASSWORD with TKE registry password
|
# - TKE_REGISTRY_PASSWORD with TKE registry password
|
||||||
#
|
#
|
||||||
@@ -38,10 +38,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
run: |
|
run: |
|
||||||
docker build -t ${TKE_IMAGE_URL}:${GITHUB_SHA} .
|
docker build -t ${TKE_IMAGE_URL}:${GITHUB_SHA} .
|
||||||
|
|
||||||
- name: Login TKE Registry
|
- name: Login TKE Registry
|
||||||
@@ -65,7 +65,7 @@ jobs:
|
|||||||
secret_key: ${{ secrets.TENCENT_CLOUD_SECRET_KEY }}
|
secret_key: ${{ secrets.TENCENT_CLOUD_SECRET_KEY }}
|
||||||
tke_region: ${{ env.TKE_REGION }}
|
tke_region: ${{ env.TKE_REGION }}
|
||||||
cluster_id: ${{ env.TKE_CLUSTER_ID }}
|
cluster_id: ${{ env.TKE_CLUSTER_ID }}
|
||||||
|
|
||||||
- name: Switch to TKE context
|
- name: Switch to TKE context
|
||||||
run: |
|
run: |
|
||||||
kubectl config use-context ${TKE_CLUSTER_ID}-context-default
|
kubectl config use-context ${TKE_CLUSTER_ID}-context-default
|
||||||
|
|||||||
Reference in New Issue
Block a user